Mercedes.VehicleManagement.API

<back to all web services

UpdateVehicleV2Request

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v2/{VehicleType}/Vehicle/UpdateVehicleRefresh vehicle data for Nexus
<?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 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 bool|null */
        public ?bool $enabledNew=null,
        /** @var bool|null */
        public ?bool $enabledUsed=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['enabledNew'])) $this->enabledNew = $o['enabledNew'];
        if (isset($o['enabledUsed'])) $this->enabledUsed = $o['enabledUsed'];
        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->enabledNew)) $o['enabledNew'] = $this->enabledNew;
        if (isset($this->enabledUsed)) $o['enabledUsed'] = $this->enabledUsed;
        if (isset($this->bodyStyles)) $o['bodyStyles'] = JsonConverters::toArray('BodyStyle', $this->bodyStyles);
        return empty($o) ? new class(){} : $o;
    }
}

class MappedFuelType implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $description=null,
        /** @var string|null */
        public ?string $fuelTypes=null,
        /** @var int */
        public int $sortOrder=0
    ) {
    }

    /** @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['fuelTypes'])) $this->fuelTypes = $o['fuelTypes'];
        if (isset($o['sortOrder'])) $this->sortOrder = $o['sortOrder'];
    }
    
    /** @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->fuelTypes)) $o['fuelTypes'] = $this->fuelTypes;
        if (isset($this->sortOrder)) $o['sortOrder'] = $this->sortOrder;
        return empty($o) ? new class(){} : $o;
    }
}

class ProductRange implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $modelId=0,
        /** @var Model|null */
        public ?Model $model=null,
        /** @var int */
        public int $fuelTypeId=0,
        /** @var MappedFuelType|null */
        public ?MappedFuelType $mapped_FuelType=null,
        /** @var int|null */
        public ?int $productRangeCode=null
    ) {
    }

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

class VehicleClass implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $description=null,
        /** @var int */
        public int $priority=0,
        /** @var array<Model>|null */
        public ?array $vehicleClasses=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['priority'])) $this->priority = $o['priority'];
        if (isset($o['vehicleClasses'])) $this->vehicleClasses = JsonConverters::fromArray('Model', $o['vehicleClasses']);
    }
    
    /** @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->priority)) $o['priority'] = $this->priority;
        if (isset($this->vehicleClasses)) $o['vehicleClasses'] = JsonConverters::toArray('Model', $this->vehicleClasses);
        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 $productRange=null,
        /** @var int|null */
        public ?int $bodyStyle_Id=null,
        /** @var int|null */
        public ?int $overrideBodyStyleId=null,
        /** @var BodyStyle|null */
        public ?BodyStyle $bodyStyle=null,
        /** @var array<ProductRange>|null */
        public ?array $productRanges=null,
        /** @var string|null */
        public ?string $imageUrlNew=null,
        /** @var string|null */
        public ?string $imageUrlUsed=null,
        /** @var bool|null */
        public ?bool $specialistNew=null,
        /** @var bool|null */
        public ?bool $specialistUsed=null,
        /** @var bool|null */
        public ?bool $excludeFromFiltersNew=null,
        /** @var bool|null */
        public ?bool $excludeFromFiltersUsed=null,
        /** @var int */
        public int $priorityNew=0,
        /** @var int */
        public int $priorityUsed=0,
        /** @var string|null */
        public ?string $alternativeModelsNew=null,
        /** @var string|null */
        public ?string $alternativeModelsUsed=null,
        /** @var int|null */
        public ?int $vehicleClass_Id=null,
        /** @var VehicleClass|null */
        public ?VehicleClass $vehicleClass=null,
        /** @var string */
        public string $oneWebModelUrlNew='',
        /** @var string */
        public string $oneWebModelUrlUsed='',
        /** @var DateTime|null */
        public ?DateTime $lastEdited=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['productRange'])) $this->productRange = $o['productRange'];
        if (isset($o['bodyStyle_Id'])) $this->bodyStyle_Id = $o['bodyStyle_Id'];
        if (isset($o['overrideBodyStyleId'])) $this->overrideBodyStyleId = $o['overrideBodyStyleId'];
        if (isset($o['bodyStyle'])) $this->bodyStyle = JsonConverters::from('BodyStyle', $o['bodyStyle']);
        if (isset($o['productRanges'])) $this->productRanges = JsonConverters::fromArray('ProductRange', $o['productRanges']);
        if (isset($o['imageUrlNew'])) $this->imageUrlNew = $o['imageUrlNew'];
        if (isset($o['imageUrlUsed'])) $this->imageUrlUsed = $o['imageUrlUsed'];
        if (isset($o['specialistNew'])) $this->specialistNew = $o['specialistNew'];
        if (isset($o['specialistUsed'])) $this->specialistUsed = $o['specialistUsed'];
        if (isset($o['excludeFromFiltersNew'])) $this->excludeFromFiltersNew = $o['excludeFromFiltersNew'];
        if (isset($o['excludeFromFiltersUsed'])) $this->excludeFromFiltersUsed = $o['excludeFromFiltersUsed'];
        if (isset($o['priorityNew'])) $this->priorityNew = $o['priorityNew'];
        if (isset($o['priorityUsed'])) $this->priorityUsed = $o['priorityUsed'];
        if (isset($o['alternativeModelsNew'])) $this->alternativeModelsNew = $o['alternativeModelsNew'];
        if (isset($o['alternativeModelsUsed'])) $this->alternativeModelsUsed = $o['alternativeModelsUsed'];
        if (isset($o['vehicleClass_Id'])) $this->vehicleClass_Id = $o['vehicleClass_Id'];
        if (isset($o['vehicleClass'])) $this->vehicleClass = JsonConverters::from('VehicleClass', $o['vehicleClass']);
        if (isset($o['oneWebModelUrlNew'])) $this->oneWebModelUrlNew = $o['oneWebModelUrlNew'];
        if (isset($o['oneWebModelUrlUsed'])) $this->oneWebModelUrlUsed = $o['oneWebModelUrlUsed'];
        if (isset($o['lastEdited'])) $this->lastEdited = JsonConverters::from('DateTime', $o['lastEdited']);
    }
    
    /** @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->productRange)) $o['productRange'] = $this->productRange;
        if (isset($this->bodyStyle_Id)) $o['bodyStyle_Id'] = $this->bodyStyle_Id;
        if (isset($this->overrideBodyStyleId)) $o['overrideBodyStyleId'] = $this->overrideBodyStyleId;
        if (isset($this->bodyStyle)) $o['bodyStyle'] = JsonConverters::to('BodyStyle', $this->bodyStyle);
        if (isset($this->productRanges)) $o['productRanges'] = JsonConverters::toArray('ProductRange', $this->productRanges);
        if (isset($this->imageUrlNew)) $o['imageUrlNew'] = $this->imageUrlNew;
        if (isset($this->imageUrlUsed)) $o['imageUrlUsed'] = $this->imageUrlUsed;
        if (isset($this->specialistNew)) $o['specialistNew'] = $this->specialistNew;
        if (isset($this->specialistUsed)) $o['specialistUsed'] = $this->specialistUsed;
        if (isset($this->excludeFromFiltersNew)) $o['excludeFromFiltersNew'] = $this->excludeFromFiltersNew;
        if (isset($this->excludeFromFiltersUsed)) $o['excludeFromFiltersUsed'] = $this->excludeFromFiltersUsed;
        if (isset($this->priorityNew)) $o['priorityNew'] = $this->priorityNew;
        if (isset($this->priorityUsed)) $o['priorityUsed'] = $this->priorityUsed;
        if (isset($this->alternativeModelsNew)) $o['alternativeModelsNew'] = $this->alternativeModelsNew;
        if (isset($this->alternativeModelsUsed)) $o['alternativeModelsUsed'] = $this->alternativeModelsUsed;
        if (isset($this->vehicleClass_Id)) $o['vehicleClass_Id'] = $this->vehicleClass_Id;
        if (isset($this->vehicleClass)) $o['vehicleClass'] = JsonConverters::to('VehicleClass', $this->vehicleClass);
        if (isset($this->oneWebModelUrlNew)) $o['oneWebModelUrlNew'] = $this->oneWebModelUrlNew;
        if (isset($this->oneWebModelUrlUsed)) $o['oneWebModelUrlUsed'] = $this->oneWebModelUrlUsed;
        if (isset($this->lastEdited)) $o['lastEdited'] = JsonConverters::to('DateTime', $this->lastEdited);
        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 string|null */
        public ?string $styleCode=null,
        /** @var string|null */
        public ?string $styleCodeElectric=null,
        /** @var string|null */
        public ?string $styleCodeHybrid=null,
        /** @var int */
        public int $sortOrder=0,
        /** @var Brand|null */
        public ?Brand $brand=null,
        /** @var int|null */
        public ?int $brand_Id=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['styleCode'])) $this->styleCode = $o['styleCode'];
        if (isset($o['styleCodeElectric'])) $this->styleCodeElectric = $o['styleCodeElectric'];
        if (isset($o['styleCodeHybrid'])) $this->styleCodeHybrid = $o['styleCodeHybrid'];
        if (isset($o['sortOrder'])) $this->sortOrder = $o['sortOrder'];
        if (isset($o['brand'])) $this->brand = JsonConverters::from('Brand', $o['brand']);
        if (isset($o['brand_Id'])) $this->brand_Id = $o['brand_Id'];
        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->styleCode)) $o['styleCode'] = $this->styleCode;
        if (isset($this->styleCodeElectric)) $o['styleCodeElectric'] = $this->styleCodeElectric;
        if (isset($this->styleCodeHybrid)) $o['styleCodeHybrid'] = $this->styleCodeHybrid;
        if (isset($this->sortOrder)) $o['sortOrder'] = $this->sortOrder;
        if (isset($this->brand)) $o['brand'] = JsonConverters::to('Brand', $this->brand);
        if (isset($this->brand_Id)) $o['brand_Id'] = $this->brand_Id;
        if (isset($this->models)) $o['models'] = JsonConverters::toArray('Model', $this->models);
        return empty($o) ? new class(){} : $o;
    }
}

class Consumption 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 RetailerGroup implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $retailerGroupId=null,
        /** @var string|null */
        public ?string $retailerGroupName=null,
        /** @var DateTime|null */
        public ?DateTime $creationDate=null,
        /** @var string|null */
        public ?string $creationSource=null,
        /** @var DateTime|null */
        public ?DateTime $maintenanceDate=null,
        /** @var string|null */
        public ?string $maintenanceSource=null,
        /** @var int|null */
        public ?int $priorityServiceNew=null,
        /** @var int|null */
        public ?int $priorityServiceUsed=null,
        /** @var string|null */
        public ?string $legacyId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['retailerGroupId'])) $this->retailerGroupId = $o['retailerGroupId'];
        if (isset($o['retailerGroupName'])) $this->retailerGroupName = $o['retailerGroupName'];
        if (isset($o['creationDate'])) $this->creationDate = JsonConverters::from('DateTime', $o['creationDate']);
        if (isset($o['creationSource'])) $this->creationSource = $o['creationSource'];
        if (isset($o['maintenanceDate'])) $this->maintenanceDate = JsonConverters::from('DateTime', $o['maintenanceDate']);
        if (isset($o['maintenanceSource'])) $this->maintenanceSource = $o['maintenanceSource'];
        if (isset($o['priorityServiceNew'])) $this->priorityServiceNew = $o['priorityServiceNew'];
        if (isset($o['priorityServiceUsed'])) $this->priorityServiceUsed = $o['priorityServiceUsed'];
        if (isset($o['legacyId'])) $this->legacyId = $o['legacyId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->retailerGroupId)) $o['retailerGroupId'] = $this->retailerGroupId;
        if (isset($this->retailerGroupName)) $o['retailerGroupName'] = $this->retailerGroupName;
        if (isset($this->creationDate)) $o['creationDate'] = JsonConverters::to('DateTime', $this->creationDate);
        if (isset($this->creationSource)) $o['creationSource'] = $this->creationSource;
        if (isset($this->maintenanceDate)) $o['maintenanceDate'] = JsonConverters::to('DateTime', $this->maintenanceDate);
        if (isset($this->maintenanceSource)) $o['maintenanceSource'] = $this->maintenanceSource;
        if (isset($this->priorityServiceNew)) $o['priorityServiceNew'] = $this->priorityServiceNew;
        if (isset($this->priorityServiceUsed)) $o['priorityServiceUsed'] = $this->priorityServiceUsed;
        if (isset($this->legacyId)) $o['legacyId'] = $this->legacyId;
        return empty($o) ? new class(){} : $o;
    }
}

class MarketArea implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var int */
        public int $marketAreaId=0,
        /** @var string */
        public string $marketAreaName=''
    ) {
    }

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

class Port implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var DateTime|null */
        public ?DateTime $creation=null,
        /** @var DateTime|null */
        public ?DateTime $modified=null,
        /** @var string|null */
        public ?string $description=null,
        /** @var float */
        public float $latitude=0.0,
        /** @var float */
        public float $longitude=0.0
    ) {
    }

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

class RetailerAccount implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string */
        public string $stpNumber='',
        /** @var int */
        public int $retailer_Id=0,
        /** @var Dealer|null */
        public ?Dealer $retailer=null
    ) {
    }

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

class Region implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string */
        public string $regionName=''
    ) {
    }

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

class Dealer implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $description=null,
        /** @var string|null */
        public ?string $rodCode=null,
        /** @var string|null */
        public ?string $gssnOutletId=null,
        /** @var float */
        public float $latitude=0.0,
        /** @var float */
        public float $longitude=0.0,
        /** @var string|null */
        public ?string $retailerGroupId=null,
        /** @var string|null */
        public ?string $street=null,
        /** @var string|null */
        public ?string $city=null,
        /** @var string|null */
        public ?string $district=null,
        /** @var string|null */
        public ?string $postcode=null,
        /** @var string|null */
        public ?string $phone=null,
        /** @var string|null */
        public ?string $fax=null,
        /** @var string|null */
        public ?string $email=null,
        /** @var string|null */
        public ?string $website=null,
        /** @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 $campaignExcluded=null,
        /** @var DateTime|null */
        public ?DateTime $creationDate=null,
        /** @var string|null */
        public ?string $creationSource=null,
        /** @var DateTime|null */
        public ?DateTime $maintenanceDate=null,
        /** @var string|null */
        public ?string $maintenanceSource=null,
        /** @var bool|null */
        public ?bool $chatEnabled=null,
        /** @var bool|null */
        public ?bool $tradeInEnabled=null,
        /** @var RetailerGroup|null */
        public ?RetailerGroup $retailerGroup=null,
        /** @var int|null */
        public ?int $retailerGroup_Id=null,
        /** @var MarketArea|null */
        public ?MarketArea $marketArea=null,
        /** @var int|null */
        public ?int $marketArea_Id=null,
        /** @var string|null */
        public ?string $displayPhoneNumberNew=null,
        /** @var string|null */
        public ?string $displayPhoneNumberUsed=null,
        /** @var bool|null */
        public ?bool $smart=null,
        /** @var string|null */
        public ?string $smartDescription=null,
        /** @var string|null */
        public ?string $smartWebsite=null,
        /** @var string|null */
        public ?string $smartEmail=null,
        /** @var string|null */
        public ?string $smartPhone=null,
        /** @var string|null */
        public ?string $additionalInformation=null,
        /** @var string|null */
        public ?string $legacyId=null,
        /** @var bool|null */
        public ?bool $agent=null,
        /** @var Port|null */
        public ?Port $port=null,
        /** @var int|null */
        public ?int $port_Id=null,
        /** @var array<RetailerAccount>|null */
        public ?array $retailerAccount=null,
        /** @var string|null */
        public ?string $digitalLoungeParentGssnId=null,
        /** @var bool|null */
        public ?bool $sendLeadsToDigitalLoungeParent=null,
        /** @var bool|null */
        public ?bool $isExcludedFromImport=null,
        /** @var int|null */
        public ?int $region_Id=null,
        /** @var Region|null */
        public ?Region $region=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['rodCode'])) $this->rodCode = $o['rodCode'];
        if (isset($o['gssnOutletId'])) $this->gssnOutletId = $o['gssnOutletId'];
        if (isset($o['latitude'])) $this->latitude = $o['latitude'];
        if (isset($o['longitude'])) $this->longitude = $o['longitude'];
        if (isset($o['retailerGroupId'])) $this->retailerGroupId = $o['retailerGroupId'];
        if (isset($o['street'])) $this->street = $o['street'];
        if (isset($o['city'])) $this->city = $o['city'];
        if (isset($o['district'])) $this->district = $o['district'];
        if (isset($o['postcode'])) $this->postcode = $o['postcode'];
        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['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['campaignExcluded'])) $this->campaignExcluded = $o['campaignExcluded'];
        if (isset($o['creationDate'])) $this->creationDate = JsonConverters::from('DateTime', $o['creationDate']);
        if (isset($o['creationSource'])) $this->creationSource = $o['creationSource'];
        if (isset($o['maintenanceDate'])) $this->maintenanceDate = JsonConverters::from('DateTime', $o['maintenanceDate']);
        if (isset($o['maintenanceSource'])) $this->maintenanceSource = $o['maintenanceSource'];
        if (isset($o['chatEnabled'])) $this->chatEnabled = $o['chatEnabled'];
        if (isset($o['tradeInEnabled'])) $this->tradeInEnabled = $o['tradeInEnabled'];
        if (isset($o['retailerGroup'])) $this->retailerGroup = JsonConverters::from('RetailerGroup', $o['retailerGroup']);
        if (isset($o['retailerGroup_Id'])) $this->retailerGroup_Id = $o['retailerGroup_Id'];
        if (isset($o['marketArea'])) $this->marketArea = JsonConverters::from('MarketArea', $o['marketArea']);
        if (isset($o['marketArea_Id'])) $this->marketArea_Id = $o['marketArea_Id'];
        if (isset($o['displayPhoneNumberNew'])) $this->displayPhoneNumberNew = $o['displayPhoneNumberNew'];
        if (isset($o['displayPhoneNumberUsed'])) $this->displayPhoneNumberUsed = $o['displayPhoneNumberUsed'];
        if (isset($o['smart'])) $this->smart = $o['smart'];
        if (isset($o['smartDescription'])) $this->smartDescription = $o['smartDescription'];
        if (isset($o['smartWebsite'])) $this->smartWebsite = $o['smartWebsite'];
        if (isset($o['smartEmail'])) $this->smartEmail = $o['smartEmail'];
        if (isset($o['smartPhone'])) $this->smartPhone = $o['smartPhone'];
        if (isset($o['additionalInformation'])) $this->additionalInformation = $o['additionalInformation'];
        if (isset($o['legacyId'])) $this->legacyId = $o['legacyId'];
        if (isset($o['agent'])) $this->agent = $o['agent'];
        if (isset($o['port'])) $this->port = JsonConverters::from('Port', $o['port']);
        if (isset($o['port_Id'])) $this->port_Id = $o['port_Id'];
        if (isset($o['retailerAccount'])) $this->retailerAccount = JsonConverters::fromArray('RetailerAccount', $o['retailerAccount']);
        if (isset($o['digitalLoungeParentGssnId'])) $this->digitalLoungeParentGssnId = $o['digitalLoungeParentGssnId'];
        if (isset($o['sendLeadsToDigitalLoungeParent'])) $this->sendLeadsToDigitalLoungeParent = $o['sendLeadsToDigitalLoungeParent'];
        if (isset($o['isExcludedFromImport'])) $this->isExcludedFromImport = $o['isExcludedFromImport'];
        if (isset($o['region_Id'])) $this->region_Id = $o['region_Id'];
        if (isset($o['region'])) $this->region = JsonConverters::from('Region', $o['region']);
    }
    
    /** @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->rodCode)) $o['rodCode'] = $this->rodCode;
        if (isset($this->gssnOutletId)) $o['gssnOutletId'] = $this->gssnOutletId;
        if (isset($this->latitude)) $o['latitude'] = $this->latitude;
        if (isset($this->longitude)) $o['longitude'] = $this->longitude;
        if (isset($this->retailerGroupId)) $o['retailerGroupId'] = $this->retailerGroupId;
        if (isset($this->street)) $o['street'] = $this->street;
        if (isset($this->city)) $o['city'] = $this->city;
        if (isset($this->district)) $o['district'] = $this->district;
        if (isset($this->postcode)) $o['postcode'] = $this->postcode;
        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->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->campaignExcluded)) $o['campaignExcluded'] = $this->campaignExcluded;
        if (isset($this->creationDate)) $o['creationDate'] = JsonConverters::to('DateTime', $this->creationDate);
        if (isset($this->creationSource)) $o['creationSource'] = $this->creationSource;
        if (isset($this->maintenanceDate)) $o['maintenanceDate'] = JsonConverters::to('DateTime', $this->maintenanceDate);
        if (isset($this->maintenanceSource)) $o['maintenanceSource'] = $this->maintenanceSource;
        if (isset($this->chatEnabled)) $o['chatEnabled'] = $this->chatEnabled;
        if (isset($this->tradeInEnabled)) $o['tradeInEnabled'] = $this->tradeInEnabled;
        if (isset($this->retailerGroup)) $o['retailerGroup'] = JsonConverters::to('RetailerGroup', $this->retailerGroup);
        if (isset($this->retailerGroup_Id)) $o['retailerGroup_Id'] = $this->retailerGroup_Id;
        if (isset($this->marketArea)) $o['marketArea'] = JsonConverters::to('MarketArea', $this->marketArea);
        if (isset($this->marketArea_Id)) $o['marketArea_Id'] = $this->marketArea_Id;
        if (isset($this->displayPhoneNumberNew)) $o['displayPhoneNumberNew'] = $this->displayPhoneNumberNew;
        if (isset($this->displayPhoneNumberUsed)) $o['displayPhoneNumberUsed'] = $this->displayPhoneNumberUsed;
        if (isset($this->smart)) $o['smart'] = $this->smart;
        if (isset($this->smartDescription)) $o['smartDescription'] = $this->smartDescription;
        if (isset($this->smartWebsite)) $o['smartWebsite'] = $this->smartWebsite;
        if (isset($this->smartEmail)) $o['smartEmail'] = $this->smartEmail;
        if (isset($this->smartPhone)) $o['smartPhone'] = $this->smartPhone;
        if (isset($this->additionalInformation)) $o['additionalInformation'] = $this->additionalInformation;
        if (isset($this->legacyId)) $o['legacyId'] = $this->legacyId;
        if (isset($this->agent)) $o['agent'] = $this->agent;
        if (isset($this->port)) $o['port'] = JsonConverters::to('Port', $this->port);
        if (isset($this->port_Id)) $o['port_Id'] = $this->port_Id;
        if (isset($this->retailerAccount)) $o['retailerAccount'] = JsonConverters::toArray('RetailerAccount', $this->retailerAccount);
        if (isset($this->digitalLoungeParentGssnId)) $o['digitalLoungeParentGssnId'] = $this->digitalLoungeParentGssnId;
        if (isset($this->sendLeadsToDigitalLoungeParent)) $o['sendLeadsToDigitalLoungeParent'] = $this->sendLeadsToDigitalLoungeParent;
        if (isset($this->isExcludedFromImport)) $o['isExcludedFromImport'] = $this->isExcludedFromImport;
        if (isset($this->region_Id)) $o['region_Id'] = $this->region_Id;
        if (isset($this->region)) $o['region'] = JsonConverters::to('Region', $this->region);
        return empty($o) ? new class(){} : $o;
    }
}

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

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

class MappedColourGroup implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $description=null,
        /** @var string|null */
        public ?string $colours=null,
        /** @var string|null */
        public ?string $imageUrl=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['colours'])) $this->colours = $o['colours'];
        if (isset($o['imageUrl'])) $this->imageUrl = $o['imageUrl'];
    }
    
    /** @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->colours)) $o['colours'] = $this->colours;
        if (isset($this->imageUrl)) $o['imageUrl'] = $this->imageUrl;
        return empty($o) ? new class(){} : $o;
    }
}

class MappedTransmissionGroup implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $description=null,
        /** @var string|null */
        public ?string $alias=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['alias'])) $this->alias = $o['alias'];
    }
    
    /** @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->alias)) $o['alias'] = $this->alias;
        return empty($o) ? new class(){} : $o;
    }
}

class Upholstery implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $price=null,
        /** @var string|null */
        public ?string $code=null,
        /** @var string|null */
        public ?string $type=null
    ) {
    }

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

