Mercedes.Agency.Orchestration.API

<back to all web services

FilterActiveBackOrdersCsvRequest

BackOrder
Requires Authentication
The following routes are available for this service:
POST/v1/backorder/active/csvCalls Agency API and fetches a list of active backorders for the Export Detailed CSVFilter Active Back Order
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class BackOrderCriteria implements JsonSerializable
{
    public function __construct(
        /** @var int[]|null */
        public ?array $Source=null,
        /** @var int[]|null */
        public ?array $CustomerType=null,
        /** @var array<int>|null */
        public ?array $CommLinkedBy=null,
        /** @var bool|null */
        public ?bool $VinAllocated=null,
        /** @var bool|null */
        public ?bool $VinAllocatedSellable=null,
        /** @var bool|null */
        public ?bool $VinAllocatedNotSellable=null,
        /** @var bool|null */
        public ?bool $Specialist=null,
        /** @var bool|null */
        public ?bool $LinkedOrder=null,
        /** @var int[]|null */
        public ?array $AssistanceProviders=null,
        /** @var bool|null */
        public ?bool $COPConverter=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Source'])) $this->Source = JsonConverters::fromArray('int', $o['Source']);
        if (isset($o['CustomerType'])) $this->CustomerType = JsonConverters::fromArray('int', $o['CustomerType']);
        if (isset($o['CommLinkedBy'])) $this->CommLinkedBy = JsonConverters::fromArray('int', $o['CommLinkedBy']);
        if (isset($o['VinAllocated'])) $this->VinAllocated = $o['VinAllocated'];
        if (isset($o['VinAllocatedSellable'])) $this->VinAllocatedSellable = $o['VinAllocatedSellable'];
        if (isset($o['VinAllocatedNotSellable'])) $this->VinAllocatedNotSellable = $o['VinAllocatedNotSellable'];
        if (isset($o['Specialist'])) $this->Specialist = $o['Specialist'];
        if (isset($o['LinkedOrder'])) $this->LinkedOrder = $o['LinkedOrder'];
        if (isset($o['AssistanceProviders'])) $this->AssistanceProviders = JsonConverters::fromArray('int', $o['AssistanceProviders']);
        if (isset($o['COPConverter'])) $this->COPConverter = $o['COPConverter'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Source)) $o['Source'] = JsonConverters::toArray('int', $this->Source);
        if (isset($this->CustomerType)) $o['CustomerType'] = JsonConverters::toArray('int', $this->CustomerType);
        if (isset($this->CommLinkedBy)) $o['CommLinkedBy'] = JsonConverters::toArray('int', $this->CommLinkedBy);
        if (isset($this->VinAllocated)) $o['VinAllocated'] = $this->VinAllocated;
        if (isset($this->VinAllocatedSellable)) $o['VinAllocatedSellable'] = $this->VinAllocatedSellable;
        if (isset($this->VinAllocatedNotSellable)) $o['VinAllocatedNotSellable'] = $this->VinAllocatedNotSellable;
        if (isset($this->Specialist)) $o['Specialist'] = $this->Specialist;
        if (isset($this->LinkedOrder)) $o['LinkedOrder'] = $this->LinkedOrder;
        if (isset($this->AssistanceProviders)) $o['AssistanceProviders'] = JsonConverters::toArray('int', $this->AssistanceProviders);
        if (isset($this->COPConverter)) $o['COPConverter'] = $this->COPConverter;
        return empty($o) ? new class(){} : $o;
    }
}

class CriteriaModel implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Description='',
        /** @var int */
        public int $Id=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleCriteria implements JsonSerializable
{
    public function __construct(
        /** @var array<CriteriaModel>|null */
        public ?array $Model=null,
        /** @var string[]|null */
        public ?array $Colour=null,
        /** @var string[]|null */
        public ?array $FuelType=null,
        /** @var string[]|null */
        public ?array $Transmission=null,
        /** @var string[]|null */
        public ?array $Engine=null,
        /** @var string[]|null */
        public ?array $Line=null,
        /** @var string[]|null */
        public ?array $Package=null,
        /** @var string[]|null */
        public ?array $Equipment=null,
        /** @var string[]|null */
        public ?array $Upholstery=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Model'])) $this->Model = JsonConverters::fromArray('CriteriaModel', $o['Model']);
        if (isset($o['Colour'])) $this->Colour = JsonConverters::fromArray('string', $o['Colour']);
        if (isset($o['FuelType'])) $this->FuelType = JsonConverters::fromArray('string', $o['FuelType']);
        if (isset($o['Transmission'])) $this->Transmission = JsonConverters::fromArray('string', $o['Transmission']);
        if (isset($o['Engine'])) $this->Engine = JsonConverters::fromArray('string', $o['Engine']);
        if (isset($o['Line'])) $this->Line = JsonConverters::fromArray('string', $o['Line']);
        if (isset($o['Package'])) $this->Package = JsonConverters::fromArray('string', $o['Package']);
        if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('string', $o['Equipment']);
        if (isset($o['Upholstery'])) $this->Upholstery = JsonConverters::fromArray('string', $o['Upholstery']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Model)) $o['Model'] = JsonConverters::toArray('CriteriaModel', $this->Model);
        if (isset($this->Colour)) $o['Colour'] = JsonConverters::toArray('string', $this->Colour);
        if (isset($this->FuelType)) $o['FuelType'] = JsonConverters::toArray('string', $this->FuelType);
        if (isset($this->Transmission)) $o['Transmission'] = JsonConverters::toArray('string', $this->Transmission);
        if (isset($this->Engine)) $o['Engine'] = JsonConverters::toArray('string', $this->Engine);
        if (isset($this->Line)) $o['Line'] = JsonConverters::toArray('string', $this->Line);
        if (isset($this->Package)) $o['Package'] = JsonConverters::toArray('string', $this->Package);
        if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('string', $this->Equipment);
        if (isset($this->Upholstery)) $o['Upholstery'] = JsonConverters::toArray('string', $this->Upholstery);
        return empty($o) ? new class(){} : $o;
    }
}

class DayRange implements JsonSerializable
{
    public function __construct(
        /** @var int|null */
        public ?int $Min=null,
        /** @var int|null */
        public ?int $Max=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Min'])) $this->Min = $o['Min'];
        if (isset($o['Max'])) $this->Max = $o['Max'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Min)) $o['Min'] = $this->Min;
        if (isset($this->Max)) $o['Max'] = $this->Max;
        return empty($o) ? new class(){} : $o;
    }
}

class CreateUpdate implements JsonSerializable
{
    public function __construct(
        /** @var DateTime|null */
        public ?DateTime $Date=null,
        /** @var DayRange|null */
        public ?DayRange $Range=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Date'])) $this->Date = JsonConverters::from('DateTime', $o['Date']);
        if (isset($o['Range'])) $this->Range = JsonConverters::from('DayRange', $o['Range']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Date)) $o['Date'] = JsonConverters::to('DateTime', $this->Date);
        if (isset($this->Range)) $o['Range'] = JsonConverters::to('DayRange', $this->Range);
        return empty($o) ? new class(){} : $o;
    }
}

class DateCriteria implements JsonSerializable
{
    public function __construct(
        /** @var CreateUpdate|null */
        public ?CreateUpdate $Created=null,
        /** @var CreateUpdate|null */
        public ?CreateUpdate $Modified=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Created'])) $this->Created = JsonConverters::from('CreateUpdate', $o['Created']);
        if (isset($o['Modified'])) $this->Modified = JsonConverters::from('CreateUpdate', $o['Modified']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('CreateUpdate', $this->Created);
        if (isset($this->Modified)) $o['Modified'] = JsonConverters::to('CreateUpdate', $this->Modified);
        return empty($o) ? new class(){} : $o;
    }
}

class FilterBackOrders implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $Historical=null,
        /** @var BackOrderCriteria|null */
        public ?BackOrderCriteria $BackOrderCriteria=null,
        /** @var VehicleCriteria|null */
        public ?VehicleCriteria $VehicleCriteria=null,
        /** @var DateCriteria|null */
        public ?DateCriteria $DateCriteria=null,
        /** @var string[]|null */
        public ?array $GssnIds=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Historical'])) $this->Historical = $o['Historical'];
        if (isset($o['BackOrderCriteria'])) $this->BackOrderCriteria = JsonConverters::from('BackOrderCriteria', $o['BackOrderCriteria']);
        if (isset($o['VehicleCriteria'])) $this->VehicleCriteria = JsonConverters::from('VehicleCriteria', $o['VehicleCriteria']);
        if (isset($o['DateCriteria'])) $this->DateCriteria = JsonConverters::from('DateCriteria', $o['DateCriteria']);
        if (isset($o['GssnIds'])) $this->GssnIds = JsonConverters::fromArray('string', $o['GssnIds']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Historical)) $o['Historical'] = $this->Historical;
        if (isset($this->BackOrderCriteria)) $o['BackOrderCriteria'] = JsonConverters::to('BackOrderCriteria', $this->BackOrderCriteria);
        if (isset($this->VehicleCriteria)) $o['VehicleCriteria'] = JsonConverters::to('VehicleCriteria', $this->VehicleCriteria);
        if (isset($this->DateCriteria)) $o['DateCriteria'] = JsonConverters::to('DateCriteria', $this->DateCriteria);
        if (isset($this->GssnIds)) $o['GssnIds'] = JsonConverters::toArray('string', $this->GssnIds);
        return empty($o) ? new class(){} : $o;
    }
}

class BackOrderHistory implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Status=0,
        /** @var string|null */
        public ?string $CommissionNumber=null,
        /** @var string|null */
        public ?string $VIN=null,
        /** @var string */
        public string $CustomerCriteria='',
        /** @var string */
        public string $AgentCriteria='',
        /** @var DateTime */
        public DateTime $CreationDate=new DateTime(),
        /** @var DateTime */
        public DateTime $MaintenanceDate=new DateTime(),
        /** @var string */
        public string $GasId='',
        /** @var bool|null */
        public ?bool $Sellable=null,
        /** @var string */
        public string $AdditionalInformation='',
        /** @var string */
        public string $Reason='',
        /** @var string */
        public string $ConfigCode='',
        /** @var string */
        public string $FleetBaseOrder='',
        /** @var string|null */
        public ?string $AssistanceDetail=null,
        /** @var string|null */
        public ?string $AssistanceProvider=null,
        /** @var string|null */
        public ?string $LinkedByUserType=null,
        /** @var string|null */
        public ?string $MotabilityVTN=null,
        /** @var string|null */
        public ?string $MotabilityBackOrderDropDown=null,
        /** @var DateTime|null */
        public ?DateTime $MotabilityValidFrom=null,
        /** @var DateTime|null */
        public ?DateTime $MotabilityValidTo=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['CommissionNumber'])) $this->CommissionNumber = $o['CommissionNumber'];
        if (isset($o['VIN'])) $this->VIN = $o['VIN'];
        if (isset($o['CustomerCriteria'])) $this->CustomerCriteria = $o['CustomerCriteria'];
        if (isset($o['AgentCriteria'])) $this->AgentCriteria = $o['AgentCriteria'];
        if (isset($o['CreationDate'])) $this->CreationDate = JsonConverters::from('DateTime', $o['CreationDate']);
        if (isset($o['MaintenanceDate'])) $this->MaintenanceDate = JsonConverters::from('DateTime', $o['MaintenanceDate']);
        if (isset($o['GasId'])) $this->GasId = $o['GasId'];
        if (isset($o['Sellable'])) $this->Sellable = $o['Sellable'];
        if (isset($o['AdditionalInformation'])) $this->AdditionalInformation = $o['AdditionalInformation'];
        if (isset($o['Reason'])) $this->Reason = $o['Reason'];
        if (isset($o['ConfigCode'])) $this->ConfigCode = $o['ConfigCode'];
        if (isset($o['FleetBaseOrder'])) $this->FleetBaseOrder = $o['FleetBaseOrder'];
        if (isset($o['AssistanceDetail'])) $this->AssistanceDetail = $o['AssistanceDetail'];
        if (isset($o['AssistanceProvider'])) $this->AssistanceProvider = $o['AssistanceProvider'];
        if (isset($o['LinkedByUserType'])) $this->LinkedByUserType = $o['LinkedByUserType'];
        if (isset($o['MotabilityVTN'])) $this->MotabilityVTN = $o['MotabilityVTN'];
        if (isset($o['MotabilityBackOrderDropDown'])) $this->MotabilityBackOrderDropDown = $o['MotabilityBackOrderDropDown'];
        if (isset($o['MotabilityValidFrom'])) $this->MotabilityValidFrom = JsonConverters::from('DateTime', $o['MotabilityValidFrom']);
        if (isset($o['MotabilityValidTo'])) $this->MotabilityValidTo = JsonConverters::from('DateTime', $o['MotabilityValidTo']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->CommissionNumber)) $o['CommissionNumber'] = $this->CommissionNumber;
        if (isset($this->VIN)) $o['VIN'] = $this->VIN;
        if (isset($this->CustomerCriteria)) $o['CustomerCriteria'] = $this->CustomerCriteria;
        if (isset($this->AgentCriteria)) $o['AgentCriteria'] = $this->AgentCriteria;
        if (isset($this->CreationDate)) $o['CreationDate'] = JsonConverters::to('DateTime', $this->CreationDate);
        if (isset($this->MaintenanceDate)) $o['MaintenanceDate'] = JsonConverters::to('DateTime', $this->MaintenanceDate);
        if (isset($this->GasId)) $o['GasId'] = $this->GasId;
        if (isset($this->Sellable)) $o['Sellable'] = $this->Sellable;
        if (isset($this->AdditionalInformation)) $o['AdditionalInformation'] = $this->AdditionalInformation;
        if (isset($this->Reason)) $o['Reason'] = $this->Reason;
        if (isset($this->ConfigCode)) $o['ConfigCode'] = $this->ConfigCode;
        if (isset($this->FleetBaseOrder)) $o['FleetBaseOrder'] = $this->FleetBaseOrder;
        if (isset($this->AssistanceDetail)) $o['AssistanceDetail'] = $this->AssistanceDetail;
        if (isset($this->AssistanceProvider)) $o['AssistanceProvider'] = $this->AssistanceProvider;
        if (isset($this->LinkedByUserType)) $o['LinkedByUserType'] = $this->LinkedByUserType;
        if (isset($this->MotabilityVTN)) $o['MotabilityVTN'] = $this->MotabilityVTN;
        if (isset($this->MotabilityBackOrderDropDown)) $o['MotabilityBackOrderDropDown'] = $this->MotabilityBackOrderDropDown;
        if (isset($this->MotabilityValidFrom)) $o['MotabilityValidFrom'] = JsonConverters::to('DateTime', $this->MotabilityValidFrom);
        if (isset($this->MotabilityValidTo)) $o['MotabilityValidTo'] = JsonConverters::to('DateTime', $this->MotabilityValidTo);
        return empty($o) ? new class(){} : $o;
    }
}

