Mercedes.Agency.Orchestration.API

<back to all web services

GetVehicleRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/vehicleGet Vehicle by Vin
<?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 GetVehicleRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Vin='',
        /** @var bool|null */
        public ?bool $IncludeAllocatedToOrder=null,
        /** @var string */
        public string $Gssn='',
        /** @var bool|null */
        public ?bool $IsOneAdmin=null
    ) {
    }

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

class Model implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $DisplayName=null,
        /** @var string|null */
        public ?string $ImageUrlSmall=null,
        /** @var string|null */
        public ?string $ImageUrlMedium=null,
        /** @var string|null */
        public ?string $ImageUrlLarge=null,
        /** @var bool|null */
        public ?bool $Specialist=null,
        /** @var int */
        public int $Priority=0,
        /** @var bool|null */
        public ?bool $ExcludeFromOnlineShowroomFilters=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['DisplayName'])) $this->DisplayName = $o['DisplayName'];
        if (isset($o['ImageUrlSmall'])) $this->ImageUrlSmall = $o['ImageUrlSmall'];
        if (isset($o['ImageUrlMedium'])) $this->ImageUrlMedium = $o['ImageUrlMedium'];
        if (isset($o['ImageUrlLarge'])) $this->ImageUrlLarge = $o['ImageUrlLarge'];
        if (isset($o['Specialist'])) $this->Specialist = $o['Specialist'];
        if (isset($o['Priority'])) $this->Priority = $o['Priority'];
        if (isset($o['ExcludeFromOnlineShowroomFilters'])) $this->ExcludeFromOnlineShowroomFilters = $o['ExcludeFromOnlineShowroomFilters'];
    }
    
    /** @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->DisplayName)) $o['DisplayName'] = $this->DisplayName;
        if (isset($this->ImageUrlSmall)) $o['ImageUrlSmall'] = $this->ImageUrlSmall;
        if (isset($this->ImageUrlMedium)) $o['ImageUrlMedium'] = $this->ImageUrlMedium;
        if (isset($this->ImageUrlLarge)) $o['ImageUrlLarge'] = $this->ImageUrlLarge;
        if (isset($this->Specialist)) $o['Specialist'] = $this->Specialist;
        if (isset($this->Priority)) $o['Priority'] = $this->Priority;
        if (isset($this->ExcludeFromOnlineShowroomFilters)) $o['ExcludeFromOnlineShowroomFilters'] = $this->ExcludeFromOnlineShowroomFilters;
        return empty($o) ? new class(){} : $o;
    }
}

class BodyStyle implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var array<Model>|null */
        public ?array $Models=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['Models'])) $this->Models = JsonConverters::fromArray('Model', $o['Models']);
    }
    
    /** @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->Models)) $o['Models'] = JsonConverters::toArray('Model', $this->Models);
        return empty($o) ? new class(){} : $o;
    }
}

class Brand implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $DisplayName=null,
        /** @var array<BodyStyle>|null */
        public ?array $BodyStyles=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['DisplayName'])) $this->DisplayName = $o['DisplayName'];
        if (isset($o['BodyStyles'])) $this->BodyStyles = JsonConverters::fromArray('BodyStyle', $o['BodyStyles']);
    }
    
    /** @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->DisplayName)) $o['DisplayName'] = $this->DisplayName;
        if (isset($this->BodyStyles)) $o['BodyStyles'] = JsonConverters::toArray('BodyStyle', $this->BodyStyles);
        return empty($o) ? new class(){} : $o;
    }
}

class Engine implements JsonSerializable
{
    public function __construct(
        /** @var int|null */
        public ?int $Id=null,
        /** @var string */
        public string $Badge=''
    ) {
    }

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