class Line implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $description=null,
        /** @var string|null */
        public ?string $alias=null,
        /** @var string|null */
        public ?string $overridesId=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['alias'])) $this->alias = $o['alias'];
        if (isset($o['overridesId'])) $this->overridesId = $o['overridesId'];
    }
    
    /** @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->alias)) $o['alias'] = $this->alias;
        if (isset($this->overridesId)) $o['overridesId'] = $this->overridesId;
        return empty($o) ? new class(){} : $o;
    }
}

class UsedCarImage implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var DateTime */
        public DateTime $creationDate=new DateTime(),
        /** @var string|null */
        public ?string $creationSource=null,
        /** @var DateTime|null */
        public ?DateTime $maintenanceDate=null,
        /** @var string|null */
        public ?string $maintenanceSource=null,
        /** @var int */
        public int $vehicleId=0,
        /** @var Vehicle|null */
        public ?Vehicle $vehicle=null,
        /** @var string|null */
        public ?string $imageUrl=null,
        /** @var bool|null */
        public ?bool $primaryImage=null,
        /** @var string|null */
        public ?string $perspective=null,
        /** @var int */
        public int $index=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['creationDate'])) $this->creationDate = JsonConverters::from('DateTime', $o['creationDate']);
        if (isset($o['creationSource'])) $this->creationSource = $o['creationSource'];
        if (isset($o['maintenanceDate'])) $this->maintenanceDate = JsonConverters::from('DateTime', $o['maintenanceDate']);
        if (isset($o['maintenanceSource'])) $this->maintenanceSource = $o['maintenanceSource'];
        if (isset($o['vehicleId'])) $this->vehicleId = $o['vehicleId'];
        if (isset($o['vehicle'])) $this->vehicle = JsonConverters::from('Vehicle', $o['vehicle']);
        if (isset($o['imageUrl'])) $this->imageUrl = $o['imageUrl'];
        if (isset($o['primaryImage'])) $this->primaryImage = $o['primaryImage'];
        if (isset($o['perspective'])) $this->perspective = $o['perspective'];
        if (isset($o['index'])) $this->index = $o['index'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->creationDate)) $o['creationDate'] = JsonConverters::to('DateTime', $this->creationDate);
        if (isset($this->creationSource)) $o['creationSource'] = $this->creationSource;
        if (isset($this->maintenanceDate)) $o['maintenanceDate'] = JsonConverters::to('DateTime', $this->maintenanceDate);
        if (isset($this->maintenanceSource)) $o['maintenanceSource'] = $this->maintenanceSource;
        if (isset($this->vehicleId)) $o['vehicleId'] = $this->vehicleId;
        if (isset($this->vehicle)) $o['vehicle'] = JsonConverters::to('Vehicle', $this->vehicle);
        if (isset($this->imageUrl)) $o['imageUrl'] = $this->imageUrl;
        if (isset($this->primaryImage)) $o['primaryImage'] = $this->primaryImage;
        if (isset($this->perspective)) $o['perspective'] = $this->perspective;
        if (isset($this->index)) $o['index'] = $this->index;
        return empty($o) ? new class(){} : $o;
    }
}

class Packages implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string */
        public string $description='',
        /** @var string|null */
        public ?string $alias=null,
        /** @var string|null */
        public ?string $overridesId=null,
        /** @var string|null */
        public ?string $packageDataOverridesId=null,
        /** @var array<VehiclePackage>|null */
        public ?array $vehiclePackages=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['alias'])) $this->alias = $o['alias'];
        if (isset($o['overridesId'])) $this->overridesId = $o['overridesId'];
        if (isset($o['packageDataOverridesId'])) $this->packageDataOverridesId = $o['packageDataOverridesId'];
        if (isset($o['vehiclePackages'])) $this->vehiclePackages = JsonConverters::fromArray('VehiclePackage', $o['vehiclePackages']);
    }
    
    /** @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->alias)) $o['alias'] = $this->alias;
        if (isset($this->overridesId)) $o['overridesId'] = $this->overridesId;
        if (isset($this->packageDataOverridesId)) $o['packageDataOverridesId'] = $this->packageDataOverridesId;
        if (isset($this->vehiclePackages)) $o['vehiclePackages'] = JsonConverters::toArray('VehiclePackage', $this->vehiclePackages);
        return empty($o) ? new class(){} : $o;
    }
}

class VehiclePackage implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $vehicleId=0,
        /** @var int */
        public int $packageId=0,
        /** @var Vehicle|null */
        public ?Vehicle $vehicle=null,
        /** @var Packages|null */
        public ?Packages $package=null
    ) {
    }

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

class VehicleSecured implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string */
        public string $reason='',
        /** @var DateTime */
        public DateTime $created=new DateTime(),
        /** @var string */
        public string $userId=''
    ) {
    }

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

class VehicleImage implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string */
        public string $commissionNumber='',
        /** @var string */
        public string $cachedImageUrl='',
        /** @var string */
        public string $imageDescriptor='',
        /** @var DateTime */
        public DateTime $createdDate=new DateTime()
    ) {
    }

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

class VehicleSecuredAudit implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string */
        public string $userId='',
        /** @var bool|null */
        public ?bool $mbukSecured=null,
        /** @var string|null */
        public ?string $vin=null,
        /** @var string */
        public string $vehicleType='',
        /** @var string */
        public string $reason='',
        /** @var DateTime */
        public DateTime $created=new DateTime(),
        /** @var Vehicle|null */
        public ?Vehicle $vehicle=null,
        /** @var string|null */
        public ?string $commissionNumber=null,
        /** @var bool|null */
        public ?bool $isBulkUpdate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['userId'])) $this->userId = $o['userId'];
        if (isset($o['mbukSecured'])) $this->mbukSecured = $o['mbukSecured'];
        if (isset($o['vin'])) $this->vin = $o['vin'];
        if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
        if (isset($o['reason'])) $this->reason = $o['reason'];
        if (isset($o['created'])) $this->created = JsonConverters::from('DateTime', $o['created']);
        if (isset($o['vehicle'])) $this->vehicle = JsonConverters::from('Vehicle', $o['vehicle']);
        if (isset($o['commissionNumber'])) $this->commissionNumber = $o['commissionNumber'];
        if (isset($o['isBulkUpdate'])) $this->isBulkUpdate = $o['isBulkUpdate'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->userId)) $o['userId'] = $this->userId;
        if (isset($this->mbukSecured)) $o['mbukSecured'] = $this->mbukSecured;
        if (isset($this->vin)) $o['vin'] = $this->vin;
        if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
        if (isset($this->reason)) $o['reason'] = $this->reason;
        if (isset($this->created)) $o['created'] = JsonConverters::to('DateTime', $this->created);
        if (isset($this->vehicle)) $o['vehicle'] = JsonConverters::to('Vehicle', $this->vehicle);
        if (isset($this->commissionNumber)) $o['commissionNumber'] = $this->commissionNumber;
        if (isset($this->isBulkUpdate)) $o['isBulkUpdate'] = $this->isBulkUpdate;
        return empty($o) ? new class(){} : $o;
    }
}