class Order implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Guid='',
        /** @var string */
        public string $Reference='',
        /** @var int */
        public int $Status=0,
        /** @var string */
        public string $CustomerId='',
        /** @var string */
        public string $MulesoftReference='',
        /** @var string */
        public string $GasId='',
        /** @var string */
        public string $OrderDate='',
        /** @var string */
        public string $OfferSnapShot=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Guid'])) $this->Guid = $o['Guid'];
        if (isset($o['Reference'])) $this->Reference = $o['Reference'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['MulesoftReference'])) $this->MulesoftReference = $o['MulesoftReference'];
        if (isset($o['GasId'])) $this->GasId = $o['GasId'];
        if (isset($o['OrderDate'])) $this->OrderDate = $o['OrderDate'];
        if (isset($o['OfferSnapShot'])) $this->OfferSnapShot = $o['OfferSnapShot'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Guid)) $o['Guid'] = $this->Guid;
        if (isset($this->Reference)) $o['Reference'] = $this->Reference;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->MulesoftReference)) $o['MulesoftReference'] = $this->MulesoftReference;
        if (isset($this->GasId)) $o['GasId'] = $this->GasId;
        if (isset($this->OrderDate)) $o['OrderDate'] = $this->OrderDate;
        if (isset($this->OfferSnapShot)) $o['OfferSnapShot'] = $this->OfferSnapShot;
        return empty($o) ? new class(){} : $o;
    }
}

class RetailerOpeningTime implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Day='',
        /** @var string */
        public string $OpenFrom='',
        /** @var string */
        public string $OpenTo='',
        /** @var string */
        public string $Special=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Day'])) $this->Day = $o['Day'];
        if (isset($o['OpenFrom'])) $this->OpenFrom = $o['OpenFrom'];
        if (isset($o['OpenTo'])) $this->OpenTo = $o['OpenTo'];
        if (isset($o['Special'])) $this->Special = $o['Special'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Day)) $o['Day'] = $this->Day;
        if (isset($this->OpenFrom)) $o['OpenFrom'] = $this->OpenFrom;
        if (isset($this->OpenTo)) $o['OpenTo'] = $this->OpenTo;
        if (isset($this->Special)) $o['Special'] = $this->Special;
        return empty($o) ? new class(){} : $o;
    }
}

class RetailerOpeningTimes implements JsonSerializable
{
    public function __construct(
        /** @var array<RetailerOpeningTime>|null */
        public ?array $New=null,
        /** @var array<RetailerOpeningTime>|null */
        public ?array $Used=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['New'])) $this->New = JsonConverters::fromArray('RetailerOpeningTime', $o['New']);
        if (isset($o['Used'])) $this->Used = JsonConverters::fromArray('RetailerOpeningTime', $o['Used']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->New)) $o['New'] = JsonConverters::toArray('RetailerOpeningTime', $this->New);
        if (isset($this->Used)) $o['Used'] = JsonConverters::toArray('RetailerOpeningTime', $this->Used);
        return empty($o) ? new class(){} : $o;
    }
}

class Retailer implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string */
        public string $GssnId='',
        /** @var string */
        public string $Description='',
        /** @var string */
        public string $Street='',
        /** @var string */
        public string $City='',
        /** @var string */
        public string $Postcode='',
        /** @var string */
        public string $GoogleMapPostcode='',
        /** @var string */
        public string $Phone='',
        /** @var string */
        public string $Fax='',
        /** @var string */
        public string $Email='',
        /** @var string */
        public string $Website='',
        /** @var string */
        public string $RetailerGroupId='',
        /** @var string */
        public string $RetailerGroupName='',
        /** @var bool|null */
        public ?bool $IsOnline=null,
        /** @var bool|null */
        public ?bool $IsNewCarRetailer=null,
        /** @var bool|null */
        public ?bool $IsUsedCarRetailer=null,
        /** @var bool|null */
        public ?bool $IsCentralRetailer=null,
        /** @var bool|null */
        public ?bool $ChatEnabled=null,
        /** @var bool|null */
        public ?bool $TradeInEnabled=null,
        /** @var bool|null */
        public ?bool $smart=null,
        /** @var string */
        public string $DisplayPhoneNumberNew='',
        /** @var string */
        public string $DisplayPhoneNumberUsed='',
        /** @var float */
        public float $Latitude=0.0,
        /** @var float */
        public float $Longitude=0.0,
        /** @var string */
        public string $smartDescription='',
        /** @var string */
        public string $smartWebsite='',
        /** @var string */
        public string $smartPhone='',
        /** @var string */
        public string $LegacyId='',
        /** @var bool|null */
        public ?bool $Agent=null,
        /** @var int */
        public int $MarketAreaId=0,
        /** @var string|null */
        public ?string $DigitalLoungeParentGssnId=null,
        /** @var bool|null */
        public ?bool $SendLeadsToDigitalLoungeParent=null,
        /** @var RetailerOpeningTimes|null */
        public ?RetailerOpeningTimes $OpeningTimes=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['GssnId'])) $this->GssnId = $o['GssnId'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Street'])) $this->Street = $o['Street'];
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['Postcode'])) $this->Postcode = $o['Postcode'];
        if (isset($o['GoogleMapPostcode'])) $this->GoogleMapPostcode = $o['GoogleMapPostcode'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['Fax'])) $this->Fax = $o['Fax'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['Website'])) $this->Website = $o['Website'];
        if (isset($o['RetailerGroupId'])) $this->RetailerGroupId = $o['RetailerGroupId'];
        if (isset($o['RetailerGroupName'])) $this->RetailerGroupName = $o['RetailerGroupName'];
        if (isset($o['IsOnline'])) $this->IsOnline = $o['IsOnline'];
        if (isset($o['IsNewCarRetailer'])) $this->IsNewCarRetailer = $o['IsNewCarRetailer'];
        if (isset($o['IsUsedCarRetailer'])) $this->IsUsedCarRetailer = $o['IsUsedCarRetailer'];
        if (isset($o['IsCentralRetailer'])) $this->IsCentralRetailer = $o['IsCentralRetailer'];
        if (isset($o['ChatEnabled'])) $this->ChatEnabled = $o['ChatEnabled'];
        if (isset($o['TradeInEnabled'])) $this->TradeInEnabled = $o['TradeInEnabled'];
        if (isset($o['smart'])) $this->smart = $o['smart'];
        if (isset($o['DisplayPhoneNumberNew'])) $this->DisplayPhoneNumberNew = $o['DisplayPhoneNumberNew'];
        if (isset($o['DisplayPhoneNumberUsed'])) $this->DisplayPhoneNumberUsed = $o['DisplayPhoneNumberUsed'];
        if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
        if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
        if (isset($o['smartDescription'])) $this->smartDescription = $o['smartDescription'];
        if (isset($o['smartWebsite'])) $this->smartWebsite = $o['smartWebsite'];
        if (isset($o['smartPhone'])) $this->smartPhone = $o['smartPhone'];
        if (isset($o['LegacyId'])) $this->LegacyId = $o['LegacyId'];
        if (isset($o['Agent'])) $this->Agent = $o['Agent'];
        if (isset($o['MarketAreaId'])) $this->MarketAreaId = $o['MarketAreaId'];
        if (isset($o['DigitalLoungeParentGssnId'])) $this->DigitalLoungeParentGssnId = $o['DigitalLoungeParentGssnId'];
        if (isset($o['SendLeadsToDigitalLoungeParent'])) $this->SendLeadsToDigitalLoungeParent = $o['SendLeadsToDigitalLoungeParent'];
        if (isset($o['OpeningTimes'])) $this->OpeningTimes = JsonConverters::from('RetailerOpeningTimes', $o['OpeningTimes']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->GssnId)) $o['GssnId'] = $this->GssnId;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Street)) $o['Street'] = $this->Street;
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->Postcode)) $o['Postcode'] = $this->Postcode;
        if (isset($this->GoogleMapPostcode)) $o['GoogleMapPostcode'] = $this->GoogleMapPostcode;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->Fax)) $o['Fax'] = $this->Fax;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->Website)) $o['Website'] = $this->Website;
        if (isset($this->RetailerGroupId)) $o['RetailerGroupId'] = $this->RetailerGroupId;
        if (isset($this->RetailerGroupName)) $o['RetailerGroupName'] = $this->RetailerGroupName;
        if (isset($this->IsOnline)) $o['IsOnline'] = $this->IsOnline;
        if (isset($this->IsNewCarRetailer)) $o['IsNewCarRetailer'] = $this->IsNewCarRetailer;
        if (isset($this->IsUsedCarRetailer)) $o['IsUsedCarRetailer'] = $this->IsUsedCarRetailer;
        if (isset($this->IsCentralRetailer)) $o['IsCentralRetailer'] = $this->IsCentralRetailer;
        if (isset($this->ChatEnabled)) $o['ChatEnabled'] = $this->ChatEnabled;
        if (isset($this->TradeInEnabled)) $o['TradeInEnabled'] = $this->TradeInEnabled;
        if (isset($this->smart)) $o['smart'] = $this->smart;
        if (isset($this->DisplayPhoneNumberNew)) $o['DisplayPhoneNumberNew'] = $this->DisplayPhoneNumberNew;
        if (isset($this->DisplayPhoneNumberUsed)) $o['DisplayPhoneNumberUsed'] = $this->DisplayPhoneNumberUsed;
        if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
        if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
        if (isset($this->smartDescription)) $o['smartDescription'] = $this->smartDescription;
        if (isset($this->smartWebsite)) $o['smartWebsite'] = $this->smartWebsite;
        if (isset($this->smartPhone)) $o['smartPhone'] = $this->smartPhone;
        if (isset($this->LegacyId)) $o['LegacyId'] = $this->LegacyId;
        if (isset($this->Agent)) $o['Agent'] = $this->Agent;
        if (isset($this->MarketAreaId)) $o['MarketAreaId'] = $this->MarketAreaId;
        if (isset($this->DigitalLoungeParentGssnId)) $o['DigitalLoungeParentGssnId'] = $this->DigitalLoungeParentGssnId;
        if (isset($this->SendLeadsToDigitalLoungeParent)) $o['SendLeadsToDigitalLoungeParent'] = $this->SendLeadsToDigitalLoungeParent;
        if (isset($this->OpeningTimes)) $o['OpeningTimes'] = JsonConverters::to('RetailerOpeningTimes', $this->OpeningTimes);
        return empty($o) ? new class(){} : $o;
    }
}

