Merge branch 'feature/ModelInitUpdate' into 'feature/develop_mvp_3'

added a public initializer

See merge request BPHV_MIPS/mvm_core_ui!868
This commit is contained in:
Pfeil, Scott Robert 2022-06-24 15:45:16 +00:00
commit 4efb675c79
48 changed files with 352 additions and 28 deletions

View File

@ -5,7 +5,7 @@
// Created by Suresh, Kamlesh on 7/9/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
@objcMembers public class ActionAlertModel: ActionModelProtocol {
//--------------------------------------------------
@ -17,4 +17,12 @@
public var alert: AlertModel
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(alert: AlertModel) {
self.alert = alert
}
}

View File

@ -7,6 +7,7 @@
//
import Foundation
import MVMCore
@objcMembers public class TagModel: MoleculeModelProtocol {
public static var identifier: String = "tag"
@ -27,6 +28,14 @@ import Foundation
}
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(label: LabelModel) {
self.label = label
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
label = try typeContainer.decode(LabelModel.self, forKey: .label)

View File

@ -7,6 +7,7 @@
//
import Foundation
import MVMCore
@objcMembers public class TagsModel: MoleculeModelProtocol {
public static var identifier: String = "tags"
@ -19,6 +20,14 @@ import Foundation
case tags
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with tags: [TagModel]) {
self.tags = tags
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
tags = try typeContainer.decode([TagModel].self, forKey: .tags)

View File

@ -38,6 +38,14 @@
public var displayFormat: String?
public var displayMask: String?
//--------------------------------------------------
// MARK: - Initializers
//--------------------------------------------------
public override init(with text: String){
super.init(with: text)
}
//--------------------------------------------------
// MARK: - Methods
//--------------------------------------------------

View File

@ -5,7 +5,7 @@
// Created by Lekshmi S on 07/09/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
open class HeartModel: MoleculeModelProtocol, EnableableModelProtocol {
@ -38,6 +38,11 @@ open class HeartModel: MoleculeModelProtocol, EnableableModelProtocol {
case readOnly
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init() { }
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -5,6 +5,7 @@
// Created by Dhamodaram Nandi on 31/03/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
@objcMembers public class RadioBoxModel: MoleculeModelProtocol, EnableableModelProtocol {
//--------------------------------------------------
@ -43,6 +44,14 @@
case readOnly
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(text: String) {
self.text = text
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -5,6 +5,7 @@
// Created by Dhamodaram Nandi on 31/03/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
@objcMembers public class RadioBoxesModel: MoleculeModelProtocol, FormFieldProtocol {
//--------------------------------------------------
@ -52,6 +53,14 @@
case groupName
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with boxes: [RadioBoxModel]){
self.boxes = boxes
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -5,7 +5,7 @@
// Created by Scott Pfeil on 4/17/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
@objcMembers public class RadioSwatchModel: MoleculeModelProtocol, EnableableModelProtocol {
//--------------------------------------------------
@ -42,6 +42,12 @@
case readOnly
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init() {}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -5,7 +5,7 @@
// Created by Lekshmi S on 31/03/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
@objcMembers public class RadioSwatchesModel: MoleculeModelProtocol, FormFieldProtocol {
//--------------------------------------------------
@ -50,6 +50,14 @@
case readOnly
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with swatches: [RadioSwatchModel]){
self.swatches = swatches
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -7,7 +7,7 @@
//
import Foundation
import MVMCore
@objcMembers public class CaretViewModel: MoleculeModelProtocol {
//--------------------------------------------------
@ -38,6 +38,12 @@ import Foundation
case inverted
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init() {}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -7,6 +7,7 @@
//
import Foundation
import MVMCore
public enum CheckboxPosition: String, Codable {
case center
@ -16,9 +17,19 @@ public enum CheckboxPosition: String, Codable {
@objcMembers public class CheckboxLabelModel: MoleculeModelProtocol {
public static var identifier: String = "checkboxLabel"
public var moleculeName: String
public var moleculeName: String = CheckboxLabelModel.identifier
public var backgroundColor: Color?
public var checkboxAlignment: CheckboxPosition?
public var checkbox: CheckboxModel
public var label: LabelModel
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(checkbox: CheckboxModel, label: LabelModel) {
self.checkbox = checkbox
self.label = label
}
}

View File

@ -7,7 +7,7 @@
//
import Foundation
import MVMCore
@objcMembers public class DashLineModel: MoleculeModelProtocol {
//--------------------------------------------------
@ -43,6 +43,12 @@ import Foundation
case isHidden
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init() {}
//--------------------------------------------------
// MARK: - codec
//--------------------------------------------------

View File

@ -18,6 +18,14 @@
var name: String?
var size: CGFloat?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public override init(_ location: Int, _ length: Int) {
super.init(location, length)
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------

View File

@ -18,6 +18,14 @@ class LabelAttributeImageModel: LabelAttributeModel {
var name: String?
var URL: String?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public override init(_ location: Int, _ length: Int) {
super.init(location, length)
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------

View File

@ -7,7 +7,7 @@
//
import Foundation
import MVMCore
open class LoadingSpinnerModel: MoleculeModelProtocol {
//--------------------------------------------------
@ -32,6 +32,12 @@ open class LoadingSpinnerModel: MoleculeModelProtocol {
case diameter
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init() {}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -5,6 +5,7 @@
// Created by Lekshmi S on 15/09/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
open class StarModel: MoleculeModelProtocol {
@ -30,6 +31,12 @@ open class StarModel: MoleculeModelProtocol {
case size
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init() {}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -5,6 +5,7 @@
// Created by Lekshmi S on 21/09/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
@objcMembers public class StarsModel: MoleculeModelProtocol {
@ -34,6 +35,14 @@
case size
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with stars: [StarModel]) {
self.stars = stars
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -14,7 +14,7 @@ open class VisibleBehaviorForVideoModel: PageBehaviorModelProtocol {
public var shouldAllowMultipleInstances: Bool = true
public weak var videoModel: VideoModel?
init(with videoModel: VideoModel) {
public init(with videoModel: VideoModel) {
self.videoModel = videoModel
}
}

View File

@ -7,6 +7,7 @@
//
import Foundation
import MVMCore
@objcMembers public class WebViewModel: MoleculeModelProtocol {
public static var identifier: String = "webview"
@ -30,6 +31,12 @@ import Foundation
case borderColor
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init() {}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)

View File

@ -23,7 +23,7 @@ public class ListThreeColumnInternationalDataDividerModel: ListItemModel, Molecu
// MARK: - Initializers
//------------------------------------------------------
public init (leftLabel: LabelModel, centerLabel: LabelModel, rightLabel: LabelModel) {
public init(leftLabel: LabelModel, centerLabel: LabelModel, rightLabel: LabelModel) {
self.leftLabel = leftLabel
self.centerLabel = centerLabel
self.rightLabel = rightLabel

View File

@ -14,6 +14,13 @@
public class override var identifier: String { "sectionHeader" }
public var line: LineModel?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public override init(with moleculeModel: MoleculeModelProtocol) {
super.init(with: moleculeModel)
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------

View File

@ -7,7 +7,7 @@
//
import Foundation
import MVMCore
@objcMembers public class RadioButtonLabelModel: MoleculeModelProtocol {
//--------------------------------------------------
@ -16,7 +16,17 @@ import Foundation
public static var identifier: String = "radioButtonLabel"
public var backgroundColor: Color?
public var moleculeName: String
public var moleculeName: String = RadioButtonLabelModel.identifier
public var radioButton: RadioButtonModel
public var label: LabelModel
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(radioButton: RadioButtonModel, label: LabelModel) {
self.radioButton = radioButton
self.label = label
}
}

View File

@ -42,6 +42,15 @@ class AccordionListItemModel: MoleculeListItemModel {
hideArrow = true
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with moleculeModel: MoleculeModelProtocol, molecules:[ListItemModelProtocol & MoleculeModelProtocol]) {
self.molecules = molecules
super.init(with: moleculeModel)
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------

View File

@ -14,4 +14,14 @@ public class ActionDetailWithImageModel: MoleculeModelProtocol {
public var backgroundColor: Color?
public var headlineBodyButton: HeadlineBodyButtonModel
public var image: ImageViewModel
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(headlineBodyButton: HeadlineBodyButtonModel, image: ImageViewModel) {
self.headlineBodyButton = headlineBodyButton
self.image = image
}
}

View File

@ -7,6 +7,7 @@
//
import UIKit
import MVMCore
public class CornerLabelsModel: ParentMoleculeModelProtocol {
public static var identifier: String = "cornerLabels"
@ -20,7 +21,7 @@ public class CornerLabelsModel: ParentMoleculeModelProtocol {
[molecule, topLeftLabel, topRightLabel, bottomLeftLabel, bottomRightLabel].compactMap { $0 }
}
init(with molecule: MoleculeModelProtocol?) {
public init(with molecule: MoleculeModelProtocol?) {
self.molecule = molecule
}

View File

@ -7,6 +7,7 @@
//
import Foundation
import MVMCore
public class LabelToggleModel: MoleculeModelProtocol {
public static var identifier: String = "labelToggle"
@ -15,7 +16,7 @@ public class LabelToggleModel: MoleculeModelProtocol {
public var label: LabelModel
public var toggle: ToggleModel
init(_ label: LabelModel, _ toggle: ToggleModel) {
public init(_ label: LabelModel, _ toggle: ToggleModel) {
self.label = label
self.toggle = toggle
}

View File

@ -22,7 +22,7 @@ public class BGImageHeadlineBodyButtonModel: ContainerModel, MoleculeModelProtoc
// MARK: - Initializer
//--------------------------------------------------
init(headlineBody: HeadlineBodyModel, image: ImageViewModel) {
public init(headlineBody: HeadlineBodyModel, image: ImageViewModel) {
self.headlineBody = headlineBody
self.image = image
super.init()

View File

@ -5,7 +5,7 @@
// Created by Scott Pfeil on 1/22/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
public class HeadlineBodyButtonModel: MoleculeModelProtocol {
//--------------------------------------------------
@ -20,6 +20,16 @@ public class HeadlineBodyButtonModel: MoleculeModelProtocol {
public var button: ButtonModel
public var buttonHeadlinePadding: CGFloat
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(headlineBody: HeadlineBodyModel, button: ButtonModel, buttonHeadlinePadding: CGFloat) {
self.headlineBody = headlineBody
self.button = button
self.buttonHeadlinePadding = buttonHeadlinePadding
}
//--------------------------------------------------
// MARK: - Method
//--------------------------------------------------

View File

@ -22,7 +22,7 @@ public class HeadlineBodyCaretLinkImageModel: ContainerModel, MoleculeModelProto
// MARK: - Initializer
//--------------------------------------------------
init(headlineBody: HeadlineBodyModel, image: ImageViewModel) {
public init(headlineBody: HeadlineBodyModel, image: ImageViewModel) {
self.headlineBody = headlineBody
self.image = image
super.init()

View File

@ -20,6 +20,15 @@ import Foundation
case list
case numberColor
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(numberColor: Color, molecules: [StackItemModelProtocol & MoleculeModelProtocol], axis: NSLayoutConstraint.Axis? = nil, spacing: CGFloat? = nil) {
self.numberColor = numberColor
super.init(molecules: molecules, axis: axis, spacing: spacing)
}
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
public required init(from decoder: Decoder) throws {

View File

@ -22,7 +22,17 @@ import Foundation
case bulletChar
case bulletColor
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(bulletChar: String, bulletColor: Color, molecules: [StackItemModelProtocol & MoleculeModelProtocol], axis: NSLayoutConstraint.Axis? = nil, spacing: CGFloat? = nil) {
self.bulletChar = bulletChar
self.bulletColor = bulletColor
super.init(molecules: molecules, axis: axis, spacing: spacing)
}
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
public required init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)

View File

@ -16,6 +16,14 @@
public var closeAction: ActionModelProtocol?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public override init(pageType: String, screenHeading: String?, molecules: [ListItemModelProtocol & MoleculeModelProtocol]) {
super.init(pageType: pageType, screenHeading: screenHeading, molecules: molecules)
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------

View File

@ -5,7 +5,7 @@
// Created by Scott Pfeil on 10/8/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import MVMCore
@objcMembers public class ModalSectionListTemplateModel: SectionListTemplateModel {
//--------------------------------------------------
@ -15,6 +15,14 @@
public override class var identifier: String { "modalSectionList" }
public var closeAction: ActionModelProtocol?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public override init(with sections: [SectionModel], pageType: String, molecules: [ListItemModelProtocol & MoleculeModelProtocol], screenHeading: String?) {
super.init(with: sections, pageType: pageType, molecules: molecules, screenHeading: screenHeading)
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------

View File

@ -15,6 +15,14 @@
public override class var identifier: String { "modalStack" }
public var closeAction: ActionModelProtocol?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public override init(pageType: String, moleculeStack: StackModel) {
super.init(pageType: pageType, moleculeStack: moleculeStack)
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
@ -24,7 +32,7 @@
}
//--------------------------------------------------
// MARK: - Init
// MARK: - Initializer
//--------------------------------------------------
required public init(from decoder: Decoder) throws {

View File

@ -19,6 +19,14 @@ public protocol SectionListHeaderFooterModel { }
public var footer: (SectionListHeaderFooterModel & MoleculeModelProtocol)?
public var rows: [ListItemModelProtocol & MoleculeModelProtocol]
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with rows: [ListItemModelProtocol & MoleculeModelProtocol]) {
self.rows = rows
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
@ -65,6 +73,15 @@ public protocol SectionListHeaderFooterModel { }
}
}
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with sections: [SectionModel], pageType: String, molecules: [ListItemModelProtocol & MoleculeModelProtocol], screenHeading: String? = nil) {
self.sections = sections
super.init(pageType: pageType, screenHeading: screenHeading, molecules: molecules)
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------

View File

@ -75,7 +75,7 @@ open class Container: View, ContainerProtocol {
self.view = view
}
convenience init(andContain view: UIView) {
public convenience init(andContain view: UIView) {
self.init()
addAndContain(view)
}

View File

@ -20,7 +20,11 @@ public class ClearFormFieldEffectModel: FormFieldEffectProtocol {
public var activatedRuleIds: [String]?
public var rules: [RulesProtocol]
init(_ fieldKey: String, activatedRuleIds: [String], rules: [RulesProtocol]) {
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(_ fieldKey: String, activatedRuleIds: [String], rules: [RulesProtocol]) {
self.fieldKey = fieldKey
self.activatedRuleIds = activatedRuleIds
self.rules = rules

View File

@ -18,8 +18,12 @@ public class DisableFormFieldEffectModel: FormFieldEffectProtocol {
public var fieldKey: String = ""
public var activatedRuleIds: [String]?
public var rules: [RulesProtocol]
init(_ fieldKey: String, _ activatedRuleIds: [String], _ rules: [RulesProtocol]) {
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(_ fieldKey: String, _ activatedRuleIds: [String], _ rules: [RulesProtocol]) {
self.fieldKey = fieldKey
self.activatedRuleIds = activatedRuleIds
self.rules = rules

View File

@ -19,7 +19,11 @@ public class DynamicRuleFormFieldEffectModel: FormFieldEffectProtocol {
public var activatedRuleIds: [String]?
public var rules: [RulesProtocol]
init(_ fieldKey: String, activatedRuleIds: [String], rules: [RulesProtocol]) {
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(_ fieldKey: String, activatedRuleIds: [String], rules: [RulesProtocol]) {
self.fieldKey = fieldKey
self.activatedRuleIds = activatedRuleIds
self.rules = rules

View File

@ -21,7 +21,11 @@ public class EnableFormFieldEffectModel: FormFieldEffectProtocol {
public var activatedRuleIds: [String]?
public var rules: [RulesProtocol]
init(_ fieldKey: String, activatedRuleIds: [String], rules: [RulesProtocol]) {
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(_ fieldKey: String, activatedRuleIds: [String], rules: [RulesProtocol]) {
self.fieldKey = fieldKey
self.activatedRuleIds = activatedRuleIds
self.rules = rules

View File

@ -18,8 +18,12 @@ public class HideFormFieldEffectModel: FormFieldEffectProtocol {
public var fieldKey: String = ""
public var activatedRuleIds: [String]?
public var rules: [RulesProtocol]
init(_ fieldKey: String, _ activatedRuleIds: [String], _ rules: [RulesProtocol]) {
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(_ fieldKey: String, _ activatedRuleIds: [String], _ rules: [RulesProtocol]) {
self.fieldKey = fieldKey
self.activatedRuleIds = activatedRuleIds
self.rules = rules

View File

@ -19,6 +19,14 @@ public class RuleAllValueChangedModel: RulesProtocol {
public var errorMessage: [String: String]?
public var fields: [String]
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(with fields: [String]) {
self.fields = fields
}
//--------------------------------------------------
// MARK: - Validation
//--------------------------------------------------

View File

@ -19,6 +19,14 @@ public class RuleAnyRequiredModel: RuleAnyModelProtocol {
public var fields: [String]
public var errorMessage: [String: String]?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(fields: [String]) {
self.fields = fields
}
//--------------------------------------------------
// MARK: - Methods
//--------------------------------------------------

View File

@ -19,6 +19,14 @@ public class RuleAnyValueChangedModel: RuleAnyModelProtocol {
public var errorMessage: [String: String]?
public var fields: [String]
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(fields: [String]) {
self.fields = fields
}
//--------------------------------------------------
// MARK: - Validation
//--------------------------------------------------

View File

@ -20,6 +20,14 @@ public class RuleEqualsIgnoreCaseModel: RuleCompareModelProtocol {
public var fields: [String]
public var errorMessage: [String: String]?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(fields: [String]) {
self.fields = fields
}
//--------------------------------------------------
// MARK: - Validation
//--------------------------------------------------

View File

@ -19,6 +19,14 @@ public class RuleEqualsModel: RuleCompareModelProtocol {
public var fields: [String]
public var errorMessage: [String: String]?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(fields: [String]) {
self.fields = fields
}
//--------------------------------------------------
// MARK: - Validation
//--------------------------------------------------

View File

@ -18,6 +18,15 @@ public class RuleRegexModel: RulesProtocol {
public var regex: String
public var errorMessage: [String: String]?
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(fields: [String], regex: String) {
self.fields = fields
self.regex = regex
}
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------

View File

@ -20,6 +20,14 @@ public class RuleRequiredModel: RulesProtocol {
public var errorMessage: [String: String]?
public var fields: [String]
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(fields: [String]) {
self.fields = fields
}
//--------------------------------------------------
// MARK: - Validation
//--------------------------------------------------