Mercedes.Agency.Orchestration.API

<back to all web services

FiltersRequest

Filters
Requires Authentication
The following routes are available for this service:
GET/v1/filters/{vehicletype}Get filters by vehicle type
<?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 Model implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $DisplayName=null,
        /** @var string|null */
        public ?string $ImageUrlSmall=null,
        /** @var string|null */
        public ?string $ImageUrlMedium=null,
        /** @var string|null */
        public ?string $ImageUrlLarge=null,
        /** @var bool|null */
        public ?bool $Specialist=null,
        /** @var int */
        public int $Priority=0,
        /** @var bool|null */
        public ?bool $ExcludeFromOnlineShowroomFilters=null
    ) {
    }

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

class BodyStyle implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var array<Model>|null */
        public ?array $Models=null
    ) {
    }

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

class Brand implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $DisplayName=null,
        /** @var array<BodyStyle>|null */
        public ?array $BodyStyles=null
    ) {
    }

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

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

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        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
    ) {
    }

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

class Engine implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Description=null,
        /** @var int|null */
        public ?int $BrandId=null,
        /** @var string|null */
        public ?string $Brand=null,
        /** @var string|null */
        public ?string $Badge=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['BrandId'])) $this->BrandId = $o['BrandId'];
        if (isset($o['Brand'])) $this->Brand = $o['Brand'];
        if (isset($o['Badge'])) $this->Badge = $o['Badge'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->BrandId)) $o['BrandId'] = $this->BrandId;
        if (isset($this->Brand)) $o['Brand'] = $this->Brand;
        if (isset($this->Badge)) $o['Badge'] = $this->Badge;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        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 */
        public string $Description='',
        /** @var string|null */
        public ?string $RetailerGroupName=null,
        /** @var array<string>|null */
        public ?array $GssnIds=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['Description'])) $this->Description = $o['Description'];
        if (isset($o['RetailerGroupName'])) $this->RetailerGroupName = $o['RetailerGroupName'];
        if (isset($o['GssnIds'])) $this->GssnIds = JsonConverters::fromArray('string', $o['GssnIds']);
    }
    
    /** @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->Description)) $o['Description'] = $this->Description;
        if (isset($this->RetailerGroupName)) $o['RetailerGroupName'] = $this->RetailerGroupName;
        if (isset($this->GssnIds)) $o['GssnIds'] = JsonConverters::toArray('string', $this->GssnIds);
        return empty($o) ? new class(){} : $o;
    }
}

class MarketArea implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $MarketAreaName=null,
        /** @var string */
        public string $Description='',
        /** @var array<string>|null */
        public ?array $GssnIds=null
    ) {
    }

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

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

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

class AccountRetailer implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Gssn=null,
        /** @var bool|null */
        public ?bool $IsSmart=null
    ) {
    }

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

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

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