class MotabilityPricingCsv implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=0)
        /** @var int */
        public int $Id=0,

        // @DataMember(Order=1)
        /** @var string */
        public string $CriteriaBM7NST='',

        // @DataMember(Order=2)
        /** @var string */
        public string $VTN='',

        // @DataMember(Order=3)
        /** @var string */
        public string $BackOrderDropDown='',

        // @DataMember(Order=4)
        /** @var string */
        public string $CriteriaFullModelYearCode='',

        // @DataMember(Order=5)
        /** @var string|null */
        public ?string $CriteriaValidOptionCodes=null,

        // @DataMember(Order=6)
        /** @var string|null */
        public ?string $CriteriaInvalidOptionCodes=null,

        // @DataMember(Order=7)
        /** @var float */
        public float $PIPNet=0.0,

        // @DataMember(Order=8)
        /** @var float */
        public float $PIPVat=0.0,

        // @DataMember(Order=9)
        /** @var float */
        public float $PIPGross=0.0,

        // @DataMember(Order=10)
        /** @var float */
        public float $WPMSNet=0.0,

        // @DataMember(Order=11)
        /** @var float */
        public float $WPMSVat=0.0,

        // @DataMember(Order=12)
        /** @var float */
        public float $WPMSGross=0.0,

        // @DataMember(Order=13)
        /** @var float */
        public float $DiscountNet=0.0,

        // @DataMember(Order=14)
        /** @var float */
        public float $DiscountVat=0.0,

        // @DataMember(Order=15)
        /** @var float */
        public float $DiscountGross=0.0,

        // @DataMember(Order=16)
        /** @var float */
        public float $ListPriceNet=0.0,

        // @DataMember(Order=17)
        /** @var float */
        public float $ListPriceVat=0.0,

        // @DataMember(Order=18)
        /** @var float */
        public float $ListPriceGross=0.0,

        // @DataMember(Order=19)
        /** @var float */
        public float $DeliveryChargeNet=0.0,

        // @DataMember(Order=20)
        /** @var float */
        public float $DeliveryChargeVat=0.0,

        // @DataMember(Order=21)
        /** @var float */
        public float $DeliveryChargeGross=0.0,

        // @DataMember(Order=22)
        /** @var float */
        public float $FuelChargeNet=0.0,

        // @DataMember(Order=23)
        /** @var float */
        public float $FuelChargeVat=0.0,

        // @DataMember(Order=24)
        /** @var float */
        public float $FuelChargeGross=0.0,

        // @DataMember(Order=25)
        /** @var float */
        public float $NumberPlateFeeNet=0.0,

        // @DataMember(Order=26)
        /** @var float */
        public float $NumberPlateFeeVat=0.0,

        // @DataMember(Order=27)
        /** @var float */
        public float $NumberPlateFeeGross=0.0,

        // @DataMember(Order=28)
        /** @var float */
        public float $FirstRegistrationFeeNet=0.0,

        // @DataMember(Order=29)
        /** @var float */
        public float $FirstRegistrationFeeVat=0.0,

        // @DataMember(Order=30)
        /** @var float */
        public float $FirstRegistrationFeeGross=0.0,

        // @DataMember(Order=31)
        /** @var float */
        public float $RoadFundLicenceNet=0.0,

        // @DataMember(Order=32)
        /** @var float */
        public float $RoadFundLicenceVat=0.0,

        // @DataMember(Order=33)
        /** @var float */
        public float $RoadFundLicenceGross=0.0,

        // @DataMember(Order=34)
        /** @var DateTime */
        public DateTime $ValidFrom=new DateTime(),

        // @DataMember(Order=35)
        /** @var DateTime */
        public DateTime $ValidTo=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['CriteriaBM7NST'])) $this->CriteriaBM7NST = $o['CriteriaBM7NST'];
        if (isset($o['VTN'])) $this->VTN = $o['VTN'];
        if (isset($o['BackOrderDropDown'])) $this->BackOrderDropDown = $o['BackOrderDropDown'];
        if (isset($o['CriteriaFullModelYearCode'])) $this->CriteriaFullModelYearCode = $o['CriteriaFullModelYearCode'];
        if (isset($o['CriteriaValidOptionCodes'])) $this->CriteriaValidOptionCodes = $o['CriteriaValidOptionCodes'];
        if (isset($o['CriteriaInvalidOptionCodes'])) $this->CriteriaInvalidOptionCodes = $o['CriteriaInvalidOptionCodes'];
        if (isset($o['PIPNet'])) $this->PIPNet = $o['PIPNet'];
        if (isset($o['PIPVat'])) $this->PIPVat = $o['PIPVat'];
        if (isset($o['PIPGross'])) $this->PIPGross = $o['PIPGross'];
        if (isset($o['WPMSNet'])) $this->WPMSNet = $o['WPMSNet'];
        if (isset($o['WPMSVat'])) $this->WPMSVat = $o['WPMSVat'];
        if (isset($o['WPMSGross'])) $this->WPMSGross = $o['WPMSGross'];
        if (isset($o['DiscountNet'])) $this->DiscountNet = $o['DiscountNet'];
        if (isset($o['DiscountVat'])) $this->DiscountVat = $o['DiscountVat'];
        if (isset($o['DiscountGross'])) $this->DiscountGross = $o['DiscountGross'];
        if (isset($o['ListPriceNet'])) $this->ListPriceNet = $o['ListPriceNet'];
        if (isset($o['ListPriceVat'])) $this->ListPriceVat = $o['ListPriceVat'];
        if (isset($o['ListPriceGross'])) $this->ListPriceGross = $o['ListPriceGross'];
        if (isset($o['DeliveryChargeNet'])) $this->DeliveryChargeNet = $o['DeliveryChargeNet'];
        if (isset($o['DeliveryChargeVat'])) $this->DeliveryChargeVat = $o['DeliveryChargeVat'];
        if (isset($o['DeliveryChargeGross'])) $this->DeliveryChargeGross = $o['DeliveryChargeGross'];
        if (isset($o['FuelChargeNet'])) $this->FuelChargeNet = $o['FuelChargeNet'];
        if (isset($o['FuelChargeVat'])) $this->FuelChargeVat = $o['FuelChargeVat'];
        if (isset($o['FuelChargeGross'])) $this->FuelChargeGross = $o['FuelChargeGross'];
        if (isset($o['NumberPlateFeeNet'])) $this->NumberPlateFeeNet = $o['NumberPlateFeeNet'];
        if (isset($o['NumberPlateFeeVat'])) $this->NumberPlateFeeVat = $o['NumberPlateFeeVat'];
        if (isset($o['NumberPlateFeeGross'])) $this->NumberPlateFeeGross = $o['NumberPlateFeeGross'];
        if (isset($o['FirstRegistrationFeeNet'])) $this->FirstRegistrationFeeNet = $o['FirstRegistrationFeeNet'];
        if (isset($o['FirstRegistrationFeeVat'])) $this->FirstRegistrationFeeVat = $o['FirstRegistrationFeeVat'];
        if (isset($o['FirstRegistrationFeeGross'])) $this->FirstRegistrationFeeGross = $o['FirstRegistrationFeeGross'];
        if (isset($o['RoadFundLicenceNet'])) $this->RoadFundLicenceNet = $o['RoadFundLicenceNet'];
        if (isset($o['RoadFundLicenceVat'])) $this->RoadFundLicenceVat = $o['RoadFundLicenceVat'];
        if (isset($o['RoadFundLicenceGross'])) $this->RoadFundLicenceGross = $o['RoadFundLicenceGross'];
        if (isset($o['ValidFrom'])) $this->ValidFrom = JsonConverters::from('DateTime', $o['ValidFrom']);
        if (isset($o['ValidTo'])) $this->ValidTo = JsonConverters::from('DateTime', $o['ValidTo']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->CriteriaBM7NST)) $o['CriteriaBM7NST'] = $this->CriteriaBM7NST;
        if (isset($this->VTN)) $o['VTN'] = $this->VTN;
        if (isset($this->BackOrderDropDown)) $o['BackOrderDropDown'] = $this->BackOrderDropDown;
        if (isset($this->CriteriaFullModelYearCode)) $o['CriteriaFullModelYearCode'] = $this->CriteriaFullModelYearCode;
        if (isset($this->CriteriaValidOptionCodes)) $o['CriteriaValidOptionCodes'] = $this->CriteriaValidOptionCodes;
        if (isset($this->CriteriaInvalidOptionCodes)) $o['CriteriaInvalidOptionCodes'] = $this->CriteriaInvalidOptionCodes;
        if (isset($this->PIPNet)) $o['PIPNet'] = $this->PIPNet;
        if (isset($this->PIPVat)) $o['PIPVat'] = $this->PIPVat;
        if (isset($this->PIPGross)) $o['PIPGross'] = $this->PIPGross;
        if (isset($this->WPMSNet)) $o['WPMSNet'] = $this->WPMSNet;
        if (isset($this->WPMSVat)) $o['WPMSVat'] = $this->WPMSVat;
        if (isset($this->WPMSGross)) $o['WPMSGross'] = $this->WPMSGross;
        if (isset($this->DiscountNet)) $o['DiscountNet'] = $this->DiscountNet;
        if (isset($this->DiscountVat)) $o['DiscountVat'] = $this->DiscountVat;
        if (isset($this->DiscountGross)) $o['DiscountGross'] = $this->DiscountGross;
        if (isset($this->ListPriceNet)) $o['ListPriceNet'] = $this->ListPriceNet;
        if (isset($this->ListPriceVat)) $o['ListPriceVat'] = $this->ListPriceVat;
        if (isset($this->ListPriceGross)) $o['ListPriceGross'] = $this->ListPriceGross;
        if (isset($this->DeliveryChargeNet)) $o['DeliveryChargeNet'] = $this->DeliveryChargeNet;
        if (isset($this->DeliveryChargeVat)) $o['DeliveryChargeVat'] = $this->DeliveryChargeVat;
        if (isset($this->DeliveryChargeGross)) $o['DeliveryChargeGross'] = $this->DeliveryChargeGross;
        if (isset($this->FuelChargeNet)) $o['FuelChargeNet'] = $this->FuelChargeNet;
        if (isset($this->FuelChargeVat)) $o['FuelChargeVat'] = $this->FuelChargeVat;
        if (isset($this->FuelChargeGross)) $o['FuelChargeGross'] = $this->FuelChargeGross;
        if (isset($this->NumberPlateFeeNet)) $o['NumberPlateFeeNet'] = $this->NumberPlateFeeNet;
        if (isset($this->NumberPlateFeeVat)) $o['NumberPlateFeeVat'] = $this->NumberPlateFeeVat;
        if (isset($this->NumberPlateFeeGross)) $o['NumberPlateFeeGross'] = $this->NumberPlateFeeGross;
        if (isset($this->FirstRegistrationFeeNet)) $o['FirstRegistrationFeeNet'] = $this->FirstRegistrationFeeNet;
        if (isset($this->FirstRegistrationFeeVat)) $o['FirstRegistrationFeeVat'] = $this->FirstRegistrationFeeVat;
        if (isset($this->FirstRegistrationFeeGross)) $o['FirstRegistrationFeeGross'] = $this->FirstRegistrationFeeGross;
        if (isset($this->RoadFundLicenceNet)) $o['RoadFundLicenceNet'] = $this->RoadFundLicenceNet;
        if (isset($this->RoadFundLicenceVat)) $o['RoadFundLicenceVat'] = $this->RoadFundLicenceVat;
        if (isset($this->RoadFundLicenceGross)) $o['RoadFundLicenceGross'] = $this->RoadFundLicenceGross;
        if (isset($this->ValidFrom)) $o['ValidFrom'] = JsonConverters::to('DateTime', $this->ValidFrom);
        if (isset($this->ValidTo)) $o['ValidTo'] = JsonConverters::to('DateTime', $this->ValidTo);
        return empty($o) ? new class(){} : $o;
    }
}

enum MotabilityPricingStatus : string
{
    case Pending = 'Pending';
    case Current = 'Current';
    case RecentlyExpired = 'RecentlyExpired';
    case Expired = 'Expired';
}

class MotabilityPricing extends MotabilityPricingCsv implements JsonSerializable
{
    /**
     * @param int $Id
     * @param string $CriteriaBM7NST
     * @param string $VTN
     * @param string $BackOrderDropDown
     * @param string $CriteriaFullModelYearCode
     * @param string|null $CriteriaValidOptionCodes
     * @param string|null $CriteriaInvalidOptionCodes
     * @param float $PIPNet
     * @param float $PIPVat
     * @param float $PIPGross
     * @param float $WPMSNet
     * @param float $WPMSVat
     * @param float $WPMSGross
     * @param float $DiscountNet
     * @param float $DiscountVat
     * @param float $DiscountGross
     * @param float $ListPriceNet
     * @param float $ListPriceVat
     * @param float $ListPriceGross
     * @param float $DeliveryChargeNet
     * @param float $DeliveryChargeVat
     * @param float $DeliveryChargeGross
     * @param float $FuelChargeNet
     * @param float $FuelChargeVat
     * @param float $FuelChargeGross
     * @param float $NumberPlateFeeNet
     * @param float $NumberPlateFeeVat
     * @param float $NumberPlateFeeGross
     * @param float $FirstRegistrationFeeNet
     * @param float $FirstRegistrationFeeVat
     * @param float $FirstRegistrationFeeGross
     * @param float $RoadFundLicenceNet
     * @param float $RoadFundLicenceVat
     * @param float $RoadFundLicenceGross
     * @param DateTime $ValidFrom
     * @param DateTime $ValidTo
     */
    public function __construct(
        int $Id=0,
        string $CriteriaBM7NST='',
        string $VTN='',
        string $BackOrderDropDown='',
        string $CriteriaFullModelYearCode='',
        ?string $CriteriaValidOptionCodes=null,
        ?string $CriteriaInvalidOptionCodes=null,
        float $PIPNet=0.0,
        float $PIPVat=0.0,
        float $PIPGross=0.0,
        float $WPMSNet=0.0,
        float $WPMSVat=0.0,
        float $WPMSGross=0.0,
        float $DiscountNet=0.0,
        float $DiscountVat=0.0,
        float $DiscountGross=0.0,
        float $ListPriceNet=0.0,
        float $ListPriceVat=0.0,
        float $ListPriceGross=0.0,
        float $DeliveryChargeNet=0.0,
        float $DeliveryChargeVat=0.0,
        float $DeliveryChargeGross=0.0,
        float $FuelChargeNet=0.0,
        float $FuelChargeVat=0.0,
        float $FuelChargeGross=0.0,
        float $NumberPlateFeeNet=0.0,
        float $NumberPlateFeeVat=0.0,
        float $NumberPlateFeeGross=0.0,
        float $FirstRegistrationFeeNet=0.0,
        float $FirstRegistrationFeeVat=0.0,
        float $FirstRegistrationFeeGross=0.0,
        float $RoadFundLicenceNet=0.0,
        float $RoadFundLicenceVat=0.0,
        float $RoadFundLicenceGross=0.0,
        DateTime $ValidFrom=new DateTime(),
        DateTime $ValidTo=new DateTime(),
        /** @var MotabilityPricingStatus|null */
        public ?MotabilityPricingStatus $MotabilityPricingStatus=null
    ) {
        parent::__construct($Id,$CriteriaBM7NST,$VTN,$BackOrderDropDown,$CriteriaFullModelYearCode,$CriteriaValidOptionCodes,$CriteriaInvalidOptionCodes,$PIPNet,$PIPVat,$PIPGross,$WPMSNet,$WPMSVat,$WPMSGross,$DiscountNet,$DiscountVat,$DiscountGross,$ListPriceNet,$ListPriceVat,$ListPriceGross,$DeliveryChargeNet,$DeliveryChargeVat,$DeliveryChargeGross,$FuelChargeNet,$FuelChargeVat,$FuelChargeGross,$NumberPlateFeeNet,$NumberPlateFeeVat,$NumberPlateFeeGross,$FirstRegistrationFeeNet,$FirstRegistrationFeeVat,$FirstRegistrationFeeGross,$RoadFundLicenceNet,$RoadFundLicenceVat,$RoadFundLicenceGross,$ValidFrom,$ValidTo);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['MotabilityPricingStatus'])) $this->MotabilityPricingStatus = JsonConverters::from('MotabilityPricingStatus', $o['MotabilityPricingStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->MotabilityPricingStatus)) $o['MotabilityPricingStatus'] = JsonConverters::to('MotabilityPricingStatus', $this->MotabilityPricingStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class CarConfigurator implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var int|null */
        public ?int $BackOrderId=null,
        /** @var string */
        public string $ConfiguratorCode='',
        /** @var string|null */
        public ?string $GasId=null,
        /** @var int */
        public int $Status=0,
        /** @var DateTime */
        public DateTime $DateOfLastUpdate=new DateTime(),
        /** @var string|null */
        public ?string $LastExceptionMessage=null,
        /** @var string|null */
        public ?string $LastException=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['BackOrderId'])) $this->BackOrderId = $o['BackOrderId'];
        if (isset($o['ConfiguratorCode'])) $this->ConfiguratorCode = $o['ConfiguratorCode'];
        if (isset($o['GasId'])) $this->GasId = $o['GasId'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['DateOfLastUpdate'])) $this->DateOfLastUpdate = JsonConverters::from('DateTime', $o['DateOfLastUpdate']);
        if (isset($o['LastExceptionMessage'])) $this->LastExceptionMessage = $o['LastExceptionMessage'];
        if (isset($o['LastException'])) $this->LastException = $o['LastException'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->BackOrderId)) $o['BackOrderId'] = $this->BackOrderId;
        if (isset($this->ConfiguratorCode)) $o['ConfiguratorCode'] = $this->ConfiguratorCode;
        if (isset($this->GasId)) $o['GasId'] = $this->GasId;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->DateOfLastUpdate)) $o['DateOfLastUpdate'] = JsonConverters::to('DateTime', $this->DateOfLastUpdate);
        if (isset($this->LastExceptionMessage)) $o['LastExceptionMessage'] = $this->LastExceptionMessage;
        if (isset($this->LastException)) $o['LastException'] = $this->LastException;
        return empty($o) ? new class(){} : $o;
    }
}

class KeyInformation implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $BM7NST=null,
        /** @var string|null */
        public ?string $ConfigurationDate=null,
        /** @var string|null */
        public ?string $ModelYear=null,
        /** @var string|null */
        public ?string $HalfYear=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['BM7NST'])) $this->BM7NST = $o['BM7NST'];
        if (isset($o['ConfigurationDate'])) $this->ConfigurationDate = $o['ConfigurationDate'];
        if (isset($o['ModelYear'])) $this->ModelYear = $o['ModelYear'];
        if (isset($o['HalfYear'])) $this->HalfYear = $o['HalfYear'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->BM7NST)) $o['BM7NST'] = $this->BM7NST;
        if (isset($this->ConfigurationDate)) $o['ConfigurationDate'] = $this->ConfigurationDate;
        if (isset($this->ModelYear)) $o['ModelYear'] = $this->ModelYear;
        if (isset($this->HalfYear)) $o['HalfYear'] = $this->HalfYear;
        return empty($o) ? new class(){} : $o;
    }
}

class OrderingOptions implements JsonSerializable
{
    public function __construct(
        /** @var array<string>|null */
        public ?array $Interior=null,
        /** @var array<string>|null */
        public ?array $Exterior=null,
        /** @var array<string>|null */
        public ?array $Other=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Interior'])) $this->Interior = JsonConverters::fromArray('string', $o['Interior']);
        if (isset($o['Exterior'])) $this->Exterior = JsonConverters::fromArray('string', $o['Exterior']);
        if (isset($o['Other'])) $this->Other = JsonConverters::fromArray('string', $o['Other']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Interior)) $o['Interior'] = JsonConverters::toArray('string', $this->Interior);
        if (isset($this->Exterior)) $o['Exterior'] = JsonConverters::toArray('string', $this->Exterior);
        if (isset($this->Other)) $o['Other'] = JsonConverters::toArray('string', $this->Other);
        return empty($o) ? new class(){} : $o;
    }
}

class CarConfiguratorResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var KeyInformation|null */
        public ?KeyInformation $KeyInformation=null,
        /** @var OrderingOptions|null */
        public ?OrderingOptions $OrderingOptions=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var string|null */
        public ?string $ConfiguratorCode=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['KeyInformation'])) $this->KeyInformation = JsonConverters::from('KeyInformation', $o['KeyInformation']);
        if (isset($o['OrderingOptions'])) $this->OrderingOptions = JsonConverters::from('OrderingOptions', $o['OrderingOptions']);
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
        if (isset($o['ConfiguratorCode'])) $this->ConfiguratorCode = $o['ConfiguratorCode'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->KeyInformation)) $o['KeyInformation'] = JsonConverters::to('KeyInformation', $this->KeyInformation);
        if (isset($this->OrderingOptions)) $o['OrderingOptions'] = JsonConverters::to('OrderingOptions', $this->OrderingOptions);
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        if (isset($this->ConfiguratorCode)) $o['ConfiguratorCode'] = $this->ConfiguratorCode;
        return empty($o) ? new class(){} : $o;
    }
}

class BackOrderBase implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Guid='',
        /** @var int */
        public int $Status=0,
        /** @var string */
        public string $CustomerId='',
        /** @var int */
        public int $Id=0,
        /** @var string */
        public string $Reference='',
        /** @var string */
        public string $Agent='',
        /** @var string */
        public string $Gssn='',
        /** @var DateTime */
        public DateTime $CreationDate=new DateTime(),
        /** @var DateTime */
        public DateTime $MaintenanceDate=new DateTime(),
        /** @var string */
        public string $CustomerCriteria='',
        /** @var string|null */
        public ?string $AgentCriteria=null,
        /** @var array<BackOrderHistory>|null */
        public ?array $History=null,
        /** @var bool|null */
        public ?bool $IsAllocatedToOrder=null,
        /** @var string */
        public string $Vin='',
        /** @var string|null */
        public ?string $CommissionNumber=null,
        /** @var Order|null */
        public ?Order $Order=null,
        /** @var string */
        public string $Source='',
        /** @var bool|null */
        public ?bool $Specialist=null,
        /** @var bool|null */
        public ?bool $OutrightPurchase=null,
        /** @var bool|null */
        public ?bool $Sellable=null,
        /** @var string */
        public string $MulesoftReference='',
        /** @var string */
        public string $AdditionalInformation='',
        /** @var string */
        public string $ConfigCode='',
        /** @var string */
        public string $FleetBaseOrder='',
        /** @var string */
        public string $GasId='',
        /** @var string */
        public string $OutrightPurchaseCustomerIdentifier='',
        /** @var Retailer|null */
        public ?Retailer $Retailer=null,
        /** @var int */
        public int $CustomerMode=0,
        /** @var bool|null */
        public ?bool $CanEdit=null,
        /** @var string|null */
        public ?string $DigitalLoungeGssnId=null,
        /** @var string|null */
        public ?string $DigitalLounge=null,
        /** @var bool|null */
        public ?bool $Motability=null,
        /** @var MotabilityPricing|null */
        public ?MotabilityPricing $MotabilityPricing=null,
        /** @var string|null */
        public ?string $LinkedByUserType=null,
        /** @var int|null */
        public ?int $AssistanceProviderId=null,
        /** @var string|null */
        public ?string $AssistanceProvider=null,
        /** @var string|null */
        public ?string $AssistanceDetail=null,
        /** @var DateTime|null */
        public ?DateTime $LastAssistanceMessageDate=null,
        /** @var string|null */
        public ?string $LastAssistanceUser=null,
        /** @var bool|null */
        public ?bool $IsCOPConverter=null,
        /** @var bool|null */
        public ?bool $IsEligibleCOPConverter=null,
        /** @var CarConfigurator|null */
        public ?CarConfigurator $CarConfigurator=null,
        /** @var CarConfiguratorResponse|null */
        public ?CarConfiguratorResponse $CarConfiguratorResponse=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Guid'])) $this->Guid = $o['Guid'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Reference'])) $this->Reference = $o['Reference'];
        if (isset($o['Agent'])) $this->Agent = $o['Agent'];
        if (isset($o['Gssn'])) $this->Gssn = $o['Gssn'];
        if (isset($o['CreationDate'])) $this->CreationDate = JsonConverters::from('DateTime', $o['CreationDate']);
        if (isset($o['MaintenanceDate'])) $this->MaintenanceDate = JsonConverters::from('DateTime', $o['MaintenanceDate']);
        if (isset($o['CustomerCriteria'])) $this->CustomerCriteria = $o['CustomerCriteria'];
        if (isset($o['AgentCriteria'])) $this->AgentCriteria = $o['AgentCriteria'];
        if (isset($o['History'])) $this->History = JsonConverters::fromArray('BackOrderHistory', $o['History']);
        if (isset($o['IsAllocatedToOrder'])) $this->IsAllocatedToOrder = $o['IsAllocatedToOrder'];
        if (isset($o['Vin'])) $this->Vin = $o['Vin'];
        if (isset($o['CommissionNumber'])) $this->CommissionNumber = $o['CommissionNumber'];
        if (isset($o['Order'])) $this->Order = JsonConverters::from('Order', $o['Order']);
        if (isset($o['Source'])) $this->Source = $o['Source'];
        if (isset($o['Specialist'])) $this->Specialist = $o['Specialist'];
        if (isset($o['OutrightPurchase'])) $this->OutrightPurchase = $o['OutrightPurchase'];
        if (isset($o['Sellable'])) $this->Sellable = $o['Sellable'];
        if (isset($o['MulesoftReference'])) $this->MulesoftReference = $o['MulesoftReference'];
        if (isset($o['AdditionalInformation'])) $this->AdditionalInformation = $o['AdditionalInformation'];
        if (isset($o['ConfigCode'])) $this->ConfigCode = $o['ConfigCode'];
        if (isset($o['FleetBaseOrder'])) $this->FleetBaseOrder = $o['FleetBaseOrder'];
        if (isset($o['GasId'])) $this->GasId = $o['GasId'];
        if (isset($o['OutrightPurchaseCustomerIdentifier'])) $this->OutrightPurchaseCustomerIdentifier = $o['OutrightPurchaseCustomerIdentifier'];
        if (isset($o['Retailer'])) $this->Retailer = JsonConverters::from('Retailer', $o['Retailer']);
        if (isset($o['CustomerMode'])) $this->CustomerMode = $o['CustomerMode'];
        if (isset($o['CanEdit'])) $this->CanEdit = $o['CanEdit'];
        if (isset($o['DigitalLoungeGssnId'])) $this->DigitalLoungeGssnId = $o['DigitalLoungeGssnId'];
        if (isset($o['DigitalLounge'])) $this->DigitalLounge = $o['DigitalLounge'];
        if (isset($o['Motability'])) $this->Motability = $o['Motability'];
        if (isset($o['MotabilityPricing'])) $this->MotabilityPricing = JsonConverters::from('MotabilityPricing', $o['MotabilityPricing']);
        if (isset($o['LinkedByUserType'])) $this->LinkedByUserType = $o['LinkedByUserType'];
        if (isset($o['AssistanceProviderId'])) $this->AssistanceProviderId = $o['AssistanceProviderId'];
        if (isset($o['AssistanceProvider'])) $this->AssistanceProvider = $o['AssistanceProvider'];
        if (isset($o['AssistanceDetail'])) $this->AssistanceDetail = $o['AssistanceDetail'];
        if (isset($o['LastAssistanceMessageDate'])) $this->LastAssistanceMessageDate = JsonConverters::from('DateTime', $o['LastAssistanceMessageDate']);
        if (isset($o['LastAssistanceUser'])) $this->LastAssistanceUser = $o['LastAssistanceUser'];
        if (isset($o['IsCOPConverter'])) $this->IsCOPConverter = $o['IsCOPConverter'];
        if (isset($o['IsEligibleCOPConverter'])) $this->IsEligibleCOPConverter = $o['IsEligibleCOPConverter'];
        if (isset($o['CarConfigurator'])) $this->CarConfigurator = JsonConverters::from('CarConfigurator', $o['CarConfigurator']);
        if (isset($o['CarConfiguratorResponse'])) $this->CarConfiguratorResponse = JsonConverters::from('CarConfiguratorResponse', $o['CarConfiguratorResponse']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Guid)) $o['Guid'] = $this->Guid;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Reference)) $o['Reference'] = $this->Reference;
        if (isset($this->Agent)) $o['Agent'] = $this->Agent;
        if (isset($this->Gssn)) $o['Gssn'] = $this->Gssn;
        if (isset($this->CreationDate)) $o['CreationDate'] = JsonConverters::to('DateTime', $this->CreationDate);
        if (isset($this->MaintenanceDate)) $o['MaintenanceDate'] = JsonConverters::to('DateTime', $this->MaintenanceDate);
        if (isset($this->CustomerCriteria)) $o['CustomerCriteria'] = $this->CustomerCriteria;
        if (isset($this->AgentCriteria)) $o['AgentCriteria'] = $this->AgentCriteria;
        if (isset($this->History)) $o['History'] = JsonConverters::toArray('BackOrderHistory', $this->History);
        if (isset($this->IsAllocatedToOrder)) $o['IsAllocatedToOrder'] = $this->IsAllocatedToOrder;
        if (isset($this->Vin)) $o['Vin'] = $this->Vin;
        if (isset($this->CommissionNumber)) $o['CommissionNumber'] = $this->CommissionNumber;
        if (isset($this->Order)) $o['Order'] = JsonConverters::to('Order', $this->Order);
        if (isset($this->Source)) $o['Source'] = $this->Source;
        if (isset($this->Specialist)) $o['Specialist'] = $this->Specialist;
        if (isset($this->OutrightPurchase)) $o['OutrightPurchase'] = $this->OutrightPurchase;
        if (isset($this->Sellable)) $o['Sellable'] = $this->Sellable;
        if (isset($this->MulesoftReference)) $o['MulesoftReference'] = $this->MulesoftReference;
        if (isset($this->AdditionalInformation)) $o['AdditionalInformation'] = $this->AdditionalInformation;
        if (isset($this->ConfigCode)) $o['ConfigCode'] = $this->ConfigCode;
        if (isset($this->FleetBaseOrder)) $o['FleetBaseOrder'] = $this->FleetBaseOrder;
        if (isset($this->GasId)) $o['GasId'] = $this->GasId;
        if (isset($this->OutrightPurchaseCustomerIdentifier)) $o['OutrightPurchaseCustomerIdentifier'] = $this->OutrightPurchaseCustomerIdentifier;
        if (isset($this->Retailer)) $o['Retailer'] = JsonConverters::to('Retailer', $this->Retailer);
        if (isset($this->CustomerMode)) $o['CustomerMode'] = $this->CustomerMode;
        if (isset($this->CanEdit)) $o['CanEdit'] = $this->CanEdit;
        if (isset($this->DigitalLoungeGssnId)) $o['DigitalLoungeGssnId'] = $this->DigitalLoungeGssnId;
        if (isset($this->DigitalLounge)) $o['DigitalLounge'] = $this->DigitalLounge;
        if (isset($this->Motability)) $o['Motability'] = $this->Motability;
        if (isset($this->MotabilityPricing)) $o['MotabilityPricing'] = JsonConverters::to('MotabilityPricing', $this->MotabilityPricing);
        if (isset($this->LinkedByUserType)) $o['LinkedByUserType'] = $this->LinkedByUserType;
        if (isset($this->AssistanceProviderId)) $o['AssistanceProviderId'] = $this->AssistanceProviderId;
        if (isset($this->AssistanceProvider)) $o['AssistanceProvider'] = $this->AssistanceProvider;
        if (isset($this->AssistanceDetail)) $o['AssistanceDetail'] = $this->AssistanceDetail;
        if (isset($this->LastAssistanceMessageDate)) $o['LastAssistanceMessageDate'] = JsonConverters::to('DateTime', $this->LastAssistanceMessageDate);
        if (isset($this->LastAssistanceUser)) $o['LastAssistanceUser'] = $this->LastAssistanceUser;
        if (isset($this->IsCOPConverter)) $o['IsCOPConverter'] = $this->IsCOPConverter;
        if (isset($this->IsEligibleCOPConverter)) $o['IsEligibleCOPConverter'] = $this->IsEligibleCOPConverter;
        if (isset($this->CarConfigurator)) $o['CarConfigurator'] = JsonConverters::to('CarConfigurator', $this->CarConfigurator);
        if (isset($this->CarConfiguratorResponse)) $o['CarConfiguratorResponse'] = JsonConverters::to('CarConfiguratorResponse', $this->CarConfiguratorResponse);
        return empty($o) ? new class(){} : $o;
    }
}

class Vehicle implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Vin=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Vin'])) $this->Vin = $o['Vin'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Vin)) $o['Vin'] = $this->Vin;
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleCriteriaMatch implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $Fuel=null,
        /** @var bool|null */
        public ?bool $Transmission=null,
        /** @var bool|null */
        public ?bool $Colour=null,
        /** @var bool|null */
        public ?bool $Upholstery=null,
        /** @var bool|null */
        public ?bool $Line=null,
        /** @var bool|null */
        public ?bool $Engine=null,
        /** @var bool|null */
        public ?bool $BodyStyle=null,
        /** @var bool|null */
        public ?bool $Packages=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Fuel'])) $this->Fuel = $o['Fuel'];
        if (isset($o['Transmission'])) $this->Transmission = $o['Transmission'];
        if (isset($o['Colour'])) $this->Colour = $o['Colour'];
        if (isset($o['Upholstery'])) $this->Upholstery = $o['Upholstery'];
        if (isset($o['Line'])) $this->Line = $o['Line'];
        if (isset($o['Engine'])) $this->Engine = $o['Engine'];
        if (isset($o['BodyStyle'])) $this->BodyStyle = $o['BodyStyle'];
        if (isset($o['Packages'])) $this->Packages = $o['Packages'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Fuel)) $o['Fuel'] = $this->Fuel;
        if (isset($this->Transmission)) $o['Transmission'] = $this->Transmission;
        if (isset($this->Colour)) $o['Colour'] = $this->Colour;
        if (isset($this->Upholstery)) $o['Upholstery'] = $this->Upholstery;
        if (isset($this->Line)) $o['Line'] = $this->Line;
        if (isset($this->Engine)) $o['Engine'] = $this->Engine;
        if (isset($this->BodyStyle)) $o['BodyStyle'] = $this->BodyStyle;
        if (isset($this->Packages)) $o['Packages'] = $this->Packages;
        return empty($o) ? new class(){} : $o;
    }
}

enum OfferPriceProductType : string
{
    case LIST_PRICE = 'LIST_PRICE';
    case NUMBER_PLATE_FEE = 'NUMBER_PLATE_FEE';
    case DELIVERY_CHARGE = 'DELIVERY_CHARGE';
    case FUEL_CHARGE = 'FUEL_CHARGE';
    case MANUFACTURER_OFFER = 'MANUFACTURER_OFFER';
    case PERSONALISED_MONEYOFFER = 'PERSONALISED_MONEYOFFER';
    case PERSONALISED_NONMONEYOFFER = 'PERSONALISED_NONMONEYOFFER';
    case PERSONALISED_NONMONEYOFFER_NEG = 'PERSONALISED_NONMONEYOFFER_NEG';
    case SERVICE = 'SERVICE';
    case SERVICE_NEG = 'SERVICE_NEG';
    case GOVERNMENT_GRANT = 'GOVERNMENT_GRANT';
    case OUTRIGHT_PURCHASE_DISCOUNT = 'OUTRIGHT_PURCHASE_DISCOUNT';
    case VIP_OFFER = 'VIP_OFFER';
    case WALLBOX_OFFER = 'WALLBOX_OFFER';
    case WALLBOX_OFFER_NEG = 'WALLBOX_OFFER_NEG';
    case ROAD_FUND_LICENCE = 'ROAD_FUND_LICENCE';
    case FIRST_REGISTRATION_FEE = 'FIRST_REGISTRATION_FEE';
    case NOT_FOUND = 'NOT_FOUND';
    case ACCESSORY_OFFER = 'ACCESSORY_OFFER';
    case ACCESSORY_OFFER_NEG = 'ACCESSORY_OFFER_NEG';
    case MOTABILITY_DISCOUNT = 'MOTABILITY_DISCOUNT';
}

