/* Options: Date: 2026-05-19 09:52:55 SwiftVersion: 5.0 Version: 8.22 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://dev-api-booster.richemont.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: GetPosBrand.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/security/pos", "GET") public class GetPosBrand : IReturn, IPagedRequest, Codable { public typealias Return = GetPosBrandResponse /** * Brand Trigram */ // @ApiMember(Description="Brand Trigram", IsRequired=true) public var brand:String /** * Mnemonic Code to Check */ // @ApiMember(Description="Mnemonic Code to Check") public var mnemonicCode:String /** * Business Unit Code */ // @ApiMember(Description="Business Unit Code") public var buCode:String /** * Index of the result set returned */ // @ApiMember(Description="Index of the result set returned", IsRequired=true) public var page:Int /** * Size of the result set returned */ // @ApiMember(Description="Size of the result set returned", IsRequired=true) public var items:Int /** * Omit precise record count - save on performance */ // @ApiMember(Description="Omit precise record count - save on performance") public var noCount:Bool /** * Sorting expression */ // @ApiMember(Description="Sorting expression") public var sortBy:String required public init(){} } public class GetPosBrandResponse : Codable { /** * Index of the result set returnedr */ // @ApiMember(Description="Index of the result set returnedr", IsRequired=true) public var page:Int /** * Size of the result set returned */ // @ApiMember(Description="Size of the result set returned", IsRequired=true) public var items:Int /** * Total amount of pages / result sets */ // @ApiMember(Description="Total amount of pages / result sets", IsRequired=true) public var totalPages:Int /** * Total amount of results */ // @ApiMember(Description="Total amount of results", IsRequired=true) public var totalResults:Int /** * List of Users */ // @ApiMember(Description="List of Users", IsRequired=true) public var elements:[PosBrand] = [] required public init(){} } public protocol IPagedRequest { var page:Int { get set } var items:Int { get set } var noCount:Bool { get set } var sortBy:String { get set } } public class Scope : Codable { /** * Scope Code - combination of BU / Brand */ // @ApiMember(Description="Scope Code - combination of BU / Brand", IsRequired=true) public var scopeCode:String /** * Business Unit Code */ // @ApiMember(Description="Business Unit Code", IsRequired=true) public var buCode:String /** * Brand Trigram */ // @ApiMember(Description="Brand Trigram", IsRequired=true) public var brand:String /** * Description of the combination */ // @ApiMember(Description="Description of the combination", IsRequired=true) public var Description:String required public init(){} } public class PosBrand : Scope { /** * Pos code */ // @ApiMember(Description="Pos code", IsRequired=true) public var posCode:String /** * Pos name */ // @ApiMember(Description="Pos name", IsRequired=true) public var name:String /** * Pos city */ // @ApiMember(Description="Pos city", IsRequired=true) public var city:String /** * Pos address */ // @ApiMember(Description="Pos address", IsRequired=true) public var address:String /** * Pos country */ // @ApiMember(Description="Pos country", IsRequired=true) public var country:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case posCode case name case city case address case country } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) posCode = try container.decodeIfPresent(String.self, forKey: .posCode) name = try container.decodeIfPresent(String.self, forKey: .name) city = try container.decodeIfPresent(String.self, forKey: .city) address = try container.decodeIfPresent(String.self, forKey: .address) country = try container.decodeIfPresent(String.self, forKey: .country) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if posCode != nil { try container.encode(posCode, forKey: .posCode) } if name != nil { try container.encode(name, forKey: .name) } if city != nil { try container.encode(city, forKey: .city) } if address != nil { try container.encode(address, forKey: .address) } if country != nil { try container.encode(country, forKey: .country) } } }