class Media implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $NoImage=null,
        /** @var string */
        public string $MainImageUrl=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['NoImage'])) $this->NoImage = $o['NoImage'];
        if (isset($o['MainImageUrl'])) $this->MainImageUrl = $o['MainImageUrl'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->NoImage)) $o['NoImage'] = $this->NoImage;
        if (isset($this->MainImageUrl)) $o['MainImageUrl'] = $this->MainImageUrl;
        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 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 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 VehicleDetailDto implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $BodyStyle='',
        /** @var string */
        public string $Vin='',
        /** @var string */
        public string $Description='',
        /** @var string */
        public string $Colour='',
        /** @var string */
        public string $ColourCode='',
        /** @var string */
        public string $ColourDescription='',
        /** @var string */
        public string $ColourGroup='',
        /** @var string */
        public string $Model='',
        /** @var string */
        public string $CommissionNumber='',
        /** @var int|null */
        public ?int $BrandId=null,
        /** @var Brand|null */
        public ?Brand $Brand=null,
        /** @var Engine|null */
        public ?Engine $Engine=null,
        /** @var string */
        public string $EngineBadge='',
        /** @var Media|null */
        public ?Media $Media=null,
        /** @var string */
        public string $Line='',
        /** @var string */
        public string $UpholsteryCode='',
        /** @var string */
        public string $UpholsteryType='',
        /** @var string */
        public string $Upholstery='',
        /** @var string */
        public string $UpholsteryDescription='',
        /** @var array<string>|null */
        public ?array $AvailablePackages=null,
        /** @var array<string>|null */
        public ?array $Packages=null,
        /** @var float */
        public float $P11D=0.0,
        /** @var DateTime|null */
        public ?DateTime $PortArrivalDate=null,
        /** @var array<Price>|null */
        public ?array $Prices=null,
        /** @var string */
        public string $TransmissionType='',
        /** @var string */
        public string $FuelType='',
        /** @var string */
        public string $VehicleClass='',
        /** @var string */
        public string $ProductRange='',
        /** @var string */
        public string $VehicleType='',
        /** @var float|null */
        public ?float $Emission=null,
        /** @var bool|null */
        public ?bool $IsAvailableOnline=null,
        /** @var bool|null */
        public ?bool $UnderOffer=null,
        /** @var bool|null */
        public ?bool $IsExcluded=null,
        /** @var bool|null */
        public ?bool $IsSellable=null,
        /** @var bool|null */
        public ?bool $OnHold=null,
        /** @var float|null */
        public ?float $ElectricConsumption=null,
        /** @var float|null */
        public ?float $ElectricRange=null,
        /** @var string */
        public string $ImageUrl='',
        /** @var string */
        public string $Baumuster='',
        /** @var Retailer|null */
        public ?Retailer $Retailer=null,
        /** @var string */
        public string $Bm7NST='',
        /** @var float */
        public float $OTR=0.0,
        /** @var float */
        public float $ActualPrice=0.0,
        /** @var bool|null */
        public ?bool $IsDisplayStock=null,
        /** @var int|null */
        public ?int $DisplayRetailerId=null,
        /** @var string */
        public string $DisplayRetailer='',
        /** @var string */
        public string $DisplayRetailerGssnId='',
        /** @var string */
        public string $DisplayRetailerMarketAreaId='',
        /** @var bool|null */
        public ?bool $IsSmartDisplayRetailer=null,
        /** @var bool|null */
        public ?bool $IsSpecialistCar=null,
        /** @var int|null */
        public ?int $Age=null,
        /** @var bool|null */
        public ?bool $Secured=null,
        /** @var bool|null */
        public ?bool $IsHOBackOrderAccountVehicle=null,
        /** @var bool|null */
        public ?bool $IsAllocatedToBackOrder=null,
        /** @var string */
        public string $UsageCode='',
        /** @var float|null */
        public ?float $EmissionCombined=null,
        /** @var string|null */
        public ?string $NormalisedEmissionDirective=null,
        /** @var bool|null */
        public ?bool $HasMildHybridEquipmentCode=null,
        /** @var float */
        public float $RetailPriceExVat=0.0,
        /** @var float */
        public float $RetailPrice_IncVAT=0.0,
        /** @var float */
        public float $RetailPrice_ExVAT=0.0,
        /** @var int */
        public int $ModelId=0,
        /** @var string|null */
        public ?string $VID=null,
        /** @var string|null */
        public ?string $ProductionDate=null,
        /** @var string|null */
        public ?string $FullModelYearCode=null,
        /** @var string|null */
        public ?string $ChassisNumber=null,
        /** @var bool|null */
        public ?bool $EligibleForIntegratedServiceCare=null,
        /** @var string|null */
        public ?string $AccountType=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<Equipmentv2>|null */
        public ?array $Equipment=null,
        /** @var array<VehicleEquipmentCategory>|null */
        public ?array $EquipmentCategories=null,
        /** @var VehicleEmissionClass|null */
        public ?VehicleEmissionClass $EnergyEfficiencyClass=null,
        /** @var array<VehicleAttribute>|null */
        public ?array $VehicleData=null,
        /** @var array<VehicleIntegratedServiceCareOption>|null */
        public ?array $IntegratedServiceCareOptions=null,
        /** @var array<string>|null */
        public ?array $IspVehicleCustomerDescriptions=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['BodyStyle'])) $this->BodyStyle = $o['BodyStyle'];
        if (isset($o['Vin'])) $this->Vin = $o['Vin'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Colour'])) $this->Colour = $o['Colour'];
        if (isset($o['ColourCode'])) $this->ColourCode = $o['ColourCode'];
        if (isset($o['ColourDescription'])) $this->ColourDescription = $o['ColourDescription'];
        if (isset($o['ColourGroup'])) $this->ColourGroup = $o['ColourGroup'];
        if (isset($o['Model'])) $this->Model = $o['Model'];
        if (isset($o['CommissionNumber'])) $this->CommissionNumber = $o['CommissionNumber'];
        if (isset($o['BrandId'])) $this->BrandId = $o['BrandId'];
        if (isset($o['Brand'])) $this->Brand = JsonConverters::from('Brand', $o['Brand']);
        if (isset($o['Engine'])) $this->Engine = JsonConverters::from('Engine', $o['Engine']);
        if (isset($o['EngineBadge'])) $this->EngineBadge = $o['EngineBadge'];
        if (isset($o['Media'])) $this->Media = JsonConverters::from('Media', $o['Media']);
        if (isset($o['Line'])) $this->Line = $o['Line'];
        if (isset($o['UpholsteryCode'])) $this->UpholsteryCode = $o['UpholsteryCode'];
        if (isset($o['UpholsteryType'])) $this->UpholsteryType = $o['UpholsteryType'];
        if (isset($o['Upholstery'])) $this->Upholstery = $o['Upholstery'];
        if (isset($o['UpholsteryDescription'])) $this->UpholsteryDescription = $o['UpholsteryDescription'];
        if (isset($o['AvailablePackages'])) $this->AvailablePackages = JsonConverters::fromArray('string', $o['AvailablePackages']);
        if (isset($o['Packages'])) $this->Packages = JsonConverters::fromArray('string', $o['Packages']);
        if (isset($o['P11D'])) $this->P11D = $o['P11D'];
        if (isset($o['PortArrivalDate'])) $this->PortArrivalDate = JsonConverters::from('DateTime', $o['PortArrivalDate']);
        if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('Price', $o['Prices']);
        if (isset($o['TransmissionType'])) $this->TransmissionType = $o['TransmissionType'];
        if (isset($o['FuelType'])) $this->FuelType = $o['FuelType'];
        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['IsAvailableOnline'])) $this->IsAvailableOnline = $o['IsAvailableOnline'];
        if (isset($o['UnderOffer'])) $this->UnderOffer = $o['UnderOffer'];
        if (isset($o['IsExcluded'])) $this->IsExcluded = $o['IsExcluded'];
        if (isset($o['IsSellable'])) $this->IsSellable = $o['IsSellable'];
        if (isset($o['OnHold'])) $this->OnHold = $o['OnHold'];
        if (isset($o['ElectricConsumption'])) $this->ElectricConsumption = $o['ElectricConsumption'];
        if (isset($o['ElectricRange'])) $this->ElectricRange = $o['ElectricRange'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['Baumuster'])) $this->Baumuster = $o['Baumuster'];
        if (isset($o['Retailer'])) $this->Retailer = JsonConverters::from('Retailer', $o['Retailer']);
        if (isset($o['Bm7NST'])) $this->Bm7NST = $o['Bm7NST'];
        if (isset($o['OTR'])) $this->OTR = $o['OTR'];
        if (isset($o['ActualPrice'])) $this->ActualPrice = $o['ActualPrice'];
        if (isset($o['IsDisplayStock'])) $this->IsDisplayStock = $o['IsDisplayStock'];
        if (isset($o['DisplayRetailerId'])) $this->DisplayRetailerId = $o['DisplayRetailerId'];
        if (isset($o['DisplayRetailer'])) $this->DisplayRetailer = $o['DisplayRetailer'];
        if (isset($o['DisplayRetailerGssnId'])) $this->DisplayRetailerGssnId = $o['DisplayRetailerGssnId'];
        if (isset($o['DisplayRetailerMarketAreaId'])) $this->DisplayRetailerMarketAreaId = $o['DisplayRetailerMarketAreaId'];
        if (isset($o['IsSmartDisplayRetailer'])) $this->IsSmartDisplayRetailer = $o['IsSmartDisplayRetailer'];
        if (isset($o['IsSpecialistCar'])) $this->IsSpecialistCar = $o['IsSpecialistCar'];
        if (isset($o['Age'])) $this->Age = $o['Age'];
        if (isset($o['Secured'])) $this->Secured = $o['Secured'];
        if (isset($o['IsHOBackOrderAccountVehicle'])) $this->IsHOBackOrderAccountVehicle = $o['IsHOBackOrderAccountVehicle'];
        if (isset($o['IsAllocatedToBackOrder'])) $this->IsAllocatedToBackOrder = $o['IsAllocatedToBackOrder'];
        if (isset($o['UsageCode'])) $this->UsageCode = $o['UsageCode'];
        if (isset($o['EmissionCombined'])) $this->EmissionCombined = $o['EmissionCombined'];
        if (isset($o['NormalisedEmissionDirective'])) $this->NormalisedEmissionDirective = $o['NormalisedEmissionDirective'];
        if (isset($o['HasMildHybridEquipmentCode'])) $this->HasMildHybridEquipmentCode = $o['HasMildHybridEquipmentCode'];
        if (isset($o['RetailPriceExVat'])) $this->RetailPriceExVat = $o['RetailPriceExVat'];
        if (isset($o['RetailPrice_IncVAT'])) $this->RetailPrice_IncVAT = $o['RetailPrice_IncVAT'];
        if (isset($o['RetailPrice_ExVAT'])) $this->RetailPrice_ExVAT = $o['RetailPrice_ExVAT'];
        if (isset($o['ModelId'])) $this->ModelId = $o['ModelId'];
        if (isset($o['VID'])) $this->VID = $o['VID'];
        if (isset($o['ProductionDate'])) $this->ProductionDate = $o['ProductionDate'];
        if (isset($o['FullModelYearCode'])) $this->FullModelYearCode = $o['FullModelYearCode'];
        if (isset($o['ChassisNumber'])) $this->ChassisNumber = $o['ChassisNumber'];
        if (isset($o['EligibleForIntegratedServiceCare'])) $this->EligibleForIntegratedServiceCare = $o['EligibleForIntegratedServiceCare'];
        if (isset($o['AccountType'])) $this->AccountType = $o['AccountType'];
        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['Equipment'])) $this->Equipment = JsonConverters::fromArray('Equipmentv2', $o['Equipment']);
        if (isset($o['EquipmentCategories'])) $this->EquipmentCategories = JsonConverters::fromArray('VehicleEquipmentCategory', $o['EquipmentCategories']);
        if (isset($o['EnergyEfficiencyClass'])) $this->EnergyEfficiencyClass = JsonConverters::from('VehicleEmissionClass', $o['EnergyEfficiencyClass']);
        if (isset($o['VehicleData'])) $this->VehicleData = JsonConverters::fromArray('VehicleAttribute', $o['VehicleData']);
        if (isset($o['IntegratedServiceCareOptions'])) $this->IntegratedServiceCareOptions = JsonConverters::fromArray('VehicleIntegratedServiceCareOption', $o['IntegratedServiceCareOptions']);
        if (isset($o['IspVehicleCustomerDescriptions'])) $this->IspVehicleCustomerDescriptions = JsonConverters::fromArray('string', $o['IspVehicleCustomerDescriptions']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->BodyStyle)) $o['BodyStyle'] = $this->BodyStyle;
        if (isset($this->Vin)) $o['Vin'] = $this->Vin;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Colour)) $o['Colour'] = $this->Colour;
        if (isset($this->ColourCode)) $o['ColourCode'] = $this->ColourCode;
        if (isset($this->ColourDescription)) $o['ColourDescription'] = $this->ColourDescription;
        if (isset($this->ColourGroup)) $o['ColourGroup'] = $this->ColourGroup;
        if (isset($this->Model)) $o['Model'] = $this->Model;
        if (isset($this->CommissionNumber)) $o['CommissionNumber'] = $this->CommissionNumber;
        if (isset($this->BrandId)) $o['BrandId'] = $this->BrandId;
        if (isset($this->Brand)) $o['Brand'] = JsonConverters::to('Brand', $this->Brand);
        if (isset($this->Engine)) $o['Engine'] = JsonConverters::to('Engine', $this->Engine);
        if (isset($this->EngineBadge)) $o['EngineBadge'] = $this->EngineBadge;
        if (isset($this->Media)) $o['Media'] = JsonConverters::to('Media', $this->Media);
        if (isset($this->Line)) $o['Line'] = $this->Line;
        if (isset($this->UpholsteryCode)) $o['UpholsteryCode'] = $this->UpholsteryCode;
        if (isset($this->UpholsteryType)) $o['UpholsteryType'] = $this->UpholsteryType;
        if (isset($this->Upholstery)) $o['Upholstery'] = $this->Upholstery;
        if (isset($this->UpholsteryDescription)) $o['UpholsteryDescription'] = $this->UpholsteryDescription;
        if (isset($this->AvailablePackages)) $o['AvailablePackages'] = JsonConverters::toArray('string', $this->AvailablePackages);
        if (isset($this->Packages)) $o['Packages'] = JsonConverters::toArray('string', $this->Packages);
        if (isset($this->P11D)) $o['P11D'] = $this->P11D;
        if (isset($this->PortArrivalDate)) $o['PortArrivalDate'] = JsonConverters::to('DateTime', $this->PortArrivalDate);
        if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('Price', $this->Prices);
        if (isset($this->TransmissionType)) $o['TransmissionType'] = $this->TransmissionType;
        if (isset($this->FuelType)) $o['FuelType'] = $this->FuelType;
        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->IsAvailableOnline)) $o['IsAvailableOnline'] = $this->IsAvailableOnline;
        if (isset($this->UnderOffer)) $o['UnderOffer'] = $this->UnderOffer;
        if (isset($this->IsExcluded)) $o['IsExcluded'] = $this->IsExcluded;
        if (isset($this->IsSellable)) $o['IsSellable'] = $this->IsSellable;
        if (isset($this->OnHold)) $o['OnHold'] = $this->OnHold;
        if (isset($this->ElectricConsumption)) $o['ElectricConsumption'] = $this->ElectricConsumption;
        if (isset($this->ElectricRange)) $o['ElectricRange'] = $this->ElectricRange;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->Baumuster)) $o['Baumuster'] = $this->Baumuster;
        if (isset($this->Retailer)) $o['Retailer'] = JsonConverters::to('Retailer', $this->Retailer);
        if (isset($this->Bm7NST)) $o['Bm7NST'] = $this->Bm7NST;
        if (isset($this->OTR)) $o['OTR'] = $this->OTR;
        if (isset($this->ActualPrice)) $o['ActualPrice'] = $this->ActualPrice;
        if (isset($this->IsDisplayStock)) $o['IsDisplayStock'] = $this->IsDisplayStock;
        if (isset($this->DisplayRetailerId)) $o['DisplayRetailerId'] = $this->DisplayRetailerId;
        if (isset($this->DisplayRetailer)) $o['DisplayRetailer'] = $this->DisplayRetailer;
        if (isset($this->DisplayRetailerGssnId)) $o['DisplayRetailerGssnId'] = $this->DisplayRetailerGssnId;
        if (isset($this->DisplayRetailerMarketAreaId)) $o['DisplayRetailerMarketAreaId'] = $this->DisplayRetailerMarketAreaId;
        if (isset($this->IsSmartDisplayRetailer)) $o['IsSmartDisplayRetailer'] = $this->IsSmartDisplayRetailer;
        if (isset($this->IsSpecialistCar)) $o['IsSpecialistCar'] = $this->IsSpecialistCar;
        if (isset($this->Age)) $o['Age'] = $this->Age;
        if (isset($this->Secured)) $o['Secured'] = $this->Secured;
        if (isset($this->IsHOBackOrderAccountVehicle)) $o['IsHOBackOrderAccountVehicle'] = $this->IsHOBackOrderAccountVehicle;
        if (isset($this->IsAllocatedToBackOrder)) $o['IsAllocatedToBackOrder'] = $this->IsAllocatedToBackOrder;
        if (isset($this->UsageCode)) $o['UsageCode'] = $this->UsageCode;
        if (isset($this->EmissionCombined)) $o['EmissionCombined'] = $this->EmissionCombined;
        if (isset($this->NormalisedEmissionDirective)) $o['NormalisedEmissionDirective'] = $this->NormalisedEmissionDirective;
        if (isset($this->HasMildHybridEquipmentCode)) $o['HasMildHybridEquipmentCode'] = $this->HasMildHybridEquipmentCode;
        if (isset($this->RetailPriceExVat)) $o['RetailPriceExVat'] = $this->RetailPriceExVat;
        if (isset($this->RetailPrice_IncVAT)) $o['RetailPrice_IncVAT'] = $this->RetailPrice_IncVAT;
        if (isset($this->RetailPrice_ExVAT)) $o['RetailPrice_ExVAT'] = $this->RetailPrice_ExVAT;
        if (isset($this->ModelId)) $o['ModelId'] = $this->ModelId;
        if (isset($this->VID)) $o['VID'] = $this->VID;
        if (isset($this->ProductionDate)) $o['ProductionDate'] = $this->ProductionDate;
        if (isset($this->FullModelYearCode)) $o['FullModelYearCode'] = $this->FullModelYearCode;
        if (isset($this->ChassisNumber)) $o['ChassisNumber'] = $this->ChassisNumber;
        if (isset($this->EligibleForIntegratedServiceCare)) $o['EligibleForIntegratedServiceCare'] = $this->EligibleForIntegratedServiceCare;
        if (isset($this->AccountType)) $o['AccountType'] = $this->AccountType;
        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->Equipment)) $o['Equipment'] = JsonConverters::toArray('Equipmentv2', $this->Equipment);
        if (isset($this->EquipmentCategories)) $o['EquipmentCategories'] = JsonConverters::toArray('VehicleEquipmentCategory', $this->EquipmentCategories);
        if (isset($this->EnergyEfficiencyClass)) $o['EnergyEfficiencyClass'] = JsonConverters::to('VehicleEmissionClass', $this->EnergyEfficiencyClass);
        if (isset($this->VehicleData)) $o['VehicleData'] = JsonConverters::toArray('VehicleAttribute', $this->VehicleData);
        if (isset($this->IntegratedServiceCareOptions)) $o['IntegratedServiceCareOptions'] = JsonConverters::toArray('VehicleIntegratedServiceCareOption', $this->IntegratedServiceCareOptions);
        if (isset($this->IspVehicleCustomerDescriptions)) $o['IspVehicleCustomerDescriptions'] = JsonConverters::toArray('string', $this->IspVehicleCustomerDescriptions);
        return empty($o) ? new class(){} : $o;
    }
}