class Price implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string */
        public string $Description='',
        /** @var float */
        public float $Net=0.0,
        /** @var float */
        public float $VAT=0.0,
        /** @var float */
        public float $Gross=0.0,
        /** @var OfferPriceProductType|null */
        public ?OfferPriceProductType $Product=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Net'])) $this->Net = $o['Net'];
        if (isset($o['VAT'])) $this->VAT = $o['VAT'];
        if (isset($o['Gross'])) $this->Gross = $o['Gross'];
        if (isset($o['Product'])) $this->Product = JsonConverters::from('OfferPriceProductType', $o['Product']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Net)) $o['Net'] = $this->Net;
        if (isset($this->VAT)) $o['VAT'] = $this->VAT;
        if (isset($this->Gross)) $o['Gross'] = $this->Gross;
        if (isset($this->Product)) $o['Product'] = JsonConverters::to('OfferPriceProductType', $this->Product);
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleBaseDetail extends Vehicle implements ICommissionNumber, JsonSerializable
{
    /**
     * @param string|null $Vin
     */
    public function __construct(
        ?string $Vin=null,
        /** @var string */
        public string $Description='',
        /** @var string */
        public string $CommissionNumber='',
        /** @var string */
        public string $PortArrivalDate='',
        /** @var string */
        public string $OfferExpiryDate='',
        /** @var string */
        public string $Fuel='',
        /** @var string */
        public string $Transmission='',
        /** @var string */
        public string $TransmissionType='',
        /** @var string */
        public string $Colour='',
        /** @var string */
        public string $ColourDescription='',
        /** @var string */
        public string $ImageUrl='',
        /** @var bool|null */
        public ?bool $Specialist=null,
        /** @var VehicleCriteriaMatch|null */
        public ?VehicleCriteriaMatch $VehicleCriteriaMatch=null,
        /** @var string */
        public string $ColourGroup='',
        /** @var string */
        public string $Model='',
        /** @var string */
        public string $BodyStyle='',
        /** @var string */
        public string $Brand='',
        /** @var string */
        public string $Engine='',
        /** @var string */
        public string $EngineDescription='',
        /** @var string */
        public string $Line='',
        /** @var string */
        public string $Upholstery='',
        /** @var string */
        public string $UpholsteryDescription='',
        /** @var array<string>|null */
        public ?array $Packages=null,
        /** @var float */
        public float $P11D=0.0,
        /** @var array<Price>|null */
        public ?array $Prices=null,
        /** @var string */
        public string $VehicleClass='',
        /** @var string */
        public string $ProductRange='',
        /** @var string */
        public string $VehicleType='',
        /** @var float|null */
        public ?float $Emission=null,
        /** @var string */
        public string $Baumuster='',
        /** @var bool|null */
        public ?bool $IsSellable=null,
        /** @var string */
        public string $Bm7NST='',
        /** @var float|null */
        public ?float $ElectricRange=null,
        /** @var float|null */
        public ?float $ElectricConsumption=null,
        /** @var bool|null */
        public ?bool $IsDisplayStock=null,
        /** @var int|null */
        public ?int $DisplayRetailer_Id=null,
        /** @var string */
        public string $DisplayRetailer='',
        /** @var string */
        public string $DisplayRetailerGssnId='',
        /** @var Retailer|null */
        public ?Retailer $Retailer=null,
        /** @var int|null */
        public ?int $Age=null,
        /** @var string */
        public string $ModelYearCode='',
        /** @var string */
        public string $HalfModelYearCode='',
        /** @var string */
        public string $FullModelYearCode='',
        /** @var string */
        public string $ProductionDate='',
        /** @var string|null */
        public ?string $ChassisNumber=null,
        /** @var bool|null */
        public ?bool $EligibleForIntegratedServiceCare=null
    ) {
        parent::__construct($Vin);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['CommissionNumber'])) $this->CommissionNumber = $o['CommissionNumber'];
        if (isset($o['PortArrivalDate'])) $this->PortArrivalDate = $o['PortArrivalDate'];
        if (isset($o['OfferExpiryDate'])) $this->OfferExpiryDate = $o['OfferExpiryDate'];
        if (isset($o['Fuel'])) $this->Fuel = $o['Fuel'];
        if (isset($o['Transmission'])) $this->Transmission = $o['Transmission'];
        if (isset($o['TransmissionType'])) $this->TransmissionType = $o['TransmissionType'];
        if (isset($o['Colour'])) $this->Colour = $o['Colour'];
        if (isset($o['ColourDescription'])) $this->ColourDescription = $o['ColourDescription'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['Specialist'])) $this->Specialist = $o['Specialist'];
        if (isset($o['VehicleCriteriaMatch'])) $this->VehicleCriteriaMatch = JsonConverters::from('VehicleCriteriaMatch', $o['VehicleCriteriaMatch']);
        if (isset($o['ColourGroup'])) $this->ColourGroup = $o['ColourGroup'];
        if (isset($o['Model'])) $this->Model = $o['Model'];
        if (isset($o['BodyStyle'])) $this->BodyStyle = $o['BodyStyle'];
        if (isset($o['Brand'])) $this->Brand = $o['Brand'];
        if (isset($o['Engine'])) $this->Engine = $o['Engine'];
        if (isset($o['EngineDescription'])) $this->EngineDescription = $o['EngineDescription'];
        if (isset($o['Line'])) $this->Line = $o['Line'];
        if (isset($o['Upholstery'])) $this->Upholstery = $o['Upholstery'];
        if (isset($o['UpholsteryDescription'])) $this->UpholsteryDescription = $o['UpholsteryDescription'];
        if (isset($o['Packages'])) $this->Packages = JsonConverters::fromArray('string', $o['Packages']);
        if (isset($o['P11D'])) $this->P11D = $o['P11D'];
        if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('Price', $o['Prices']);
        if (isset($o['VehicleClass'])) $this->VehicleClass = $o['VehicleClass'];
        if (isset($o['ProductRange'])) $this->ProductRange = $o['ProductRange'];
        if (isset($o['VehicleType'])) $this->VehicleType = $o['VehicleType'];
        if (isset($o['Emission'])) $this->Emission = $o['Emission'];
        if (isset($o['Baumuster'])) $this->Baumuster = $o['Baumuster'];
        if (isset($o['IsSellable'])) $this->IsSellable = $o['IsSellable'];
        if (isset($o['Bm7NST'])) $this->Bm7NST = $o['Bm7NST'];
        if (isset($o['ElectricRange'])) $this->ElectricRange = $o['ElectricRange'];
        if (isset($o['ElectricConsumption'])) $this->ElectricConsumption = $o['ElectricConsumption'];
        if (isset($o['IsDisplayStock'])) $this->IsDisplayStock = $o['IsDisplayStock'];
        if (isset($o['DisplayRetailer_Id'])) $this->DisplayRetailer_Id = $o['DisplayRetailer_Id'];
        if (isset($o['DisplayRetailer'])) $this->DisplayRetailer = $o['DisplayRetailer'];
        if (isset($o['DisplayRetailerGssnId'])) $this->DisplayRetailerGssnId = $o['DisplayRetailerGssnId'];
        if (isset($o['Retailer'])) $this->Retailer = JsonConverters::from('Retailer', $o['Retailer']);
        if (isset($o['Age'])) $this->Age = $o['Age'];
        if (isset($o['ModelYearCode'])) $this->ModelYearCode = $o['ModelYearCode'];
        if (isset($o['HalfModelYearCode'])) $this->HalfModelYearCode = $o['HalfModelYearCode'];
        if (isset($o['FullModelYearCode'])) $this->FullModelYearCode = $o['FullModelYearCode'];
        if (isset($o['ProductionDate'])) $this->ProductionDate = $o['ProductionDate'];
        if (isset($o['ChassisNumber'])) $this->ChassisNumber = $o['ChassisNumber'];
        if (isset($o['EligibleForIntegratedServiceCare'])) $this->EligibleForIntegratedServiceCare = $o['EligibleForIntegratedServiceCare'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->CommissionNumber)) $o['CommissionNumber'] = $this->CommissionNumber;
        if (isset($this->PortArrivalDate)) $o['PortArrivalDate'] = $this->PortArrivalDate;
        if (isset($this->OfferExpiryDate)) $o['OfferExpiryDate'] = $this->OfferExpiryDate;
        if (isset($this->Fuel)) $o['Fuel'] = $this->Fuel;
        if (isset($this->Transmission)) $o['Transmission'] = $this->Transmission;
        if (isset($this->TransmissionType)) $o['TransmissionType'] = $this->TransmissionType;
        if (isset($this->Colour)) $o['Colour'] = $this->Colour;
        if (isset($this->ColourDescription)) $o['ColourDescription'] = $this->ColourDescription;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->Specialist)) $o['Specialist'] = $this->Specialist;
        if (isset($this->VehicleCriteriaMatch)) $o['VehicleCriteriaMatch'] = JsonConverters::to('VehicleCriteriaMatch', $this->VehicleCriteriaMatch);
        if (isset($this->ColourGroup)) $o['ColourGroup'] = $this->ColourGroup;
        if (isset($this->Model)) $o['Model'] = $this->Model;
        if (isset($this->BodyStyle)) $o['BodyStyle'] = $this->BodyStyle;
        if (isset($this->Brand)) $o['Brand'] = $this->Brand;
        if (isset($this->Engine)) $o['Engine'] = $this->Engine;
        if (isset($this->EngineDescription)) $o['EngineDescription'] = $this->EngineDescription;
        if (isset($this->Line)) $o['Line'] = $this->Line;
        if (isset($this->Upholstery)) $o['Upholstery'] = $this->Upholstery;
        if (isset($this->UpholsteryDescription)) $o['UpholsteryDescription'] = $this->UpholsteryDescription;
        if (isset($this->Packages)) $o['Packages'] = JsonConverters::toArray('string', $this->Packages);
        if (isset($this->P11D)) $o['P11D'] = $this->P11D;
        if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('Price', $this->Prices);
        if (isset($this->VehicleClass)) $o['VehicleClass'] = $this->VehicleClass;
        if (isset($this->ProductRange)) $o['ProductRange'] = $this->ProductRange;
        if (isset($this->VehicleType)) $o['VehicleType'] = $this->VehicleType;
        if (isset($this->Emission)) $o['Emission'] = $this->Emission;
        if (isset($this->Baumuster)) $o['Baumuster'] = $this->Baumuster;
        if (isset($this->IsSellable)) $o['IsSellable'] = $this->IsSellable;
        if (isset($this->Bm7NST)) $o['Bm7NST'] = $this->Bm7NST;
        if (isset($this->ElectricRange)) $o['ElectricRange'] = $this->ElectricRange;
        if (isset($this->ElectricConsumption)) $o['ElectricConsumption'] = $this->ElectricConsumption;
        if (isset($this->IsDisplayStock)) $o['IsDisplayStock'] = $this->IsDisplayStock;
        if (isset($this->DisplayRetailer_Id)) $o['DisplayRetailer_Id'] = $this->DisplayRetailer_Id;
        if (isset($this->DisplayRetailer)) $o['DisplayRetailer'] = $this->DisplayRetailer;
        if (isset($this->DisplayRetailerGssnId)) $o['DisplayRetailerGssnId'] = $this->DisplayRetailerGssnId;
        if (isset($this->Retailer)) $o['Retailer'] = JsonConverters::to('Retailer', $this->Retailer);
        if (isset($this->Age)) $o['Age'] = $this->Age;
        if (isset($this->ModelYearCode)) $o['ModelYearCode'] = $this->ModelYearCode;
        if (isset($this->HalfModelYearCode)) $o['HalfModelYearCode'] = $this->HalfModelYearCode;
        if (isset($this->FullModelYearCode)) $o['FullModelYearCode'] = $this->FullModelYearCode;
        if (isset($this->ProductionDate)) $o['ProductionDate'] = $this->ProductionDate;
        if (isset($this->ChassisNumber)) $o['ChassisNumber'] = $this->ChassisNumber;
        if (isset($this->EligibleForIntegratedServiceCare)) $o['EligibleForIntegratedServiceCare'] = $this->EligibleForIntegratedServiceCare;
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleConsumption implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var float */
        public float $Lkm=0.0,
        /** @var float */
        public float $Mpg=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Lkm'])) $this->Lkm = $o['Lkm'];
        if (isset($o['Mpg'])) $this->Mpg = $o['Mpg'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Lkm)) $o['Lkm'] = $this->Lkm;
        if (isset($this->Mpg)) $o['Mpg'] = $this->Mpg;
        return empty($o) ? new class(){} : $o;
    }
}

class Equipment implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Code=null,
        /** @var string|null */
        public ?string $Description=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Code'])) $this->Code = $o['Code'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Code)) $o['Code'] = $this->Code;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        return empty($o) ? new class(){} : $o;
    }
}

