Preference
public struct Preference : Codable, Equatable
extension Preference: UpdateProfileChallengeAttribute
Struct representing Preference related values.
-
Value representing the entity id.
Declaration
Swift
public var id: Int -
The name of preference.
Declaration
Swift
public var name: String -
The label of preference.
Declaration
Swift
public var label: String -
The description of preference.
Declaration
Swift
public var desc: String -
The list of domains.
Declaration
Swift
public var domains: [String] -
The list of domains with details.
Declaration
Swift
public var detailedDomains: [Preference.Domain] -
The list of domains selected by the user.
Declaration
Swift
public var selectedDomain: [String] -
The list of domains selected by the user.
Declaration
Swift
public var userDomains: [String] -
The list of domains added by the user.
Declaration
Swift
public var addedDomains: [String] -
Indicates if domains are unbounded or not.
Declaration
Swift
public var isUnbounded: Bool -
Indicates if domain to be selected is one or many.
Declaration
Swift
public var isMultiSelect: Bool -
Indicates whether the preference has only “yes” and “no” options
Declaration
Swift
public var isToggle: Bool { get } -
Indicates
domainscontain “no”Declaration
Swift
public var hasNoOption: Bool { get } -
Indicates
domainscontain “yes”Declaration
Swift
public var hasYesOption: Bool { get } -
Indicates if
selectedDomainscontain “yes”Declaration
Swift
public var hasSelectedYes: Bool { get } -
init(id:name: label: desc: domains: detailedDomains: selectedDomain: userDomains: addedDomains: isUnbounded: isMultiSelect: ) Undocumented
Declaration
Swift
public init(id: Int, name: String, label: String, desc: String, domains: [String], detailedDomains: [Preference.Domain], selectedDomain: [String], userDomains: [String], addedDomains: [String], isUnbounded: Bool, isMultiSelect: Bool) -
Struct representing Preference Domain related values.
See moreDeclaration
Swift
public struct Domain : Codable, Equatable -
Checks if a given domain is contained in the
selectedDomainsordomainsDeclaration
Swift
public func checkIfDomainsContain(string: String, isSelected: Bool) -> Bool -
Checks if a given domain is contained in the
selectedDomainsDeclaration
Swift
public func hasSelected(domain: String) -> Bool -
Checks if a given domain is contained in the
userDomainsDeclaration
Swift
public func isDomainUserDefined(_ domain: String) -> Bool -
Add/removes domain in
selectedDomainsDeclaration
Swift
public mutating func toggleSelectionFor(domain: String) -
Adds the given domain in the
domainsanduserDomainsDeclaration
Swift
public mutating func addUserDomain(_ domain: String) -
Removes the given domain in the
domains,userDomainsandselectedDomainDeclaration
Swift
public mutating func removeUserDomain(_ domain: String) -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Declaration
Swift
public init(from decoder: Decoder) throws
View on GitHub
Preference Structure Reference