/* Options: Date: 2025-03-15 05:18:39 SwiftVersion: 5.0 Version: 8.30 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.sanctionssearch.com/v2 //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: GetEulaStatus.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/account/eula", "GET") // @DataContract public class GetEulaStatus : BaseRequest, IReturn { public typealias Return = GetEulaStatusResponse /** * If this is specified, the information will be for the specified sub user, otherwise it will be for the main user account */ // @DataMember // @ApiMember(Description="If this is specified, the information will be for the specified sub user, otherwise it will be for the main user account") public var subUserName:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case subUserName } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) subUserName = try container.decodeIfPresent(String.self, forKey: .subUserName) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if subUserName != nil { try container.encode(subUserName, forKey: .subUserName) } } } // @DataContract public class GetEulaStatusResponse : Codable { // @DataMember public var data:GetEulaStatusData required public init(){} } // @DataContract public class Authentication : Codable { /** * The API User ID provided by us when you signed up to use our API */ // @DataMember // @ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body") public var apiUserId:String /** * The API User Key provided by us when you signed up to use our API */ // @DataMember // @ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body") public var apiUserKey:String required public init(){} } // @DataContract public class BaseRequest : IBaseRequest, Codable { /** * The authentication credentials */ // @DataMember // @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body") public var authentication:Authentication required public init(){} } public protocol IBaseRequest { var authentication:Authentication { get set } } public class GetEulaStatusData : BaseResponse { public var termsAndConditions:String public var privacyPolicy:String public var agreeToContact:Bool public var agreeToContactInfo:String public var agreeToContactDate:Date? public var agreeToTerms:Bool public var agreeToTermsInfo:String public var agreeToTermsDate:Date? public var agreeToDataProtection:Bool public var agreeToDataProtectionInfo:String public var agreeToDataProtectionDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case termsAndConditions case privacyPolicy case agreeToContact case agreeToContactInfo case agreeToContactDate case agreeToTerms case agreeToTermsInfo case agreeToTermsDate case agreeToDataProtection case agreeToDataProtectionInfo case agreeToDataProtectionDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) termsAndConditions = try container.decodeIfPresent(String.self, forKey: .termsAndConditions) privacyPolicy = try container.decodeIfPresent(String.self, forKey: .privacyPolicy) agreeToContact = try container.decodeIfPresent(Bool.self, forKey: .agreeToContact) agreeToContactInfo = try container.decodeIfPresent(String.self, forKey: .agreeToContactInfo) agreeToContactDate = try container.decodeIfPresent(Date.self, forKey: .agreeToContactDate) agreeToTerms = try container.decodeIfPresent(Bool.self, forKey: .agreeToTerms) agreeToTermsInfo = try container.decodeIfPresent(String.self, forKey: .agreeToTermsInfo) agreeToTermsDate = try container.decodeIfPresent(Date.self, forKey: .agreeToTermsDate) agreeToDataProtection = try container.decodeIfPresent(Bool.self, forKey: .agreeToDataProtection) agreeToDataProtectionInfo = try container.decodeIfPresent(String.self, forKey: .agreeToDataProtectionInfo) agreeToDataProtectionDate = try container.decodeIfPresent(Date.self, forKey: .agreeToDataProtectionDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if termsAndConditions != nil { try container.encode(termsAndConditions, forKey: .termsAndConditions) } if privacyPolicy != nil { try container.encode(privacyPolicy, forKey: .privacyPolicy) } if agreeToContact != nil { try container.encode(agreeToContact, forKey: .agreeToContact) } if agreeToContactInfo != nil { try container.encode(agreeToContactInfo, forKey: .agreeToContactInfo) } if agreeToContactDate != nil { try container.encode(agreeToContactDate, forKey: .agreeToContactDate) } if agreeToTerms != nil { try container.encode(agreeToTerms, forKey: .agreeToTerms) } if agreeToTermsInfo != nil { try container.encode(agreeToTermsInfo, forKey: .agreeToTermsInfo) } if agreeToTermsDate != nil { try container.encode(agreeToTermsDate, forKey: .agreeToTermsDate) } if agreeToDataProtection != nil { try container.encode(agreeToDataProtection, forKey: .agreeToDataProtection) } if agreeToDataProtectionInfo != nil { try container.encode(agreeToDataProtectionInfo, forKey: .agreeToDataProtectionInfo) } if agreeToDataProtectionDate != nil { try container.encode(agreeToDataProtectionDate, forKey: .agreeToDataProtectionDate) } } } public class BaseResponse : IBaseDataResponse, IHasResponseStatus, Codable { /** * The status of the response */ // @ApiMember(Description="The status of the response") public var responseStatus:ResponseStatus required public init(){} } public protocol IBaseDataResponse { var responseStatus:ResponseStatus { get set } } public protocol IHasResponseStatus { var responseStatus:ResponseStatus { get set } } public class ArrayOfResponseError : List { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } }