/* Options: Date: 2025-12-06 06:21:52 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: TakeMeHomeRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/pickmeup/takemehome", "POST") public class TakeMeHomeRequest : PickMeUpActivationRequest, IReturn { public typealias Return = PickMeUpResponse 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) } } public class PickMeUpResponse : 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 /** * This indicates that the pickup location is outside of the service area of the service provider. */ // @ApiMember(Description="This indicates that the pickup location is outside of the service area of the service provider.") public var pickupOutOfBounds:Bool /** * This indicates that the dropoff location is outside of the service area of the service provider. */ // @ApiMember(Description="This indicates that the dropoff location is outside of the service area of the service provider.") public var dropoffOutOfBounds:Bool /** * This indicates that the pickup time is not far enough in the future. The time needs to be at least 60 minutes in the future, or 90 minutes during peak times. See the documentation for more details. */ // @ApiMember(Description="This indicates that the pickup time is not far enough in the future. The time needs to be at least 60 minutes in the future, or 90 minutes during peak times. See the documentation for more details.") public var pickupTooSoon:Bool /** * 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 /** * Error message from service provider. */ // @ApiMember(Description="Error message from service provider.") public var errorMessage:String /** * Error code from service provider. */ // @ApiMember(Description="Error code from service provider.") public var errorCode:Int required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case productAvailable case userHasAccess case pickupOutOfBounds case dropoffOutOfBounds case pickupTooSoon case referenceNumber case errorMessage case errorCode } 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) pickupOutOfBounds = try container.decodeIfPresent(Bool.self, forKey: .pickupOutOfBounds) dropoffOutOfBounds = try container.decodeIfPresent(Bool.self, forKey: .dropoffOutOfBounds) pickupTooSoon = try container.decodeIfPresent(Bool.self, forKey: .pickupTooSoon) referenceNumber = try container.decodeIfPresent(String.self, forKey: .referenceNumber) errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) errorCode = try container.decodeIfPresent(Int.self, forKey: .errorCode) } 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 pickupOutOfBounds != nil { try container.encode(pickupOutOfBounds, forKey: .pickupOutOfBounds) } if dropoffOutOfBounds != nil { try container.encode(dropoffOutOfBounds, forKey: .dropoffOutOfBounds) } if pickupTooSoon != nil { try container.encode(pickupTooSoon, forKey: .pickupTooSoon) } if referenceNumber != nil { try container.encode(referenceNumber, forKey: .referenceNumber) } if errorMessage != nil { try container.encode(errorMessage, forKey: .errorMessage) } if errorCode != nil { try container.encode(errorCode, forKey: .errorCode) } } } 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 PickMeUpActivationRequest : ApiServiceRequest { /** * ID Number of the user making this request. */ // @ApiMember(Description="ID Number of the user making this request.", IsRequired=true) public var idNumber:String /** * The number of people to be picked up. */ // @ApiMember(Description="The number of people to be picked up.", IsRequired=true) public var passengerCount:Int /** * Date and Time of the pickup in ISO 8601 format. */ // @ApiMember(Description="Date and Time of the pickup in ISO 8601 format.", IsRequired=true) public var bookingDate: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 location details of where the clients are to be picked up. */ // @ApiMember(DataType="BookingLocation", 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(DataType="BookingLocation", Description="The location details of where the clients are to be dropped off.", IsRequired=true) public var dropoffLocation:BookingLocation required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case idNumber case passengerCount case bookingDate case contactName case contactNumber case pickupLocation case dropoffLocation } 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) passengerCount = try container.decodeIfPresent(Int.self, forKey: .passengerCount) bookingDate = try container.decodeIfPresent(String.self, forKey: .bookingDate) contactName = try container.decodeIfPresent(String.self, forKey: .contactName) contactNumber = try container.decodeIfPresent(String.self, forKey: .contactNumber) pickupLocation = try container.decodeIfPresent(BookingLocation.self, forKey: .pickupLocation) dropoffLocation = try container.decodeIfPresent(BookingLocation.self, forKey: .dropoffLocation) } 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) } if passengerCount != nil { try container.encode(passengerCount, forKey: .passengerCount) } if bookingDate != nil { try container.encode(bookingDate, forKey: .bookingDate) } if contactName != nil { try container.encode(contactName, forKey: .contactName) } if contactNumber != nil { try container.encode(contactNumber, forKey: .contactNumber) } if pickupLocation != nil { try container.encode(pickupLocation, forKey: .pickupLocation) } if dropoffLocation != nil { try container.encode(dropoffLocation, forKey: .dropoffLocation) } } } 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(){} }