class Equipmentv2 extends Equipment implements JsonSerializable
{
    /**
     * @param int $Id
     * @param string|null $Code
     * @param string|null $Description
     */
    public function __construct(
        int $Id=0,
        ?string $Code=null,
        ?string $Description=null,
        /** @var int */
        public int $Importance=0,
        /** @var bool|null */
        public ?bool $IsAdditional=null
    ) {
        parent::__construct($Id,$Code,$Description);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Importance'])) $this->Importance = $o['Importance'];
        if (isset($o['IsAdditional'])) $this->IsAdditional = $o['IsAdditional'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Importance)) $o['Importance'] = $this->Importance;
        if (isset($this->IsAdditional)) $o['IsAdditional'] = $this->IsAdditional;
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleEquipmentCategory implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Order=0,
        /** @var string|null */
        public ?string $Code=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var array<Equipmentv2>|null */
        public ?array $Equipment=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Order'])) $this->Order = $o['Order'];
        if (isset($o['Code'])) $this->Code = $o['Code'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('Equipmentv2', $o['Equipment']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Order)) $o['Order'] = $this->Order;
        if (isset($this->Code)) $o['Code'] = $this->Code;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('Equipmentv2', $this->Equipment);
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleEmissionClass implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Colour=null,
        /** @var string|null */
        public ?string $Rating=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Colour'])) $this->Colour = $o['Colour'];
        if (isset($o['Rating'])) $this->Rating = $o['Rating'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Colour)) $o['Colour'] = $this->Colour;
        if (isset($this->Rating)) $o['Rating'] = $this->Rating;
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleAttribute implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Value=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Value'])) $this->Value = $o['Value'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Value)) $o['Value'] = $this->Value;
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleIntegratedServiceCareOption implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $OptionCode=null,
        /** @var string|null */
        public ?string $BM7NST=null,
        /** @var string|null */
        public ?string $FullModelYear=null,
        /** @var string|null */
        public ?string $IntegratedProductType=null,
        /** @var string|null */
        public ?string $CustomerDescription=null,
        /** @var string|null */
        public ?string $OneAgentProductType=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['OptionCode'])) $this->OptionCode = $o['OptionCode'];
        if (isset($o['BM7NST'])) $this->BM7NST = $o['BM7NST'];
        if (isset($o['FullModelYear'])) $this->FullModelYear = $o['FullModelYear'];
        if (isset($o['IntegratedProductType'])) $this->IntegratedProductType = $o['IntegratedProductType'];
        if (isset($o['CustomerDescription'])) $this->CustomerDescription = $o['CustomerDescription'];
        if (isset($o['OneAgentProductType'])) $this->OneAgentProductType = $o['OneAgentProductType'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->OptionCode)) $o['OptionCode'] = $this->OptionCode;
        if (isset($this->BM7NST)) $o['BM7NST'] = $this->BM7NST;
        if (isset($this->FullModelYear)) $o['FullModelYear'] = $this->FullModelYear;
        if (isset($this->IntegratedProductType)) $o['IntegratedProductType'] = $this->IntegratedProductType;
        if (isset($this->CustomerDescription)) $o['CustomerDescription'] = $this->CustomerDescription;
        if (isset($this->OneAgentProductType)) $o['OneAgentProductType'] = $this->OneAgentProductType;
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleDetail extends VehicleBaseDetail implements JsonSerializable
{
    /**
     * @param string|null $Vin
     * @param string $Description
     * @param string $CommissionNumber
     * @param string $PortArrivalDate
     * @param string $OfferExpiryDate
     * @param string $Fuel
     * @param string $Transmission
     * @param string $TransmissionType
     * @param string $Colour
     * @param string $ColourDescription
     * @param string $ImageUrl
     * @param bool|null $Specialist
     * @param VehicleCriteriaMatch|null $VehicleCriteriaMatch
     * @param string $ColourGroup
     * @param string $Model
     * @param string $BodyStyle
     * @param string $Brand
     * @param string $Engine
     * @param string $EngineDescription
     * @param string $Line
     * @param string $Upholstery
     * @param string $UpholsteryDescription
     * @param array<string>|null $Packages
     * @param float $P11D
     * @param array<Price>|null $Prices
     * @param string $VehicleClass
     * @param string $ProductRange
     * @param string $VehicleType
     * @param float|null $Emission
     * @param string $Baumuster
     * @param bool|null $IsSellable
     * @param string $Bm7NST
     * @param float|null $ElectricRange
     * @param float|null $ElectricConsumption
     * @param bool|null $IsDisplayStock
     * @param int|null $DisplayRetailer_Id
     * @param string $DisplayRetailer
     * @param string $DisplayRetailerGssnId
     * @param Retailer|null $Retailer
     * @param int|null $Age
     * @param string $ModelYearCode
     * @param string $HalfModelYearCode
     * @param string $FullModelYearCode
     * @param string $ProductionDate
     * @param string|null $ChassisNumber
     * @param bool|null $EligibleForIntegratedServiceCare
     */
    public function __construct(
        ?string $Vin=null,
        string $Description='',
        string $CommissionNumber='',
        string $PortArrivalDate='',
        string $OfferExpiryDate='',
        string $Fuel='',
        string $Transmission='',
        string $TransmissionType='',
        string $Colour='',
        string $ColourDescription='',
        string $ImageUrl='',
        ?bool $Specialist=null,
        ?VehicleCriteriaMatch $VehicleCriteriaMatch=null,
        string $ColourGroup='',
        string $Model='',
        string $BodyStyle='',
        string $Brand='',
        string $Engine='',
        string $EngineDescription='',
        string $Line='',
        string $Upholstery='',
        string $UpholsteryDescription='',
        ?array $Packages=null,
        float $P11D=0.0,
        ?array $Prices=null,
        string $VehicleClass='',
        string $ProductRange='',
        string $VehicleType='',
        ?float $Emission=null,
        string $Baumuster='',
        ?bool $IsSellable=null,
        string $Bm7NST='',
        ?float $ElectricRange=null,
        ?float $ElectricConsumption=null,
        ?bool $IsDisplayStock=null,
        ?int $DisplayRetailer_Id=null,
        string $DisplayRetailer='',
        string $DisplayRetailerGssnId='',
        ?Retailer $Retailer=null,
        ?int $Age=null,
        string $ModelYearCode='',
        string $HalfModelYearCode='',
        string $FullModelYearCode='',
        string $ProductionDate='',
        ?string $ChassisNumber=null,
        ?bool $EligibleForIntegratedServiceCare=null,
        /** @var string */
        public string $RetailPrice_ExVAT='',
        /** @var string */
        public string $OTR='',
        /** @var string */
        public string $ActualPrice='',
        /** @var string */
        public string $TotalOfferValue='',
        /** @var bool|null */
        public ?bool $IsHOBackOrderAccountVehicle=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $ConsumptionCombined=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $ConsumptionExtraUrban=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $ConsumptionUrban=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $WltpFuelConsumptionCombined=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $WltpFuelConsumptionExtraHigh=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $WltpFuelConsumptionHigh=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $WltpFuelConsumptionLow=null,
        /** @var VehicleConsumption|null */
        public ?VehicleConsumption $WltpFuelConsumptionMedium=null,
        /** @var array<VehicleEquipmentCategory>|null */
        public ?array $EquipmentCategories=null,
        /** @var VehicleEmissionClass|null */
        public ?VehicleEmissionClass $VehicleEnergyEfficiencyClass=null,
        /** @var array<VehicleAttribute>|null */
        public ?array $VehicleData=null,
        /** @var array<VehicleIntegratedServiceCareOption>|null */
        public ?array $IntegratedProducts=null,
        /** @var array<string>|null */
        public ?array $IspVehicleCustomerDescriptions=null,
        /** @var string */
        public string $ColourCode='',
        /** @var string */
        public string $UpholsteryCode=''
    ) {
        parent::__construct($Vin,$Description,$CommissionNumber,$PortArrivalDate,$OfferExpiryDate,$Fuel,$Transmission,$TransmissionType,$Colour,$ColourDescription,$ImageUrl,$Specialist,$VehicleCriteriaMatch,$ColourGroup,$Model,$BodyStyle,$Brand,$Engine,$EngineDescription,$Line,$Upholstery,$UpholsteryDescription,$Packages,$P11D,$Prices,$VehicleClass,$ProductRange,$VehicleType,$Emission,$Baumuster,$IsSellable,$Bm7NST,$ElectricRange,$ElectricConsumption,$IsDisplayStock,$DisplayRetailer_Id,$DisplayRetailer,$DisplayRetailerGssnId,$Retailer,$Age,$ModelYearCode,$HalfModelYearCode,$FullModelYearCode,$ProductionDate,$ChassisNumber,$EligibleForIntegratedServiceCare);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['RetailPrice_ExVAT'])) $this->RetailPrice_ExVAT = $o['RetailPrice_ExVAT'];
        if (isset($o['OTR'])) $this->OTR = $o['OTR'];
        if (isset($o['ActualPrice'])) $this->ActualPrice = $o['ActualPrice'];
        if (isset($o['TotalOfferValue'])) $this->TotalOfferValue = $o['TotalOfferValue'];
        if (isset($o['IsHOBackOrderAccountVehicle'])) $this->IsHOBackOrderAccountVehicle = $o['IsHOBackOrderAccountVehicle'];
        if (isset($o['ConsumptionCombined'])) $this->ConsumptionCombined = JsonConverters::from('VehicleConsumption', $o['ConsumptionCombined']);
        if (isset($o['ConsumptionExtraUrban'])) $this->ConsumptionExtraUrban = JsonConverters::from('VehicleConsumption', $o['ConsumptionExtraUrban']);
        if (isset($o['ConsumptionUrban'])) $this->ConsumptionUrban = JsonConverters::from('VehicleConsumption', $o['ConsumptionUrban']);
        if (isset($o['WltpFuelConsumptionCombined'])) $this->WltpFuelConsumptionCombined = JsonConverters::from('VehicleConsumption', $o['WltpFuelConsumptionCombined']);
        if (isset($o['WltpFuelConsumptionExtraHigh'])) $this->WltpFuelConsumptionExtraHigh = JsonConverters::from('VehicleConsumption', $o['WltpFuelConsumptionExtraHigh']);
        if (isset($o['WltpFuelConsumptionHigh'])) $this->WltpFuelConsumptionHigh = JsonConverters::from('VehicleConsumption', $o['WltpFuelConsumptionHigh']);
        if (isset($o['WltpFuelConsumptionLow'])) $this->WltpFuelConsumptionLow = JsonConverters::from('VehicleConsumption', $o['WltpFuelConsumptionLow']);
        if (isset($o['WltpFuelConsumptionMedium'])) $this->WltpFuelConsumptionMedium = JsonConverters::from('VehicleConsumption', $o['WltpFuelConsumptionMedium']);
        if (isset($o['EquipmentCategories'])) $this->EquipmentCategories = JsonConverters::fromArray('VehicleEquipmentCategory', $o['EquipmentCategories']);
        if (isset($o['VehicleEnergyEfficiencyClass'])) $this->VehicleEnergyEfficiencyClass = JsonConverters::from('VehicleEmissionClass', $o['VehicleEnergyEfficiencyClass']);
        if (isset($o['VehicleData'])) $this->VehicleData = JsonConverters::fromArray('VehicleAttribute', $o['VehicleData']);
        if (isset($o['IntegratedProducts'])) $this->IntegratedProducts = JsonConverters::fromArray('VehicleIntegratedServiceCareOption', $o['IntegratedProducts']);
        if (isset($o['IspVehicleCustomerDescriptions'])) $this->IspVehicleCustomerDescriptions = JsonConverters::fromArray('string', $o['IspVehicleCustomerDescriptions']);
        if (isset($o['ColourCode'])) $this->ColourCode = $o['ColourCode'];
        if (isset($o['UpholsteryCode'])) $this->UpholsteryCode = $o['UpholsteryCode'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->RetailPrice_ExVAT)) $o['RetailPrice_ExVAT'] = $this->RetailPrice_ExVAT;
        if (isset($this->OTR)) $o['OTR'] = $this->OTR;
        if (isset($this->ActualPrice)) $o['ActualPrice'] = $this->ActualPrice;
        if (isset($this->TotalOfferValue)) $o['TotalOfferValue'] = $this->TotalOfferValue;
        if (isset($this->IsHOBackOrderAccountVehicle)) $o['IsHOBackOrderAccountVehicle'] = $this->IsHOBackOrderAccountVehicle;
        if (isset($this->ConsumptionCombined)) $o['ConsumptionCombined'] = JsonConverters::to('VehicleConsumption', $this->ConsumptionCombined);
        if (isset($this->ConsumptionExtraUrban)) $o['ConsumptionExtraUrban'] = JsonConverters::to('VehicleConsumption', $this->ConsumptionExtraUrban);
        if (isset($this->ConsumptionUrban)) $o['ConsumptionUrban'] = JsonConverters::to('VehicleConsumption', $this->ConsumptionUrban);
        if (isset($this->WltpFuelConsumptionCombined)) $o['WltpFuelConsumptionCombined'] = JsonConverters::to('VehicleConsumption', $this->WltpFuelConsumptionCombined);
        if (isset($this->WltpFuelConsumptionExtraHigh)) $o['WltpFuelConsumptionExtraHigh'] = JsonConverters::to('VehicleConsumption', $this->WltpFuelConsumptionExtraHigh);
        if (isset($this->WltpFuelConsumptionHigh)) $o['WltpFuelConsumptionHigh'] = JsonConverters::to('VehicleConsumption', $this->WltpFuelConsumptionHigh);
        if (isset($this->WltpFuelConsumptionLow)) $o['WltpFuelConsumptionLow'] = JsonConverters::to('VehicleConsumption', $this->WltpFuelConsumptionLow);
        if (isset($this->WltpFuelConsumptionMedium)) $o['WltpFuelConsumptionMedium'] = JsonConverters::to('VehicleConsumption', $this->WltpFuelConsumptionMedium);
        if (isset($this->EquipmentCategories)) $o['EquipmentCategories'] = JsonConverters::toArray('VehicleEquipmentCategory', $this->EquipmentCategories);
        if (isset($this->VehicleEnergyEfficiencyClass)) $o['VehicleEnergyEfficiencyClass'] = JsonConverters::to('VehicleEmissionClass', $this->VehicleEnergyEfficiencyClass);
        if (isset($this->VehicleData)) $o['VehicleData'] = JsonConverters::toArray('VehicleAttribute', $this->VehicleData);
        if (isset($this->IntegratedProducts)) $o['IntegratedProducts'] = JsonConverters::toArray('VehicleIntegratedServiceCareOption', $this->IntegratedProducts);
        if (isset($this->IspVehicleCustomerDescriptions)) $o['IspVehicleCustomerDescriptions'] = JsonConverters::toArray('string', $this->IspVehicleCustomerDescriptions);
        if (isset($this->ColourCode)) $o['ColourCode'] = $this->ColourCode;
        if (isset($this->UpholsteryCode)) $o['UpholsteryCode'] = $this->UpholsteryCode;
        return empty($o) ? new class(){} : $o;
    }
}