class Vehicle implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $vin=null,
        /** @var string|null */
        public ?string $commissionNumber=null,
        /** @var bool|null */
        public ?bool $isAllWheel=null,
        /** @var bool|null */
        public ?bool $isAMG=null,
        /** @var bool|null */
        public ?bool $isAvailableOnline=null,
        /** @var bool|null */
        public ?bool $isSellable=null,
        /** @var bool|null */
        public ?bool $isDisplayStock=null,
        /** @var DateTime */
        public DateTime $creationDate=new DateTime(),
        /** @var DateTime|null */
        public ?DateTime $maintenanceDate=null,
        /** @var float */
        public float $horsePower=0.0,
        /** @var float */
        public float $deliveryCharge=0.0,
        /** @var float|null */
        public ?float $deliveryChargeNet=null,
        /** @var float|null */
        public ?float $deliveryChargeVAT=null,
        /** @var float */
        public float $firstRegFee=0.0,
        /** @var float */
        public float $otr=0.0,
        /** @var float */
        public float $p11D=0.0,
        /** @var float */
        public float $otR_Value=0.0,
        /** @var float|null */
        public ?float $actualPrice=null,
        /** @var float|null */
        public ?float $totalOfferValue=null,
        /** @var float|null */
        public ?float $campaignOfferContribution=null,
        /** @var float|null */
        public ?float $retailerOfferContribution=null,
        /** @var float|null */
        public ?float $campaignGovernmentGrantOfferContribution=null,
        /** @var DateTime|null */
        public ?DateTime $offerExpiryDate=null,
        /** @var bool|null */
        public ?bool $hasNonMonetaryOffers=null,
        /** @var float */
        public float $plates=0.0,
        /** @var float|null */
        public ?float $platesNet=null,
        /** @var float|null */
        public ?float $platesVAT=null,
        /** @var float */
        public float $fuelCharge=0.0,
        /** @var float|null */
        public ?float $fuelChargeNet=null,
        /** @var float|null */
        public ?float $fuelChargeVAT=null,
        /** @var float */
        public float $powerKW=0.0,
        /** @var float */
        public float $retailPrice_ExVAT=0.0,
        /** @var float */
        public float $retailPrice_IncVAT=0.0,
        /** @var float */
        public float $veD_Year1=0.0,
        /** @var float */
        public float $veD_Year2=0.0,
        /** @var int */
        public int $cc=0,
        /** @var int */
        public int $cyclinders=0,
        /** @var string|null */
        public ?string $baumuster=null,
        /** @var string|null */
        public ?string $marketingCode=null,
        /** @var string|null */
        public ?string $chassisNumber=null,
        /** @var string|null */
        public ?string $colourDescription=null,
        /** @var string|null */
        public ?string $colourCode=null,
        /** @var string|null */
        public ?string $emissionCombined=null,
        /** @var string|null */
        public ?string $emissionDirective=null,
        /** @var string|null */
        public ?string $normalisedEmissionDirective=null,
        /** @var string|null */
        public ?string $emissionExtraUrban=null,
        /** @var string|null */
        public ?string $emissionUrban=null,
        /** @var string|null */
        public ?string $energyEfficiencyClass=null,
        /** @var string|null */
        public ?string $wltpEmissionCombined=null,
        /** @var string|null */
        public ?string $imageUrl=null,
        /** @var string|null */
        public ?string $line=null,
        /** @var string|null */
        public ?string $modelYear=null,
        /** @var string|null */
        public ?string $modelYearCode=null,
        /** @var string|null */
        public ?string $halfModelYearCode=null,
        /** @var string|null */
        public ?string $nst=null,
        /** @var string|null */
        public ?string $numberOfDoors=null,
        /** @var string|null */
        public ?string $numberOfGears=null,
        /** @var string|null */
        public ?string $numberOfSeats=null,
        /** @var string|null */
        public ?string $rvOptions=null,
        /** @var string|null */
        public ?string $salesDescription=null,
        /** @var string|null */
        public ?string $salesDescriptionShort=null,
        /** @var string|null */
        public ?string $upholsteryCode=null,
        /** @var string|null */
        public ?string $upholsteryDescription=null,
        /** @var string|null */
        public ?string $transmissionDescription=null,
        /** @var string|null */
        public ?string $vehicleCategory=null,
        /** @var string|null */
        public ?string $vehicleClass=null,
        /** @var string|null */
        public ?string $vehicleType=null,
        /** @var string|null */
        public ?string $vid=null,
        /** @var bool|null */
        public ?bool $latestModel=null,
        /** @var DateTime|null */
        public ?DateTime $portArrivalDate=null,
        /** @var DateTime|null */
        public ?DateTime $productionDate=null,
        /** @var DateTime|null */
        public ?DateTime $confirmedProductionDate=null,
        /** @var DateTime|null */
        public ?DateTime $tradeInDate=null,
        /** @var float|null */
        public ?float $electricConsumption=null,
        /** @var float|null */
        public ?float $electricRange=null,
        /** @var string|null */
        public ?string $locationTypeName=null,
        /** @var string|null */
        public ?string $cesarIdShipToParty=null,
        /** @var string|null */
        public ?string $vehicleUsageCode=null,
        /** @var string|null */
        public ?string $account=null,
        /** @var bool|null */
        public ?bool $isSpecialistCar=null,
        /** @var int|null */
        public ?int $bootCapacity=null,
        /** @var string|null */
        public ?string $driveConcept=null,
        /** @var string|null */
        public ?string $driveType=null,
        /** @var float|null */
        public ?float $combustionPowerHp=null,
        /** @var float|null */
        public ?float $electricPowerKw=null,
        /** @var float|null */
        public ?float $electricPowerHp=null,
        /** @var float|null */
        public ?float $combinedPowerKw=null,
        /** @var float|null */
        public ?float $combinedPowerHP=null,
        /** @var string|null */
        public ?string $mbukReserve=null,
        /** @var string|null */
        public ?string $bm7NST=null,
        /** @var DateTime|null */
        public ?DateTime $gbDestDate=null,
        /** @var string|null */
        public ?string $fin=null,
        /** @var BodyStyle|null */
        public ?BodyStyle $bodyStyle=null,
        /** @var int|null */
        public ?int $bodyStyle_Id=null,
        /** @var Brand|null */
        public ?Brand $brand=null,
        /** @var int|null */
        public ?int $brandId=null,
        /** @var Consumption|null */
        public ?Consumption $consumptionCombined=null,
        /** @var Consumption|null */
        public ?Consumption $consumptionExtraUrban=null,
        /** @var Consumption|null */
        public ?Consumption $consumptionUrban=null,
        /** @var Consumption|null */
        public ?Consumption $wltpFuelConsumptionExtraHigh=null,
        /** @var Consumption|null */
        public ?Consumption $wltpFuelConsumptionHigh=null,
        /** @var Consumption|null */
        public ?Consumption $wltpFuelConsumptionMedium=null,
        /** @var Consumption|null */
        public ?Consumption $wltpFuelConsumptionLow=null,
        /** @var Consumption|null */
        public ?Consumption $wltpFuelConsumptionCombined=null,
        /** @var Dealer|null */
        public ?Dealer $dealer=null,
        /** @var int|null */
        public ?int $dealer_Id=null,
        /** @var Dealer|null */
        public ?Dealer $displayRetailer=null,
        /** @var int|null */
        public ?int $displayRetailer_Id=null,
        /** @var Engine|null */
        public ?Engine $engine=null,
        /** @var MappedColourGroup|null */
        public ?MappedColourGroup $mapped_ColourGroup=null,
        /** @var int|null */
        public ?int $mapped_ColourGroup_Id=null,
        /** @var MappedFuelType|null */
        public ?MappedFuelType $mapped_FuelType=null,
        /** @var int|null */
        public ?int $mapped_FuelType_Id=null,
        /** @var MappedTransmissionGroup|null */
        public ?MappedTransmissionGroup $mapped_TransmissionGroup=null,
        /** @var int|null */
        public ?int $model_Id=null,
        /** @var Model|null */
        public ?Model $model=null,
        /** @var Upholstery|null */
        public ?Upholstery $upholstery=null,
        /** @var int|null */
        public ?int $upholstery_Id=null,
        /** @var Line|null */
        public ?Line $mapped_Line=null,
        /** @var int|null */
        public ?int $mapped_Line_Id=null,
        /** @var int|null */
        public ?int $mileage=null,
        /** @var string|null */
        public ?string $condition=null,
        /** @var string|null */
        public ?string $source=null,
        /** @var DateTime|null */
        public ?DateTime $registrationDate=null,
        /** @var string|null */
        public ?string $registrationNumber=null,
        /** @var float|null */
        public ?float $topSpeed=null,
        /** @var float|null */
        public ?float $acceleration=null,
        /** @var float|null */
        public ?float $torque=null,
        /** @var array<UsedCarImage>|null */
        public ?array $usedCarImages=null,
        /** @var float|null */
        public ?float $taxAmount=null,
        /** @var int|null */
        public ?int $vatQualifying=null,
        /** @var string|null */
        public ?string $promoCode=null,
        /** @var float|null */
        public ?float $campaignPromoOfferContribution=null,
        /** @var bool|null */
        public ?bool $reserved=null,
        /** @var float|null */
        public ?float $emission=null,
        /** @var bool|null */
        public ?bool $underOffer=null,
        /** @var bool|null */
        public ?bool $allocatedToBackOrder=null,
        /** @var string|null */
        public ?string $paintSwatchUrl=null,
        /** @var string|null */
        public ?string $upholsterySwatchUrl=null,
        /** @var array<VehiclePackage>|null */
        public ?array $packages=null,
        /** @var VehicleSecured|null */
        public ?VehicleSecured $secured=null,
        /** @var VehicleImage|null */
        public ?VehicleImage $cachedImage=null,
        /** @var bool|null */
        public ?bool $hasMildHybridEquipmentCode=null,
        /** @var bool|null */
        public ?bool $eligibleForIntegratedServiceCare=null,
        /** @var array<VehicleSecuredAudit>|null */
        public ?array $vehicleSecuredAudit=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['vin'])) $this->vin = $o['vin'];
        if (isset($o['commissionNumber'])) $this->commissionNumber = $o['commissionNumber'];
        if (isset($o['isAllWheel'])) $this->isAllWheel = $o['isAllWheel'];
        if (isset($o['isAMG'])) $this->isAMG = $o['isAMG'];
        if (isset($o['isAvailableOnline'])) $this->isAvailableOnline = $o['isAvailableOnline'];
        if (isset($o['isSellable'])) $this->isSellable = $o['isSellable'];
        if (isset($o['isDisplayStock'])) $this->isDisplayStock = $o['isDisplayStock'];
        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['horsePower'])) $this->horsePower = $o['horsePower'];
        if (isset($o['deliveryCharge'])) $this->deliveryCharge = $o['deliveryCharge'];
        if (isset($o['deliveryChargeNet'])) $this->deliveryChargeNet = $o['deliveryChargeNet'];
        if (isset($o['deliveryChargeVAT'])) $this->deliveryChargeVAT = $o['deliveryChargeVAT'];
        if (isset($o['firstRegFee'])) $this->firstRegFee = $o['firstRegFee'];
        if (isset($o['otr'])) $this->otr = $o['otr'];
        if (isset($o['p11D'])) $this->p11D = $o['p11D'];
        if (isset($o['otR_Value'])) $this->otR_Value = $o['otR_Value'];
        if (isset($o['actualPrice'])) $this->actualPrice = $o['actualPrice'];
        if (isset($o['totalOfferValue'])) $this->totalOfferValue = $o['totalOfferValue'];
        if (isset($o['campaignOfferContribution'])) $this->campaignOfferContribution = $o['campaignOfferContribution'];
        if (isset($o['retailerOfferContribution'])) $this->retailerOfferContribution = $o['retailerOfferContribution'];
        if (isset($o['campaignGovernmentGrantOfferContribution'])) $this->campaignGovernmentGrantOfferContribution = $o['campaignGovernmentGrantOfferContribution'];
        if (isset($o['offerExpiryDate'])) $this->offerExpiryDate = JsonConverters::from('DateTime', $o['offerExpiryDate']);
        if (isset($o['hasNonMonetaryOffers'])) $this->hasNonMonetaryOffers = $o['hasNonMonetaryOffers'];
        if (isset($o['plates'])) $this->plates = $o['plates'];
        if (isset($o['platesNet'])) $this->platesNet = $o['platesNet'];
        if (isset($o['platesVAT'])) $this->platesVAT = $o['platesVAT'];
        if (isset($o['fuelCharge'])) $this->fuelCharge = $o['fuelCharge'];
        if (isset($o['fuelChargeNet'])) $this->fuelChargeNet = $o['fuelChargeNet'];
        if (isset($o['fuelChargeVAT'])) $this->fuelChargeVAT = $o['fuelChargeVAT'];
        if (isset($o['powerKW'])) $this->powerKW = $o['powerKW'];
        if (isset($o['retailPrice_ExVAT'])) $this->retailPrice_ExVAT = $o['retailPrice_ExVAT'];
        if (isset($o['retailPrice_IncVAT'])) $this->retailPrice_IncVAT = $o['retailPrice_IncVAT'];
        if (isset($o['veD_Year1'])) $this->veD_Year1 = $o['veD_Year1'];
        if (isset($o['veD_Year2'])) $this->veD_Year2 = $o['veD_Year2'];
        if (isset($o['cc'])) $this->cc = $o['cc'];
        if (isset($o['cyclinders'])) $this->cyclinders = $o['cyclinders'];
        if (isset($o['baumuster'])) $this->baumuster = $o['baumuster'];
        if (isset($o['marketingCode'])) $this->marketingCode = $o['marketingCode'];
        if (isset($o['chassisNumber'])) $this->chassisNumber = $o['chassisNumber'];
        if (isset($o['colourDescription'])) $this->colourDescription = $o['colourDescription'];
        if (isset($o['colourCode'])) $this->colourCode = $o['colourCode'];
        if (isset($o['emissionCombined'])) $this->emissionCombined = $o['emissionCombined'];
        if (isset($o['emissionDirective'])) $this->emissionDirective = $o['emissionDirective'];
        if (isset($o['normalisedEmissionDirective'])) $this->normalisedEmissionDirective = $o['normalisedEmissionDirective'];
        if (isset($o['emissionExtraUrban'])) $this->emissionExtraUrban = $o['emissionExtraUrban'];
        if (isset($o['emissionUrban'])) $this->emissionUrban = $o['emissionUrban'];
        if (isset($o['energyEfficiencyClass'])) $this->energyEfficiencyClass = $o['energyEfficiencyClass'];
        if (isset($o['wltpEmissionCombined'])) $this->wltpEmissionCombined = $o['wltpEmissionCombined'];
        if (isset($o['imageUrl'])) $this->imageUrl = $o['imageUrl'];
        if (isset($o['line'])) $this->line = $o['line'];
        if (isset($o['modelYear'])) $this->modelYear = $o['modelYear'];
        if (isset($o['modelYearCode'])) $this->modelYearCode = $o['modelYearCode'];
        if (isset($o['halfModelYearCode'])) $this->halfModelYearCode = $o['halfModelYearCode'];
        if (isset($o['nst'])) $this->nst = $o['nst'];
        if (isset($o['numberOfDoors'])) $this->numberOfDoors = $o['numberOfDoors'];
        if (isset($o['numberOfGears'])) $this->numberOfGears = $o['numberOfGears'];
        if (isset($o['numberOfSeats'])) $this->numberOfSeats = $o['numberOfSeats'];
        if (isset($o['rvOptions'])) $this->rvOptions = $o['rvOptions'];
        if (isset($o['salesDescription'])) $this->salesDescription = $o['salesDescription'];
        if (isset($o['salesDescriptionShort'])) $this->salesDescriptionShort = $o['salesDescriptionShort'];
        if (isset($o['upholsteryCode'])) $this->upholsteryCode = $o['upholsteryCode'];
        if (isset($o['upholsteryDescription'])) $this->upholsteryDescription = $o['upholsteryDescription'];
        if (isset($o['transmissionDescription'])) $this->transmissionDescription = $o['transmissionDescription'];
        if (isset($o['vehicleCategory'])) $this->vehicleCategory = $o['vehicleCategory'];
        if (isset($o['vehicleClass'])) $this->vehicleClass = $o['vehicleClass'];
        if (isset($o['vehicleType'])) $this->vehicleType = $o['vehicleType'];
        if (isset($o['vid'])) $this->vid = $o['vid'];
        if (isset($o['latestModel'])) $this->latestModel = $o['latestModel'];
        if (isset($o['portArrivalDate'])) $this->portArrivalDate = JsonConverters::from('DateTime', $o['portArrivalDate']);
        if (isset($o['productionDate'])) $this->productionDate = JsonConverters::from('DateTime', $o['productionDate']);
        if (isset($o['confirmedProductionDate'])) $this->confirmedProductionDate = JsonConverters::from('DateTime', $o['confirmedProductionDate']);
        if (isset($o['tradeInDate'])) $this->tradeInDate = JsonConverters::from('DateTime', $o['tradeInDate']);
        if (isset($o['electricConsumption'])) $this->electricConsumption = $o['electricConsumption'];
        if (isset($o['electricRange'])) $this->electricRange = $o['electricRange'];
        if (isset($o['locationTypeName'])) $this->locationTypeName = $o['locationTypeName'];
        if (isset($o['cesarIdShipToParty'])) $this->cesarIdShipToParty = $o['cesarIdShipToParty'];
        if (isset($o['vehicleUsageCode'])) $this->vehicleUsageCode = $o['vehicleUsageCode'];
        if (isset($o['account'])) $this->account = $o['account'];
        if (isset($o['isSpecialistCar'])) $this->isSpecialistCar = $o['isSpecialistCar'];
        if (isset($o['bootCapacity'])) $this->bootCapacity = $o['bootCapacity'];
        if (isset($o['driveConcept'])) $this->driveConcept = $o['driveConcept'];
        if (isset($o['driveType'])) $this->driveType = $o['driveType'];
        if (isset($o['combustionPowerHp'])) $this->combustionPowerHp = $o['combustionPowerHp'];
        if (isset($o['electricPowerKw'])) $this->electricPowerKw = $o['electricPowerKw'];
        if (isset($o['electricPowerHp'])) $this->electricPowerHp = $o['electricPowerHp'];
        if (isset($o['combinedPowerKw'])) $this->combinedPowerKw = $o['combinedPowerKw'];
        if (isset($o['combinedPowerHP'])) $this->combinedPowerHP = $o['combinedPowerHP'];
        if (isset($o['mbukReserve'])) $this->mbukReserve = $o['mbukReserve'];
        if (isset($o['bm7NST'])) $this->bm7NST = $o['bm7NST'];
        if (isset($o['gbDestDate'])) $this->gbDestDate = JsonConverters::from('DateTime', $o['gbDestDate']);
        if (isset($o['fin'])) $this->fin = $o['fin'];
        if (isset($o['bodyStyle'])) $this->bodyStyle = JsonConverters::from('BodyStyle', $o['bodyStyle']);
        if (isset($o['bodyStyle_Id'])) $this->bodyStyle_Id = $o['bodyStyle_Id'];
        if (isset($o['brand'])) $this->brand = JsonConverters::from('Brand', $o['brand']);
        if (isset($o['brandId'])) $this->brandId = $o['brandId'];
        if (isset($o['consumptionCombined'])) $this->consumptionCombined = JsonConverters::from('Consumption', $o['consumptionCombined']);
        if (isset($o['consumptionExtraUrban'])) $this->consumptionExtraUrban = JsonConverters::from('Consumption', $o['consumptionExtraUrban']);
        if (isset($o['consumptionUrban'])) $this->consumptionUrban = JsonConverters::from('Consumption', $o['consumptionUrban']);
        if (isset($o['wltpFuelConsumptionExtraHigh'])) $this->wltpFuelConsumptionExtraHigh = JsonConverters::from('Consumption', $o['wltpFuelConsumptionExtraHigh']);
        if (isset($o['wltpFuelConsumptionHigh'])) $this->wltpFuelConsumptionHigh = JsonConverters::from('Consumption', $o['wltpFuelConsumptionHigh']);
        if (isset($o['wltpFuelConsumptionMedium'])) $this->wltpFuelConsumptionMedium = JsonConverters::from('Consumption', $o['wltpFuelConsumptionMedium']);
        if (isset($o['wltpFuelConsumptionLow'])) $this->wltpFuelConsumptionLow = JsonConverters::from('Consumption', $o['wltpFuelConsumptionLow']);
        if (isset($o['wltpFuelConsumptionCombined'])) $this->wltpFuelConsumptionCombined = JsonConverters::from('Consumption', $o['wltpFuelConsumptionCombined']);
        if (isset($o['dealer'])) $this->dealer = JsonConverters::from('Dealer', $o['dealer']);
        if (isset($o['dealer_Id'])) $this->dealer_Id = $o['dealer_Id'];
        if (isset($o['displayRetailer'])) $this->displayRetailer = JsonConverters::from('Dealer', $o['displayRetailer']);
        if (isset($o['displayRetailer_Id'])) $this->displayRetailer_Id = $o['displayRetailer_Id'];
        if (isset($o['engine'])) $this->engine = JsonConverters::from('Engine', $o['engine']);
        if (isset($o['mapped_ColourGroup'])) $this->mapped_ColourGroup = JsonConverters::from('MappedColourGroup', $o['mapped_ColourGroup']);
        if (isset($o['mapped_ColourGroup_Id'])) $this->mapped_ColourGroup_Id = $o['mapped_ColourGroup_Id'];
        if (isset($o['mapped_FuelType'])) $this->mapped_FuelType = JsonConverters::from('MappedFuelType', $o['mapped_FuelType']);
        if (isset($o['mapped_FuelType_Id'])) $this->mapped_FuelType_Id = $o['mapped_FuelType_Id'];
        if (isset($o['mapped_TransmissionGroup'])) $this->mapped_TransmissionGroup = JsonConverters::from('MappedTransmissionGroup', $o['mapped_TransmissionGroup']);
        if (isset($o['model_Id'])) $this->model_Id = $o['model_Id'];
        if (isset($o['model'])) $this->model = JsonConverters::from('Model', $o['model']);
        if (isset($o['upholstery'])) $this->upholstery = JsonConverters::from('Upholstery', $o['upholstery']);
        if (isset($o['upholstery_Id'])) $this->upholstery_Id = $o['upholstery_Id'];
        if (isset($o['mapped_Line'])) $this->mapped_Line = JsonConverters::from('Line', $o['mapped_Line']);
        if (isset($o['mapped_Line_Id'])) $this->mapped_Line_Id = $o['mapped_Line_Id'];
        if (isset($o['mileage'])) $this->mileage = $o['mileage'];
        if (isset($o['condition'])) $this->condition = $o['condition'];
        if (isset($o['source'])) $this->source = $o['source'];
        if (isset($o['registrationDate'])) $this->registrationDate = JsonConverters::from('DateTime', $o['registrationDate']);
        if (isset($o['registrationNumber'])) $this->registrationNumber = $o['registrationNumber'];
        if (isset($o['topSpeed'])) $this->topSpeed = $o['topSpeed'];
        if (isset($o['acceleration'])) $this->acceleration = $o['acceleration'];
        if (isset($o['torque'])) $this->torque = $o['torque'];
        if (isset($o['usedCarImages'])) $this->usedCarImages = JsonConverters::fromArray('UsedCarImage', $o['usedCarImages']);
        if (isset($o['taxAmount'])) $this->taxAmount = $o['taxAmount'];
        if (isset($o['vatQualifying'])) $this->vatQualifying = $o['vatQualifying'];
        if (isset($o['promoCode'])) $this->promoCode = $o['promoCode'];
        if (isset($o['campaignPromoOfferContribution'])) $this->campaignPromoOfferContribution = $o['campaignPromoOfferContribution'];
        if (isset($o['reserved'])) $this->reserved = $o['reserved'];
        if (isset($o['emission'])) $this->emission = $o['emission'];
        if (isset($o['underOffer'])) $this->underOffer = $o['underOffer'];
        if (isset($o['allocatedToBackOrder'])) $this->allocatedToBackOrder = $o['allocatedToBackOrder'];
        if (isset($o['paintSwatchUrl'])) $this->paintSwatchUrl = $o['paintSwatchUrl'];
        if (isset($o['upholsterySwatchUrl'])) $this->upholsterySwatchUrl = $o['upholsterySwatchUrl'];
        if (isset($o['packages'])) $this->packages = JsonConverters::fromArray('VehiclePackage', $o['packages']);
        if (isset($o['secured'])) $this->secured = JsonConverters::from('VehicleSecured', $o['secured']);
        if (isset($o['cachedImage'])) $this->cachedImage = JsonConverters::from('VehicleImage', $o['cachedImage']);
        if (isset($o['hasMildHybridEquipmentCode'])) $this->hasMildHybridEquipmentCode = $o['hasMildHybridEquipmentCode'];
        if (isset($o['eligibleForIntegratedServiceCare'])) $this->eligibleForIntegratedServiceCare = $o['eligibleForIntegratedServiceCare'];
        if (isset($o['vehicleSecuredAudit'])) $this->vehicleSecuredAudit = JsonConverters::fromArray('VehicleSecuredAudit', $o['vehicleSecuredAudit']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->vin)) $o['vin'] = $this->vin;
        if (isset($this->commissionNumber)) $o['commissionNumber'] = $this->commissionNumber;
        if (isset($this->isAllWheel)) $o['isAllWheel'] = $this->isAllWheel;
        if (isset($this->isAMG)) $o['isAMG'] = $this->isAMG;
        if (isset($this->isAvailableOnline)) $o['isAvailableOnline'] = $this->isAvailableOnline;
        if (isset($this->isSellable)) $o['isSellable'] = $this->isSellable;
        if (isset($this->isDisplayStock)) $o['isDisplayStock'] = $this->isDisplayStock;
        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->horsePower)) $o['horsePower'] = $this->horsePower;
        if (isset($this->deliveryCharge)) $o['deliveryCharge'] = $this->deliveryCharge;
        if (isset($this->deliveryChargeNet)) $o['deliveryChargeNet'] = $this->deliveryChargeNet;
        if (isset($this->deliveryChargeVAT)) $o['deliveryChargeVAT'] = $this->deliveryChargeVAT;
        if (isset($this->firstRegFee)) $o['firstRegFee'] = $this->firstRegFee;
        if (isset($this->otr)) $o['otr'] = $this->otr;
        if (isset($this->p11D)) $o['p11D'] = $this->p11D;
        if (isset($this->otR_Value)) $o['otR_Value'] = $this->otR_Value;
        if (isset($this->actualPrice)) $o['actualPrice'] = $this->actualPrice;
        if (isset($this->totalOfferValue)) $o['totalOfferValue'] = $this->totalOfferValue;
        if (isset($this->campaignOfferContribution)) $o['campaignOfferContribution'] = $this->campaignOfferContribution;
        if (isset($this->retailerOfferContribution)) $o['retailerOfferContribution'] = $this->retailerOfferContribution;
        if (isset($this->campaignGovernmentGrantOfferContribution)) $o['campaignGovernmentGrantOfferContribution'] = $this->campaignGovernmentGrantOfferContribution;
        if (isset($this->offerExpiryDate)) $o['offerExpiryDate'] = JsonConverters::to('DateTime', $this->offerExpiryDate);
        if (isset($this->hasNonMonetaryOffers)) $o['hasNonMonetaryOffers'] = $this->hasNonMonetaryOffers;
        if (isset($this->plates)) $o['plates'] = $this->plates;
        if (isset($this->platesNet)) $o['platesNet'] = $this->platesNet;
        if (isset($this->platesVAT)) $o['platesVAT'] = $this->platesVAT;
        if (isset($this->fuelCharge)) $o['fuelCharge'] = $this->fuelCharge;
        if (isset($this->fuelChargeNet)) $o['fuelChargeNet'] = $this->fuelChargeNet;
        if (isset($this->fuelChargeVAT)) $o['fuelChargeVAT'] = $this->fuelChargeVAT;
        if (isset($this->powerKW)) $o['powerKW'] = $this->powerKW;
        if (isset($this->retailPrice_ExVAT)) $o['retailPrice_ExVAT'] = $this->retailPrice_ExVAT;
        if (isset($this->retailPrice_IncVAT)) $o['retailPrice_IncVAT'] = $this->retailPrice_IncVAT;
        if (isset($this->veD_Year1)) $o['veD_Year1'] = $this->veD_Year1;
        if (isset($this->veD_Year2)) $o['veD_Year2'] = $this->veD_Year2;
        if (isset($this->cc)) $o['cc'] = $this->cc;
        if (isset($this->cyclinders)) $o['cyclinders'] = $this->cyclinders;
        if (isset($this->baumuster)) $o['baumuster'] = $this->baumuster;
        if (isset($this->marketingCode)) $o['marketingCode'] = $this->marketingCode;
        if (isset($this->chassisNumber)) $o['chassisNumber'] = $this->chassisNumber;
        if (isset($this->colourDescription)) $o['colourDescription'] = $this->colourDescription;
        if (isset($this->colourCode)) $o['colourCode'] = $this->colourCode;
        if (isset($this->emissionCombined)) $o['emissionCombined'] = $this->emissionCombined;
        if (isset($this->emissionDirective)) $o['emissionDirective'] = $this->emissionDirective;
        if (isset($this->normalisedEmissionDirective)) $o['normalisedEmissionDirective'] = $this->normalisedEmissionDirective;
        if (isset($this->emissionExtraUrban)) $o['emissionExtraUrban'] = $this->emissionExtraUrban;
        if (isset($this->emissionUrban)) $o['emissionUrban'] = $this->emissionUrban;
        if (isset($this->energyEfficiencyClass)) $o['energyEfficiencyClass'] = $this->energyEfficiencyClass;
        if (isset($this->wltpEmissionCombined)) $o['wltpEmissionCombined'] = $this->wltpEmissionCombined;
        if (isset($this->imageUrl)) $o['imageUrl'] = $this->imageUrl;
        if (isset($this->line)) $o['line'] = $this->line;
        if (isset($this->modelYear)) $o['modelYear'] = $this->modelYear;
        if (isset($this->modelYearCode)) $o['modelYearCode'] = $this->modelYearCode;
        if (isset($this->halfModelYearCode)) $o['halfModelYearCode'] = $this->halfModelYearCode;
        if (isset($this->nst)) $o['nst'] = $this->nst;
        if (isset($this->numberOfDoors)) $o['numberOfDoors'] = $this->numberOfDoors;
        if (isset($this->numberOfGears)) $o['numberOfGears'] = $this->numberOfGears;
        if (isset($this->numberOfSeats)) $o['numberOfSeats'] = $this->numberOfSeats;
        if (isset($this->rvOptions)) $o['rvOptions'] = $this->rvOptions;
        if (isset($this->salesDescription)) $o['salesDescription'] = $this->salesDescription;
        if (isset($this->salesDescriptionShort)) $o['salesDescriptionShort'] = $this->salesDescriptionShort;
        if (isset($this->upholsteryCode)) $o['upholsteryCode'] = $this->upholsteryCode;
        if (isset($this->upholsteryDescription)) $o['upholsteryDescription'] = $this->upholsteryDescription;
        if (isset($this->transmissionDescription)) $o['transmissionDescription'] = $this->transmissionDescription;
        if (isset($this->vehicleCategory)) $o['vehicleCategory'] = $this->vehicleCategory;
        if (isset($this->vehicleClass)) $o['vehicleClass'] = $this->vehicleClass;
        if (isset($this->vehicleType)) $o['vehicleType'] = $this->vehicleType;
        if (isset($this->vid)) $o['vid'] = $this->vid;
        if (isset($this->latestModel)) $o['latestModel'] = $this->latestModel;
        if (isset($this->portArrivalDate)) $o['portArrivalDate'] = JsonConverters::to('DateTime', $this->portArrivalDate);
        if (isset($this->productionDate)) $o['productionDate'] = JsonConverters::to('DateTime', $this->productionDate);
        if (isset($this->confirmedProductionDate)) $o['confirmedProductionDate'] = JsonConverters::to('DateTime', $this->confirmedProductionDate);
        if (isset($this->tradeInDate)) $o['tradeInDate'] = JsonConverters::to('DateTime', $this->tradeInDate);
        if (isset($this->electricConsumption)) $o['electricConsumption'] = $this->electricConsumption;
        if (isset($this->electricRange)) $o['electricRange'] = $this->electricRange;
        if (isset($this->locationTypeName)) $o['locationTypeName'] = $this->locationTypeName;
        if (isset($this->cesarIdShipToParty)) $o['cesarIdShipToParty'] = $this->cesarIdShipToParty;
        if (isset($this->vehicleUsageCode)) $o['vehicleUsageCode'] = $this->vehicleUsageCode;
        if (isset($this->account)) $o['account'] = $this->account;
        if (isset($this->isSpecialistCar)) $o['isSpecialistCar'] = $this->isSpecialistCar;
        if (isset($this->bootCapacity)) $o['bootCapacity'] = $this->bootCapacity;
        if (isset($this->driveConcept)) $o['driveConcept'] = $this->driveConcept;
        if (isset($this->driveType)) $o['driveType'] = $this->driveType;
        if (isset($this->combustionPowerHp)) $o['combustionPowerHp'] = $this->combustionPowerHp;
        if (isset($this->electricPowerKw)) $o['electricPowerKw'] = $this->electricPowerKw;
        if (isset($this->electricPowerHp)) $o['electricPowerHp'] = $this->electricPowerHp;
        if (isset($this->combinedPowerKw)) $o['combinedPowerKw'] = $this->combinedPowerKw;
        if (isset($this->combinedPowerHP)) $o['combinedPowerHP'] = $this->combinedPowerHP;
        if (isset($this->mbukReserve)) $o['mbukReserve'] = $this->mbukReserve;
        if (isset($this->bm7NST)) $o['bm7NST'] = $this->bm7NST;
        if (isset($this->gbDestDate)) $o['gbDestDate'] = JsonConverters::to('DateTime', $this->gbDestDate);
        if (isset($this->fin)) $o['fin'] = $this->fin;
        if (isset($this->bodyStyle)) $o['bodyStyle'] = JsonConverters::to('BodyStyle', $this->bodyStyle);
        if (isset($this->bodyStyle_Id)) $o['bodyStyle_Id'] = $this->bodyStyle_Id;
        if (isset($this->brand)) $o['brand'] = JsonConverters::to('Brand', $this->brand);
        if (isset($this->brandId)) $o['brandId'] = $this->brandId;
        if (isset($this->consumptionCombined)) $o['consumptionCombined'] = JsonConverters::to('Consumption', $this->consumptionCombined);
        if (isset($this->consumptionExtraUrban)) $o['consumptionExtraUrban'] = JsonConverters::to('Consumption', $this->consumptionExtraUrban);
        if (isset($this->consumptionUrban)) $o['consumptionUrban'] = JsonConverters::to('Consumption', $this->consumptionUrban);
        if (isset($this->wltpFuelConsumptionExtraHigh)) $o['wltpFuelConsumptionExtraHigh'] = JsonConverters::to('Consumption', $this->wltpFuelConsumptionExtraHigh);
        if (isset($this->wltpFuelConsumptionHigh)) $o['wltpFuelConsumptionHigh'] = JsonConverters::to('Consumption', $this->wltpFuelConsumptionHigh);
        if (isset($this->wltpFuelConsumptionMedium)) $o['wltpFuelConsumptionMedium'] = JsonConverters::to('Consumption', $this->wltpFuelConsumptionMedium);
        if (isset($this->wltpFuelConsumptionLow)) $o['wltpFuelConsumptionLow'] = JsonConverters::to('Consumption', $this->wltpFuelConsumptionLow);
        if (isset($this->wltpFuelConsumptionCombined)) $o['wltpFuelConsumptionCombined'] = JsonConverters::to('Consumption', $this->wltpFuelConsumptionCombined);
        if (isset($this->dealer)) $o['dealer'] = JsonConverters::to('Dealer', $this->dealer);
        if (isset($this->dealer_Id)) $o['dealer_Id'] = $this->dealer_Id;
        if (isset($this->displayRetailer)) $o['displayRetailer'] = JsonConverters::to('Dealer', $this->displayRetailer);
        if (isset($this->displayRetailer_Id)) $o['displayRetailer_Id'] = $this->displayRetailer_Id;
        if (isset($this->engine)) $o['engine'] = JsonConverters::to('Engine', $this->engine);
        if (isset($this->mapped_ColourGroup)) $o['mapped_ColourGroup'] = JsonConverters::to('MappedColourGroup', $this->mapped_ColourGroup);
        if (isset($this->mapped_ColourGroup_Id)) $o['mapped_ColourGroup_Id'] = $this->mapped_ColourGroup_Id;
        if (isset($this->mapped_FuelType)) $o['mapped_FuelType'] = JsonConverters::to('MappedFuelType', $this->mapped_FuelType);
        if (isset($this->mapped_FuelType_Id)) $o['mapped_FuelType_Id'] = $this->mapped_FuelType_Id;
        if (isset($this->mapped_TransmissionGroup)) $o['mapped_TransmissionGroup'] = JsonConverters::to('MappedTransmissionGroup', $this->mapped_TransmissionGroup);
        if (isset($this->model_Id)) $o['model_Id'] = $this->model_Id;
        if (isset($this->model)) $o['model'] = JsonConverters::to('Model', $this->model);
        if (isset($this->upholstery)) $o['upholstery'] = JsonConverters::to('Upholstery', $this->upholstery);
        if (isset($this->upholstery_Id)) $o['upholstery_Id'] = $this->upholstery_Id;
        if (isset($this->mapped_Line)) $o['mapped_Line'] = JsonConverters::to('Line', $this->mapped_Line);
        if (isset($this->mapped_Line_Id)) $o['mapped_Line_Id'] = $this->mapped_Line_Id;
        if (isset($this->mileage)) $o['mileage'] = $this->mileage;
        if (isset($this->condition)) $o['condition'] = $this->condition;
        if (isset($this->source)) $o['source'] = $this->source;
        if (isset($this->registrationDate)) $o['registrationDate'] = JsonConverters::to('DateTime', $this->registrationDate);
        if (isset($this->registrationNumber)) $o['registrationNumber'] = $this->registrationNumber;
        if (isset($this->topSpeed)) $o['topSpeed'] = $this->topSpeed;
        if (isset($this->acceleration)) $o['acceleration'] = $this->acceleration;
        if (isset($this->torque)) $o['torque'] = $this->torque;
        if (isset($this->usedCarImages)) $o['usedCarImages'] = JsonConverters::toArray('UsedCarImage', $this->usedCarImages);
        if (isset($this->taxAmount)) $o['taxAmount'] = $this->taxAmount;
        if (isset($this->vatQualifying)) $o['vatQualifying'] = $this->vatQualifying;
        if (isset($this->promoCode)) $o['promoCode'] = $this->promoCode;
        if (isset($this->campaignPromoOfferContribution)) $o['campaignPromoOfferContribution'] = $this->campaignPromoOfferContribution;
        if (isset($this->reserved)) $o['reserved'] = $this->reserved;
        if (isset($this->emission)) $o['emission'] = $this->emission;
        if (isset($this->underOffer)) $o['underOffer'] = $this->underOffer;
        if (isset($this->allocatedToBackOrder)) $o['allocatedToBackOrder'] = $this->allocatedToBackOrder;
        if (isset($this->paintSwatchUrl)) $o['paintSwatchUrl'] = $this->paintSwatchUrl;
        if (isset($this->upholsterySwatchUrl)) $o['upholsterySwatchUrl'] = $this->upholsterySwatchUrl;
        if (isset($this->packages)) $o['packages'] = JsonConverters::toArray('VehiclePackage', $this->packages);
        if (isset($this->secured)) $o['secured'] = JsonConverters::to('VehicleSecured', $this->secured);
        if (isset($this->cachedImage)) $o['cachedImage'] = JsonConverters::to('VehicleImage', $this->cachedImage);
        if (isset($this->hasMildHybridEquipmentCode)) $o['hasMildHybridEquipmentCode'] = $this->hasMildHybridEquipmentCode;
        if (isset($this->eligibleForIntegratedServiceCare)) $o['eligibleForIntegratedServiceCare'] = $this->eligibleForIntegratedServiceCare;
        if (isset($this->vehicleSecuredAudit)) $o['vehicleSecuredAudit'] = JsonConverters::toArray('VehicleSecuredAudit', $this->vehicleSecuredAudit);
        return empty($o) ? new class(){} : $o;
    }
}

