/* Options: Date: 2025-12-06 06:21:06 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: PulsitModuleTripHistoryRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/pulsit/moduletriphistory", "GET") public class PulsitModuleTripHistoryRequest : ApiServiceRequest, IReturn { public typealias Return = PulsitModuleTripHistoryResponse public var pulsitModuleId:String public var startDate:String public var endDate:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case pulsitModuleId case startDate case endDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) pulsitModuleId = try container.decodeIfPresent(String.self, forKey: .pulsitModuleId) startDate = try container.decodeIfPresent(String.self, forKey: .startDate) endDate = try container.decodeIfPresent(String.self, forKey: .endDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if pulsitModuleId != nil { try container.encode(pulsitModuleId, forKey: .pulsitModuleId) } if startDate != nil { try container.encode(startDate, forKey: .startDate) } if endDate != nil { try container.encode(endDate, forKey: .endDate) } } } public class PulsitModuleTripHistoryResponse : ApiServiceResponse { public var trips:[PulsitTripHistoryItem] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case trips } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) trips = try container.decodeIfPresent([PulsitTripHistoryItem].self, forKey: .trips) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if trips.count > 0 { try container.encode(trips, forKey: .trips) } } } 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 PulsitTripHistoryItem : Codable { public var tripNumber:String public var startPulsitId:String public var startEventTime:Date public var startLatitude:Double public var startLongitude:Double public var startAddress:String public var stopPulsitId:String public var stopEventTime:Date public var stopLatitude:Double public var stopLongitude:Double public var stopAddress:String public var tripMinutes:Double 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(){} }