class Filters extends Filters implements JsonSerializable
{
    /**
     * @param array<Brand>|null $Brands
     * @param array<Fuel>|null $Fuels
     * @param array<Line>|null $Lines
     * @param array<Engine>|null $Engines
     * @param array<BodyStyle>|null $BodyStyles
     * @param array<Model>|null $Models
     * @param array<Transmission>|null $Transmissions
     * @param array<Brand>|null $ModelHierarchy
     * @param array<Retailer>|null $Retailers
     * @param array<Line>|null $AllLines
     * @param array<Colour>|null $Colours
     * @param array<Upholstery>|null $Upholsteries
     * @param array<Package>|null $Packages
     * @param array<DeliveryTime>|null $DeliveryTime
     * @param array<RetailerGroup>|null $RetailerGroups
     * @param array<MarketArea>|null $MarketAreas
     * @param array<NonOptimalReason>|null $NonOptimalReasons
     */
    public function __construct(
        ?array $Brands=null,
        ?array $Fuels=null,
        ?array $Lines=null,
        ?array $Engines=null,
        ?array $BodyStyles=null,
        ?array $Models=null,
        ?array $Transmissions=null,
        ?array $ModelHierarchy=null,
        ?array $Retailers=null,
        ?array $AllLines=null,
        ?array $Colours=null,
        ?array $Upholsteries=null,
        ?array $Packages=null,
        ?array $DeliveryTime=null,
        ?array $RetailerGroups=null,
        ?array $MarketAreas=null,
        ?array $NonOptimalReasons=null,
        /** @var array<string>|null */
        public ?array $Equipment=null,
        /** @var array<LookupValue>|null */
        public ?array $CustomerLocations=null,
        /** @var array<LookupValue>|null */
        public ?array $AssistanceProviders=null
    ) {
        parent::__construct($Brands,$Fuels,$Lines,$Engines,$BodyStyles,$Models,$Transmissions,$ModelHierarchy,$Retailers,$AllLines,$Colours,$Upholsteries,$Packages,$DeliveryTime,$RetailerGroups,$MarketAreas,$NonOptimalReasons);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Fuels'])) $this->Fuels = JsonConverters::fromArray('Fuel', $o['Fuels']);
        if (isset($o['Lines'])) $this->Lines = JsonConverters::fromArray('Line', $o['Lines']);
        if (isset($o['Engines'])) $this->Engines = JsonConverters::fromArray('Engine', $o['Engines']);
        if (isset($o['Transmissions'])) $this->Transmissions = JsonConverters::fromArray('Transmission', $o['Transmissions']);
        if (isset($o['Colours'])) $this->Colours = JsonConverters::fromArray('Colour', $o['Colours']);
        if (isset($o['Upholsteries'])) $this->Upholsteries = JsonConverters::fromArray('Upholstery', $o['Upholsteries']);
        if (isset($o['Packages'])) $this->Packages = JsonConverters::fromArray('Package', $o['Packages']);
        if (isset($o['Brands'])) $this->Brands = JsonConverters::fromArray('Brand', $o['Brands']);
        if (isset($o['Equipment'])) $this->Equipment = JsonConverters::fromArray('string', $o['Equipment']);
        if (isset($o['Retailers'])) $this->Retailers = JsonConverters::fromArray('Retailer', $o['Retailers']);
        if (isset($o['Retailers'])) $this->Retailers = JsonConverters::fromArray('AccountRetailer', $o['Retailers']);
        if (isset($o['RetailerGroups'])) $this->RetailerGroups = JsonConverters::fromArray('RetailerGroup', $o['RetailerGroups']);
        if (isset($o['MarketAreas'])) $this->MarketAreas = JsonConverters::fromArray('MarketArea', $o['MarketAreas']);
        if (isset($o['CustomerLocations'])) $this->CustomerLocations = JsonConverters::fromArray('LookupValue', $o['CustomerLocations']);
        if (isset($o['AssistanceProviders'])) $this->AssistanceProviders = JsonConverters::fromArray('LookupValue', $o['AssistanceProviders']);
        if (isset($o['NonOptimalReasons'])) $this->NonOptimalReasons = JsonConverters::fromArray('NonOptimalReason', $o['NonOptimalReasons']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Fuels)) $o['Fuels'] = JsonConverters::toArray('Fuel', $this->Fuels);
        if (isset($this->Lines)) $o['Lines'] = JsonConverters::toArray('Line', $this->Lines);
        if (isset($this->Engines)) $o['Engines'] = JsonConverters::toArray('Engine', $this->Engines);
        if (isset($this->Transmissions)) $o['Transmissions'] = JsonConverters::toArray('Transmission', $this->Transmissions);
        if (isset($this->Colours)) $o['Colours'] = JsonConverters::toArray('Colour', $this->Colours);
        if (isset($this->Upholsteries)) $o['Upholsteries'] = JsonConverters::toArray('Upholstery', $this->Upholsteries);
        if (isset($this->Packages)) $o['Packages'] = JsonConverters::toArray('Package', $this->Packages);
        if (isset($this->Brands)) $o['Brands'] = JsonConverters::toArray('Brand', $this->Brands);
        if (isset($this->Equipment)) $o['Equipment'] = JsonConverters::toArray('string', $this->Equipment);
        if (isset($this->Retailers)) $o['Retailers'] = JsonConverters::toArray('Retailer', $this->Retailers);
        if (isset($this->Retailers)) $o['Retailers'] = JsonConverters::toArray('AccountRetailer', $this->Retailers);
        if (isset($this->RetailerGroups)) $o['RetailerGroups'] = JsonConverters::toArray('RetailerGroup', $this->RetailerGroups);
        if (isset($this->MarketAreas)) $o['MarketAreas'] = JsonConverters::toArray('MarketArea', $this->MarketAreas);
        if (isset($this->CustomerLocations)) $o['CustomerLocations'] = JsonConverters::toArray('LookupValue', $this->CustomerLocations);
        if (isset($this->AssistanceProviders)) $o['AssistanceProviders'] = JsonConverters::toArray('LookupValue', $this->AssistanceProviders);
        if (isset($this->NonOptimalReasons)) $o['NonOptimalReasons'] = JsonConverters::toArray('NonOptimalReason', $this->NonOptimalReasons);
        return empty($o) ? new class(){} : $o;
    }
}