class EquipmentCache implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $code='',
        /** @var string */
        public string $description='',
        /** @var string */
        public string $standardFlag='',
        /** @var float */
        public float $price=0.0,
        /** @var string */
        public string $category='',
        /** @var string */
        public string $importance=''
    ) {
    }

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

class OpenSearchVehicle extends Vehicle implements JsonSerializable
{
    /**
     * @param int $id
     * @param string|null $vin
     * @param string|null $commissionNumber
     * @param bool|null $isAllWheel
     * @param bool|null $isAMG
     * @param bool|null $isAvailableOnline
     * @param bool|null $isSellable
     * @param bool|null $isDisplayStock
     * @param DateTime $creationDate
     * @param DateTime|null $maintenanceDate
     * @param float $horsePower
     * @param float $deliveryCharge
     * @param float|null $deliveryChargeNet
     * @param float|null $deliveryChargeVAT
     * @param float $firstRegFee
     * @param float $otr
     * @param float $p11D
     * @param float $otR_Value
     * @param float|null $actualPrice
     * @param float|null $totalOfferValue
     * @param float|null $campaignOfferContribution
     * @param float|null $retailerOfferContribution
     * @param float|null $campaignGovernmentGrantOfferContribution
     * @param DateTime|null $offerExpiryDate
     * @param bool|null $hasNonMonetaryOffers
     * @param float $plates
     * @param float|null $platesNet
     * @param float|null $platesVAT
     * @param float $fuelCharge
     * @param float|null $fuelChargeNet
     * @param float|null $fuelChargeVAT
     * @param float $powerKW
     * @param float $retailPrice_ExVAT
     * @param float $retailPrice_IncVAT
     * @param float $veD_Year1
     * @param float $veD_Year2
     * @param int $cc
     * @param int $cyclinders
     * @param string|null $baumuster
     * @param string|null $marketingCode
     * @param string|null $chassisNumber
     * @param string|null $colourDescription
     * @param string|null $colourCode
     * @param string|null $emissionCombined
     * @param string|null $emissionDirective
     * @param string|null $normalisedEmissionDirective
     * @param string|null $emissionExtraUrban
     * @param string|null $emissionUrban
     * @param string|null $energyEfficiencyClass
     * @param string|null $wltpEmissionCombined
     * @param string|null $imageUrl
     * @param string|null $line
     * @param string|null $modelYear
     * @param string|null $modelYearCode
     * @param string|null $halfModelYearCode
     * @param string|null $nst
     * @param string|null $numberOfDoors
     * @param string|null $numberOfGears
     * @param string|null $numberOfSeats
     * @param string|null $rvOptions
     * @param string|null $salesDescription
     * @param string|null $salesDescriptionShort
     * @param string|null $upholsteryCode
     * @param string|null $upholsteryDescription
     * @param string|null $transmissionDescription
     * @param string|null $vehicleCategory
     * @param string|null $vehicleClass
     * @param string|null $vehicleType
     * @param string|null $vid
     * @param bool|null $latestModel
     * @param DateTime|null $portArrivalDate
     * @param DateTime|null $productionDate
     * @param DateTime|null $confirmedProductionDate
     * @param DateTime|null $tradeInDate
     * @param float|null $electricConsumption
     * @param float|null $electricRange
     * @param string|null $locationTypeName
     * @param string|null $cesarIdShipToParty
     * @param string|null $vehicleUsageCode
     * @param string|null $account
     * @param bool|null $isSpecialistCar
     * @param int|null $bootCapacity
     * @param string|null $driveConcept
     * @param string|null $driveType
     * @param float|null $combustionPowerHp
     * @param float|null $electricPowerKw
     * @param float|null $electricPowerHp
     * @param float|null $combinedPowerKw
     * @param float|null $combinedPowerHP
     * @param string|null $mbukReserve
     * @param string|null $bm7NST
     * @param DateTime|null $gbDestDate
     * @param string|null $fin
     * @param BodyStyle|null $bodyStyle
     * @param int|null $bodyStyle_Id
     * @param Brand|null $brand
     * @param int|null $brandId
     * @param Consumption|null $consumptionCombined
     * @param Consumption|null $consumptionExtraUrban
     * @param Consumption|null $consumptionUrban
     * @param Consumption|null $wltpFuelConsumptionExtraHigh
     * @param Consumption|null $wltpFuelConsumptionHigh
     * @param Consumption|null $wltpFuelConsumptionMedium
     * @param Consumption|null $wltpFuelConsumptionLow
     * @param Consumption|null $wltpFuelConsumptionCombined
     * @param Dealer|null $dealer
     * @param int|null $dealer_Id
     * @param Dealer|null $displayRetailer
     * @param int|null $displayRetailer_Id
     * @param Engine|null $engine
     * @param MappedColourGroup|null $mapped_ColourGroup
     * @param int|null $mapped_ColourGroup_Id
     * @param MappedFuelType|null $mapped_FuelType
     * @param int|null $mapped_FuelType_Id
     * @param MappedTransmissionGroup|null $mapped_TransmissionGroup
     * @param int|null $model_Id
     * @param Model|null $model
     * @param Upholstery|null $upholstery
     * @param int|null $upholstery_Id
     * @param Line|null $mapped_Line
     * @param int|null $mapped_Line_Id
     * @param int|null $mileage
     * @param string|null $condition
     * @param string|null $source
     * @param DateTime|null $registrationDate
     * @param string|null $registrationNumber
     * @param float|null $topSpeed
     * @param float|null $acceleration
     * @param float|null $torque
     * @param array<UsedCarImage>|null $usedCarImages
     * @param float|null $taxAmount
     * @param int|null $vatQualifying
     * @param string|null $promoCode
     * @param float|null $campaignPromoOfferContribution
     * @param bool|null $reserved
     * @param float|null $emission
     * @param bool|null $underOffer
     * @param bool|null $allocatedToBackOrder
     * @param string|null $paintSwatchUrl
     * @param string|null $upholsterySwatchUrl
     * @param array<VehiclePackage>|null $packages
     * @param VehicleSecured|null $secured
     * @param VehicleImage|null $cachedImage
     * @param bool|null $hasMildHybridEquipmentCode
     * @param bool|null $eligibleForIntegratedServiceCare
     * @param array<VehicleSecuredAudit>|null $vehicleSecuredAudit
     */
    public function __construct(
        int $id=0,
        ?string $vin=null,
        ?string $commissionNumber=null,
        ?bool $isAllWheel=null,
        ?bool $isAMG=null,
        ?bool $isAvailableOnline=null,
        ?bool $isSellable=null,
        ?bool $isDisplayStock=null,
        DateTime $creationDate=new DateTime(),
        ?DateTime $maintenanceDate=null,
        float $horsePower=0.0,
        float $deliveryCharge=0.0,
        ?float $deliveryChargeNet=null,
        ?float $deliveryChargeVAT=null,
        float $firstRegFee=0.0,
        float $otr=0.0,
        float $p11D=0.0,
        float $otR_Value=0.0,
        ?float $actualPrice=null,
        ?float $totalOfferValue=null,
        ?float $campaignOfferContribution=null,
        ?float $retailerOfferContribution=null,
        ?float $campaignGovernmentGrantOfferContribution=null,
        ?DateTime $offerExpiryDate=null,
        ?bool $hasNonMonetaryOffers=null,
        float $plates=0.0,
        ?float $platesNet=null,
        ?float $platesVAT=null,
        float $fuelCharge=0.0,
        ?float $fuelChargeNet=null,
        ?float $fuelChargeVAT=null,
        float $powerKW=0.0,
        float $retailPrice_ExVAT=0.0,
        float $retailPrice_IncVAT=0.0,
        float $veD_Year1=0.0,
        float $veD_Year2=0.0,
        int $cc=0,
        int $cyclinders=0,
        ?string $baumuster=null,
        ?string $marketingCode=null,
        ?string $chassisNumber=null,
        ?string $colourDescription=null,
        ?string $colourCode=null,
        ?string $emissionCombined=null,
        ?string $emissionDirective=null,
        ?string $normalisedEmissionDirective=null,
        ?string $emissionExtraUrban=null,
        ?string $emissionUrban=null,
        ?string $energyEfficiencyClass=null,
        ?string $wltpEmissionCombined=null,
        ?string $imageUrl=null,
        ?string $line=null,
        ?string $modelYear=null,
        ?string $modelYearCode=null,
        ?string $halfModelYearCode=null,
        ?string $nst=null,
        ?string $numberOfDoors=null,
        ?string $numberOfGears=null,
        ?string $numberOfSeats=null,
        ?string $rvOptions=null,
        ?string $salesDescription=null,
        ?string $salesDescriptionShort=null,
        ?string $upholsteryCode=null,
        ?string $upholsteryDescription=null,
        ?string $transmissionDescription=null,
        ?string $vehicleCategory=null,
        ?string $vehicleClass=null,
        ?string $vehicleType=null,
        ?string $vid=null,
        ?bool $latestModel=null,
        ?DateTime $portArrivalDate=null,
        ?DateTime $productionDate=null,
        ?DateTime $confirmedProductionDate=null,
        ?DateTime $tradeInDate=null,
        ?float $electricConsumption=null,
        ?float $electricRange=null,
        ?string $locationTypeName=null,
        ?string $cesarIdShipToParty=null,
        ?string $vehicleUsageCode=null,
        ?string $account=null,
        ?bool $isSpecialistCar=null,
        ?int $bootCapacity=null,
        ?string $driveConcept=null,
        ?string $driveType=null,
        ?float $combustionPowerHp=null,
        ?float $electricPowerKw=null,
        ?float $electricPowerHp=null,
        ?float $combinedPowerKw=null,
        ?float $combinedPowerHP=null,
        ?string $mbukReserve=null,
        ?string $bm7NST=null,
        ?DateTime $gbDestDate=null,
        ?string $fin=null,
        ?BodyStyle $bodyStyle=null,
        ?int $bodyStyle_Id=null,
        ?Brand $brand=null,
        ?int $brandId=null,
        ?Consumption $consumptionCombined=null,
        ?Consumption $consumptionExtraUrban=null,
        ?Consumption $consumptionUrban=null,
        ?Consumption $wltpFuelConsumptionExtraHigh=null,
        ?Consumption $wltpFuelConsumptionHigh=null,
        ?Consumption $wltpFuelConsumptionMedium=null,
        ?Consumption $wltpFuelConsumptionLow=null,
        ?Consumption $wltpFuelConsumptionCombined=null,
        ?Dealer $dealer=null,
        ?int $dealer_Id=null,
        ?Dealer $displayRetailer=null,
        ?int $displayRetailer_Id=null,
        ?Engine $engine=null,
        ?MappedColourGroup $mapped_ColourGroup=null,
        ?int $mapped_ColourGroup_Id=null,
        ?MappedFuelType $mapped_FuelType=null,
        ?int $mapped_FuelType_Id=null,
        ?MappedTransmissionGroup $mapped_TransmissionGroup=null,
        ?int $model_Id=null,
        ?Model $model=null,
        ?Upholstery $upholstery=null,
        ?int $upholstery_Id=null,
        ?Line $mapped_Line=null,
        ?int $mapped_Line_Id=null,
        ?int $mileage=null,
        ?string $condition=null,
        ?string $source=null,
        ?DateTime $registrationDate=null,
        ?string $registrationNumber=null,
        ?float $topSpeed=null,
        ?float $acceleration=null,
        ?float $torque=null,
        ?array $usedCarImages=null,
        ?float $taxAmount=null,
        ?int $vatQualifying=null,
        ?string $promoCode=null,
        ?float $campaignPromoOfferContribution=null,
        ?bool $reserved=null,
        ?float $emission=null,
        ?bool $underOffer=null,
        ?bool $allocatedToBackOrder=null,
        ?string $paintSwatchUrl=null,
        ?string $upholsterySwatchUrl=null,
        ?array $packages=null,
        ?VehicleSecured $secured=null,
        ?VehicleImage $cachedImage=null,
        ?bool $hasMildHybridEquipmentCode=null,
        ?bool $eligibleForIntegratedServiceCare=null,
        ?array $vehicleSecuredAudit=null,
        /** @var string */
        public string $vehicleIdentifier='',
        /** @var DateTime */
        public DateTime $lastUpdated=new DateTime(),
        /** @var array<EquipmentCache>|null */
        public ?array $equipmentCacheList=null,
        /** @var string */
        public string $key=''
    ) {
        parent::__construct($id,$vin,$commissionNumber,$isAllWheel,$isAMG,$isAvailableOnline,$isSellable,$isDisplayStock,$creationDate,$maintenanceDate,$horsePower,$deliveryCharge,$deliveryChargeNet,$deliveryChargeVAT,$firstRegFee,$otr,$p11D,$otR_Value,$actualPrice,$totalOfferValue,$campaignOfferContribution,$retailerOfferContribution,$campaignGovernmentGrantOfferContribution,$offerExpiryDate,$hasNonMonetaryOffers,$plates,$platesNet,$platesVAT,$fuelCharge,$fuelChargeNet,$fuelChargeVAT,$powerKW,$retailPrice_ExVAT,$retailPrice_IncVAT,$veD_Year1,$veD_Year2,$cc,$cyclinders,$baumuster,$marketingCode,$chassisNumber,$colourDescription,$colourCode,$emissionCombined,$emissionDirective,$normalisedEmissionDirective,$emissionExtraUrban,$emissionUrban,$energyEfficiencyClass,$wltpEmissionCombined,$imageUrl,$line,$modelYear,$modelYearCode,$halfModelYearCode,$nst,$numberOfDoors,$numberOfGears,$numberOfSeats,$rvOptions,$salesDescription,$salesDescriptionShort,$upholsteryCode,$upholsteryDescription,$transmissionDescription,$vehicleCategory,$vehicleClass,$vehicleType,$vid,$latestModel,$portArrivalDate,$productionDate,$confirmedProductionDate,$tradeInDate,$electricConsumption,$electricRange,$locationTypeName,$cesarIdShipToParty,$vehicleUsageCode,$account,$isSpecialistCar,$bootCapacity,$driveConcept,$driveType,$combustionPowerHp,$electricPowerKw,$electricPowerHp,$combinedPowerKw,$combinedPowerHP,$mbukReserve,$bm7NST,$gbDestDate,$fin,$bodyStyle,$bodyStyle_Id,$brand,$brandId,$consumptionCombined,$consumptionExtraUrban,$consumptionUrban,$wltpFuelConsumptionExtraHigh,$wltpFuelConsumptionHigh,$wltpFuelConsumptionMedium,$wltpFuelConsumptionLow,$wltpFuelConsumptionCombined,$dealer,$dealer_Id,$displayRetailer,$displayRetailer_Id,$engine,$mapped_ColourGroup,$mapped_ColourGroup_Id,$mapped_FuelType,$mapped_FuelType_Id,$mapped_TransmissionGroup,$model_Id,$model,$upholstery,$upholstery_Id,$mapped_Line,$mapped_Line_Id,$mileage,$condition,$source,$registrationDate,$registrationNumber,$topSpeed,$acceleration,$torque,$usedCarImages,$taxAmount,$vatQualifying,$promoCode,$campaignPromoOfferContribution,$reserved,$emission,$underOffer,$allocatedToBackOrder,$paintSwatchUrl,$upholsterySwatchUrl,$packages,$secured,$cachedImage,$hasMildHybridEquipmentCode,$eligibleForIntegratedServiceCare,$vehicleSecuredAudit);
    }

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

class UpdateVehicleV2Request implements IPost, JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $vehicleIdentifier='',
        /** @var string */
        public string $vin='',
        /** @var string */
        public string $vehicleType=''
    ) {
    }

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

enum ActionType : string
{
    case Insert = 'Insert';
    case Update = 'Update';
    case Offline = 'Offline';
    case NoAction = 'NoAction';
    case Error = 'Error';
}

/**
 * @template TVehicle
 */
class ProcessResult implements JsonSerializable
{
    public array $genericArgs = [];
    public static function create(array $genericArgs=[]): ProcessResult {
        $to = new ProcessResult();
        $to->genericArgs = $genericArgs;
        return $to;
    }

    public function __construct(
        /** @var bool|null */
        public mixed $success=null,
        /** @var bool|null */
        public mixed $rejected=null,
        /** @var OpenSearchVehicle|null */
        public mixed $mappedVehicle=null,
        /** @var ActionType|null */
        public mixed $action=null
    ) {
    }

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

PHP UpdateVehicleV2Request 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 /v2/{VehicleType}/Vehicle/UpdateVehicle HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"vehicleIdentifier":"String","vin":"String","vehicleType":"String"}