/* Options: Date: 2026-10-01 10:23:07 SwiftVersion: 5.0 Version: 6.10 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://stubbur-app.azurewebsites.net //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: SelfServiceAvailableSeatsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/selfService/transferTicket/availableSeats", "POST") public class SelfServiceAvailableSeatsRequest : IReturn, Codable { public typealias Return = SelfServiceAvailableSeatsResult public var ticketTokenId:String? public var buyerPhone:String? public var toEventId:Int? public var toOwnerTicketTypeId:Int? public var toSeriesTicketTypeId:Int? required public init(){} } public class SelfServiceAvailableSeatsResult : SelfServiceTransferResultBase { public var toEventId:Int? public var toTicketTypeName:String? public var assignedSeatId:Int? public var assignedSeatLabel:String? public var sections:[SelfServiceSeatSection] = [] public var totalSeats:Int? public var selectableSeats:Int? public var truncated:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case toEventId case toTicketTypeName case assignedSeatId case assignedSeatLabel case sections case totalSeats case selectableSeats case truncated } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) toEventId = try container.decodeIfPresent(Int.self, forKey: .toEventId) toTicketTypeName = try container.decodeIfPresent(String.self, forKey: .toTicketTypeName) assignedSeatId = try container.decodeIfPresent(Int.self, forKey: .assignedSeatId) assignedSeatLabel = try container.decodeIfPresent(String.self, forKey: .assignedSeatLabel) sections = try container.decodeIfPresent([SelfServiceSeatSection].self, forKey: .sections) ?? [] totalSeats = try container.decodeIfPresent(Int.self, forKey: .totalSeats) selectableSeats = try container.decodeIfPresent(Int.self, forKey: .selectableSeats) truncated = try container.decodeIfPresent(Bool.self, forKey: .truncated) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if toEventId != nil { try container.encode(toEventId, forKey: .toEventId) } if toTicketTypeName != nil { try container.encode(toTicketTypeName, forKey: .toTicketTypeName) } if assignedSeatId != nil { try container.encode(assignedSeatId, forKey: .assignedSeatId) } if assignedSeatLabel != nil { try container.encode(assignedSeatLabel, forKey: .assignedSeatLabel) } if sections.count > 0 { try container.encode(sections, forKey: .sections) } if totalSeats != nil { try container.encode(totalSeats, forKey: .totalSeats) } if selectableSeats != nil { try container.encode(selectableSeats, forKey: .selectableSeats) } if truncated != nil { try container.encode(truncated, forKey: .truncated) } } } public class SelfServiceTransferResultBase : Codable { public var ok:Bool? public var statusCode:Int? public var code:String? public var message:String? required public init(){} } public class SelfServiceSeatSection : Codable { public var sectionId:Int? public var sectionName:String? public var positionX:Double? public var positionY:Double? public var rotation:Double? public var viewType:String? public var seats:[SelfServiceSeatOption] = [] required public init(){} } public class SelfServiceSeatOption : Codable { public var seatId:Int? public var seatName:String? public var label:String? public var status:String? public var isSeat:Bool? public var selectable:Bool? public var positionX:Double? public var positionY:Double? public var rotation:Double? public var sortOrder:Double? public var rowId:Int? public var rowName:String? required public init(){} }