/* Options: Date: 2025-05-05 18:46:06 SwiftVersion: 6.0 Version: 8.61 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://prod-api-agency-orch-mb-dhc.rapp-customers.co.uk //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: UpdateBackOrderVehicleImportsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/v1/backorder/vehicleimports", "POST") // @ApiResponse(Description="Success", StatusCode=200) // @ApiResponse(Description="BadRequest", StatusCode=400) public class UpdateBackOrderVehicleImportsRequest : IReturn, IPost, Codable { public typealias Return = UpdateBackOrderVehicleImportsResponse public var vehicleImports:[VehicleImport] = [] required public init(){} } public class UpdateBackOrderVehicleImportsResponse : Codable { required public init(){} } public class Vehicle : Codable { public var vin:String? required public init(){} } public class VehicleImport : Vehicle { public var commissionNumber:String? public var sellable:Bool? public var vehicle:VehicleDetail? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case commissionNumber case sellable case vehicle } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) commissionNumber = try container.decodeIfPresent(String.self, forKey: .commissionNumber) sellable = try container.decodeIfPresent(Bool.self, forKey: .sellable) vehicle = try container.decodeIfPresent(VehicleDetail.self, forKey: .vehicle) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if commissionNumber != nil { try container.encode(commissionNumber, forKey: .commissionNumber) } if sellable != nil { try container.encode(sellable, forKey: .sellable) } if vehicle != nil { try container.encode(vehicle, forKey: .vehicle) } } } public class VehicleDetail : VehicleBaseDetail { public var retailPrice_ExVAT:String? public var otr:String? public var actualPrice:String? public var totalOfferValue:String? public var isHOBackOrderAccountVehicle:Bool? public var consumptionCombined:VehicleConsumption? public var consumptionExtraUrban:VehicleConsumption? public var consumptionUrban:VehicleConsumption? public var wltpFuelConsumptionCombined:VehicleConsumption? public var wltpFuelConsumptionExtraHigh:VehicleConsumption? public var wltpFuelConsumptionHigh:VehicleConsumption? public var wltpFuelConsumptionLow:VehicleConsumption? public var wltpFuelConsumptionMedium:VehicleConsumption? public var equipmentCategories:[VehicleEquipmentCategory]? public var vehicleEnergyEfficiencyClass:VehicleEmissionClass? public var vehicleData:[VehicleAttribute]? public var integratedProducts:[VehicleIntegratedServiceCareOption] = [] public var ispVehicleCustomerDescriptions:[String]? public var colourCode:String? public var upholsteryCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case retailPrice_ExVAT case otr case actualPrice case totalOfferValue case isHOBackOrderAccountVehicle case consumptionCombined case consumptionExtraUrban case consumptionUrban case wltpFuelConsumptionCombined case wltpFuelConsumptionExtraHigh case wltpFuelConsumptionHigh case wltpFuelConsumptionLow case wltpFuelConsumptionMedium case equipmentCategories case vehicleEnergyEfficiencyClass case vehicleData case integratedProducts case ispVehicleCustomerDescriptions case colourCode case upholsteryCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) retailPrice_ExVAT = try container.decodeIfPresent(String.self, forKey: .retailPrice_ExVAT) otr = try container.decodeIfPresent(String.self, forKey: .otr) actualPrice = try container.decodeIfPresent(String.self, forKey: .actualPrice) totalOfferValue = try container.decodeIfPresent(String.self, forKey: .totalOfferValue) isHOBackOrderAccountVehicle = try container.decodeIfPresent(Bool.self, forKey: .isHOBackOrderAccountVehicle) consumptionCombined = try container.decodeIfPresent(VehicleConsumption.self, forKey: .consumptionCombined) consumptionExtraUrban = try container.decodeIfPresent(VehicleConsumption.self, forKey: .consumptionExtraUrban) consumptionUrban = try container.decodeIfPresent(VehicleConsumption.self, forKey: .consumptionUrban) wltpFuelConsumptionCombined = try container.decodeIfPresent(VehicleConsumption.self, forKey: .wltpFuelConsumptionCombined) wltpFuelConsumptionExtraHigh = try container.decodeIfPresent(VehicleConsumption.self, forKey: .wltpFuelConsumptionExtraHigh) wltpFuelConsumptionHigh = try container.decodeIfPresent(VehicleConsumption.self, forKey: .wltpFuelConsumptionHigh) wltpFuelConsumptionLow = try container.decodeIfPresent(VehicleConsumption.self, forKey: .wltpFuelConsumptionLow) wltpFuelConsumptionMedium = try container.decodeIfPresent(VehicleConsumption.self, forKey: .wltpFuelConsumptionMedium) equipmentCategories = try container.decodeIfPresent([VehicleEquipmentCategory].self, forKey: .equipmentCategories) ?? [] vehicleEnergyEfficiencyClass = try container.decodeIfPresent(VehicleEmissionClass.self, forKey: .vehicleEnergyEfficiencyClass) vehicleData = try container.decodeIfPresent([VehicleAttribute].self, forKey: .vehicleData) ?? [] integratedProducts = try container.decodeIfPresent([VehicleIntegratedServiceCareOption].self, forKey: .integratedProducts) ?? [] ispVehicleCustomerDescriptions = try container.decodeIfPresent([String].self, forKey: .ispVehicleCustomerDescriptions) ?? [] colourCode = try container.decodeIfPresent(String.self, forKey: .colourCode) upholsteryCode = try container.decodeIfPresent(String.self, forKey: .upholsteryCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if retailPrice_ExVAT != nil { try container.encode(retailPrice_ExVAT, forKey: .retailPrice_ExVAT) } if otr != nil { try container.encode(otr, forKey: .otr) } if actualPrice != nil { try container.encode(actualPrice, forKey: .actualPrice) } if totalOfferValue != nil { try container.encode(totalOfferValue, forKey: .totalOfferValue) } if isHOBackOrderAccountVehicle != nil { try container.encode(isHOBackOrderAccountVehicle, forKey: .isHOBackOrderAccountVehicle) } if consumptionCombined != nil { try container.encode(consumptionCombined, forKey: .consumptionCombined) } if consumptionExtraUrban != nil { try container.encode(consumptionExtraUrban, forKey: .consumptionExtraUrban) } if consumptionUrban != nil { try container.encode(consumptionUrban, forKey: .consumptionUrban) } if wltpFuelConsumptionCombined != nil { try container.encode(wltpFuelConsumptionCombined, forKey: .wltpFuelConsumptionCombined) } if wltpFuelConsumptionExtraHigh != nil { try container.encode(wltpFuelConsumptionExtraHigh, forKey: .wltpFuelConsumptionExtraHigh) } if wltpFuelConsumptionHigh != nil { try container.encode(wltpFuelConsumptionHigh, forKey: .wltpFuelConsumptionHigh) } if wltpFuelConsumptionLow != nil { try container.encode(wltpFuelConsumptionLow, forKey: .wltpFuelConsumptionLow) } if wltpFuelConsumptionMedium != nil { try container.encode(wltpFuelConsumptionMedium, forKey: .wltpFuelConsumptionMedium) } if equipmentCategories != nil { try container.encode(equipmentCategories, forKey: .equipmentCategories) } if vehicleEnergyEfficiencyClass != nil { try container.encode(vehicleEnergyEfficiencyClass, forKey: .vehicleEnergyEfficiencyClass) } if vehicleData != nil { try container.encode(vehicleData, forKey: .vehicleData) } if integratedProducts.count > 0 { try container.encode(integratedProducts, forKey: .integratedProducts) } if ispVehicleCustomerDescriptions != nil { try container.encode(ispVehicleCustomerDescriptions, forKey: .ispVehicleCustomerDescriptions) } if colourCode != nil { try container.encode(colourCode, forKey: .colourCode) } if upholsteryCode != nil { try container.encode(upholsteryCode, forKey: .upholsteryCode) } } } public class Retailer : Codable { public var id:Int? public var gssnId:String? public var Description:String? public var street:String? public var city:String? public var postcode:String? public var googleMapPostcode:String? public var phone:String? public var fax:String? public var email:String? public var website:String? public var retailerGroupId:String? public var retailerGroupName:String? public var isOnline:Bool? public var isNewCarRetailer:Bool? public var isUsedCarRetailer:Bool? public var isCentralRetailer:Bool? public var chatEnabled:Bool? public var tradeInEnabled:Bool? public var smart:Bool? public var displayPhoneNumberNew:String? public var displayPhoneNumberUsed:String? public var latitude:Double? public var longitude:Double? public var smartDescription:String? public var smartWebsite:String? public var smartPhone:String? public var legacyId:String? public var agent:Bool? public var marketAreaId:Int? public var digitalLoungeParentGssnId:String? public var sendLeadsToDigitalLoungeParent:Bool? public var openingTimes:RetailerOpeningTimes? required public init(){} } public class VehicleConsumption : Codable { public var id:Int? public var lkm:Double? public var mpg:Double? required public init(){} } public class VehicleEquipmentCategory : Codable { public var order:Int? public var code:String? public var Description:String? public var equipment:[Equipmentv2]? required public init(){} } public class VehicleEmissionClass : Codable { public var colour:String? public var rating:String? required public init(){} } public class VehicleAttribute : Codable { public var Description:String? public var value:String? required public init(){} } public class VehicleIntegratedServiceCareOption : Codable { public var optionCode:String? public var bM7NST:String? public var fullModelYear:String? public var integratedProductType:String? public var customerDescription:String? public var oneAgentProductType:String? required public init(){} } public class VehicleCriteriaMatch : Codable { public var fuel:Bool? public var transmission:Bool? public var colour:Bool? public var upholstery:Bool? public var line:Bool? public var engine:Bool? public var bodyStyle:Bool? public var packages:Bool? required public init(){} } public class Price : Codable { public var id:String? public var Description:String? public var net:Double? public var vat:Double? public var gross:Double? public var product:OfferPriceProductType? required public init(){} } public class VehicleBaseDetail : Vehicle, ICommissionNumber { public var Description:String? public var commissionNumber:String? public var portArrivalDate:String? public var offerExpiryDate:String? public var fuel:String? public var transmission:String? public var transmissionType:String? public var colour:String? public var colourDescription:String? public var imageUrl:String? public var specialist:Bool? public var vehicleCriteriaMatch:VehicleCriteriaMatch? public var colourGroup:String? public var model:String? public var bodyStyle:String? public var brand:String? public var engine:String? public var engineDescription:String? public var line:String? public var upholstery:String? public var upholsteryDescription:String? public var packages:[String] = [] public var p11D:Double? public var prices:[Price] = [] public var vehicleClass:String? public var productRange:String? public var vehicleType:String? public var emission:Double? public var baumuster:String? public var isSellable:Bool? public var bm7NST:String? public var electricRange:Double? public var electricConsumption:Double? public var isDisplayStock:Bool? public var displayRetailer_Id:Int? public var displayRetailer:String? public var displayRetailerGssnId:String? public var retailer:Retailer? public var age:Int? public var modelYearCode:String? public var halfModelYearCode:String? public var fullModelYearCode:String? public var productionDate:String? public var chassisNumber:String? public var eligibleForIntegratedServiceCare:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case Description case commissionNumber case portArrivalDate case offerExpiryDate case fuel case transmission case transmissionType case colour case colourDescription case imageUrl case specialist case vehicleCriteriaMatch case colourGroup case model case bodyStyle case brand case engine case engineDescription case line case upholstery case upholsteryDescription case packages case p11D case prices case vehicleClass case productRange case vehicleType case emission case baumuster case isSellable case bm7NST case electricRange case electricConsumption case isDisplayStock case displayRetailer_Id case displayRetailer case displayRetailerGssnId case retailer case age case modelYearCode case halfModelYearCode case fullModelYearCode case productionDate case chassisNumber case eligibleForIntegratedServiceCare } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) Description = try container.decodeIfPresent(String.self, forKey: .Description) commissionNumber = try container.decodeIfPresent(String.self, forKey: .commissionNumber) portArrivalDate = try container.decodeIfPresent(String.self, forKey: .portArrivalDate) offerExpiryDate = try container.decodeIfPresent(String.self, forKey: .offerExpiryDate) fuel = try container.decodeIfPresent(String.self, forKey: .fuel) transmission = try container.decodeIfPresent(String.self, forKey: .transmission) transmissionType = try container.decodeIfPresent(String.self, forKey: .transmissionType) colour = try container.decodeIfPresent(String.self, forKey: .colour) colourDescription = try container.decodeIfPresent(String.self, forKey: .colourDescription) imageUrl = try container.decodeIfPresent(String.self, forKey: .imageUrl) specialist = try container.decodeIfPresent(Bool.self, forKey: .specialist) vehicleCriteriaMatch = try container.decodeIfPresent(VehicleCriteriaMatch.self, forKey: .vehicleCriteriaMatch) colourGroup = try container.decodeIfPresent(String.self, forKey: .colourGroup) model = try container.decodeIfPresent(String.self, forKey: .model) bodyStyle = try container.decodeIfPresent(String.self, forKey: .bodyStyle) brand = try container.decodeIfPresent(String.self, forKey: .brand) engine = try container.decodeIfPresent(String.self, forKey: .engine) engineDescription = try container.decodeIfPresent(String.self, forKey: .engineDescription) line = try container.decodeIfPresent(String.self, forKey: .line) upholstery = try container.decodeIfPresent(String.self, forKey: .upholstery) upholsteryDescription = try container.decodeIfPresent(String.self, forKey: .upholsteryDescription) packages = try container.decodeIfPresent([String].self, forKey: .packages) ?? [] p11D = try container.decodeIfPresent(Double.self, forKey: .p11D) prices = try container.decodeIfPresent([Price].self, forKey: .prices) ?? [] vehicleClass = try container.decodeIfPresent(String.self, forKey: .vehicleClass) productRange = try container.decodeIfPresent(String.self, forKey: .productRange) vehicleType = try container.decodeIfPresent(String.self, forKey: .vehicleType) emission = try container.decodeIfPresent(Double.self, forKey: .emission) baumuster = try container.decodeIfPresent(String.self, forKey: .baumuster) isSellable = try container.decodeIfPresent(Bool.self, forKey: .isSellable) bm7NST = try container.decodeIfPresent(String.self, forKey: .bm7NST) electricRange = try container.decodeIfPresent(Double.self, forKey: .electricRange) electricConsumption = try container.decodeIfPresent(Double.self, forKey: .electricConsumption) isDisplayStock = try container.decodeIfPresent(Bool.self, forKey: .isDisplayStock) displayRetailer_Id = try container.decodeIfPresent(Int.self, forKey: .displayRetailer_Id) displayRetailer = try container.decodeIfPresent(String.self, forKey: .displayRetailer) displayRetailerGssnId = try container.decodeIfPresent(String.self, forKey: .displayRetailerGssnId) retailer = try container.decodeIfPresent(Retailer.self, forKey: .retailer) age = try container.decodeIfPresent(Int.self, forKey: .age) modelYearCode = try container.decodeIfPresent(String.self, forKey: .modelYearCode) halfModelYearCode = try container.decodeIfPresent(String.self, forKey: .halfModelYearCode) fullModelYearCode = try container.decodeIfPresent(String.self, forKey: .fullModelYearCode) productionDate = try container.decodeIfPresent(String.self, forKey: .productionDate) chassisNumber = try container.decodeIfPresent(String.self, forKey: .chassisNumber) eligibleForIntegratedServiceCare = try container.decodeIfPresent(Bool.self, forKey: .eligibleForIntegratedServiceCare) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if Description != nil { try container.encode(Description, forKey: .Description) } if commissionNumber != nil { try container.encode(commissionNumber, forKey: .commissionNumber) } if portArrivalDate != nil { try container.encode(portArrivalDate, forKey: .portArrivalDate) } if offerExpiryDate != nil { try container.encode(offerExpiryDate, forKey: .offerExpiryDate) } if fuel != nil { try container.encode(fuel, forKey: .fuel) } if transmission != nil { try container.encode(transmission, forKey: .transmission) } if transmissionType != nil { try container.encode(transmissionType, forKey: .transmissionType) } if colour != nil { try container.encode(colour, forKey: .colour) } if colourDescription != nil { try container.encode(colourDescription, forKey: .colourDescription) } if imageUrl != nil { try container.encode(imageUrl, forKey: .imageUrl) } if specialist != nil { try container.encode(specialist, forKey: .specialist) } if vehicleCriteriaMatch != nil { try container.encode(vehicleCriteriaMatch, forKey: .vehicleCriteriaMatch) } if colourGroup != nil { try container.encode(colourGroup, forKey: .colourGroup) } if model != nil { try container.encode(model, forKey: .model) } if bodyStyle != nil { try container.encode(bodyStyle, forKey: .bodyStyle) } if brand != nil { try container.encode(brand, forKey: .brand) } if engine != nil { try container.encode(engine, forKey: .engine) } if engineDescription != nil { try container.encode(engineDescription, forKey: .engineDescription) } if line != nil { try container.encode(line, forKey: .line) } if upholstery != nil { try container.encode(upholstery, forKey: .upholstery) } if upholsteryDescription != nil { try container.encode(upholsteryDescription, forKey: .upholsteryDescription) } if packages.count > 0 { try container.encode(packages, forKey: .packages) } if p11D != nil { try container.encode(p11D, forKey: .p11D) } if prices.count > 0 { try container.encode(prices, forKey: .prices) } if vehicleClass != nil { try container.encode(vehicleClass, forKey: .vehicleClass) } if productRange != nil { try container.encode(productRange, forKey: .productRange) } if vehicleType != nil { try container.encode(vehicleType, forKey: .vehicleType) } if emission != nil { try container.encode(emission, forKey: .emission) } if baumuster != nil { try container.encode(baumuster, forKey: .baumuster) } if isSellable != nil { try container.encode(isSellable, forKey: .isSellable) } if bm7NST != nil { try container.encode(bm7NST, forKey: .bm7NST) } if electricRange != nil { try container.encode(electricRange, forKey: .electricRange) } if electricConsumption != nil { try container.encode(electricConsumption, forKey: .electricConsumption) } if isDisplayStock != nil { try container.encode(isDisplayStock, forKey: .isDisplayStock) } if displayRetailer_Id != nil { try container.encode(displayRetailer_Id, forKey: .displayRetailer_Id) } if displayRetailer != nil { try container.encode(displayRetailer, forKey: .displayRetailer) } if displayRetailerGssnId != nil { try container.encode(displayRetailerGssnId, forKey: .displayRetailerGssnId) } if retailer != nil { try container.encode(retailer, forKey: .retailer) } if age != nil { try container.encode(age, forKey: .age) } if modelYearCode != nil { try container.encode(modelYearCode, forKey: .modelYearCode) } if halfModelYearCode != nil { try container.encode(halfModelYearCode, forKey: .halfModelYearCode) } if fullModelYearCode != nil { try container.encode(fullModelYearCode, forKey: .fullModelYearCode) } if productionDate != nil { try container.encode(productionDate, forKey: .productionDate) } if chassisNumber != nil { try container.encode(chassisNumber, forKey: .chassisNumber) } if eligibleForIntegratedServiceCare != nil { try container.encode(eligibleForIntegratedServiceCare, forKey: .eligibleForIntegratedServiceCare) } } } public protocol ICommissionNumber { var commissionNumber:String? { get set } } public class Retailer : Codable { public var gssn:String? public var Description:String? public var campaignExcluded:Bool? required public init(){} } public class Equipmentv2 : Equipment { public var importance:Int? public var isAdditional:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case importance case isAdditional } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) importance = try container.decodeIfPresent(Int.self, forKey: .importance) isAdditional = try container.decodeIfPresent(Bool.self, forKey: .isAdditional) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if importance != nil { try container.encode(importance, forKey: .importance) } if isAdditional != nil { try container.encode(isAdditional, forKey: .isAdditional) } } } public enum OfferPriceProductType : String, Codable { case LIST_PRICE case NUMBER_PLATE_FEE case DELIVERY_CHARGE case FUEL_CHARGE case MANUFACTURER_OFFER case PERSONALISED_MONEYOFFER case PERSONALISED_NONMONEYOFFER case PERSONALISED_NONMONEYOFFER_NEG case SERVICE case SERVICE_NEG case GOVERNMENT_GRANT case OUTRIGHT_PURCHASE_DISCOUNT case VIP_OFFER case WALLBOX_OFFER case WALLBOX_OFFER_NEG case ROAD_FUND_LICENCE case FIRST_REGISTRATION_FEE case NOT_FOUND case ACCESSORY_OFFER case ACCESSORY_OFFER_NEG case MOTABILITY_DISCOUNT } public class Equipment : Codable { public var id:Int? public var code:String? public var Description:String? required public init(){} }