class FiltersResponse implements JsonSerializable
{
    public function __construct(
        /** @var Filters|null */
        public ?Filters $Filters=null
    ) {
    }

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

class FiltersRequest implements IGet, JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $vehicleType=''
    ) {
    }

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

class Filters implements JsonSerializable
{
    public function __construct(
        /** @var array<Brand>|null */
        public ?array $Brands=null,
        /** @var array<Fuel>|null */
        public ?array $Fuels=null,
        /** @var array<Line>|null */
        public ?array $Lines=null,
        /** @var array<Engine>|null */
        public ?array $Engines=null,
        /** @var array<BodyStyle>|null */
        public ?array $BodyStyles=null,
        /** @var array<Model>|null */
        public ?array $Models=null,
        /** @var array<Transmission>|null */
        public ?array $Transmissions=null,
        /** @var array<Brand>|null */
        public ?array $ModelHierarchy=null,
        /** @var array<Retailer>|null */
        public ?array $Retailers=null,
        /** @var array<Line>|null */
        public ?array $AllLines=null,
        /** @var array<Colour>|null */
        public ?array $Colours=null,
        /** @var array<Upholstery>|null */
        public ?array $Upholsteries=null,
        /** @var array<Package>|null */
        public ?array $Packages=null,
        /** @var array<DeliveryTime>|null */
        public ?array $DeliveryTime=null,
        /** @var array<RetailerGroup>|null */
        public ?array $RetailerGroups=null,
        /** @var array<MarketArea>|null */
        public ?array $MarketAreas=null,
        /** @var array<NonOptimalReason>|null */
        public ?array $NonOptimalReasons=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Brands'])) $this->Brands = JsonConverters::fromArray('Brand', $o['Brands']);
        if (isset($o['Fuels'])) $this->Fuels = JsonConverters::fromArray('Fuel', $o['Fuels']);
        if (isset($o['Lines'])) $this->Lines = JsonConverters::fromArray('Line', $o['Lines']);
        if (isset($o['Engines'])) $this->Engines = JsonConverters::fromArray('Engine', $o['Engines']);
        if (isset($o['BodyStyles'])) $this->BodyStyles = JsonConverters::fromArray('BodyStyle', $o['BodyStyles']);
        if (isset($o['Models'])) $this->Models = JsonConverters::fromArray('Model', $o['Models']);
        if (isset($o['Transmissions'])) $this->Transmissions = JsonConverters::fromArray('Transmission', $o['Transmissions']);
        if (isset($o['ModelHierarchy'])) $this->ModelHierarchy = JsonConverters::fromArray('Brand', $o['ModelHierarchy']);
        if (isset($o['Retailers'])) $this->Retailers = JsonConverters::fromArray('Retailer', $o['Retailers']);
        if (isset($o['AllLines'])) $this->AllLines = JsonConverters::fromArray('Line', $o['AllLines']);
        if (isset($o['Colours'])) $this->Colours = JsonConverters::fromArray('Colour', $o['Colours']);
        if (isset($o['Upholsteries'])) $this->Upholsteries = JsonConverters::fromArray('Upholstery', $o['Upholsteries']);
        if (isset($o['Packages'])) $this->Packages = JsonConverters::fromArray('Package', $o['Packages']);
        if (isset($o['DeliveryTime'])) $this->DeliveryTime = JsonConverters::fromArray('DeliveryTime', $o['DeliveryTime']);
        if (isset($o['RetailerGroups'])) $this->RetailerGroups = JsonConverters::fromArray('RetailerGroup', $o['RetailerGroups']);
        if (isset($o['MarketAreas'])) $this->MarketAreas = JsonConverters::fromArray('MarketArea', $o['MarketAreas']);
        if (isset($o['NonOptimalReasons'])) $this->NonOptimalReasons = JsonConverters::fromArray('NonOptimalReason', $o['NonOptimalReasons']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Brands)) $o['Brands'] = JsonConverters::toArray('Brand', $this->Brands);
        if (isset($this->Fuels)) $o['Fuels'] = JsonConverters::toArray('Fuel', $this->Fuels);
        if (isset($this->Lines)) $o['Lines'] = JsonConverters::toArray('Line', $this->Lines);
        if (isset($this->Engines)) $o['Engines'] = JsonConverters::toArray('Engine', $this->Engines);
        if (isset($this->BodyStyles)) $o['BodyStyles'] = JsonConverters::toArray('BodyStyle', $this->BodyStyles);
        if (isset($this->Models)) $o['Models'] = JsonConverters::toArray('Model', $this->Models);
        if (isset($this->Transmissions)) $o['Transmissions'] = JsonConverters::toArray('Transmission', $this->Transmissions);
        if (isset($this->ModelHierarchy)) $o['ModelHierarchy'] = JsonConverters::toArray('Brand', $this->ModelHierarchy);
        if (isset($this->Retailers)) $o['Retailers'] = JsonConverters::toArray('Retailer', $this->Retailers);
        if (isset($this->AllLines)) $o['AllLines'] = JsonConverters::toArray('Line', $this->AllLines);
        if (isset($this->Colours)) $o['Colours'] = JsonConverters::toArray('Colour', $this->Colours);
        if (isset($this->Upholsteries)) $o['Upholsteries'] = JsonConverters::toArray('Upholstery', $this->Upholsteries);
        if (isset($this->Packages)) $o['Packages'] = JsonConverters::toArray('Package', $this->Packages);
        if (isset($this->DeliveryTime)) $o['DeliveryTime'] = JsonConverters::toArray('DeliveryTime', $this->DeliveryTime);
        if (isset($this->RetailerGroups)) $o['RetailerGroups'] = JsonConverters::toArray('RetailerGroup', $this->RetailerGroups);
        if (isset($this->MarketAreas)) $o['MarketAreas'] = JsonConverters::toArray('MarketArea', $this->MarketAreas);
        if (isset($this->NonOptimalReasons)) $o['NonOptimalReasons'] = JsonConverters::toArray('NonOptimalReason', $this->NonOptimalReasons);
        return empty($o) ? new class(){} : $o;
    }
}