class BackOrder extends BackOrderBase implements JsonSerializable
{
    /**
     * @param string $Guid
     * @param int $Status
     * @param string $CustomerId
     * @param int $Id
     * @param string $Reference
     * @param string $Agent
     * @param string $Gssn
     * @param DateTime $CreationDate
     * @param DateTime $MaintenanceDate
     * @param string $CustomerCriteria
     * @param string|null $AgentCriteria
     * @param array<BackOrderHistory>|null $History
     * @param bool|null $IsAllocatedToOrder
     * @param string $Vin
     * @param string|null $CommissionNumber
     * @param Order|null $Order
     * @param string $Source
     * @param bool|null $Specialist
     * @param bool|null $OutrightPurchase
     * @param bool|null $Sellable
     * @param string $MulesoftReference
     * @param string $AdditionalInformation
     * @param string $ConfigCode
     * @param string $FleetBaseOrder
     * @param string $GasId
     * @param string $OutrightPurchaseCustomerIdentifier
     * @param Retailer|null $Retailer
     * @param int $CustomerMode
     * @param bool|null $CanEdit
     * @param string|null $DigitalLoungeGssnId
     * @param string|null $DigitalLounge
     * @param bool|null $Motability
     * @param MotabilityPricing|null $MotabilityPricing
     * @param string|null $LinkedByUserType
     * @param int|null $AssistanceProviderId
     * @param string|null $AssistanceProvider
     * @param string|null $AssistanceDetail
     * @param DateTime|null $LastAssistanceMessageDate
     * @param string|null $LastAssistanceUser
     * @param bool|null $IsCOPConverter
     * @param bool|null $IsEligibleCOPConverter
     * @param CarConfigurator|null $CarConfigurator
     * @param CarConfiguratorResponse|null $CarConfiguratorResponse
     */
    public function __construct(
        string $Guid='',
        int $Status=0,
        string $CustomerId='',
        int $Id=0,
        string $Reference='',
        string $Agent='',
        string $Gssn='',
        DateTime $CreationDate=new DateTime(),
        DateTime $MaintenanceDate=new DateTime(),
        string $CustomerCriteria='',
        ?string $AgentCriteria=null,
        ?array $History=null,
        ?bool $IsAllocatedToOrder=null,
        string $Vin='',
        ?string $CommissionNumber=null,
        ?Order $Order=null,
        string $Source='',
        ?bool $Specialist=null,
        ?bool $OutrightPurchase=null,
        ?bool $Sellable=null,
        string $MulesoftReference='',
        string $AdditionalInformation='',
        string $ConfigCode='',
        string $FleetBaseOrder='',
        string $GasId='',
        string $OutrightPurchaseCustomerIdentifier='',
        ?Retailer $Retailer=null,
        int $CustomerMode=0,
        ?bool $CanEdit=null,
        ?string $DigitalLoungeGssnId=null,
        ?string $DigitalLounge=null,
        ?bool $Motability=null,
        ?MotabilityPricing $MotabilityPricing=null,
        ?string $LinkedByUserType=null,
        ?int $AssistanceProviderId=null,
        ?string $AssistanceProvider=null,
        ?string $AssistanceDetail=null,
        ?DateTime $LastAssistanceMessageDate=null,
        ?string $LastAssistanceUser=null,
        ?bool $IsCOPConverter=null,
        ?bool $IsEligibleCOPConverter=null,
        ?CarConfigurator $CarConfigurator=null,
        ?CarConfiguratorResponse $CarConfiguratorResponse=null,
        /** @var VehicleDetail|null */
        public ?VehicleDetail $Vehicle=null
    ) {
        parent::__construct($Guid,$Status,$CustomerId,$Id,$Reference,$Agent,$Gssn,$CreationDate,$MaintenanceDate,$CustomerCriteria,$AgentCriteria,$History,$IsAllocatedToOrder,$Vin,$CommissionNumber,$Order,$Source,$Specialist,$OutrightPurchase,$Sellable,$MulesoftReference,$AdditionalInformation,$ConfigCode,$FleetBaseOrder,$GasId,$OutrightPurchaseCustomerIdentifier,$Retailer,$CustomerMode,$CanEdit,$DigitalLoungeGssnId,$DigitalLounge,$Motability,$MotabilityPricing,$LinkedByUserType,$AssistanceProviderId,$AssistanceProvider,$AssistanceDetail,$LastAssistanceMessageDate,$LastAssistanceUser,$IsCOPConverter,$IsEligibleCOPConverter,$CarConfigurator,$CarConfiguratorResponse);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Vehicle'])) $this->Vehicle = JsonConverters::from('VehicleDetail', $o['Vehicle']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Vehicle)) $o['Vehicle'] = JsonConverters::to('VehicleDetail', $this->Vehicle);
        return empty($o) ? new class(){} : $o;
    }
}

class FilterBackOrdersResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<BackOrder>|null */
        public ?array $BackOrders=null,
        /** @var string */
        public string $FilteredGssn='',
        /** @var string */
        public string $FilteredRetailer=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['BackOrders'])) $this->BackOrders = JsonConverters::fromArray('BackOrder', $o['BackOrders']);
        if (isset($o['FilteredGssn'])) $this->FilteredGssn = $o['FilteredGssn'];
        if (isset($o['FilteredRetailer'])) $this->FilteredRetailer = $o['FilteredRetailer'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->BackOrders)) $o['BackOrders'] = JsonConverters::toArray('BackOrder', $this->BackOrders);
        if (isset($this->FilteredGssn)) $o['FilteredGssn'] = $this->FilteredGssn;
        if (isset($this->FilteredRetailer)) $o['FilteredRetailer'] = $this->FilteredRetailer;
        return empty($o) ? new class(){} : $o;
    }
}

class FilterActiveBackOrdersCsvRequest extends FilterBackOrders implements IPost, JsonSerializable
{
    /**
     * @param bool|null $Historical
     * @param BackOrderCriteria|null $BackOrderCriteria
     * @param VehicleCriteria|null $VehicleCriteria
     * @param DateCriteria|null $DateCriteria
     * @param string[]|null $GssnIds
     */
    public function __construct(
        ?bool $Historical=null,
        ?BackOrderCriteria $BackOrderCriteria=null,
        ?VehicleCriteria $VehicleCriteria=null,
        ?DateCriteria $DateCriteria=null,
        ?array $GssnIds=null
    ) {
        parent::__construct($Historical,$BackOrderCriteria,$VehicleCriteria,$DateCriteria,$GssnIds);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

PHP FilterActiveBackOrdersCsvRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/backorder/active/csv HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Historical":false,"BackOrderCriteria":{"Source":[0],"CustomerType":[0],"CommLinkedBy":[0],"VinAllocated":false,"VinAllocatedSellable":false,"VinAllocatedNotSellable":false,"Specialist":false,"LinkedOrder":false,"AssistanceProviders":[0],"COPConverter":false},"VehicleCriteria":{"Model":[{"Description":"String","Id":0}],"Colour":["String"],"FuelType":["String"],"Transmission":["String"],"Engine":["String"],"Line":["String"],"Package":["String"],"Equipment":["String"],"Upholstery":["String"]},"DateCriteria":{"Created":{"Date":"\/Date(-62135596800000-0000)\/","Range":{"Min":0,"Max":0}},"Modified":{"Date":"\/Date(-62135596800000-0000)\/","Range":{"Min":0,"Max":0}}},"GssnIds":["String"]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"BackOrders":[{"Vehicle":{"RetailPrice_ExVAT":"String","OTR":"String","ActualPrice":"String","TotalOfferValue":"String","IsHOBackOrderAccountVehicle":false,"ConsumptionCombined":{"Id":0,"Lkm":0,"Mpg":0},"ConsumptionExtraUrban":{"Id":0,"Lkm":0,"Mpg":0},"ConsumptionUrban":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionCombined":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionExtraHigh":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionHigh":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionLow":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionMedium":{"Id":0,"Lkm":0,"Mpg":0},"EquipmentCategories":[{"Order":0,"Code":"String","Description":"String","Equipment":[{"Importance":0,"IsAdditional":false,"Id":0,"Code":"String","Description":"String"}]}],"VehicleEnergyEfficiencyClass":{"Colour":"String","Rating":"String"},"VehicleData":[{"Description":"String","Value":"String"}],"IntegratedProducts":[{"OptionCode":"String","BM7NST":"String","FullModelYear":"String","IntegratedProductType":"String","CustomerDescription":"String","OneAgentProductType":"String"}],"IspVehicleCustomerDescriptions":["String"],"ColourCode":"String","UpholsteryCode":"String","Description":"String","CommissionNumber":"String","PortArrivalDate":"String","OfferExpiryDate":"String","Fuel":"String","Transmission":"String","TransmissionType":"String","Colour":"String","ColourDescription":"String","ImageUrl":"String","Specialist":false,"VehicleCriteriaMatch":{"Fuel":false,"Transmission":false,"Colour":false,"Upholstery":false,"Line":false,"Engine":false,"BodyStyle":false,"Packages":false},"ColourGroup":"String","Model":"String","BodyStyle":"String","Brand":"String","Engine":"String","EngineDescription":"String","Line":"String","Upholstery":"String","UpholsteryDescription":"String","Packages":["String"],"P11D":0,"Prices":[{"Id":"String","Description":"String","Net":0,"VAT":0,"Gross":0,"Product":"LIST_PRICE"}],"VehicleClass":"String","ProductRange":"String","VehicleType":"String","Emission":0,"Baumuster":"String","IsSellable":false,"Bm7NST":"String","ElectricRange":0,"ElectricConsumption":0,"IsDisplayStock":false,"DisplayRetailer_Id":0,"DisplayRetailer":"String","DisplayRetailerGssnId":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"Age":0,"ModelYearCode":"String","HalfModelYearCode":"String","FullModelYearCode":"String","ProductionDate":"String","ChassisNumber":"String","EligibleForIntegratedServiceCare":false,"Vin":"String"},"Guid":"String","Status":0,"CustomerId":"String","Id":0,"Reference":"String","Agent":"String","Gssn":"String","CreationDate":"\/Date(-62135596800000-0000)\/","MaintenanceDate":"\/Date(-62135596800000-0000)\/","CustomerCriteria":"String","AgentCriteria":"String","History":[{"Status":0,"CommissionNumber":"String","VIN":"String","CustomerCriteria":"String","AgentCriteria":"String","CreationDate":"\/Date(-62135596800000-0000)\/","MaintenanceDate":"\/Date(-62135596800000-0000)\/","GasId":"String","Sellable":false,"AdditionalInformation":"String","Reason":"String","ConfigCode":"String","FleetBaseOrder":"String","AssistanceDetail":"String","AssistanceProvider":"String","LinkedByUserType":"String","MotabilityVTN":"String","MotabilityBackOrderDropDown":"String","MotabilityValidFrom":"\/Date(-62135596800000-0000)\/","MotabilityValidTo":"\/Date(-62135596800000-0000)\/"}],"IsAllocatedToOrder":false,"Vin":"String","CommissionNumber":"String","Order":{"Guid":"00000000000000000000000000000000","Reference":"String","Status":0,"CustomerId":"String","MulesoftReference":"String","GasId":"String","OrderDate":"String","OfferSnapShot":"String"},"Source":"String","Specialist":false,"OutrightPurchase":false,"Sellable":false,"MulesoftReference":"String","AdditionalInformation":"String","ConfigCode":"String","FleetBaseOrder":"String","GasId":"String","OutrightPurchaseCustomerIdentifier":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"CustomerMode":0,"CanEdit":false,"DigitalLoungeGssnId":"String","DigitalLounge":"String","Motability":false,"MotabilityPricing":{"MotabilityPricingStatus":"Pending","Id":0,"CriteriaBM7NST":"String","VTN":"String","BackOrderDropDown":"String","CriteriaFullModelYearCode":"String","CriteriaValidOptionCodes":"String","CriteriaInvalidOptionCodes":"String","PIPNet":0,"PIPVat":0,"PIPGross":0,"WPMSNet":0,"WPMSVat":0,"WPMSGross":0,"DiscountNet":0,"DiscountVat":0,"DiscountGross":0,"ListPriceNet":0,"ListPriceVat":0,"ListPriceGross":0,"DeliveryChargeNet":0,"DeliveryChargeVat":0,"DeliveryChargeGross":0,"FuelChargeNet":0,"FuelChargeVat":0,"FuelChargeGross":0,"NumberPlateFeeNet":0,"NumberPlateFeeVat":0,"NumberPlateFeeGross":0,"FirstRegistrationFeeNet":0,"FirstRegistrationFeeVat":0,"FirstRegistrationFeeGross":0,"RoadFundLicenceNet":0,"RoadFundLicenceVat":0,"RoadFundLicenceGross":0,"ValidFrom":"\/Date(-62135596800000-0000)\/","ValidTo":"\/Date(-62135596800000-0000)\/"},"LinkedByUserType":"String","AssistanceProviderId":0,"AssistanceProvider":"String","AssistanceDetail":"String","LastAssistanceMessageDate":"\/Date(-62135596800000-0000)\/","LastAssistanceUser":"String","IsCOPConverter":false,"IsEligibleCOPConverter":false,"CarConfigurator":{"Id":0,"BackOrderId":0,"ConfiguratorCode":"String","GasId":"String","Status":0,"DateOfLastUpdate":"\/Date(-62135596800000-0000)\/","LastExceptionMessage":"String","LastException":"String"},"CarConfiguratorResponse":{"Name":"String","KeyInformation":{"BM7NST":"String","ConfigurationDate":"String","ModelYear":"String","HalfYear":"String"},"OrderingOptions":{"Interior":["String"],"Exterior":["String"],"Other":["String"]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ConfiguratorCode":"String"}}],"FilteredGssn":"String","FilteredRetailer":"String"}