class VehicleError implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Field='',
        /** @var string */
        public string $Message=''
    ) {
    }

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

class GetVehicleResponse implements JsonSerializable
{
    public function __construct(
        /** @var VehicleDetailDto|null */
        public ?VehicleDetailDto $Vehicle=null,
        /** @var array<VehicleError>|null */
        public ?array $Errors=null
    ) {
    }

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

PHP GetVehicleRequest DTOs

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

HTTP + CSV

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

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

{"Vin":"String","IncludeAllocatedToOrder":false,"Gssn":"String","IsOneAdmin":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Vehicle":{"BodyStyle":"String","Vin":"String","Description":"String","Colour":"String","ColourCode":"String","ColourDescription":"String","ColourGroup":"String","Model":"String","CommissionNumber":"String","BrandId":0,"Brand":{"Id":0,"Description":"String","DisplayName":"String","BodyStyles":[{"Id":0,"Description":"String","Models":[{"Id":0,"Description":"String","DisplayName":"String","ImageUrlSmall":"String","ImageUrlMedium":"String","ImageUrlLarge":"String","Specialist":false,"Priority":0,"ExcludeFromOnlineShowroomFilters":false}]}]},"Engine":{"Id":0,"Badge":"String"},"EngineBadge":"String","Media":{"NoImage":false,"MainImageUrl":"String"},"Line":"String","UpholsteryCode":"String","UpholsteryType":"String","Upholstery":"String","UpholsteryDescription":"String","AvailablePackages":["String"],"Packages":["String"],"P11D":0,"PortArrivalDate":"\/Date(-62135596800000-0000)\/","Prices":[{"Id":"String","Description":"String","Net":0,"VAT":0,"Gross":0,"Product":"LIST_PRICE"}],"TransmissionType":"String","FuelType":"String","VehicleClass":"String","ProductRange":"String","VehicleType":"String","Emission":0,"IsAvailableOnline":false,"UnderOffer":false,"IsExcluded":false,"IsSellable":false,"OnHold":false,"ElectricConsumption":0,"ElectricRange":0,"ImageUrl":"String","Baumuster":"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"}]}},"Bm7NST":"String","OTR":0,"ActualPrice":0,"IsDisplayStock":false,"DisplayRetailerId":0,"DisplayRetailer":"String","DisplayRetailerGssnId":"String","DisplayRetailerMarketAreaId":"String","IsSmartDisplayRetailer":false,"IsSpecialistCar":false,"Age":0,"Secured":false,"IsHOBackOrderAccountVehicle":false,"IsAllocatedToBackOrder":false,"UsageCode":"String","EmissionCombined":0,"NormalisedEmissionDirective":"String","HasMildHybridEquipmentCode":false,"RetailPriceExVat":0,"RetailPrice_IncVAT":0,"RetailPrice_ExVAT":0,"ModelId":0,"VID":"String","ProductionDate":"String","FullModelYearCode":"String","ChassisNumber":"String","EligibleForIntegratedServiceCare":false,"AccountType":"String","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},"Equipment":[{"Importance":0,"IsAdditional":false,"Id":0,"Code":"String","Description":"String"}],"EquipmentCategories":[{"Order":0,"Code":"String","Description":"String","Equipment":[{"Importance":0,"IsAdditional":false,"Id":0,"Code":"String","Description":"String"}]}],"EnergyEfficiencyClass":{"Colour":"String","Rating":"String"},"VehicleData":[{"Description":"String","Value":"String"}],"IntegratedServiceCareOptions":[{"OptionCode":"String","BM7NST":"String","FullModelYear":"String","IntegratedProductType":"String","CustomerDescription":"String","OneAgentProductType":"String"}],"IspVehicleCustomerDescriptions":["String"]},"Errors":[{"Field":"String","Message":"String"}]}