/* Options: Date: 2025-05-05 17:51:59 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: UpdateBackOrderRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/v1/backorder/{Guid}", "PUT") public class UpdateBackOrderRequest : IReturn, IPut, Codable { public typealias Return = UpdateBackOrderResponse public var guid:String? public var agentCriteria:V2Criteria? public var additionalInformation:String? public var configCode:String? public var motabilityPricingId:Int? public var assistanceProviderId:Int? public var assistanceDetail:String? public var isCOPConverter:Bool? public var configuratorCode:String? public var isOneAdminUpdate:Bool? required public init(){} } public class UpdateBackOrderResponse : Codable { required public init(){} } public class V2Criteria : CriteriaBase { public var engine:[V2EngineCriteria] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case engine } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) engine = try container.decodeIfPresent([V2EngineCriteria].self, forKey: .engine) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if engine.count > 0 { try container.encode(engine, forKey: .engine) } } } public class CriteriaModel : Codable { public var Description:String? public var id:Int? required public init(){} } public class CriteriaDifference : Codable { public var model:Bool? public var transmission:Bool? public var fuel:Bool? public var upholstery:Bool? public var equipment:Bool? public var line:Bool? public var bodyStyle:Bool? public var colourGroup:Bool? public var packages:Bool? public var engine:Bool? public var additionalInformation:Bool? public var urlReferrer:Bool? public var preferredDeliveryDate:Bool? public var isSmart:Bool? public var isSpecialised:Bool? required public init(){} } public class CriteriaBase : JsonVersion { public var transmission:[String] = [] public var fuel:[String] = [] public var upholstery:[String] = [] public var equipment:[String] = [] public var line:[String] = [] public var bodyStyle:[String] = [] public var colourGroup:[String] = [] public var packages:[String] = [] public var model:[CriteriaModel] = [] public var urlReferrer:String? public var preferredDeliveryDate:String? // @ApiMember(ExcludeInSchema=true) public var isNewModel:Bool? // @ApiMember(ExcludeInSchema=true) public var isSmart:Bool? // @ApiMember(ExcludeInSchema=true) public var isSpecialised:Bool? // @ApiMember(ExcludeInSchema=true) public var criteriaDifference:CriteriaDifference? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case transmission case fuel case upholstery case equipment case line case bodyStyle case colourGroup case packages case model case urlReferrer case preferredDeliveryDate case isNewModel case isSmart case isSpecialised case criteriaDifference } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) transmission = try container.decodeIfPresent([String].self, forKey: .transmission) ?? [] fuel = try container.decodeIfPresent([String].self, forKey: .fuel) ?? [] upholstery = try container.decodeIfPresent([String].self, forKey: .upholstery) ?? [] equipment = try container.decodeIfPresent([String].self, forKey: .equipment) ?? [] line = try container.decodeIfPresent([String].self, forKey: .line) ?? [] bodyStyle = try container.decodeIfPresent([String].self, forKey: .bodyStyle) ?? [] colourGroup = try container.decodeIfPresent([String].self, forKey: .colourGroup) ?? [] packages = try container.decodeIfPresent([String].self, forKey: .packages) ?? [] model = try container.decodeIfPresent([CriteriaModel].self, forKey: .model) ?? [] urlReferrer = try container.decodeIfPresent(String.self, forKey: .urlReferrer) preferredDeliveryDate = try container.decodeIfPresent(String.self, forKey: .preferredDeliveryDate) isNewModel = try container.decodeIfPresent(Bool.self, forKey: .isNewModel) isSmart = try container.decodeIfPresent(Bool.self, forKey: .isSmart) isSpecialised = try container.decodeIfPresent(Bool.self, forKey: .isSpecialised) criteriaDifference = try container.decodeIfPresent(CriteriaDifference.self, forKey: .criteriaDifference) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if transmission.count > 0 { try container.encode(transmission, forKey: .transmission) } if fuel.count > 0 { try container.encode(fuel, forKey: .fuel) } if upholstery.count > 0 { try container.encode(upholstery, forKey: .upholstery) } if equipment.count > 0 { try container.encode(equipment, forKey: .equipment) } if line.count > 0 { try container.encode(line, forKey: .line) } if bodyStyle.count > 0 { try container.encode(bodyStyle, forKey: .bodyStyle) } if colourGroup.count > 0 { try container.encode(colourGroup, forKey: .colourGroup) } if packages.count > 0 { try container.encode(packages, forKey: .packages) } if model.count > 0 { try container.encode(model, forKey: .model) } if urlReferrer != nil { try container.encode(urlReferrer, forKey: .urlReferrer) } if preferredDeliveryDate != nil { try container.encode(preferredDeliveryDate, forKey: .preferredDeliveryDate) } if isNewModel != nil { try container.encode(isNewModel, forKey: .isNewModel) } if isSmart != nil { try container.encode(isSmart, forKey: .isSmart) } if isSpecialised != nil { try container.encode(isSpecialised, forKey: .isSpecialised) } if criteriaDifference != nil { try container.encode(criteriaDifference, forKey: .criteriaDifference) } } } public protocol IJsonVersion { var version:Int? { get set } } public class V2EngineCriteria : Codable { public var badge:String? public var brand:String? required public init(){} } public class JsonVersion : IJsonVersion, Codable { public var version:Int? required public init(){} }