PHP FiltersRequest DTOs

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

HTTP + JSV

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

GET /v1/filters/{vehicletype} HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Filters: 
	{
		Fuels: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		Lines: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		Engines: 
		[
			{
				Id: 0,
				Description: String,
				BrandId: 0,
				Brand: String,
				Badge: String
			}
		],
		Transmissions: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		Colours: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		Upholsteries: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		Packages: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		Brands: 
		[
			{
				Id: 0,
				Description: String,
				DisplayName: String,
				BodyStyles: 
				[
					{
						Id: 0,
						Description: String,
						Models: 
						[
							{
								Id: 0,
								Description: String,
								DisplayName: String,
								ImageUrlSmall: String,
								ImageUrlMedium: String,
								ImageUrlLarge: String,
								Specialist: False,
								Priority: 0,
								ExcludeFromOnlineShowroomFilters: False
							}
						]
					}
				]
			}
		],
		Equipment: 
		[
			String
		],
		Retailers: 
		[
			{
				Gssn: String,
				Description: String,
				CampaignExcluded: False
			}
		],
		Retailers: 
		[
			{
				Name: String,
				Gssn: String,
				IsSmart: False
			}
		],
		RetailerGroups: 
		[
			{
				Id: 0,
				RetailerGroupId: String,
				Description: String,
				RetailerGroupName: String,
				GssnIds: 
				[
					String
				]
			}
		],
		MarketAreas: 
		[
			{
				Id: 0,
				MarketAreaName: String,
				Description: String,
				GssnIds: 
				[
					String
				]
			}
		],
		CustomerLocations: 
		[
			{
				
			}
		],
		AssistanceProviders: 
		[
			{
				
			}
		],
		NonOptimalReasons: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		BodyStyles: 
		[
			{
				Id: 0,
				Description: String,
				Models: 
				[
					{
						Id: 0,
						Description: String,
						DisplayName: String,
						ImageUrlSmall: String,
						ImageUrlMedium: String,
						ImageUrlLarge: String,
						Specialist: False,
						Priority: 0,
						ExcludeFromOnlineShowroomFilters: False
					}
				]
			}
		],
		Models: 
		[
			{
				Id: 0,
				Description: String,
				DisplayName: String,
				ImageUrlSmall: String,
				ImageUrlMedium: String,
				ImageUrlLarge: String,
				Specialist: False,
				Priority: 0,
				ExcludeFromOnlineShowroomFilters: False
			}
		],
		ModelHierarchy: 
		[
			{
				Id: 0,
				Description: String,
				DisplayName: String,
				BodyStyles: 
				[
					{
						Id: 0,
						Description: String,
						Models: 
						[
							{
								Id: 0,
								Description: String,
								DisplayName: String,
								ImageUrlSmall: String,
								ImageUrlMedium: String,
								ImageUrlLarge: String,
								Specialist: False,
								Priority: 0,
								ExcludeFromOnlineShowroomFilters: False
							}
						]
					}
				]
			}
		],
		AllLines: 
		[
			{
				Id: 0,
				Description: String
			}
		],
		DeliveryTime: 
		[
			{
				Id: 0,
				Description: String
			}
		]
	}
}