/* Options: Date: 2025-12-06 06:19:31 SwiftVersion: 5.0 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://galaxymobile.api.client.prod.86degrees.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: PickMeUpHistoryRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/pickmeup/history", "GET, POST") public class PickMeUpHistoryRequest : ApiServiceRequest, IReturn { public typealias Return = PickMeUpHistoryResponse /** * ID Number of the user's history to retrieve. */ // @ApiMember(Description="ID Number of the user's history to retrieve.", IsRequired=true) public var idNumber:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case idNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) idNumber = try container.decodeIfPresent(String.self, forKey: .idNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if idNumber != nil { try container.encode(idNumber, forKey: .idNumber) } } } public class PickMeUpHistoryResponse : ApiServiceResponse { /** * Is the requested product set up and enabled on Galaxy. */ // @ApiMember(Description="Is the requested product set up and enabled on Galaxy.") public var productAvailable:Bool /** * Does the user have access to this product, based on their Galaxy profile. */ // @ApiMember(Description="Does the user have access to this product, based on their Galaxy profile.") public var userHasAccess:Bool /** * List of booking history items for the Pick Me Up service. */ // @ApiMember(Description="List of booking history items for the Pick Me Up service.") public var pickMeUpHistory:[PickMeUpBookingItem] = [] /** * List of booking history items for the Take Me Home service. */ // @ApiMember(Description="List of booking history items for the Take Me Home service.") public var takeMeHomeHistory:[PickMeUpBookingItem] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case productAvailable case userHasAccess case pickMeUpHistory case takeMeHomeHistory } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) productAvailable = try container.decodeIfPresent(Bool.self, forKey: .productAvailable) userHasAccess = try container.decodeIfPresent(Bool.self, forKey: .userHasAccess) pickMeUpHistory = try container.decodeIfPresent([PickMeUpBookingItem].self, forKey: .pickMeUpHistory) ?? [] takeMeHomeHistory = try container.decodeIfPresent([PickMeUpBookingItem].self, forKey: .takeMeHomeHistory) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if productAvailable != nil { try container.encode(productAvailable, forKey: .productAvailable) } if userHasAccess != nil { try container.encode(userHasAccess, forKey: .userHasAccess) } if pickMeUpHistory.count > 0 { try container.encode(pickMeUpHistory, forKey: .pickMeUpHistory) } if takeMeHomeHistory.count > 0 { try container.encode(takeMeHomeHistory, forKey: .takeMeHomeHistory) } } } public class ApiServiceRequest : IServiceRequest, IHasApiKey, Codable { /** * The API Key required for authentication */ // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true) public var apiKey:String required public init(){} } public protocol IServiceRequest { } public protocol IHasApiKey { var apiKey:String { get set } } public class BookingLocation : Codable { /** * Latitude of the pickup/drop-off location. */ // @ApiMember(Description="Latitude of the pickup/drop-off location.", IsRequired=true) public var latitude:Double /** * Longitude of the pickup/drop-off location. */ // @ApiMember(Description="Longitude of the pickup/drop-off location.", IsRequired=true) public var longitude:Double /** * Address of the pickup/drop-off location. */ // @ApiMember(Description="Address of the pickup/drop-off location.", IsRequired=true) public var address:String required public init(){} } public class PickMeUpBookingItem : Codable { /** * Date and Time of the pickup in ISO 8601 format. */ // @ApiMember(Description="Date and Time of the pickup in ISO 8601 format.") public var bookingTime:String /** * The booking reference number returned by the service provider. To be shown to the client. */ // @ApiMember(Description="The booking reference number returned by the service provider. To be shown to the client.") public var referenceNumber:String /** * Date and Time the booking request was made in ISO 8601 format. */ // @ApiMember(Description="Date and Time the booking request was made in ISO 8601 format.") public var dateCreated:String /** * Status of the booking as returned by the service provider. */ // @ApiMember(Description="Status of the booking as returned by the service provider.") public var status:String /** * Name of contact person at pickup. */ // @ApiMember(Description="Name of contact person at pickup.", IsRequired=true) public var contactName:String /** * Contact number of contact person at pickup. */ // @ApiMember(Description="Contact number of contact person at pickup.", IsRequired=true) public var contactNumber:String /** * The number of people to be picked up. */ // @ApiMember(Description="The number of people to be picked up.", IsRequired=true) public var passengerCount:String /** * The location details of where the clients are to be picked up. */ // @ApiMember(Description="The location details of where the clients are to be picked up.", IsRequired=true) public var pickupLocation:BookingLocation /** * The location details of where the clients are to be dropped off. */ // @ApiMember(Description="The location details of where the clients are to be dropped off.", IsRequired=true) public var dropoffLocation:BookingLocation required public init(){} } public class ApiServiceResponse : IServiceResponse, Codable { public var Description:String public var heading:String public var wasSuccessful:Bool //modelState:Object ignored. Type could not be extended in Swift required public init(){} }