BokaMera.API.Host

<back to all web services

TestRecurringSchedule

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/schedules/recurring/testTest recurring scheduleTest recurring schedule, only administrators are allowed to test schedules.
<?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 ExceptionText implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Reason=null,
        /** @var string|null */
        public ?string $ReasonPublic=null
    ) {
    }

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

class AvailableTimesSum implements IAvailableTime, JsonSerializable
{
    public function __construct(
        /** @var DateTime */
        public DateTime $From=new DateTime(),
        /** @var DateTime */
        public DateTime $To=new DateTime(),
        /** @var int */
        public int $Free=0,
        /** @var int */
        public int $FreeSpots=0,
        /** @var array<ExceptionText>|null */
        public ?array $ExceptionTexts=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
        if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
        if (isset($o['Free'])) $this->Free = $o['Free'];
        if (isset($o['FreeSpots'])) $this->FreeSpots = $o['FreeSpots'];
        if (isset($o['ExceptionTexts'])) $this->ExceptionTexts = JsonConverters::fromArray('ExceptionText', $o['ExceptionTexts']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
        if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
        if (isset($this->Free)) $o['Free'] = $this->Free;
        if (isset($this->FreeSpots)) $o['FreeSpots'] = $this->FreeSpots;
        if (isset($this->ExceptionTexts)) $o['ExceptionTexts'] = JsonConverters::toArray('ExceptionText', $this->ExceptionTexts);
        return empty($o) ? new class(){} : $o;
    }
}

class AvailableTimesResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $CompanyId='',
        /** @var int */
        public int $ServiceId=0,
        /** @var string|null */
        public ?string $TimesFreeTextSingle=null,
        /** @var string|null */
        public ?string $TimesFreeTextMultiple=null,
        /** @var array<AvailableTimesSum>|null */
        public ?array $Times=null
    ) {
    }

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

class AddRecurringScheduleDate implements JsonSerializable
{
    public function __construct(
        /** @description The date for the schedule opening (only date part is used here */
        // @ApiMember(Description="The date for the schedule opening (only date part is used here", IsRequired=true)
        /** @var DateTime */
        public DateTime $Date=new DateTime(),

        /** @description The time for the schedule opening hours (starttime) */
        // @ApiMember(Description="The time for the schedule opening hours (starttime)", IsRequired=true)
        /** @var DateInterval|null */
        public ?DateInterval $StartTime=null,

        /** @description The time for the schedule opening hours (endtime) */
        // @ApiMember(Description="The time for the schedule opening hours (endtime)", IsRequired=true)
        /** @var DateInterval|null */
        public ?DateInterval $EndTime=null
    ) {
    }

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

class ScheduleException implements JsonSerializable
{
    public function __construct(
        /** @var DateInterval|null */
        public ?DateInterval $StartTime=null,
        /** @var DateInterval|null */
        public ?DateInterval $EndTime=null
    ) {
    }

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

class AddScheduleService implements JsonSerializable
{
    public function __construct(
        /** @description The service id */
        // @ApiMember(Description="The service id", IsRequired=true)
        /** @var int */
        public int $Id=0
    ) {
    }

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

class BaseModel implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

enum ScheduleType : string
{
    case NotDefined = 'NotDefined';
    case RecurringSchedule = 'RecurringSchedule';
    case DateSchedule = 'DateSchedule';
}

/**
 * @property array<Resource>|null $Resources
 * @property ScheduleType $Type
 * @property bool $Active
 * @property bool $IsResourceSpecific
 */
interface ISchedule
{
}

/**
 * @property int $Id
 * @property string|null $ReasonText
 * @property bool $IsBlock
 * @property string|null $ReasonTextPublic
 * @property bool $IsRecurring
 * @property int[]|null $ResourceIds
 */
interface ITimeException extends IInterval
{
}

enum BookingStatusEnum : int
{
    case Booked = 1;
    case Unbooked = 2;
    case Reserved = 3;
    case Canceled = 4;
    case AwaitingPayment = 5;
    case AwaitingPaymentNoTimeLimit = 6;
    case Payed = 7;
    case AwaitingPaymentRequestFromAdmin = 8;
    case AwaitingPaymentFromProvider = 9;
    case Invoiced = 10;
}

class BookedCustomer implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var string|null */
        public ?string $Firstname=null,
        /** @var string|null */
        public ?string $Lastname=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $FacebookUserName=null,
        /** @var string|null */
        public ?string $ImageUrl=null,
        /** @var string|null */
        public ?string $CorporateIdentityNumber=null,
        /** @var string|null */
        public ?string $InvoiceAddress1=null,
        /** @var string|null */
        public ?string $InvoiceAddress2=null,
        /** @var string|null */
        public ?string $InvoiceCity=null,
        /** @var string|null */
        public ?string $InvoicePostalCode=null,
        /** @var string|null */
        public ?string $InvoiceCountryCode=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Firstname'])) $this->Firstname = $o['Firstname'];
        if (isset($o['Lastname'])) $this->Lastname = $o['Lastname'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['FacebookUserName'])) $this->FacebookUserName = $o['FacebookUserName'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['CorporateIdentityNumber'])) $this->CorporateIdentityNumber = $o['CorporateIdentityNumber'];
        if (isset($o['InvoiceAddress1'])) $this->InvoiceAddress1 = $o['InvoiceAddress1'];
        if (isset($o['InvoiceAddress2'])) $this->InvoiceAddress2 = $o['InvoiceAddress2'];
        if (isset($o['InvoiceCity'])) $this->InvoiceCity = $o['InvoiceCity'];
        if (isset($o['InvoicePostalCode'])) $this->InvoicePostalCode = $o['InvoicePostalCode'];
        if (isset($o['InvoiceCountryCode'])) $this->InvoiceCountryCode = $o['InvoiceCountryCode'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Firstname)) $o['Firstname'] = $this->Firstname;
        if (isset($this->Lastname)) $o['Lastname'] = $this->Lastname;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->FacebookUserName)) $o['FacebookUserName'] = $this->FacebookUserName;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->CorporateIdentityNumber)) $o['CorporateIdentityNumber'] = $this->CorporateIdentityNumber;
        if (isset($this->InvoiceAddress1)) $o['InvoiceAddress1'] = $this->InvoiceAddress1;
        if (isset($this->InvoiceAddress2)) $o['InvoiceAddress2'] = $this->InvoiceAddress2;
        if (isset($this->InvoiceCity)) $o['InvoiceCity'] = $this->InvoiceCity;
        if (isset($this->InvoicePostalCode)) $o['InvoicePostalCode'] = $this->InvoicePostalCode;
        if (isset($this->InvoiceCountryCode)) $o['InvoiceCountryCode'] = $this->InvoiceCountryCode;
        return empty($o) ? new class(){} : $o;
    }
}

/**
 * @property int $Id
 * @property int $ServiceId
 * @property int $BookedSpots
 * @property int $TotalSpots
 * @property int $PauseAfterInMinutes
 * @property BookingStatusEnum $Status
 * @property int $StatusId
 * @property BookedCustomer|null $Customer
 */
interface IBookedTime extends IInterval
{
}

class CustomFieldValue extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var string */
        public string $Value='',

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var int|null */
        public ?int $SortOrder=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class CustomField extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Table='',

        // @Required()
        /** @var string */
        public string $Column='',

        // @Required()
        /** @var string */
        public string $DataType='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class RegEx extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $RegExCode='',

        /** @var string|null */
        public ?string $ErrorMessage=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class ResourceType extends BaseModel implements IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var bool|null */
        public ?bool $SelectableByUser=null,

        // @Ignore()
        /** @var array<Resource>|null */
        public ?array $Resources=null,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var string */
        public string $Name='',

        /** @var string|null */
        public ?string $Description=null,
        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        // @Required()
        /** @var DateTime */
        public DateTime $UpdatedDate=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['SelectableByUser'])) $this->SelectableByUser = $o['SelectableByUser'];
        if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('Resource', $o['Resources']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->SelectableByUser)) $o['SelectableByUser'] = $this->SelectableByUser;
        if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('Resource', $this->Resources);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

class RebateCodeType extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        /** @var string|null */
        public ?string $Description=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class AppliedRebateCodes implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $RebateCodeId=0,
        /** @var string|null */
        public ?string $RebateCodeSign=null,
        /** @var int */
        public int $RebateCodeValue=0,
        /** @var float */
        public float $RebateAmount=0.0,
        /** @var RebateCodeType|null */
        public ?RebateCodeType $RebateCodeType=null
    ) {
    }

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

class TotalPriceInformation implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $TotalPrice=0.0,
        /** @var float */
        public float $TotalVATAmount=0.0,
        /** @var float */
        public float $TotalRebate=0.0,
        /** @var float */
        public float $TotalPriceBeforeRebate=0.0,
        /** @var array<AppliedRebateCodes>|null */
        public ?array $AppliedCodes=null,
        /** @var string|null */
        public ?string $PriceSign=null,
        /** @var string|null */
        public ?string $CurrencyId=null,
        /** @var float */
        public float $VAT=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TotalPrice'])) $this->TotalPrice = $o['TotalPrice'];
        if (isset($o['TotalVATAmount'])) $this->TotalVATAmount = $o['TotalVATAmount'];
        if (isset($o['TotalRebate'])) $this->TotalRebate = $o['TotalRebate'];
        if (isset($o['TotalPriceBeforeRebate'])) $this->TotalPriceBeforeRebate = $o['TotalPriceBeforeRebate'];
        if (isset($o['AppliedCodes'])) $this->AppliedCodes = JsonConverters::fromArray('AppliedRebateCodes', $o['AppliedCodes']);
        if (isset($o['PriceSign'])) $this->PriceSign = $o['PriceSign'];
        if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
        if (isset($o['VAT'])) $this->VAT = $o['VAT'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TotalPrice)) $o['TotalPrice'] = $this->TotalPrice;
        if (isset($this->TotalVATAmount)) $o['TotalVATAmount'] = $this->TotalVATAmount;
        if (isset($this->TotalRebate)) $o['TotalRebate'] = $this->TotalRebate;
        if (isset($this->TotalPriceBeforeRebate)) $o['TotalPriceBeforeRebate'] = $this->TotalPriceBeforeRebate;
        if (isset($this->AppliedCodes)) $o['AppliedCodes'] = JsonConverters::toArray('AppliedRebateCodes', $this->AppliedCodes);
        if (isset($this->PriceSign)) $o['PriceSign'] = $this->PriceSign;
        if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
        if (isset($this->VAT)) $o['VAT'] = $this->VAT;
        return empty($o) ? new class(){} : $o;
    }
}

enum Currency : int
{
    case SEK = 1;
    case EUR = 2;
}

class PriceMapping extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var string */
        public string $Id='',

        // @Required()
        /** @var int */
        public int $PriceId=0,

        /** @var string|null */
        public ?string $ReferenceType=null,
        /** @var string|null */
        public ?string $ExternalReference=null,
        // @Required()
        /** @var DateTime */
        public DateTime $UpdatedDate=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['PriceId'])) $this->PriceId = $o['PriceId'];
        if (isset($o['ReferenceType'])) $this->ReferenceType = $o['ReferenceType'];
        if (isset($o['ExternalReference'])) $this->ExternalReference = $o['ExternalReference'];
        if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->PriceId)) $o['PriceId'] = $this->PriceId;
        if (isset($this->ReferenceType)) $o['ReferenceType'] = $this->ReferenceType;
        if (isset($this->ExternalReference)) $o['ExternalReference'] = $this->ExternalReference;
        if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

enum BokaMeraDayOfWeek : int
{
    case Monday = 1;
    case Tuesday = 2;
    case Wednesday = 3;
    case Thursday = 4;
    case Friday = 5;
    case Saturday = 6;
    case Sunday = 7;
}

class ServicePriceDayOfWeekRelation extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var BokaMeraDayOfWeek|null */
        public ?BokaMeraDayOfWeek $DayOfWeek=null,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $ServicePriceId=0,

        // @Required()
        /** @var int */
        public int $DayOfWeekId=0,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class RebateCodeDayOfWeekRelation extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var BokaMeraDayOfWeek|null */
        public ?BokaMeraDayOfWeek $DayOfWeek=null,

        // @Required()
        /** @var int */
        public int $DayOfWeekId=0,

        // @Required()
        /** @var int */
        public int $RebateCodeId=0,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class RebateCodeServiceRelation extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $ServiceId=0,

        // @Required()
        /** @var int */
        public int $RebateCodeId=0,

        /** @var int */
        public int $Id=0,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class RebateCodeBookingPriceRelation extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $PriceId=0,

        // @Required()
        /** @var int */
        public int $RebateCodeId=0,

        /** @var int */
        public int $Id=0,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class RebateCodeCustomerRelation extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var string */
        public string $CustomerId='',

        // @Required()
        /** @var int */
        public int $RebateCodeId=0,

        /** @var int */
        public int $Id=0,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class DaysOfWeek extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $DayOfWeek='',

        // @Required()
        /** @var string */
        public string $DayOfWeekTranslation='',

        /** @var bool|null */
        public ?bool $DayOfWeekActive=null,
        /** @var int|null */
        public ?int $DayOfWeekSortOrder=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class UserAccessKeys extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $AccessKeyTypeId=0,

        // @Required()
        /** @var string */
        public string $Value='',

        // @Required()
        /** @var string */
        public string $CustomerId='',

        /** @var string|null */
        public ?string $Description=null,
        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

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

class ExternalReference extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var string */
        public string $Id='',

        // @Required()
        /** @var string */
        public string $OwnerId='',

        // @Required()
        /** @var string */
        public string $ReferenceType='',

        /** @var string|null */
        public ?string $ExternalData=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['OwnerId'])) $this->OwnerId = $o['OwnerId'];
        if (isset($o['ReferenceType'])) $this->ReferenceType = $o['ReferenceType'];
        if (isset($o['ExternalData'])) $this->ExternalData = $o['ExternalData'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->OwnerId)) $o['OwnerId'] = $this->OwnerId;
        if (isset($this->ReferenceType)) $o['ReferenceType'] = $this->ReferenceType;
        if (isset($this->ExternalData)) $o['ExternalData'] = $this->ExternalData;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

class CustomFieldDataResponse implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Column=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Value=null,
        /** @description Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */
        // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
        /** @var string|null */
        public ?string $DataType=null
    ) {
    }

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

class CustomerComment extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var string */
        public string $CustomerId='',

        // @Required()
        /** @var string */
        public string $Comments='',

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        /** @var string|null */
        public ?string $ImageUrl=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['Comments'])) $this->Comments = $o['Comments'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->Comments)) $o['Comments'] = $this->Comments;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

enum CustomerType : string
{
    case Person = 'Person';
    case Business = 'Business';
}

class Customer implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $City=null,
        /** @var string|null */
        public ?string $CountryCode=null,
        /** @var string|null */
        public ?string $IdentityNumber=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var string|null */
        public ?string $FirstName=null,
        /** @var string|null */
        public ?string $LastName=null,
        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $PostalCode=null,
        /** @var string|null */
        public ?string $Street=null,
        /** @var string|null */
        public ?string $Reference=null,
        /** @var CustomerType|null */
        public ?CustomerType $Type=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['CountryCode'])) $this->CountryCode = $o['CountryCode'];
        if (isset($o['IdentityNumber'])) $this->IdentityNumber = $o['IdentityNumber'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['PostalCode'])) $this->PostalCode = $o['PostalCode'];
        if (isset($o['Street'])) $this->Street = $o['Street'];
        if (isset($o['Reference'])) $this->Reference = $o['Reference'];
        if (isset($o['Type'])) $this->Type = JsonConverters::from('CustomerType', $o['Type']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->CountryCode)) $o['CountryCode'] = $this->CountryCode;
        if (isset($this->IdentityNumber)) $o['IdentityNumber'] = $this->IdentityNumber;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->PostalCode)) $o['PostalCode'] = $this->PostalCode;
        if (isset($this->Street)) $o['Street'] = $this->Street;
        if (isset($this->Reference)) $o['Reference'] = $this->Reference;
        if (isset($this->Type)) $o['Type'] = JsonConverters::to('CustomerType', $this->Type);
        return empty($o) ? new class(){} : $o;
    }
}

class RebateCodeStatus extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        /** @var string|null */
        public ?string $Description=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class RebateCode extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @References("typeof(BokaMera.API.ServiceModel.Db.RebateCodeType)")
        /** @var int */
        public int $RebateCodeTypeId=0,

        /** @var RebateCodeType|null */
        public ?RebateCodeType $RebateCodeTypeInfo=null,
        // @References("typeof(BokaMera.API.ServiceModel.Db.RebateCodeStatus)")
        /** @var int */
        public int $RebateCodeStatusId=0,

        /** @var RebateCodeType|null */
        public ?RebateCodeType $RebateCodeStatusInfo=null,
        // @Ignore()
        /** @var array<Service>|null */
        public ?array $Services=null,

        /** @var array<RebateCodeDayOfWeekRelation>|null */
        public ?array $RebateCodeDayOfWeekRelation=null,
        /** @var array<RebateCodeServiceRelation>|null */
        public ?array $RebateCodeServiceRelation=null,
        /** @var array<RebateCodeBookingPriceRelation>|null */
        public ?array $RebateCodeBookingPriceRelation=null,
        /** @var array<RebateCodeCustomerRelation>|null */
        public ?array $RebateCodeCustomerRelation=null,
        // @Ignore()
        /** @var array<DaysOfWeek>|null */
        public ?array $DaysOfWeek=null,

        // @Ignore()
        /** @var array<Customer>|null */
        public ?array $Customers=null,

        // @Ignore()
        /** @var RebateCodeStatus|null */
        public ?RebateCodeStatus $RebateCodeStatus=null,

        // @Ignore()
        /** @var RebateCodeType|null */
        public ?RebateCodeType $RebateCodeType=null,

        // @Ignore()
        /** @var int */
        public int $CurrentNumberOfUsesPerCustomer=0,

        // @Ignore()
        /** @var bool|null */
        public ?bool $IsSpecificByDayOfWeek=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var string */
        public string $CompanyId='',
        // @Required()
        /** @var DateTime */
        public DateTime $ValidFrom=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $ValidTo=new DateTime(),

        // @Required()
        /** @var string */
        public string $RebateCodeSign='',

        // @Required()
        /** @var int */
        public int $RebateCodeValue=0,

        // @Required()
        /** @var int */
        public int $MaxNumberOfUses=0,

        // @Required()
        /** @var int */
        public int $MaxNumberOfUsesPerCustomer=0,

        // @Required()
        /** @var int */
        public int $NumberOfUsesUsed=0,

        /** @var string|null */
        public ?string $PersonalNote=null,
        // @Required()
        /** @var string */
        public string $CreatedBy='',

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        // @Required()
        /** @var string */
        public string $UpdatedBy='',

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateInterval|null */
        public ?DateInterval $FromTime=null,

        // @Required()
        /** @var DateInterval|null */
        public ?DateInterval $ToTime=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['RebateCodeTypeId'])) $this->RebateCodeTypeId = $o['RebateCodeTypeId'];
        if (isset($o['RebateCodeTypeInfo'])) $this->RebateCodeTypeInfo = JsonConverters::from('RebateCodeType', $o['RebateCodeTypeInfo']);
        if (isset($o['RebateCodeStatusId'])) $this->RebateCodeStatusId = $o['RebateCodeStatusId'];
        if (isset($o['RebateCodeStatusInfo'])) $this->RebateCodeStatusInfo = JsonConverters::from('RebateCodeType', $o['RebateCodeStatusInfo']);
        if (isset($o['Services'])) $this->Services = JsonConverters::fromArray('Service', $o['Services']);
        if (isset($o['RebateCodeDayOfWeekRelation'])) $this->RebateCodeDayOfWeekRelation = JsonConverters::fromArray('RebateCodeDayOfWeekRelation', $o['RebateCodeDayOfWeekRelation']);
        if (isset($o['RebateCodeServiceRelation'])) $this->RebateCodeServiceRelation = JsonConverters::fromArray('RebateCodeServiceRelation', $o['RebateCodeServiceRelation']);
        if (isset($o['RebateCodeBookingPriceRelation'])) $this->RebateCodeBookingPriceRelation = JsonConverters::fromArray('RebateCodeBookingPriceRelation', $o['RebateCodeBookingPriceRelation']);
        if (isset($o['RebateCodeCustomerRelation'])) $this->RebateCodeCustomerRelation = JsonConverters::fromArray('RebateCodeCustomerRelation', $o['RebateCodeCustomerRelation']);
        if (isset($o['DaysOfWeek'])) $this->DaysOfWeek = JsonConverters::fromArray('DaysOfWeek', $o['DaysOfWeek']);
        if (isset($o['Customers'])) $this->Customers = JsonConverters::fromArray('Customer', $o['Customers']);
        if (isset($o['RebateCodeStatus'])) $this->RebateCodeStatus = JsonConverters::from('RebateCodeStatus', $o['RebateCodeStatus']);
        if (isset($o['RebateCodeType'])) $this->RebateCodeType = JsonConverters::from('RebateCodeType', $o['RebateCodeType']);
        if (isset($o['CurrentNumberOfUsesPerCustomer'])) $this->CurrentNumberOfUsesPerCustomer = $o['CurrentNumberOfUsesPerCustomer'];
        if (isset($o['IsSpecificByDayOfWeek'])) $this->IsSpecificByDayOfWeek = $o['IsSpecificByDayOfWeek'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['ValidFrom'])) $this->ValidFrom = JsonConverters::from('DateTime', $o['ValidFrom']);
        if (isset($o['ValidTo'])) $this->ValidTo = JsonConverters::from('DateTime', $o['ValidTo']);
        if (isset($o['RebateCodeSign'])) $this->RebateCodeSign = $o['RebateCodeSign'];
        if (isset($o['RebateCodeValue'])) $this->RebateCodeValue = $o['RebateCodeValue'];
        if (isset($o['MaxNumberOfUses'])) $this->MaxNumberOfUses = $o['MaxNumberOfUses'];
        if (isset($o['MaxNumberOfUsesPerCustomer'])) $this->MaxNumberOfUsesPerCustomer = $o['MaxNumberOfUsesPerCustomer'];
        if (isset($o['NumberOfUsesUsed'])) $this->NumberOfUsesUsed = $o['NumberOfUsesUsed'];
        if (isset($o['PersonalNote'])) $this->PersonalNote = $o['PersonalNote'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['UpdatedBy'])) $this->UpdatedBy = $o['UpdatedBy'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['FromTime'])) $this->FromTime = JsonConverters::from('DateInterval', $o['FromTime']);
        if (isset($o['ToTime'])) $this->ToTime = JsonConverters::from('DateInterval', $o['ToTime']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->RebateCodeTypeId)) $o['RebateCodeTypeId'] = $this->RebateCodeTypeId;
        if (isset($this->RebateCodeTypeInfo)) $o['RebateCodeTypeInfo'] = JsonConverters::to('RebateCodeType', $this->RebateCodeTypeInfo);
        if (isset($this->RebateCodeStatusId)) $o['RebateCodeStatusId'] = $this->RebateCodeStatusId;
        if (isset($this->RebateCodeStatusInfo)) $o['RebateCodeStatusInfo'] = JsonConverters::to('RebateCodeType', $this->RebateCodeStatusInfo);
        if (isset($this->Services)) $o['Services'] = JsonConverters::toArray('Service', $this->Services);
        if (isset($this->RebateCodeDayOfWeekRelation)) $o['RebateCodeDayOfWeekRelation'] = JsonConverters::toArray('RebateCodeDayOfWeekRelation', $this->RebateCodeDayOfWeekRelation);
        if (isset($this->RebateCodeServiceRelation)) $o['RebateCodeServiceRelation'] = JsonConverters::toArray('RebateCodeServiceRelation', $this->RebateCodeServiceRelation);
        if (isset($this->RebateCodeBookingPriceRelation)) $o['RebateCodeBookingPriceRelation'] = JsonConverters::toArray('RebateCodeBookingPriceRelation', $this->RebateCodeBookingPriceRelation);
        if (isset($this->RebateCodeCustomerRelation)) $o['RebateCodeCustomerRelation'] = JsonConverters::toArray('RebateCodeCustomerRelation', $this->RebateCodeCustomerRelation);
        if (isset($this->DaysOfWeek)) $o['DaysOfWeek'] = JsonConverters::toArray('DaysOfWeek', $this->DaysOfWeek);
        if (isset($this->Customers)) $o['Customers'] = JsonConverters::toArray('Customer', $this->Customers);
        if (isset($this->RebateCodeStatus)) $o['RebateCodeStatus'] = JsonConverters::to('RebateCodeStatus', $this->RebateCodeStatus);
        if (isset($this->RebateCodeType)) $o['RebateCodeType'] = JsonConverters::to('RebateCodeType', $this->RebateCodeType);
        if (isset($this->CurrentNumberOfUsesPerCustomer)) $o['CurrentNumberOfUsesPerCustomer'] = $this->CurrentNumberOfUsesPerCustomer;
        if (isset($this->IsSpecificByDayOfWeek)) $o['IsSpecificByDayOfWeek'] = $this->IsSpecificByDayOfWeek;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->ValidFrom)) $o['ValidFrom'] = JsonConverters::to('DateTime', $this->ValidFrom);
        if (isset($this->ValidTo)) $o['ValidTo'] = JsonConverters::to('DateTime', $this->ValidTo);
        if (isset($this->RebateCodeSign)) $o['RebateCodeSign'] = $this->RebateCodeSign;
        if (isset($this->RebateCodeValue)) $o['RebateCodeValue'] = $this->RebateCodeValue;
        if (isset($this->MaxNumberOfUses)) $o['MaxNumberOfUses'] = $this->MaxNumberOfUses;
        if (isset($this->MaxNumberOfUsesPerCustomer)) $o['MaxNumberOfUsesPerCustomer'] = $this->MaxNumberOfUsesPerCustomer;
        if (isset($this->NumberOfUsesUsed)) $o['NumberOfUsesUsed'] = $this->NumberOfUsesUsed;
        if (isset($this->PersonalNote)) $o['PersonalNote'] = $this->PersonalNote;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->UpdatedBy)) $o['UpdatedBy'] = $this->UpdatedBy;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->FromTime)) $o['FromTime'] = JsonConverters::to('DateInterval', $this->FromTime);
        if (isset($this->ToTime)) $o['ToTime'] = JsonConverters::to('DateInterval', $this->ToTime);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class ServicePrice extends BaseModel implements IInterval, JsonSerializable
{
    public function __construct(
        // @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
        /** @var string|null */
        public ?string $CurrencyId=null,

        /** @var Currency|null */
        public ?Currency $CurrencyInfo=null,
        // @Ignore()
        /** @var Service|null */
        public ?Service $Service=null,

        // @Ignore()
        /** @var array<PriceMapping>|null */
        public ?array $PriceMappings=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $isTimeSpecific=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $isDaysOfWeekSpecific=null,

        /** @var array<ServicePriceDayOfWeekRelation>|null */
        public ?array $DayOfWeeks=null,
        // @Ignore()
        /** @var float|null */
        public ?float $PriceBeforeRebate=null,

        // @Ignore()
        /** @var array<RebateCode>|null */
        public ?array $RebateCodesApplied=null,

        // @Ignore()
        /** @var string|null */
        public ?string $PriceText=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $IsWeighted=null,

        // @Ignore()
        /** @var array<ServicePrice>|null */
        public ?array $OverlappingPrices=null,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var int */
        public int $ServiceId=0,

        /** @var float|null */
        public ?float $Price=null,
        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        // @Required()
        /** @var DateInterval|null */
        public ?DateInterval $FromTime=null,

        // @Required()
        /** @var DateInterval|null */
        public ?DateInterval $ToTime=null,

        // @Required()
        /** @var float */
        public float $VAT=0.0,

        /** @var string|null */
        public ?string $Category=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var DateTime */
        public DateTime $From=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $To=new DateTime(),

        // @Required()
        /** @var int */
        public int $CalculationTypeId=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
        if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
        if (isset($o['Service'])) $this->Service = JsonConverters::from('Service', $o['Service']);
        if (isset($o['PriceMappings'])) $this->PriceMappings = JsonConverters::fromArray('PriceMapping', $o['PriceMappings']);
        if (isset($o['isTimeSpecific'])) $this->isTimeSpecific = $o['isTimeSpecific'];
        if (isset($o['isDaysOfWeekSpecific'])) $this->isDaysOfWeekSpecific = $o['isDaysOfWeekSpecific'];
        if (isset($o['DayOfWeeks'])) $this->DayOfWeeks = JsonConverters::fromArray('ServicePriceDayOfWeekRelation', $o['DayOfWeeks']);
        if (isset($o['PriceBeforeRebate'])) $this->PriceBeforeRebate = $o['PriceBeforeRebate'];
        if (isset($o['RebateCodesApplied'])) $this->RebateCodesApplied = JsonConverters::fromArray('RebateCode', $o['RebateCodesApplied']);
        if (isset($o['PriceText'])) $this->PriceText = $o['PriceText'];
        if (isset($o['IsWeighted'])) $this->IsWeighted = $o['IsWeighted'];
        if (isset($o['OverlappingPrices'])) $this->OverlappingPrices = JsonConverters::fromArray('ServicePrice', $o['OverlappingPrices']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
        if (isset($o['Price'])) $this->Price = $o['Price'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['FromTime'])) $this->FromTime = JsonConverters::from('DateInterval', $o['FromTime']);
        if (isset($o['ToTime'])) $this->ToTime = JsonConverters::from('DateInterval', $o['ToTime']);
        if (isset($o['VAT'])) $this->VAT = $o['VAT'];
        if (isset($o['Category'])) $this->Category = $o['Category'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
        if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
        if (isset($o['CalculationTypeId'])) $this->CalculationTypeId = $o['CalculationTypeId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
        if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
        if (isset($this->Service)) $o['Service'] = JsonConverters::to('Service', $this->Service);
        if (isset($this->PriceMappings)) $o['PriceMappings'] = JsonConverters::toArray('PriceMapping', $this->PriceMappings);
        if (isset($this->isTimeSpecific)) $o['isTimeSpecific'] = $this->isTimeSpecific;
        if (isset($this->isDaysOfWeekSpecific)) $o['isDaysOfWeekSpecific'] = $this->isDaysOfWeekSpecific;
        if (isset($this->DayOfWeeks)) $o['DayOfWeeks'] = JsonConverters::toArray('ServicePriceDayOfWeekRelation', $this->DayOfWeeks);
        if (isset($this->PriceBeforeRebate)) $o['PriceBeforeRebate'] = $this->PriceBeforeRebate;
        if (isset($this->RebateCodesApplied)) $o['RebateCodesApplied'] = JsonConverters::toArray('RebateCode', $this->RebateCodesApplied);
        if (isset($this->PriceText)) $o['PriceText'] = $this->PriceText;
        if (isset($this->IsWeighted)) $o['IsWeighted'] = $this->IsWeighted;
        if (isset($this->OverlappingPrices)) $o['OverlappingPrices'] = JsonConverters::toArray('ServicePrice', $this->OverlappingPrices);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
        if (isset($this->Price)) $o['Price'] = $this->Price;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->FromTime)) $o['FromTime'] = JsonConverters::to('DateInterval', $this->FromTime);
        if (isset($this->ToTime)) $o['ToTime'] = JsonConverters::to('DateInterval', $this->ToTime);
        if (isset($this->VAT)) $o['VAT'] = $this->VAT;
        if (isset($this->Category)) $o['Category'] = $this->Category;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
        if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
        if (isset($this->CalculationTypeId)) $o['CalculationTypeId'] = $this->CalculationTypeId;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

class ScheduleView extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class WeekNumberSetting extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class BookingTemplate extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $UsedByApplication='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class CalendarType extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class FreeSpotTexts extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $TextSingular='',

        // @Required()
        /** @var string */
        public string $TextPlural='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class BookingSettings extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @References("typeof(BokaMera.API.ServiceModel.Db.FreeSpotTexts)")
        /** @var int */
        public int $FreeSpotTextsId=0,

        // @Ignore()
        /** @var bool|null */
        public ?bool $SendEmailConfirmation=null,

        // @Ignore()
        /** @var array<ScheduleView>|null */
        public ?array $ScheduleViewOptions=null,

        // @Ignore()
        /** @var array<WeekNumberSetting>|null */
        public ?array $WeekNumberSettingOptions=null,

        // @Ignore()
        /** @var array<BookingTemplate>|null */
        public ?array $BookingTemplateOptions=null,

        // @Ignore()
        /** @var array<CalendarType>|null */
        public ?array $CalendarTypeOptions=null,

        // @Ignore()
        /** @var array<FreeSpotTexts>|null */
        public ?array $FreeSpotTextOptions=null,

        // @Ignore()
        /** @var array<BookingStatusOptions>|null */
        public ?array $BookingStatusOptions=null,

        /** @var FreeSpotTexts|null */
        public ?FreeSpotTexts $FreeSpotTextsInfo=null,
        // @Ignore()
        /** @var string|null */
        public ?string $FreeSpotsTextSingular=null,

        // @Ignore()
        /** @var string|null */
        public ?string $FreeSpotsTextPlural=null,

        // @Required()
        /** @var int */
        public int $BookingStatusId=0,

        // @Required()
        /** @var int */
        public int $ScheduleViewId=0,

        // @Required()
        /** @var int */
        public int $BookingTemplateId=0,

        // @Required()
        /** @var int */
        public int $CalendarTypeId=0,

        // @Required()
        /** @var bool|null */
        public ?bool $AllowBookingOnUnbookedTimes=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendEmailReminder=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendSmsReminder=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendSmsConfirmation=null,

        // @Required()
        /** @var int */
        public int $EmailReminderTime=0,

        // @Required()
        /** @var int */
        public int $SmsReminderTime=0,

        // @Required()
        /** @var int */
        public int $MaxActiveBookings=0,

        // @Required()
        /** @var bool|null */
        public ?bool $SendNotifications=null,

        /** @var string|null */
        public ?string $SendNotificationsEmail=null,
        // @Required()
        /** @var bool|null */
        public ?bool $EnableMobileApp=null,

        /** @var DateInterval|null */
        public ?DateInterval $ScheduleStartTime=null,
        /** @var DateInterval|null */
        public ?DateInterval $ScheduleEndTime=null,
        /** @var string|null */
        public ?string $ReceiptTemplate=null,
        // @Required()
        /** @var int */
        public int $ScheduleTimeSlotMinutes=0,

        // @Required()
        /** @var bool|null */
        public ?bool $ShowFreeTimesLeft=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableICalGroupBookings=null,

        /** @var string|null */
        public ?string $AgreementTemplate=null,
        // @Required()
        /** @var bool|null */
        public ?bool $ScheduleShowTimeExeptions=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableBookingsOnSameTime=null,

        // @Required()
        /** @var int */
        public int $ShowWeekNumberSettingId=0,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableShowBookedTimes=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableSendFollowUpMessage=null,

        // @Required()
        /** @var int */
        public int $FollowUpMessageTime=0,

        /** @var string|null */
        public ?string $MessageText=null,
        // @Required()
        /** @var bool|null */
        public ?bool $ScheduleGroupResources=null,

        // @Required()
        /** @var int */
        public int $BookSpotUserResponseMinutes=0,

        // @Required()
        /** @var bool|null */
        public ?bool $IsBookSpotDirectly=null,

        // @Required()
        /** @var int */
        public int $BookSpotDirectlyTimeLeftMinutes=0,

        // @Required()
        /** @var bool|null */
        public ?bool $SendEmailNotificationQueue=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendSMSNotificationQueue=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SchedulerDisableHorizontalScrolling=null,

        // @Required()
        /** @var bool|null */
        public ?bool $BookOnlyOnExistingCustomers=null,

        // @Required()
        /** @var bool|null */
        public ?bool $AutoGenerateUniquePinCode=null,

        // @Required()
        /** @var bool|null */
        public ?bool $WeightedPrices=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var bool|null */
        public ?bool $AutoCreateUserProfile=null,

        /** @var bool|null */
        public ?bool $ShowMultipleResourcesAsOne=null,
        /** @var bool|null */
        public ?bool $ShowMultiDayAsTime=null,
        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['FreeSpotTextsId'])) $this->FreeSpotTextsId = $o['FreeSpotTextsId'];
        if (isset($o['SendEmailConfirmation'])) $this->SendEmailConfirmation = $o['SendEmailConfirmation'];
        if (isset($o['ScheduleViewOptions'])) $this->ScheduleViewOptions = JsonConverters::fromArray('ScheduleView', $o['ScheduleViewOptions']);
        if (isset($o['WeekNumberSettingOptions'])) $this->WeekNumberSettingOptions = JsonConverters::fromArray('WeekNumberSetting', $o['WeekNumberSettingOptions']);
        if (isset($o['BookingTemplateOptions'])) $this->BookingTemplateOptions = JsonConverters::fromArray('BookingTemplate', $o['BookingTemplateOptions']);
        if (isset($o['CalendarTypeOptions'])) $this->CalendarTypeOptions = JsonConverters::fromArray('CalendarType', $o['CalendarTypeOptions']);
        if (isset($o['FreeSpotTextOptions'])) $this->FreeSpotTextOptions = JsonConverters::fromArray('FreeSpotTexts', $o['FreeSpotTextOptions']);
        if (isset($o['BookingStatusOptions'])) $this->BookingStatusOptions = JsonConverters::fromArray('BookingStatusOptions', $o['BookingStatusOptions']);
        if (isset($o['FreeSpotTextsInfo'])) $this->FreeSpotTextsInfo = JsonConverters::from('FreeSpotTexts', $o['FreeSpotTextsInfo']);
        if (isset($o['FreeSpotsTextSingular'])) $this->FreeSpotsTextSingular = $o['FreeSpotsTextSingular'];
        if (isset($o['FreeSpotsTextPlural'])) $this->FreeSpotsTextPlural = $o['FreeSpotsTextPlural'];
        if (isset($o['BookingStatusId'])) $this->BookingStatusId = $o['BookingStatusId'];
        if (isset($o['ScheduleViewId'])) $this->ScheduleViewId = $o['ScheduleViewId'];
        if (isset($o['BookingTemplateId'])) $this->BookingTemplateId = $o['BookingTemplateId'];
        if (isset($o['CalendarTypeId'])) $this->CalendarTypeId = $o['CalendarTypeId'];
        if (isset($o['AllowBookingOnUnbookedTimes'])) $this->AllowBookingOnUnbookedTimes = $o['AllowBookingOnUnbookedTimes'];
        if (isset($o['SendEmailReminder'])) $this->SendEmailReminder = $o['SendEmailReminder'];
        if (isset($o['SendSmsReminder'])) $this->SendSmsReminder = $o['SendSmsReminder'];
        if (isset($o['SendSmsConfirmation'])) $this->SendSmsConfirmation = $o['SendSmsConfirmation'];
        if (isset($o['EmailReminderTime'])) $this->EmailReminderTime = $o['EmailReminderTime'];
        if (isset($o['SmsReminderTime'])) $this->SmsReminderTime = $o['SmsReminderTime'];
        if (isset($o['MaxActiveBookings'])) $this->MaxActiveBookings = $o['MaxActiveBookings'];
        if (isset($o['SendNotifications'])) $this->SendNotifications = $o['SendNotifications'];
        if (isset($o['SendNotificationsEmail'])) $this->SendNotificationsEmail = $o['SendNotificationsEmail'];
        if (isset($o['EnableMobileApp'])) $this->EnableMobileApp = $o['EnableMobileApp'];
        if (isset($o['ScheduleStartTime'])) $this->ScheduleStartTime = JsonConverters::from('TimeSpan', $o['ScheduleStartTime']);
        if (isset($o['ScheduleEndTime'])) $this->ScheduleEndTime = JsonConverters::from('TimeSpan', $o['ScheduleEndTime']);
        if (isset($o['ReceiptTemplate'])) $this->ReceiptTemplate = $o['ReceiptTemplate'];
        if (isset($o['ScheduleTimeSlotMinutes'])) $this->ScheduleTimeSlotMinutes = $o['ScheduleTimeSlotMinutes'];
        if (isset($o['ShowFreeTimesLeft'])) $this->ShowFreeTimesLeft = $o['ShowFreeTimesLeft'];
        if (isset($o['EnableICalGroupBookings'])) $this->EnableICalGroupBookings = $o['EnableICalGroupBookings'];
        if (isset($o['AgreementTemplate'])) $this->AgreementTemplate = $o['AgreementTemplate'];
        if (isset($o['ScheduleShowTimeExeptions'])) $this->ScheduleShowTimeExeptions = $o['ScheduleShowTimeExeptions'];
        if (isset($o['EnableBookingsOnSameTime'])) $this->EnableBookingsOnSameTime = $o['EnableBookingsOnSameTime'];
        if (isset($o['ShowWeekNumberSettingId'])) $this->ShowWeekNumberSettingId = $o['ShowWeekNumberSettingId'];
        if (isset($o['EnableShowBookedTimes'])) $this->EnableShowBookedTimes = $o['EnableShowBookedTimes'];
        if (isset($o['EnableSendFollowUpMessage'])) $this->EnableSendFollowUpMessage = $o['EnableSendFollowUpMessage'];
        if (isset($o['FollowUpMessageTime'])) $this->FollowUpMessageTime = $o['FollowUpMessageTime'];
        if (isset($o['MessageText'])) $this->MessageText = $o['MessageText'];
        if (isset($o['ScheduleGroupResources'])) $this->ScheduleGroupResources = $o['ScheduleGroupResources'];
        if (isset($o['BookSpotUserResponseMinutes'])) $this->BookSpotUserResponseMinutes = $o['BookSpotUserResponseMinutes'];
        if (isset($o['IsBookSpotDirectly'])) $this->IsBookSpotDirectly = $o['IsBookSpotDirectly'];
        if (isset($o['BookSpotDirectlyTimeLeftMinutes'])) $this->BookSpotDirectlyTimeLeftMinutes = $o['BookSpotDirectlyTimeLeftMinutes'];
        if (isset($o['SendEmailNotificationQueue'])) $this->SendEmailNotificationQueue = $o['SendEmailNotificationQueue'];
        if (isset($o['SendSMSNotificationQueue'])) $this->SendSMSNotificationQueue = $o['SendSMSNotificationQueue'];
        if (isset($o['SchedulerDisableHorizontalScrolling'])) $this->SchedulerDisableHorizontalScrolling = $o['SchedulerDisableHorizontalScrolling'];
        if (isset($o['BookOnlyOnExistingCustomers'])) $this->BookOnlyOnExistingCustomers = $o['BookOnlyOnExistingCustomers'];
        if (isset($o['AutoGenerateUniquePinCode'])) $this->AutoGenerateUniquePinCode = $o['AutoGenerateUniquePinCode'];
        if (isset($o['WeightedPrices'])) $this->WeightedPrices = $o['WeightedPrices'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['AutoCreateUserProfile'])) $this->AutoCreateUserProfile = $o['AutoCreateUserProfile'];
        if (isset($o['ShowMultipleResourcesAsOne'])) $this->ShowMultipleResourcesAsOne = $o['ShowMultipleResourcesAsOne'];
        if (isset($o['ShowMultiDayAsTime'])) $this->ShowMultiDayAsTime = $o['ShowMultiDayAsTime'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->FreeSpotTextsId)) $o['FreeSpotTextsId'] = $this->FreeSpotTextsId;
        if (isset($this->SendEmailConfirmation)) $o['SendEmailConfirmation'] = $this->SendEmailConfirmation;
        if (isset($this->ScheduleViewOptions)) $o['ScheduleViewOptions'] = JsonConverters::toArray('ScheduleView', $this->ScheduleViewOptions);
        if (isset($this->WeekNumberSettingOptions)) $o['WeekNumberSettingOptions'] = JsonConverters::toArray('WeekNumberSetting', $this->WeekNumberSettingOptions);
        if (isset($this->BookingTemplateOptions)) $o['BookingTemplateOptions'] = JsonConverters::toArray('BookingTemplate', $this->BookingTemplateOptions);
        if (isset($this->CalendarTypeOptions)) $o['CalendarTypeOptions'] = JsonConverters::toArray('CalendarType', $this->CalendarTypeOptions);
        if (isset($this->FreeSpotTextOptions)) $o['FreeSpotTextOptions'] = JsonConverters::toArray('FreeSpotTexts', $this->FreeSpotTextOptions);
        if (isset($this->BookingStatusOptions)) $o['BookingStatusOptions'] = JsonConverters::toArray('BookingStatusOptions', $this->BookingStatusOptions);
        if (isset($this->FreeSpotTextsInfo)) $o['FreeSpotTextsInfo'] = JsonConverters::to('FreeSpotTexts', $this->FreeSpotTextsInfo);
        if (isset($this->FreeSpotsTextSingular)) $o['FreeSpotsTextSingular'] = $this->FreeSpotsTextSingular;
        if (isset($this->FreeSpotsTextPlural)) $o['FreeSpotsTextPlural'] = $this->FreeSpotsTextPlural;
        if (isset($this->BookingStatusId)) $o['BookingStatusId'] = $this->BookingStatusId;
        if (isset($this->ScheduleViewId)) $o['ScheduleViewId'] = $this->ScheduleViewId;
        if (isset($this->BookingTemplateId)) $o['BookingTemplateId'] = $this->BookingTemplateId;
        if (isset($this->CalendarTypeId)) $o['CalendarTypeId'] = $this->CalendarTypeId;
        if (isset($this->AllowBookingOnUnbookedTimes)) $o['AllowBookingOnUnbookedTimes'] = $this->AllowBookingOnUnbookedTimes;
        if (isset($this->SendEmailReminder)) $o['SendEmailReminder'] = $this->SendEmailReminder;
        if (isset($this->SendSmsReminder)) $o['SendSmsReminder'] = $this->SendSmsReminder;
        if (isset($this->SendSmsConfirmation)) $o['SendSmsConfirmation'] = $this->SendSmsConfirmation;
        if (isset($this->EmailReminderTime)) $o['EmailReminderTime'] = $this->EmailReminderTime;
        if (isset($this->SmsReminderTime)) $o['SmsReminderTime'] = $this->SmsReminderTime;
        if (isset($this->MaxActiveBookings)) $o['MaxActiveBookings'] = $this->MaxActiveBookings;
        if (isset($this->SendNotifications)) $o['SendNotifications'] = $this->SendNotifications;
        if (isset($this->SendNotificationsEmail)) $o['SendNotificationsEmail'] = $this->SendNotificationsEmail;
        if (isset($this->EnableMobileApp)) $o['EnableMobileApp'] = $this->EnableMobileApp;
        if (isset($this->ScheduleStartTime)) $o['ScheduleStartTime'] = JsonConverters::to('TimeSpan', $this->ScheduleStartTime);
        if (isset($this->ScheduleEndTime)) $o['ScheduleEndTime'] = JsonConverters::to('TimeSpan', $this->ScheduleEndTime);
        if (isset($this->ReceiptTemplate)) $o['ReceiptTemplate'] = $this->ReceiptTemplate;
        if (isset($this->ScheduleTimeSlotMinutes)) $o['ScheduleTimeSlotMinutes'] = $this->ScheduleTimeSlotMinutes;
        if (isset($this->ShowFreeTimesLeft)) $o['ShowFreeTimesLeft'] = $this->ShowFreeTimesLeft;
        if (isset($this->EnableICalGroupBookings)) $o['EnableICalGroupBookings'] = $this->EnableICalGroupBookings;
        if (isset($this->AgreementTemplate)) $o['AgreementTemplate'] = $this->AgreementTemplate;
        if (isset($this->ScheduleShowTimeExeptions)) $o['ScheduleShowTimeExeptions'] = $this->ScheduleShowTimeExeptions;
        if (isset($this->EnableBookingsOnSameTime)) $o['EnableBookingsOnSameTime'] = $this->EnableBookingsOnSameTime;
        if (isset($this->ShowWeekNumberSettingId)) $o['ShowWeekNumberSettingId'] = $this->ShowWeekNumberSettingId;
        if (isset($this->EnableShowBookedTimes)) $o['EnableShowBookedTimes'] = $this->EnableShowBookedTimes;
        if (isset($this->EnableSendFollowUpMessage)) $o['EnableSendFollowUpMessage'] = $this->EnableSendFollowUpMessage;
        if (isset($this->FollowUpMessageTime)) $o['FollowUpMessageTime'] = $this->FollowUpMessageTime;
        if (isset($this->MessageText)) $o['MessageText'] = $this->MessageText;
        if (isset($this->ScheduleGroupResources)) $o['ScheduleGroupResources'] = $this->ScheduleGroupResources;
        if (isset($this->BookSpotUserResponseMinutes)) $o['BookSpotUserResponseMinutes'] = $this->BookSpotUserResponseMinutes;
        if (isset($this->IsBookSpotDirectly)) $o['IsBookSpotDirectly'] = $this->IsBookSpotDirectly;
        if (isset($this->BookSpotDirectlyTimeLeftMinutes)) $o['BookSpotDirectlyTimeLeftMinutes'] = $this->BookSpotDirectlyTimeLeftMinutes;
        if (isset($this->SendEmailNotificationQueue)) $o['SendEmailNotificationQueue'] = $this->SendEmailNotificationQueue;
        if (isset($this->SendSMSNotificationQueue)) $o['SendSMSNotificationQueue'] = $this->SendSMSNotificationQueue;
        if (isset($this->SchedulerDisableHorizontalScrolling)) $o['SchedulerDisableHorizontalScrolling'] = $this->SchedulerDisableHorizontalScrolling;
        if (isset($this->BookOnlyOnExistingCustomers)) $o['BookOnlyOnExistingCustomers'] = $this->BookOnlyOnExistingCustomers;
        if (isset($this->AutoGenerateUniquePinCode)) $o['AutoGenerateUniquePinCode'] = $this->AutoGenerateUniquePinCode;
        if (isset($this->WeightedPrices)) $o['WeightedPrices'] = $this->WeightedPrices;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->AutoCreateUserProfile)) $o['AutoCreateUserProfile'] = $this->AutoCreateUserProfile;
        if (isset($this->ShowMultipleResourcesAsOne)) $o['ShowMultipleResourcesAsOne'] = $this->ShowMultipleResourcesAsOne;
        if (isset($this->ShowMultiDayAsTime)) $o['ShowMultiDayAsTime'] = $this->ShowMultiDayAsTime;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class AdminPaymentOptions extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class PaymentProviders extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Category='',

        /** @var string|null */
        public ?string $Url=null,
        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class PaymentSetting extends BaseModel implements JsonSerializable
{
    public function __construct(
        /** @var AdminPaymentOptions|null */
        public ?AdminPaymentOptions $AdminPaymentOption=null,
        // @Ignore()
        /** @var array<AdminPaymentOptions>|null */
        public ?array $AdminPaymentOptions=null,

        // @Ignore()
        /** @var array<PaymentProviders>|null */
        public ?array $PaymentProviderOptions=null,

        // @Required()
        /** @var bool|null */
        public ?bool $Enabled=null,

        // @Required()
        /** @var int */
        public int $InvoiceFee=0,

        // @Required()
        /** @var bool|null */
        public ?bool $AllowCreditCardPayment=null,

        // @Required()
        /** @var bool|null */
        public ?bool $AllowInvoicePayment=null,

        // @Required()
        /** @var bool|null */
        public ?bool $AllowBankPayment=null,

        // @Required()
        /** @var bool|null */
        public ?bool $GuaranteeOffered=null,

        // @Required()
        /** @var bool|null */
        public ?bool $RefundOnCancelBooking=null,

        /** @var int|null */
        public ?int $DefaultPaymentOptionId=null,
        // @Required()
        /** @var int */
        public int $PaymentProviderId=0,

        // @Required()
        /** @var bool|null */
        public ?bool $SendPaymentRequestDirectly=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['AdminPaymentOption'])) $this->AdminPaymentOption = JsonConverters::from('AdminPaymentOptions', $o['AdminPaymentOption']);
        if (isset($o['AdminPaymentOptions'])) $this->AdminPaymentOptions = JsonConverters::fromArray('AdminPaymentOptions', $o['AdminPaymentOptions']);
        if (isset($o['PaymentProviderOptions'])) $this->PaymentProviderOptions = JsonConverters::fromArray('PaymentProviders', $o['PaymentProviderOptions']);
        if (isset($o['Enabled'])) $this->Enabled = $o['Enabled'];
        if (isset($o['InvoiceFee'])) $this->InvoiceFee = $o['InvoiceFee'];
        if (isset($o['AllowCreditCardPayment'])) $this->AllowCreditCardPayment = $o['AllowCreditCardPayment'];
        if (isset($o['AllowInvoicePayment'])) $this->AllowInvoicePayment = $o['AllowInvoicePayment'];
        if (isset($o['AllowBankPayment'])) $this->AllowBankPayment = $o['AllowBankPayment'];
        if (isset($o['GuaranteeOffered'])) $this->GuaranteeOffered = $o['GuaranteeOffered'];
        if (isset($o['RefundOnCancelBooking'])) $this->RefundOnCancelBooking = $o['RefundOnCancelBooking'];
        if (isset($o['DefaultPaymentOptionId'])) $this->DefaultPaymentOptionId = $o['DefaultPaymentOptionId'];
        if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
        if (isset($o['SendPaymentRequestDirectly'])) $this->SendPaymentRequestDirectly = $o['SendPaymentRequestDirectly'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->AdminPaymentOption)) $o['AdminPaymentOption'] = JsonConverters::to('AdminPaymentOptions', $this->AdminPaymentOption);
        if (isset($this->AdminPaymentOptions)) $o['AdminPaymentOptions'] = JsonConverters::toArray('AdminPaymentOptions', $this->AdminPaymentOptions);
        if (isset($this->PaymentProviderOptions)) $o['PaymentProviderOptions'] = JsonConverters::toArray('PaymentProviders', $this->PaymentProviderOptions);
        if (isset($this->Enabled)) $o['Enabled'] = $this->Enabled;
        if (isset($this->InvoiceFee)) $o['InvoiceFee'] = $this->InvoiceFee;
        if (isset($this->AllowCreditCardPayment)) $o['AllowCreditCardPayment'] = $this->AllowCreditCardPayment;
        if (isset($this->AllowInvoicePayment)) $o['AllowInvoicePayment'] = $this->AllowInvoicePayment;
        if (isset($this->AllowBankPayment)) $o['AllowBankPayment'] = $this->AllowBankPayment;
        if (isset($this->GuaranteeOffered)) $o['GuaranteeOffered'] = $this->GuaranteeOffered;
        if (isset($this->RefundOnCancelBooking)) $o['RefundOnCancelBooking'] = $this->RefundOnCancelBooking;
        if (isset($this->DefaultPaymentOptionId)) $o['DefaultPaymentOptionId'] = $this->DefaultPaymentOptionId;
        if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
        if (isset($this->SendPaymentRequestDirectly)) $o['SendPaymentRequestDirectly'] = $this->SendPaymentRequestDirectly;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class CalendarExport extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $BookingId=0,

        // @Required()
        /** @var int */
        public int $ExceptionId=0,

        /** @var bool|null */
        public ?bool $CalendarSync=null,
        /** @var string|null */
        public ?string $CalendarId=null,
        /** @var bool|null */
        public ?bool $IsExceptionDeleted=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
        if (isset($o['ExceptionId'])) $this->ExceptionId = $o['ExceptionId'];
        if (isset($o['CalendarSync'])) $this->CalendarSync = $o['CalendarSync'];
        if (isset($o['CalendarId'])) $this->CalendarId = $o['CalendarId'];
        if (isset($o['IsExceptionDeleted'])) $this->IsExceptionDeleted = $o['IsExceptionDeleted'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
        if (isset($this->ExceptionId)) $o['ExceptionId'] = $this->ExceptionId;
        if (isset($this->CalendarSync)) $o['CalendarSync'] = $this->CalendarSync;
        if (isset($this->CalendarId)) $o['CalendarId'] = $this->CalendarId;
        if (isset($this->IsExceptionDeleted)) $o['IsExceptionDeleted'] = $this->IsExceptionDeleted;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class BookingLogEventType extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class BookingLog extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @References("typeof(BokaMera.API.ServiceModel.Db.BookingLogEventType)")
        /** @var int */
        public int $EventTypeId=0,

        /** @var BookingLogEventType|null */
        public ?BookingLogEventType $EventType=null,
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $BookingId=0,

        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Comments=null,
        /** @var string|null */
        public ?string $UserId=null,
        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['EventTypeId'])) $this->EventTypeId = $o['EventTypeId'];
        if (isset($o['EventType'])) $this->EventType = JsonConverters::from('BookingLogEventType', $o['EventType']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Comments'])) $this->Comments = $o['Comments'];
        if (isset($o['UserId'])) $this->UserId = $o['UserId'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->EventTypeId)) $o['EventTypeId'] = $this->EventTypeId;
        if (isset($this->EventType)) $o['EventType'] = JsonConverters::to('BookingLogEventType', $this->EventType);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Comments)) $o['Comments'] = $this->Comments;
        if (isset($this->UserId)) $o['UserId'] = $this->UserId;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

class PaymentLog extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
        /** @var string|null */
        public ?string $CurrencyId=null,

        /** @var Currency|null */
        public ?Currency $CurrencyInfo=null,
        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var int */
        public int $BookingId=0,

        /** @var string|null */
        public ?string $PaymentReferenceId=null,
        /** @var int|null */
        public ?int $PaymentProviderId=null,
        /** @var string|null */
        public ?string $OrderItemReferenceId=null,
        /** @var float|null */
        public ?float $Amount=null,
        /** @var float|null */
        public ?float $VAT=null,
        /** @var float|null */
        public ?float $AmountCredited=null,
        /** @var string|null */
        public ?string $Comments=null,
        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
        if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
        if (isset($o['PaymentReferenceId'])) $this->PaymentReferenceId = $o['PaymentReferenceId'];
        if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
        if (isset($o['OrderItemReferenceId'])) $this->OrderItemReferenceId = $o['OrderItemReferenceId'];
        if (isset($o['Amount'])) $this->Amount = $o['Amount'];
        if (isset($o['VAT'])) $this->VAT = $o['VAT'];
        if (isset($o['AmountCredited'])) $this->AmountCredited = $o['AmountCredited'];
        if (isset($o['Comments'])) $this->Comments = $o['Comments'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
        if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
        if (isset($this->PaymentReferenceId)) $o['PaymentReferenceId'] = $this->PaymentReferenceId;
        if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
        if (isset($this->OrderItemReferenceId)) $o['OrderItemReferenceId'] = $this->OrderItemReferenceId;
        if (isset($this->Amount)) $o['Amount'] = $this->Amount;
        if (isset($this->VAT)) $o['VAT'] = $this->VAT;
        if (isset($this->AmountCredited)) $o['AmountCredited'] = $this->AmountCredited;
        if (isset($this->Comments)) $o['Comments'] = $this->Comments;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

class QvicklyCheckoutResponse implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Number=0,
        /** @var string|null */
        public ?string $Status=null,
        /** @var string|null */
        public ?string $OrderId=null,
        /** @var string|null */
        public ?string $Url=null
    ) {
    }

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

enum Payson2CheckoutStatus : string
{
    case None = 'None';
    case Created = 'Created';
    case FormsFilled = 'FormsFilled';
    case ReadyToPay = 'ReadyToPay';
    case ProcessingPayment = 'ProcessingPayment';
    case ReadyToShip = 'ReadyToShip';
    case Shipped = 'Shipped';
    case PaidToAccount = 'PaidToAccount';
    case Canceled = 'Canceled';
    case Credited = 'Credited';
    case Expired = 'Expired';
    case Denied = 'Denied';
}

enum ItemType : string
{
    case Physical = 'Physical';
    case Service = 'Service';
    case Fee = 'Fee';
    case Discount = 'Discount';
}

class Item implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ItemId='',
        /** @var float */
        public float $DiscountRate=0.0,
        /** @var string|null */
        public ?string $Ean=null,
        /** @var string|null */
        public ?string $ImageUri=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var float */
        public float $Quantity=0.0,
        /** @var string|null */
        public ?string $Reference=null,
        /** @var float */
        public float $TaxRate=0.0,
        /** @var float */
        public float $TotalPriceExcludingTax=0.0,
        /** @var float */
        public float $TotalPriceIncludingTax=0.0,
        /** @var float */
        public float $TotalTaxAmount=0.0,
        /** @var float */
        public float $CreditedAmount=0.0,
        /** @var ItemType|null */
        public ?ItemType $Type=null,
        /** @var float */
        public float $UnitPrice=0.0,
        /** @var string|null */
        public ?string $Uri=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ItemId'])) $this->ItemId = $o['ItemId'];
        if (isset($o['DiscountRate'])) $this->DiscountRate = $o['DiscountRate'];
        if (isset($o['Ean'])) $this->Ean = $o['Ean'];
        if (isset($o['ImageUri'])) $this->ImageUri = JsonConverters::from('string', $o['ImageUri']);
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
        if (isset($o['Reference'])) $this->Reference = $o['Reference'];
        if (isset($o['TaxRate'])) $this->TaxRate = $o['TaxRate'];
        if (isset($o['TotalPriceExcludingTax'])) $this->TotalPriceExcludingTax = $o['TotalPriceExcludingTax'];
        if (isset($o['TotalPriceIncludingTax'])) $this->TotalPriceIncludingTax = $o['TotalPriceIncludingTax'];
        if (isset($o['TotalTaxAmount'])) $this->TotalTaxAmount = $o['TotalTaxAmount'];
        if (isset($o['CreditedAmount'])) $this->CreditedAmount = $o['CreditedAmount'];
        if (isset($o['Type'])) $this->Type = JsonConverters::from('ItemType', $o['Type']);
        if (isset($o['UnitPrice'])) $this->UnitPrice = $o['UnitPrice'];
        if (isset($o['Uri'])) $this->Uri = JsonConverters::from('string', $o['Uri']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ItemId)) $o['ItemId'] = $this->ItemId;
        if (isset($this->DiscountRate)) $o['DiscountRate'] = $this->DiscountRate;
        if (isset($this->Ean)) $o['Ean'] = $this->Ean;
        if (isset($this->ImageUri)) $o['ImageUri'] = JsonConverters::to('string', $this->ImageUri);
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
        if (isset($this->Reference)) $o['Reference'] = $this->Reference;
        if (isset($this->TaxRate)) $o['TaxRate'] = $this->TaxRate;
        if (isset($this->TotalPriceExcludingTax)) $o['TotalPriceExcludingTax'] = $this->TotalPriceExcludingTax;
        if (isset($this->TotalPriceIncludingTax)) $o['TotalPriceIncludingTax'] = $this->TotalPriceIncludingTax;
        if (isset($this->TotalTaxAmount)) $o['TotalTaxAmount'] = $this->TotalTaxAmount;
        if (isset($this->CreditedAmount)) $o['CreditedAmount'] = $this->CreditedAmount;
        if (isset($this->Type)) $o['Type'] = JsonConverters::to('ItemType', $this->Type);
        if (isset($this->UnitPrice)) $o['UnitPrice'] = $this->UnitPrice;
        if (isset($this->Uri)) $o['Uri'] = JsonConverters::to('string', $this->Uri);
        return empty($o) ? new class(){} : $o;
    }
}

class Order implements JsonSerializable
{
    public function __construct(
        /** @var Currency|null */
        public ?Currency $Currency=null,
        /** @var float */
        public float $TotalFeeExcludingTax=0.0,
        /** @var float */
        public float $TotalFeeIncludingTax=0.0,
        /** @var float */
        public float $TotalPriceExcludingTax=0.0,
        /** @var float */
        public float $TotalPriceIncludingTax=0.0,
        /** @var float */
        public float $TotalTaxAmount=0.0,
        /** @var float */
        public float $TotalCreditedAmount=0.0,
        /** @var array<Item>|null */
        public ?array $Items=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Currency'])) $this->Currency = JsonConverters::from('Currency', $o['Currency']);
        if (isset($o['TotalFeeExcludingTax'])) $this->TotalFeeExcludingTax = $o['TotalFeeExcludingTax'];
        if (isset($o['TotalFeeIncludingTax'])) $this->TotalFeeIncludingTax = $o['TotalFeeIncludingTax'];
        if (isset($o['TotalPriceExcludingTax'])) $this->TotalPriceExcludingTax = $o['TotalPriceExcludingTax'];
        if (isset($o['TotalPriceIncludingTax'])) $this->TotalPriceIncludingTax = $o['TotalPriceIncludingTax'];
        if (isset($o['TotalTaxAmount'])) $this->TotalTaxAmount = $o['TotalTaxAmount'];
        if (isset($o['TotalCreditedAmount'])) $this->TotalCreditedAmount = $o['TotalCreditedAmount'];
        if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('Item', $o['Items']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Currency)) $o['Currency'] = JsonConverters::to('Currency', $this->Currency);
        if (isset($this->TotalFeeExcludingTax)) $o['TotalFeeExcludingTax'] = $this->TotalFeeExcludingTax;
        if (isset($this->TotalFeeIncludingTax)) $o['TotalFeeIncludingTax'] = $this->TotalFeeIncludingTax;
        if (isset($this->TotalPriceExcludingTax)) $o['TotalPriceExcludingTax'] = $this->TotalPriceExcludingTax;
        if (isset($this->TotalPriceIncludingTax)) $o['TotalPriceIncludingTax'] = $this->TotalPriceIncludingTax;
        if (isset($this->TotalTaxAmount)) $o['TotalTaxAmount'] = $this->TotalTaxAmount;
        if (isset($this->TotalCreditedAmount)) $o['TotalCreditedAmount'] = $this->TotalCreditedAmount;
        if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('Item', $this->Items);
        return empty($o) ? new class(){} : $o;
    }
}

class Merchant implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $CheckoutUri=null,
        /** @var string|null */
        public ?string $ConfirmationUri=null,
        /** @var string|null */
        public ?string $NotificationUri=null,
        /** @var string|null */
        public ?string $ValidationUri=null,
        /** @var string|null */
        public ?string $TermsUri=null,
        /** @var string|null */
        public ?string $Reference=null,
        /** @var string|null */
        public ?string $PartnerId=null
    ) {
    }

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

enum ColorScheme : string
{
    case White = 'White';
    case Blue = 'Blue';
    case Gray = 'Gray';
    case GrayTextLogos = 'GrayTextLogos';
    case BlueTextLogos = 'BlueTextLogos';
    case WhiteTextLogos = 'WhiteTextLogos';
    case WhiteNoFooter = 'WhiteNoFooter';
    case GrayNoFooter = 'GrayNoFooter';
    case BlueNoFooter = 'BlueNoFooter';
}

class Gui implements JsonSerializable
{
    public function __construct(
        /** @var ColorScheme|null */
        public ?ColorScheme $ColorScheme=null,
        /** @var string|null */
        public ?string $Locale=null,
        /** @var bool|null */
        public ?bool $RequestPhone=null,
        /** @var bool|null */
        public ?bool $PhoneOptional=null
    ) {
    }

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

class History implements JsonSerializable
{
    public function __construct(
        /** @var DateTime|null */
        public ?DateTime $Created=null,
        /** @var DateTime|null */
        public ?DateTime $ReadyToPay=null,
        /** @var DateTime|null */
        public ?DateTime $ReadyToShip=null,
        /** @var DateTime|null */
        public ?DateTime $Shipped=null,
        /** @var DateTime|null */
        public ?DateTime $PaidToAccount=null,
        /** @var DateTime|null */
        public ?DateTime $Canceled=null,
        /** @var DateTime|null */
        public ?DateTime $Expired=null,
        /** @var DateTime|null */
        public ?DateTime $Denied=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['ReadyToPay'])) $this->ReadyToPay = JsonConverters::from('DateTime', $o['ReadyToPay']);
        if (isset($o['ReadyToShip'])) $this->ReadyToShip = JsonConverters::from('DateTime', $o['ReadyToShip']);
        if (isset($o['Shipped'])) $this->Shipped = JsonConverters::from('DateTime', $o['Shipped']);
        if (isset($o['PaidToAccount'])) $this->PaidToAccount = JsonConverters::from('DateTime', $o['PaidToAccount']);
        if (isset($o['Canceled'])) $this->Canceled = JsonConverters::from('DateTime', $o['Canceled']);
        if (isset($o['Expired'])) $this->Expired = JsonConverters::from('DateTime', $o['Expired']);
        if (isset($o['Denied'])) $this->Denied = JsonConverters::from('DateTime', $o['Denied']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->ReadyToPay)) $o['ReadyToPay'] = JsonConverters::to('DateTime', $this->ReadyToPay);
        if (isset($this->ReadyToShip)) $o['ReadyToShip'] = JsonConverters::to('DateTime', $this->ReadyToShip);
        if (isset($this->Shipped)) $o['Shipped'] = JsonConverters::to('DateTime', $this->Shipped);
        if (isset($this->PaidToAccount)) $o['PaidToAccount'] = JsonConverters::to('DateTime', $this->PaidToAccount);
        if (isset($this->Canceled)) $o['Canceled'] = JsonConverters::to('DateTime', $this->Canceled);
        if (isset($this->Expired)) $o['Expired'] = JsonConverters::to('DateTime', $this->Expired);
        if (isset($this->Denied)) $o['Denied'] = JsonConverters::to('DateTime', $this->Denied);
        return empty($o) ? new class(){} : $o;
    }
}

class Payson2CheckoutResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Id='',
        /** @var DateTime|null */
        public ?DateTime $ExpirationTime=null,
        /** @var string|null */
        public ?string $Snippet=null,
        /** @var Payson2CheckoutStatus|null */
        public ?Payson2CheckoutStatus $Status=null,
        /** @var Customer|null */
        public ?Customer $Customer=null,
        /** @var Order|null */
        public ?Order $Order=null,
        /** @var Merchant|null */
        public ?Merchant $Merchant=null,
        /** @var Gui|null */
        public ?Gui $Gui=null,
        /** @var History|null */
        public ?History $History=null,
        /** @var int|null */
        public ?int $PurchaseId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['ExpirationTime'])) $this->ExpirationTime = JsonConverters::from('DateTime', $o['ExpirationTime']);
        if (isset($o['Snippet'])) $this->Snippet = $o['Snippet'];
        if (isset($o['Status'])) $this->Status = JsonConverters::from('Payson2CheckoutStatus', $o['Status']);
        if (isset($o['Customer'])) $this->Customer = JsonConverters::from('Customer', $o['Customer']);
        if (isset($o['Order'])) $this->Order = JsonConverters::from('Order', $o['Order']);
        if (isset($o['Merchant'])) $this->Merchant = JsonConverters::from('Merchant', $o['Merchant']);
        if (isset($o['Gui'])) $this->Gui = JsonConverters::from('Gui', $o['Gui']);
        if (isset($o['History'])) $this->History = JsonConverters::from('History', $o['History']);
        if (isset($o['PurchaseId'])) $this->PurchaseId = $o['PurchaseId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->ExpirationTime)) $o['ExpirationTime'] = JsonConverters::to('DateTime', $this->ExpirationTime);
        if (isset($this->Snippet)) $o['Snippet'] = $this->Snippet;
        if (isset($this->Status)) $o['Status'] = JsonConverters::to('Payson2CheckoutStatus', $this->Status);
        if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('Customer', $this->Customer);
        if (isset($this->Order)) $o['Order'] = JsonConverters::to('Order', $this->Order);
        if (isset($this->Merchant)) $o['Merchant'] = JsonConverters::to('Merchant', $this->Merchant);
        if (isset($this->Gui)) $o['Gui'] = JsonConverters::to('Gui', $this->Gui);
        if (isset($this->History)) $o['History'] = JsonConverters::to('History', $this->History);
        if (isset($this->PurchaseId)) $o['PurchaseId'] = $this->PurchaseId;
        return empty($o) ? new class(){} : $o;
    }
}

class PaymentDetails extends BaseModel implements IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var QvicklyCheckoutResponse|null */
        public ?QvicklyCheckoutResponse $QvicklyCheckoutSerialized=null,

        // @Ignore()
        /** @var Payson2CheckoutResponse|null */
        public ?Payson2CheckoutResponse $Payson2CheckoutSerialized=null,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $BookingId=0,

        // @Required()
        /** @var string */
        public string $ExternalResponseData='',

        // @Required()
        /** @var string */
        public string $ExternalResponseReference='',

        // @Required()
        /** @var int */
        public int $PaymentProviderId=0,

        // @Required()
        /** @var bool|null */
        public ?bool $IsPayment=null,

        // @Required()
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $UpdatedDate=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['QvicklyCheckoutSerialized'])) $this->QvicklyCheckoutSerialized = JsonConverters::from('QvicklyCheckoutResponse', $o['QvicklyCheckoutSerialized']);
        if (isset($o['Payson2CheckoutSerialized'])) $this->Payson2CheckoutSerialized = JsonConverters::from('Payson2CheckoutResponse', $o['Payson2CheckoutSerialized']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
        if (isset($o['ExternalResponseData'])) $this->ExternalResponseData = $o['ExternalResponseData'];
        if (isset($o['ExternalResponseReference'])) $this->ExternalResponseReference = $o['ExternalResponseReference'];
        if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
        if (isset($o['IsPayment'])) $this->IsPayment = $o['IsPayment'];
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->QvicklyCheckoutSerialized)) $o['QvicklyCheckoutSerialized'] = JsonConverters::to('QvicklyCheckoutResponse', $this->QvicklyCheckoutSerialized);
        if (isset($this->Payson2CheckoutSerialized)) $o['Payson2CheckoutSerialized'] = JsonConverters::to('Payson2CheckoutResponse', $this->Payson2CheckoutSerialized);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
        if (isset($this->ExternalResponseData)) $o['ExternalResponseData'] = $this->ExternalResponseData;
        if (isset($this->ExternalResponseReference)) $o['ExternalResponseReference'] = $this->ExternalResponseReference;
        if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
        if (isset($this->IsPayment)) $o['IsPayment'] = $this->IsPayment;
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

class BookingPrice extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
        /** @var string|null */
        public ?string $CurrencyId=null,

        /** @var int|null */
        public ?int $PriceId=null,
        /** @var Currency|null */
        public ?Currency $CurrencyInfo=null,
        // @Ignore()
        /** @var string|null */
        public ?string $PriceText=null,

        // @Ignore()
        /** @var array<AppliedRebateCodes>|null */
        public ?array $AppliedCodes=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $IsRebate=null,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $BookingId=0,

        // @Required()
        /** @var int */
        public int $Quantity=0,

        /** @var float|null */
        public ?float $Price=null,
        /** @var float|null */
        public ?float $VAT=null,
        /** @var string|null */
        public ?string $Category=null,
        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        // @Required()
        /** @var bool|null */
        public ?bool $Invoiced=null,

        // @Required()
        /** @var bool|null */
        public ?bool $OccupiesSpot=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
        if (isset($o['PriceId'])) $this->PriceId = $o['PriceId'];
        if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
        if (isset($o['PriceText'])) $this->PriceText = $o['PriceText'];
        if (isset($o['AppliedCodes'])) $this->AppliedCodes = JsonConverters::fromArray('AppliedRebateCodes', $o['AppliedCodes']);
        if (isset($o['IsRebate'])) $this->IsRebate = $o['IsRebate'];
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
        if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
        if (isset($o['Price'])) $this->Price = $o['Price'];
        if (isset($o['VAT'])) $this->VAT = $o['VAT'];
        if (isset($o['Category'])) $this->Category = $o['Category'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['Invoiced'])) $this->Invoiced = $o['Invoiced'];
        if (isset($o['OccupiesSpot'])) $this->OccupiesSpot = $o['OccupiesSpot'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
        if (isset($this->PriceId)) $o['PriceId'] = $this->PriceId;
        if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
        if (isset($this->PriceText)) $o['PriceText'] = $this->PriceText;
        if (isset($this->AppliedCodes)) $o['AppliedCodes'] = JsonConverters::toArray('AppliedRebateCodes', $this->AppliedCodes);
        if (isset($this->IsRebate)) $o['IsRebate'] = $this->IsRebate;
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
        if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
        if (isset($this->Price)) $o['Price'] = $this->Price;
        if (isset($this->VAT)) $o['VAT'] = $this->VAT;
        if (isset($this->Category)) $o['Category'] = $this->Category;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->Invoiced)) $o['Invoiced'] = $this->Invoiced;
        if (isset($this->OccupiesSpot)) $o['OccupiesSpot'] = $this->OccupiesSpot;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

enum CompanyStatus : int
{
    case Registered = 1;
    case AwaitingApproval = 2;
    case Approved = 3;
    case Inactive = 4;
    case ClosedDown = 5;
    case NotApproved = 6;
}

class CompanyType extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class CodeLockSystem extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Supplier='',

        /** @var string|null */
        public ?string $LogoType=null,
        // @Required()
        /** @var string */
        public string $Description='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class CodeLockSetting extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var array<CodeLockSystem>|null */
        public ?array $CodeLockSystemOptions=null,

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        // @Required()
        /** @var int */
        public int $CodeLockSystemsId=0,

        // @Required()
        /** @var int */
        public int $ValidBeforeMinutes=0,

        // @Required()
        /** @var int */
        public int $ValidAfterMinutes=0,

        // @Required()
        /** @var bool|null */
        public ?bool $DeleteOldBySchedule=null,

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var bool|null */
        public ?bool $SendEmailNotification=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendSMSNotification=null,

        // @Required()
        /** @var int */
        public int $EmailNotificationTime=0,

        // @Required()
        /** @var int */
        public int $SMSNotificationTime=0,

        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CodeLockSystemOptions'])) $this->CodeLockSystemOptions = JsonConverters::fromArray('CodeLockSystem', $o['CodeLockSystemOptions']);
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CodeLockSystemsId'])) $this->CodeLockSystemsId = $o['CodeLockSystemsId'];
        if (isset($o['ValidBeforeMinutes'])) $this->ValidBeforeMinutes = $o['ValidBeforeMinutes'];
        if (isset($o['ValidAfterMinutes'])) $this->ValidAfterMinutes = $o['ValidAfterMinutes'];
        if (isset($o['DeleteOldBySchedule'])) $this->DeleteOldBySchedule = $o['DeleteOldBySchedule'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['SendEmailNotification'])) $this->SendEmailNotification = $o['SendEmailNotification'];
        if (isset($o['SendSMSNotification'])) $this->SendSMSNotification = $o['SendSMSNotification'];
        if (isset($o['EmailNotificationTime'])) $this->EmailNotificationTime = $o['EmailNotificationTime'];
        if (isset($o['SMSNotificationTime'])) $this->SMSNotificationTime = $o['SMSNotificationTime'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CodeLockSystemOptions)) $o['CodeLockSystemOptions'] = JsonConverters::toArray('CodeLockSystem', $this->CodeLockSystemOptions);
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CodeLockSystemsId)) $o['CodeLockSystemsId'] = $this->CodeLockSystemsId;
        if (isset($this->ValidBeforeMinutes)) $o['ValidBeforeMinutes'] = $this->ValidBeforeMinutes;
        if (isset($this->ValidAfterMinutes)) $o['ValidAfterMinutes'] = $this->ValidAfterMinutes;
        if (isset($this->DeleteOldBySchedule)) $o['DeleteOldBySchedule'] = $this->DeleteOldBySchedule;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->SendEmailNotification)) $o['SendEmailNotification'] = $this->SendEmailNotification;
        if (isset($this->SendSMSNotification)) $o['SendSMSNotification'] = $this->SendSMSNotification;
        if (isset($this->EmailNotificationTime)) $o['EmailNotificationTime'] = $this->EmailNotificationTime;
        if (isset($this->SMSNotificationTime)) $o['SMSNotificationTime'] = $this->SMSNotificationTime;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class LanguageResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Id=null,
        /** @var string|null */
        public ?string $Name=null
    ) {
    }

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

class CompanySetting extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var array<LanguageResponse>|null */
        public ?array $Languages=null,

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var string|null */
        public ?string $InactiveMessage=null,
        // @Required()
        /** @var bool|null */
        public ?bool $Searchable=null,

        /** @var string|null */
        public ?string $GATrackingId=null,
        /** @var string|null */
        public ?string $FacebookPixelId=null,
        // @Required()
        /** @var bool|null */
        public ?bool $MultiLanguage=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableAPITranslation=null,

        // @Required()
        /** @var string */
        public string $DefaultLanguage='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $GTMTrackingId=null,
        // @Required()
        /** @var bool|null */
        public ?bool $ShowOnMarketPlace=null,

        /** @var string|null */
        public ?string $GoogleAdsConversionId=null,
        /** @var string|null */
        public ?string $LinkedinTagId=null,
        /** @var string|null */
        public ?string $GoogleAdsConversionLabel=null,
        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Languages'])) $this->Languages = JsonConverters::fromArray('LanguageResponse', $o['Languages']);
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['InactiveMessage'])) $this->InactiveMessage = $o['InactiveMessage'];
        if (isset($o['Searchable'])) $this->Searchable = $o['Searchable'];
        if (isset($o['GATrackingId'])) $this->GATrackingId = $o['GATrackingId'];
        if (isset($o['FacebookPixelId'])) $this->FacebookPixelId = $o['FacebookPixelId'];
        if (isset($o['MultiLanguage'])) $this->MultiLanguage = $o['MultiLanguage'];
        if (isset($o['EnableAPITranslation'])) $this->EnableAPITranslation = $o['EnableAPITranslation'];
        if (isset($o['DefaultLanguage'])) $this->DefaultLanguage = $o['DefaultLanguage'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['GTMTrackingId'])) $this->GTMTrackingId = $o['GTMTrackingId'];
        if (isset($o['ShowOnMarketPlace'])) $this->ShowOnMarketPlace = $o['ShowOnMarketPlace'];
        if (isset($o['GoogleAdsConversionId'])) $this->GoogleAdsConversionId = $o['GoogleAdsConversionId'];
        if (isset($o['LinkedinTagId'])) $this->LinkedinTagId = $o['LinkedinTagId'];
        if (isset($o['GoogleAdsConversionLabel'])) $this->GoogleAdsConversionLabel = $o['GoogleAdsConversionLabel'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Languages)) $o['Languages'] = JsonConverters::toArray('LanguageResponse', $this->Languages);
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->InactiveMessage)) $o['InactiveMessage'] = $this->InactiveMessage;
        if (isset($this->Searchable)) $o['Searchable'] = $this->Searchable;
        if (isset($this->GATrackingId)) $o['GATrackingId'] = $this->GATrackingId;
        if (isset($this->FacebookPixelId)) $o['FacebookPixelId'] = $this->FacebookPixelId;
        if (isset($this->MultiLanguage)) $o['MultiLanguage'] = $this->MultiLanguage;
        if (isset($this->EnableAPITranslation)) $o['EnableAPITranslation'] = $this->EnableAPITranslation;
        if (isset($this->DefaultLanguage)) $o['DefaultLanguage'] = $this->DefaultLanguage;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->GTMTrackingId)) $o['GTMTrackingId'] = $this->GTMTrackingId;
        if (isset($this->ShowOnMarketPlace)) $o['ShowOnMarketPlace'] = $this->ShowOnMarketPlace;
        if (isset($this->GoogleAdsConversionId)) $o['GoogleAdsConversionId'] = $this->GoogleAdsConversionId;
        if (isset($this->LinkedinTagId)) $o['LinkedinTagId'] = $this->LinkedinTagId;
        if (isset($this->GoogleAdsConversionLabel)) $o['GoogleAdsConversionLabel'] = $this->GoogleAdsConversionLabel;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class WidgetServiceLayouts extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Code='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class WidgetTimeLayouts extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Code='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class WidgetBookingLayouts extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Code='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class WidgetBookingMethods extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Code='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class HomepageWidgetSetting extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var array<WidgetServiceLayouts>|null */
        public ?array $WidgetServiceLayoutOptions=null,

        // @Ignore()
        /** @var array<WidgetTimeLayouts>|null */
        public ?array $WidgetTimeLayoutOptions=null,

        // @Ignore()
        /** @var array<WidgetBookingLayouts>|null */
        public ?array $WidgetBookingLayoutOptions=null,

        // @Ignore()
        /** @var array<WidgetBookingMethods>|null */
        public ?array $WidgetBookingMethodOptions=null,

        // @Required()
        /** @var int */
        public int $ServiceLayoutId=0,

        // @Required()
        /** @var int */
        public int $TimeLayoutId=0,

        // @Required()
        /** @var int */
        public int $BookingLayoutId=0,

        // @Required()
        /** @var string */
        public string $PrimaryColor='',

        // @Required()
        /** @var bool|null */
        public ?bool $ShowServiceImage=null,

        // @Required()
        /** @var bool|null */
        public ?bool $ShowNextAvailableTime=null,

        // @Required()
        /** @var bool|null */
        public ?bool $ShowEndTime=null,

        /** @var string|null */
        public ?string $BookedTimeSlotText=null,
        // @Required()
        /** @var bool|null */
        public ?bool $DarkTheme=null,

        // @Required()
        /** @var bool|null */
        public ?bool $ShowRebateCodeField=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var bool|null */
        public ?bool $EnableCreateAccount=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableLogin=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableDirectBooking=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableFacebookLogin=null,

        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['WidgetServiceLayoutOptions'])) $this->WidgetServiceLayoutOptions = JsonConverters::fromArray('WidgetServiceLayouts', $o['WidgetServiceLayoutOptions']);
        if (isset($o['WidgetTimeLayoutOptions'])) $this->WidgetTimeLayoutOptions = JsonConverters::fromArray('WidgetTimeLayouts', $o['WidgetTimeLayoutOptions']);
        if (isset($o['WidgetBookingLayoutOptions'])) $this->WidgetBookingLayoutOptions = JsonConverters::fromArray('WidgetBookingLayouts', $o['WidgetBookingLayoutOptions']);
        if (isset($o['WidgetBookingMethodOptions'])) $this->WidgetBookingMethodOptions = JsonConverters::fromArray('WidgetBookingMethods', $o['WidgetBookingMethodOptions']);
        if (isset($o['ServiceLayoutId'])) $this->ServiceLayoutId = $o['ServiceLayoutId'];
        if (isset($o['TimeLayoutId'])) $this->TimeLayoutId = $o['TimeLayoutId'];
        if (isset($o['BookingLayoutId'])) $this->BookingLayoutId = $o['BookingLayoutId'];
        if (isset($o['PrimaryColor'])) $this->PrimaryColor = $o['PrimaryColor'];
        if (isset($o['ShowServiceImage'])) $this->ShowServiceImage = $o['ShowServiceImage'];
        if (isset($o['ShowNextAvailableTime'])) $this->ShowNextAvailableTime = $o['ShowNextAvailableTime'];
        if (isset($o['ShowEndTime'])) $this->ShowEndTime = $o['ShowEndTime'];
        if (isset($o['BookedTimeSlotText'])) $this->BookedTimeSlotText = $o['BookedTimeSlotText'];
        if (isset($o['DarkTheme'])) $this->DarkTheme = $o['DarkTheme'];
        if (isset($o['ShowRebateCodeField'])) $this->ShowRebateCodeField = $o['ShowRebateCodeField'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['EnableCreateAccount'])) $this->EnableCreateAccount = $o['EnableCreateAccount'];
        if (isset($o['EnableLogin'])) $this->EnableLogin = $o['EnableLogin'];
        if (isset($o['EnableDirectBooking'])) $this->EnableDirectBooking = $o['EnableDirectBooking'];
        if (isset($o['EnableFacebookLogin'])) $this->EnableFacebookLogin = $o['EnableFacebookLogin'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->WidgetServiceLayoutOptions)) $o['WidgetServiceLayoutOptions'] = JsonConverters::toArray('WidgetServiceLayouts', $this->WidgetServiceLayoutOptions);
        if (isset($this->WidgetTimeLayoutOptions)) $o['WidgetTimeLayoutOptions'] = JsonConverters::toArray('WidgetTimeLayouts', $this->WidgetTimeLayoutOptions);
        if (isset($this->WidgetBookingLayoutOptions)) $o['WidgetBookingLayoutOptions'] = JsonConverters::toArray('WidgetBookingLayouts', $this->WidgetBookingLayoutOptions);
        if (isset($this->WidgetBookingMethodOptions)) $o['WidgetBookingMethodOptions'] = JsonConverters::toArray('WidgetBookingMethods', $this->WidgetBookingMethodOptions);
        if (isset($this->ServiceLayoutId)) $o['ServiceLayoutId'] = $this->ServiceLayoutId;
        if (isset($this->TimeLayoutId)) $o['TimeLayoutId'] = $this->TimeLayoutId;
        if (isset($this->BookingLayoutId)) $o['BookingLayoutId'] = $this->BookingLayoutId;
        if (isset($this->PrimaryColor)) $o['PrimaryColor'] = $this->PrimaryColor;
        if (isset($this->ShowServiceImage)) $o['ShowServiceImage'] = $this->ShowServiceImage;
        if (isset($this->ShowNextAvailableTime)) $o['ShowNextAvailableTime'] = $this->ShowNextAvailableTime;
        if (isset($this->ShowEndTime)) $o['ShowEndTime'] = $this->ShowEndTime;
        if (isset($this->BookedTimeSlotText)) $o['BookedTimeSlotText'] = $this->BookedTimeSlotText;
        if (isset($this->DarkTheme)) $o['DarkTheme'] = $this->DarkTheme;
        if (isset($this->ShowRebateCodeField)) $o['ShowRebateCodeField'] = $this->ShowRebateCodeField;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->EnableCreateAccount)) $o['EnableCreateAccount'] = $this->EnableCreateAccount;
        if (isset($this->EnableLogin)) $o['EnableLogin'] = $this->EnableLogin;
        if (isset($this->EnableDirectBooking)) $o['EnableDirectBooking'] = $this->EnableDirectBooking;
        if (isset($this->EnableFacebookLogin)) $o['EnableFacebookLogin'] = $this->EnableFacebookLogin;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class HomepageTemplate extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        /** @var string|null */
        public ?string $ImageUrl=null,
        // @Required()
        /** @var bool|null */
        public ?bool $Premium=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class HeroSectionStyle extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        /** @var string|null */
        public ?string $Description=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $Id=0
    ) {
    }

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

class HomepageSetting extends BaseModel implements ICompany, JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var array<HomepageTemplate>|null */
        public ?array $HomepageTemplateOptions=null,

        // @Ignore()
        /** @var array<HeroSectionStyle>|null */
        public ?array $HomepageHeroSectionStyleOptions=null,

        // @Ignore()
        /** @var string|null */
        public ?string $CompanyId=null,

        /** @var string|null */
        public ?string $WelcomePageHeading=null,
        /** @var string|null */
        public ?string $WelcomePageBody=null,
        /** @var string|null */
        public ?string $AboutUsPageHeading=null,
        /** @var string|null */
        public ?string $AboutUsPageBody=null,
        // @Required()
        /** @var int */
        public int $HomePageTemplateId=0,

        /** @var string|null */
        public ?string $ImageUrl=null,
        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        /** @var string|null */
        public ?string $HomepageHeading=null,
        // @Required()
        /** @var int */
        public int $HeroSectionStyleId=0,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var bool|null */
        public ?bool $ShowRating=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableHomepage=null,

        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['HomepageTemplateOptions'])) $this->HomepageTemplateOptions = JsonConverters::fromArray('HomepageTemplate', $o['HomepageTemplateOptions']);
        if (isset($o['HomepageHeroSectionStyleOptions'])) $this->HomepageHeroSectionStyleOptions = JsonConverters::fromArray('HeroSectionStyle', $o['HomepageHeroSectionStyleOptions']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['WelcomePageHeading'])) $this->WelcomePageHeading = $o['WelcomePageHeading'];
        if (isset($o['WelcomePageBody'])) $this->WelcomePageBody = $o['WelcomePageBody'];
        if (isset($o['AboutUsPageHeading'])) $this->AboutUsPageHeading = $o['AboutUsPageHeading'];
        if (isset($o['AboutUsPageBody'])) $this->AboutUsPageBody = $o['AboutUsPageBody'];
        if (isset($o['HomePageTemplateId'])) $this->HomePageTemplateId = $o['HomePageTemplateId'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['HomepageHeading'])) $this->HomepageHeading = $o['HomepageHeading'];
        if (isset($o['HeroSectionStyleId'])) $this->HeroSectionStyleId = $o['HeroSectionStyleId'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['ShowRating'])) $this->ShowRating = $o['ShowRating'];
        if (isset($o['EnableHomepage'])) $this->EnableHomepage = $o['EnableHomepage'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->HomepageTemplateOptions)) $o['HomepageTemplateOptions'] = JsonConverters::toArray('HomepageTemplate', $this->HomepageTemplateOptions);
        if (isset($this->HomepageHeroSectionStyleOptions)) $o['HomepageHeroSectionStyleOptions'] = JsonConverters::toArray('HeroSectionStyle', $this->HomepageHeroSectionStyleOptions);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->WelcomePageHeading)) $o['WelcomePageHeading'] = $this->WelcomePageHeading;
        if (isset($this->WelcomePageBody)) $o['WelcomePageBody'] = $this->WelcomePageBody;
        if (isset($this->AboutUsPageHeading)) $o['AboutUsPageHeading'] = $this->AboutUsPageHeading;
        if (isset($this->AboutUsPageBody)) $o['AboutUsPageBody'] = $this->AboutUsPageBody;
        if (isset($this->HomePageTemplateId)) $o['HomePageTemplateId'] = $this->HomePageTemplateId;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->HomepageHeading)) $o['HomepageHeading'] = $this->HomepageHeading;
        if (isset($this->HeroSectionStyleId)) $o['HeroSectionStyleId'] = $this->HeroSectionStyleId;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->ShowRating)) $o['ShowRating'] = $this->ShowRating;
        if (isset($this->EnableHomepage)) $o['EnableHomepage'] = $this->EnableHomepage;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class AverageRatingScore implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $AverageScore=0.0,
        /** @var int */
        public int $Score1Count=0,
        /** @var int */
        public int $Score2Count=0,
        /** @var int */
        public int $Score3Count=0,
        /** @var int */
        public int $Score4Count=0,
        /** @var int */
        public int $Score5Count=0,
        /** @var int */
        public int $Count=0
    ) {
    }

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

class Review extends BaseModel implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $ReviewId='',
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var string */
        public string $Title='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Author='',

        // @Required()
        /** @var int */
        public int $Status=0,

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $ReviewAnswer=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['ReviewId'])) $this->ReviewId = $o['ReviewId'];
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Title'])) $this->Title = $o['Title'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Author'])) $this->Author = $o['Author'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['ReviewAnswer'])) $this->ReviewAnswer = $o['ReviewAnswer'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->ReviewId)) $o['ReviewId'] = $this->ReviewId;
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Title)) $o['Title'] = $this->Title;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Author)) $o['Author'] = $this->Author;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->ReviewAnswer)) $o['ReviewAnswer'] = $this->ReviewAnswer;
        return empty($o) ? new class(){} : $o;
    }
}

class Rating extends BaseModel implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ReviewId=null,
        /** @var Review|null */
        public ?Review $Review=null,
        // @Required()
        /** @var string */
        public string $CompanyId='',

        // @Required()
        /** @var int */
        public int $BookingId=0,

        // @Required()
        /** @var int */
        public int $RatingScore=0,

        // @Required()
        /** @var int */
        public int $Status=0,

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['ReviewId'])) $this->ReviewId = $o['ReviewId'];
        if (isset($o['Review'])) $this->Review = JsonConverters::from('Review', $o['Review']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
        if (isset($o['RatingScore'])) $this->RatingScore = $o['RatingScore'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->ReviewId)) $o['ReviewId'] = $this->ReviewId;
        if (isset($this->Review)) $o['Review'] = JsonConverters::to('Review', $this->Review);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
        if (isset($this->RatingScore)) $o['RatingScore'] = $this->RatingScore;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

class LicenseTypeItem extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var string|null */
        public ?string $Name=null,

        // @Required()
        /** @var int */
        public int $LicenseTypesId=0,

        // @Required()
        /** @var int */
        public int $LicenseItemsId=0,

        // @Required()
        /** @var int */
        public int $NumberOfItems=0,

        /** @var int */
        public int $Id=0,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class Country extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
        /** @var string|null */
        public ?string $CurrencyId=null,

        /** @var Currency|null */
        public ?Currency $CurrencyInfo=null,
        // @Required()
        /** @var string */
        public string $Name='',

        /** @var string|null */
        public ?string $Culture=null,
        /** @var string|null */
        public ?string $TimeZone=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
        if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Culture'])) $this->Culture = $o['Culture'];
        if (isset($o['TimeZone'])) $this->TimeZone = $o['TimeZone'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
        if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Culture)) $o['Culture'] = $this->Culture;
        if (isset($this->TimeZone)) $o['TimeZone'] = $this->TimeZone;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class LicensePrice extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var Country|null */
        public ?Country $Country=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $MonthlyPayment=null,

        // @Required()
        /** @var int */
        public int $LicenseTypeId=0,

        // @Required()
        /** @var string */
        public string $CountryId='',

        // @Required()
        /** @var int */
        public int $Price=0,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class LicenseType extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var array<LicenseTypeItem>|null */
        public ?array $LicenseItems=null,

        // @Ignore()
        /** @var array<LicensePrice>|null */
        public ?array $Prices=null,

        // @Ignore()
        /** @var int */
        public int $PeriodOfNoticeDays=0,

        // @Ignore()
        /** @var LicenseType|null */
        public ?LicenseType $NextLicenseOption=null,

        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var bool|null */
        public ?bool $ExtraLicenseOption=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['LicenseItems'])) $this->LicenseItems = JsonConverters::fromArray('LicenseTypeItem', $o['LicenseItems']);
        if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('LicensePrice', $o['Prices']);
        if (isset($o['PeriodOfNoticeDays'])) $this->PeriodOfNoticeDays = $o['PeriodOfNoticeDays'];
        if (isset($o['NextLicenseOption'])) $this->NextLicenseOption = JsonConverters::from('LicenseType', $o['NextLicenseOption']);
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['ExtraLicenseOption'])) $this->ExtraLicenseOption = $o['ExtraLicenseOption'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->LicenseItems)) $o['LicenseItems'] = JsonConverters::toArray('LicenseTypeItem', $this->LicenseItems);
        if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('LicensePrice', $this->Prices);
        if (isset($this->PeriodOfNoticeDays)) $o['PeriodOfNoticeDays'] = $this->PeriodOfNoticeDays;
        if (isset($this->NextLicenseOption)) $o['NextLicenseOption'] = JsonConverters::to('LicenseType', $this->NextLicenseOption);
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->ExtraLicenseOption)) $o['ExtraLicenseOption'] = $this->ExtraLicenseOption;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class License extends BaseModel implements JsonSerializable
{
    public function __construct(
        /** @var LicenseType|null */
        public ?LicenseType $Type=null,
        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var int */
        public int $TypeId=0,

        // @Required()
        /** @var DateTime */
        public DateTime $ValidFrom=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $ValidTo=new DateTime(),

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $MetaData=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Type'])) $this->Type = JsonConverters::from('LicenseType', $o['Type']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['TypeId'])) $this->TypeId = $o['TypeId'];
        if (isset($o['ValidFrom'])) $this->ValidFrom = JsonConverters::from('DateTime', $o['ValidFrom']);
        if (isset($o['ValidTo'])) $this->ValidTo = JsonConverters::from('DateTime', $o['ValidTo']);
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['MetaData'])) $this->MetaData = $o['MetaData'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Type)) $o['Type'] = JsonConverters::to('LicenseType', $this->Type);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->TypeId)) $o['TypeId'] = $this->TypeId;
        if (isset($this->ValidFrom)) $o['ValidFrom'] = JsonConverters::to('DateTime', $this->ValidFrom);
        if (isset($this->ValidTo)) $o['ValidTo'] = JsonConverters::to('DateTime', $this->ValidTo);
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->MetaData)) $o['MetaData'] = $this->MetaData;
        return empty($o) ? new class(){} : $o;
    }
}

class CompanyCategory extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Header='',

        // @Required()
        /** @var string */
        public string $Description='',

        /** @var string|null */
        public ?string $ImageUrl=null,
        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var int|null */
        public ?int $SortOrder=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Header'])) $this->Header = $o['Header'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Header)) $o['Header'] = $this->Header;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class Company extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var CompanyStatus|null */
        public ?CompanyStatus $Status=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $Active=null,

        // @Ignore()
        /** @var array<CustomFieldConfig>|null */
        public ?array $CustomerCustomFieldsConfig=null,

        // @Ignore()
        /** @var string|null */
        public ?string $BookingAgreements=null,

        // @Ignore()
        /** @var BookingSettings|null */
        public ?BookingSettings $BookingSettings=null,

        // @Ignore()
        /** @var CompanyType|null */
        public ?CompanyType $CompanyType=null,

        // @Ignore()
        /** @var CodeLockSetting|null */
        public ?CodeLockSetting $CodeLockSettings=null,

        // @Ignore()
        /** @var PaymentSetting|null */
        public ?PaymentSetting $PaymentSettings=null,

        // @Ignore()
        /** @var CompanySetting|null */
        public ?CompanySetting $Settings=null,

        // @Ignore()
        /** @var HomepageWidgetSetting|null */
        public ?HomepageWidgetSetting $WidgetSettings=null,

        // @Ignore()
        /** @var HomepageSetting|null */
        public ?HomepageSetting $HomepageSettings=null,

        // @Ignore()
        /** @var AverageRatingScore|null */
        public ?AverageRatingScore $RatingScore=null,

        // @Ignore()
        /** @var array<Rating>|null */
        public ?array $Ratings=null,

        // @Ignore()
        /** @var float|null */
        public ?float $Distance=null,

        // @Ignore()
        /** @var array<License>|null */
        public ?array $Licenses=null,

        // @Ignore()
        /** @var array<License>|null */
        public ?array $ActiveLicenses=null,

        // @Ignore()
        /** @var License|null */
        public ?License $CurrentLicense=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $IsFreeAccount=null,

        // @Ignore()
        /** @var CultureInfo|null */
        public ?CultureInfo $DefaultLanguage=null,

        /** @var CompanyCategory|null */
        public ?CompanyCategory $Category=null,
        // @Ignore()
        /** @var float */
        public float $Lat=0.0,

        // @Ignore()
        /** @var float */
        public float $Lon=0.0,

        // @Ignore()
        /** @var bool|null */
        public ?bool $IsFavorite=null,

        // @Ignore()
        /** @var array<ExternalReference>|null */
        public ?array $ExternalReferences=null,

        // @Required()
        /** @var string */
        public string $OrganisationNumber='',

        // @Required()
        /** @var int */
        public int $StatusId=0,

        // @Required()
        /** @var int */
        public int $CategoryId=0,

        // @Required()
        /** @var string */
        public string $SitePath='',

        // @Required()
        /** @var string */
        public string $Name='',

        /** @var string|null */
        public ?string $Street1=null,
        /** @var string|null */
        public ?string $Street2=null,
        /** @var string|null */
        public ?string $ZipCode=null,
        /** @var string|null */
        public ?string $City=null,
        /** @var string|null */
        public ?string $OpeningHours=null,
        /** @var string|null */
        public ?string $FaxNumber=null,
        // @Required()
        /** @var string */
        public string $Email='',

        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $Details=null,
        /** @var string|null */
        public ?string $LogoType=null,
        // @Required()
        /** @var bool|null */
        public ?bool $ApprovedByAdmin=null,

        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        /** @var string|null */
        public ?string $IpAddress=null,
        /** @var string|null */
        public ?string $Homepage=null,
        /** @var string|null */
        public ?string $DomainName=null,
        // @Required()
        /** @var string */
        public string $CountryId='',

        // @Required()
        /** @var int */
        public int $CompanyOwnerId=0,

        /** @var int|null */
        public ?int $TypeId=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Status'])) $this->Status = JsonConverters::from('CompanyStatus', $o['Status']);
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CustomerCustomFieldsConfig'])) $this->CustomerCustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomerCustomFieldsConfig']);
        if (isset($o['BookingAgreements'])) $this->BookingAgreements = $o['BookingAgreements'];
        if (isset($o['BookingSettings'])) $this->BookingSettings = JsonConverters::from('BookingSettings', $o['BookingSettings']);
        if (isset($o['CompanyType'])) $this->CompanyType = JsonConverters::from('CompanyType', $o['CompanyType']);
        if (isset($o['CodeLockSettings'])) $this->CodeLockSettings = JsonConverters::from('CodeLockSetting', $o['CodeLockSettings']);
        if (isset($o['PaymentSettings'])) $this->PaymentSettings = JsonConverters::from('PaymentSetting', $o['PaymentSettings']);
        if (isset($o['Settings'])) $this->Settings = JsonConverters::from('CompanySetting', $o['Settings']);
        if (isset($o['WidgetSettings'])) $this->WidgetSettings = JsonConverters::from('HomepageWidgetSetting', $o['WidgetSettings']);
        if (isset($o['HomepageSettings'])) $this->HomepageSettings = JsonConverters::from('HomepageSetting', $o['HomepageSettings']);
        if (isset($o['RatingScore'])) $this->RatingScore = JsonConverters::from('AverageRatingScore', $o['RatingScore']);
        if (isset($o['Ratings'])) $this->Ratings = JsonConverters::fromArray('Rating', $o['Ratings']);
        if (isset($o['Distance'])) $this->Distance = $o['Distance'];
        if (isset($o['Licenses'])) $this->Licenses = JsonConverters::fromArray('License', $o['Licenses']);
        if (isset($o['ActiveLicenses'])) $this->ActiveLicenses = JsonConverters::fromArray('License', $o['ActiveLicenses']);
        if (isset($o['CurrentLicense'])) $this->CurrentLicense = JsonConverters::from('License', $o['CurrentLicense']);
        if (isset($o['IsFreeAccount'])) $this->IsFreeAccount = $o['IsFreeAccount'];
        if (isset($o['DefaultLanguage'])) $this->DefaultLanguage = JsonConverters::from('CultureInfo', $o['DefaultLanguage']);
        if (isset($o['Category'])) $this->Category = JsonConverters::from('CompanyCategory', $o['Category']);
        if (isset($o['Lat'])) $this->Lat = $o['Lat'];
        if (isset($o['Lon'])) $this->Lon = $o['Lon'];
        if (isset($o['IsFavorite'])) $this->IsFavorite = $o['IsFavorite'];
        if (isset($o['ExternalReferences'])) $this->ExternalReferences = JsonConverters::fromArray('ExternalReference', $o['ExternalReferences']);
        if (isset($o['OrganisationNumber'])) $this->OrganisationNumber = $o['OrganisationNumber'];
        if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
        if (isset($o['CategoryId'])) $this->CategoryId = $o['CategoryId'];
        if (isset($o['SitePath'])) $this->SitePath = $o['SitePath'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Street1'])) $this->Street1 = $o['Street1'];
        if (isset($o['Street2'])) $this->Street2 = $o['Street2'];
        if (isset($o['ZipCode'])) $this->ZipCode = $o['ZipCode'];
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['OpeningHours'])) $this->OpeningHours = $o['OpeningHours'];
        if (isset($o['FaxNumber'])) $this->FaxNumber = $o['FaxNumber'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['Details'])) $this->Details = $o['Details'];
        if (isset($o['LogoType'])) $this->LogoType = $o['LogoType'];
        if (isset($o['ApprovedByAdmin'])) $this->ApprovedByAdmin = $o['ApprovedByAdmin'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['IpAddress'])) $this->IpAddress = $o['IpAddress'];
        if (isset($o['Homepage'])) $this->Homepage = $o['Homepage'];
        if (isset($o['DomainName'])) $this->DomainName = $o['DomainName'];
        if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
        if (isset($o['CompanyOwnerId'])) $this->CompanyOwnerId = $o['CompanyOwnerId'];
        if (isset($o['TypeId'])) $this->TypeId = $o['TypeId'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['Id'])) $this->Id = $o['Id'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Status)) $o['Status'] = JsonConverters::to('CompanyStatus', $this->Status);
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CustomerCustomFieldsConfig)) $o['CustomerCustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomerCustomFieldsConfig);
        if (isset($this->BookingAgreements)) $o['BookingAgreements'] = $this->BookingAgreements;
        if (isset($this->BookingSettings)) $o['BookingSettings'] = JsonConverters::to('BookingSettings', $this->BookingSettings);
        if (isset($this->CompanyType)) $o['CompanyType'] = JsonConverters::to('CompanyType', $this->CompanyType);
        if (isset($this->CodeLockSettings)) $o['CodeLockSettings'] = JsonConverters::to('CodeLockSetting', $this->CodeLockSettings);
        if (isset($this->PaymentSettings)) $o['PaymentSettings'] = JsonConverters::to('PaymentSetting', $this->PaymentSettings);
        if (isset($this->Settings)) $o['Settings'] = JsonConverters::to('CompanySetting', $this->Settings);
        if (isset($this->WidgetSettings)) $o['WidgetSettings'] = JsonConverters::to('HomepageWidgetSetting', $this->WidgetSettings);
        if (isset($this->HomepageSettings)) $o['HomepageSettings'] = JsonConverters::to('HomepageSetting', $this->HomepageSettings);
        if (isset($this->RatingScore)) $o['RatingScore'] = JsonConverters::to('AverageRatingScore', $this->RatingScore);
        if (isset($this->Ratings)) $o['Ratings'] = JsonConverters::toArray('Rating', $this->Ratings);
        if (isset($this->Distance)) $o['Distance'] = $this->Distance;
        if (isset($this->Licenses)) $o['Licenses'] = JsonConverters::toArray('License', $this->Licenses);
        if (isset($this->ActiveLicenses)) $o['ActiveLicenses'] = JsonConverters::toArray('License', $this->ActiveLicenses);
        if (isset($this->CurrentLicense)) $o['CurrentLicense'] = JsonConverters::to('License', $this->CurrentLicense);
        if (isset($this->IsFreeAccount)) $o['IsFreeAccount'] = $this->IsFreeAccount;
        if (isset($this->DefaultLanguage)) $o['DefaultLanguage'] = JsonConverters::to('CultureInfo', $this->DefaultLanguage);
        if (isset($this->Category)) $o['Category'] = JsonConverters::to('CompanyCategory', $this->Category);
        if (isset($this->Lat)) $o['Lat'] = $this->Lat;
        if (isset($this->Lon)) $o['Lon'] = $this->Lon;
        if (isset($this->IsFavorite)) $o['IsFavorite'] = $this->IsFavorite;
        if (isset($this->ExternalReferences)) $o['ExternalReferences'] = JsonConverters::toArray('ExternalReference', $this->ExternalReferences);
        if (isset($this->OrganisationNumber)) $o['OrganisationNumber'] = $this->OrganisationNumber;
        if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
        if (isset($this->CategoryId)) $o['CategoryId'] = $this->CategoryId;
        if (isset($this->SitePath)) $o['SitePath'] = $this->SitePath;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Street1)) $o['Street1'] = $this->Street1;
        if (isset($this->Street2)) $o['Street2'] = $this->Street2;
        if (isset($this->ZipCode)) $o['ZipCode'] = $this->ZipCode;
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->OpeningHours)) $o['OpeningHours'] = $this->OpeningHours;
        if (isset($this->FaxNumber)) $o['FaxNumber'] = $this->FaxNumber;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->Details)) $o['Details'] = $this->Details;
        if (isset($this->LogoType)) $o['LogoType'] = $this->LogoType;
        if (isset($this->ApprovedByAdmin)) $o['ApprovedByAdmin'] = $this->ApprovedByAdmin;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->IpAddress)) $o['IpAddress'] = $this->IpAddress;
        if (isset($this->Homepage)) $o['Homepage'] = $this->Homepage;
        if (isset($this->DomainName)) $o['DomainName'] = $this->DomainName;
        if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
        if (isset($this->CompanyOwnerId)) $o['CompanyOwnerId'] = $this->CompanyOwnerId;
        if (isset($this->TypeId)) $o['TypeId'] = $this->TypeId;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->Id)) $o['Id'] = $this->Id;
        return empty($o) ? new class(){} : $o;
    }
}

class BookingStatus extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Color='',

        // @Required()
        /** @var string */
        public string $Icon='',

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var int */
        public int $Id=0
    ) {
    }

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

class BookedResource implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Id=0,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Color=null,
        /** @var string|null */
        public ?string $ImageUrl=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var string|null */
        public ?string $MobilePhone=null,
        /** @var string|null */
        public ?string $AccessGroup=null,
        /** @var bool|null */
        public ?bool $EmailNotification=null,
        /** @var bool|null */
        public ?bool $SMSNotification=null,
        /** @var bool|null */
        public ?bool $EmailReminder=null,
        /** @var bool|null */
        public ?bool $SMSReminder=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Color'])) $this->Color = $o['Color'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
        if (isset($o['AccessGroup'])) $this->AccessGroup = $o['AccessGroup'];
        if (isset($o['EmailNotification'])) $this->EmailNotification = $o['EmailNotification'];
        if (isset($o['SMSNotification'])) $this->SMSNotification = $o['SMSNotification'];
        if (isset($o['EmailReminder'])) $this->EmailReminder = $o['EmailReminder'];
        if (isset($o['SMSReminder'])) $this->SMSReminder = $o['SMSReminder'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Color)) $o['Color'] = $this->Color;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
        if (isset($this->AccessGroup)) $o['AccessGroup'] = $this->AccessGroup;
        if (isset($this->EmailNotification)) $o['EmailNotification'] = $this->EmailNotification;
        if (isset($this->SMSNotification)) $o['SMSNotification'] = $this->SMSNotification;
        if (isset($this->EmailReminder)) $o['EmailReminder'] = $this->EmailReminder;
        if (isset($this->SMSReminder)) $o['SMSReminder'] = $this->SMSReminder;
        return empty($o) ? new class(){} : $o;
    }
}

class BookedResourceType implements JsonSerializable
{
    public function __construct(
        /** @description The resource type id */
        // @ApiMember(Description="The resource type id")
        /** @var int */
        public int $Id=0,

        /** @description The resource type name */
        // @ApiMember(Description="The resource type name")
        /** @var string|null */
        public ?string $Name=null,

        /** @description The resources inside resource type */
        // @ApiMember(Description="The resources inside resource type")
        /** @var array<BookedResource>|null */
        public ?array $Resources=null
    ) {
    }

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

class Booking extends BaseModel implements IInterval, ICustomFieldTable, IBaseModelUpdated, IBaseModelCreated, JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var Customer|null */
        public ?Customer $Customer=null,

        // @Ignore()
        /** @var Service|null */
        public ?Service $Service=null,

        // @Ignore()
        /** @var CalendarExport|null */
        public ?CalendarExport $CalendarExport=null,

        // @Ignore()
        /** @var array<BookingLog>|null */
        public ?array $Log=null,

        // @Ignore()
        /** @var array<PaymentLog>|null */
        public ?array $PaymentLog=null,

        // @Ignore()
        /** @var array<PaymentDetails>|null */
        public ?array $CheckoutLogs=null,

        // @Ignore()
        /** @var array<BookingPrice>|null */
        public ?array $Prices=null,

        // @Ignore()
        /** @var BookingStatusEnum|null */
        public ?BookingStatusEnum $Status=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $isReserved=null,

        // @Ignore()
        /** @var string|null */
        public ?string $StatusName=null,

        // @Ignore()
        /** @var Company|null */
        public ?Company $Company=null,

        // @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
        /** @var string|null */
        public ?string $CurrencyId=null,

        /** @var Currency|null */
        public ?Currency $CurrencyInfo=null,
        /** @var BookingStatus|null */
        public ?BookingStatus $BookingStatus=null,
        // @Ignore()
        /** @var float|null */
        public ?float $TotalPrice=null,

        // @Ignore()
        /** @var int|null */
        public ?int $TotalSpots=null,

        // @Ignore()
        /** @var array<Resource>|null */
        public ?array $Resources=null,

        // @Ignore()
        /** @var array<ExternalReference>|null */
        public ?array $ExternalReferences=null,

        // @Ignore()
        /** @var array<BookedResourceType>|null */
        public ?array $BookedResources=null,

        // @Ignore()
        /** @var array<CustomFieldConfig>|null */
        public ?array $CustomFieldsConfig=null,

        // @Ignore()
        /** @var array<CustomFieldDataResponse>|null */
        public ?array $CustomFieldsData=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $Active=null,

        // @Ignore()
        /** @var DateTime|null */
        public ?DateTime $LastTimeToUnBook=null,

        // @Ignore()
        /** @var array<PriceMapping>|null */
        public ?array $PriceMappings=null,

        // @Required()
        /** @var DateTime */
        public DateTime $UpdatedDate=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),

        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var string */
        public string $CustomerId='',

        // @Required()
        /** @var int */
        public int $ServiceId=0,

        // @Required()
        /** @var int */
        public int $StatusId=0,

        /** @var DateTime|null */
        public ?DateTime $UnbookedOn=null,
        /** @var string|null */
        public ?string $UnbookedComments=null,
        /** @var string|null */
        public ?string $BookedComments=null,
        // @Required()
        /** @var string */
        public string $BookedBy='',

        /** @var string|null */
        public ?string $UnBookedBy=null,
        // @Required()
        /** @var bool|null */
        public ?bool $SendSmsReminder=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendEmailReminder=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendSmsConfirmation=null,

        /** @var string|null */
        public ?string $RebateCode=null,
        /** @var string|null */
        public ?string $Comments=null,
        /** @var string|null */
        public ?string $IpAddress=null,
        // @Required()
        /** @var int */
        public int $NumberOfBookedSpots=0,

        /** @var string|null */
        public ?string $CommentsToCustomer=null,
        /** @var DateTime|null */
        public ?DateTime $PaymentExpiration=null,
        /** @var float|null */
        public ?float $PriceVat=null,
        // @Required()
        /** @var bool|null */
        public ?bool $SendEmailConfirmation=null,

        /** @var string|null */
        public ?string $CancellationCode=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $RatingCode=null,
        /** @var string|null */
        public ?string $TextField1=null,
        /** @var string|null */
        public ?string $TextField2=null,
        /** @var string|null */
        public ?string $TextField3=null,
        /** @var string|null */
        public ?string $TextField4=null,
        /** @var string|null */
        public ?string $TextField5=null,
        /** @var string|null */
        public ?string $TextField6=null,
        /** @var string|null */
        public ?string $TextField7=null,
        /** @var string|null */
        public ?string $TextField8=null,
        /** @var string|null */
        public ?string $TextField9=null,
        /** @var string|null */
        public ?string $TextField10=null,
        /** @var string|null */
        public ?string $TextField11=null,
        /** @var string|null */
        public ?string $TextField12=null,
        /** @var string|null */
        public ?string $TextField13=null,
        /** @var string|null */
        public ?string $TextField14=null,
        /** @var string|null */
        public ?string $TextField15=null,
        /** @var string|null */
        public ?string $TextField16=null,
        /** @var string|null */
        public ?string $TextField17=null,
        /** @var string|null */
        public ?string $TextField18=null,
        /** @var string|null */
        public ?string $TextField19=null,
        /** @var string|null */
        public ?string $TextField20=null,
        // @Required()
        /** @var DateTime */
        public DateTime $From=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $To=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Customer'])) $this->Customer = JsonConverters::from('Customer', $o['Customer']);
        if (isset($o['Service'])) $this->Service = JsonConverters::from('Service', $o['Service']);
        if (isset($o['CalendarExport'])) $this->CalendarExport = JsonConverters::from('CalendarExport', $o['CalendarExport']);
        if (isset($o['Log'])) $this->Log = JsonConverters::fromArray('BookingLog', $o['Log']);
        if (isset($o['PaymentLog'])) $this->PaymentLog = JsonConverters::fromArray('PaymentLog', $o['PaymentLog']);
        if (isset($o['CheckoutLogs'])) $this->CheckoutLogs = JsonConverters::fromArray('PaymentDetails', $o['CheckoutLogs']);
        if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('BookingPrice', $o['Prices']);
        if (isset($o['Status'])) $this->Status = JsonConverters::from('BookingStatusEnum', $o['Status']);
        if (isset($o['isReserved'])) $this->isReserved = $o['isReserved'];
        if (isset($o['StatusName'])) $this->StatusName = $o['StatusName'];
        if (isset($o['Company'])) $this->Company = JsonConverters::from('Company', $o['Company']);
        if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
        if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
        if (isset($o['BookingStatus'])) $this->BookingStatus = JsonConverters::from('BookingStatus', $o['BookingStatus']);
        if (isset($o['TotalPrice'])) $this->TotalPrice = $o['TotalPrice'];
        if (isset($o['TotalSpots'])) $this->TotalSpots = $o['TotalSpots'];
        if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('Resource', $o['Resources']);
        if (isset($o['ExternalReferences'])) $this->ExternalReferences = JsonConverters::fromArray('ExternalReference', $o['ExternalReferences']);
        if (isset($o['BookedResources'])) $this->BookedResources = JsonConverters::fromArray('BookedResourceType', $o['BookedResources']);
        if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
        if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['LastTimeToUnBook'])) $this->LastTimeToUnBook = JsonConverters::from('DateTime', $o['LastTimeToUnBook']);
        if (isset($o['PriceMappings'])) $this->PriceMappings = JsonConverters::fromArray('PriceMapping', $o['PriceMappings']);
        if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
        if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
        if (isset($o['UnbookedOn'])) $this->UnbookedOn = JsonConverters::from('DateTime', $o['UnbookedOn']);
        if (isset($o['UnbookedComments'])) $this->UnbookedComments = $o['UnbookedComments'];
        if (isset($o['BookedComments'])) $this->BookedComments = $o['BookedComments'];
        if (isset($o['BookedBy'])) $this->BookedBy = $o['BookedBy'];
        if (isset($o['UnBookedBy'])) $this->UnBookedBy = $o['UnBookedBy'];
        if (isset($o['SendSmsReminder'])) $this->SendSmsReminder = $o['SendSmsReminder'];
        if (isset($o['SendEmailReminder'])) $this->SendEmailReminder = $o['SendEmailReminder'];
        if (isset($o['SendSmsConfirmation'])) $this->SendSmsConfirmation = $o['SendSmsConfirmation'];
        if (isset($o['RebateCode'])) $this->RebateCode = $o['RebateCode'];
        if (isset($o['Comments'])) $this->Comments = $o['Comments'];
        if (isset($o['IpAddress'])) $this->IpAddress = $o['IpAddress'];
        if (isset($o['NumberOfBookedSpots'])) $this->NumberOfBookedSpots = $o['NumberOfBookedSpots'];
        if (isset($o['CommentsToCustomer'])) $this->CommentsToCustomer = $o['CommentsToCustomer'];
        if (isset($o['PaymentExpiration'])) $this->PaymentExpiration = JsonConverters::from('DateTime', $o['PaymentExpiration']);
        if (isset($o['PriceVat'])) $this->PriceVat = $o['PriceVat'];
        if (isset($o['SendEmailConfirmation'])) $this->SendEmailConfirmation = $o['SendEmailConfirmation'];
        if (isset($o['CancellationCode'])) $this->CancellationCode = $o['CancellationCode'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['RatingCode'])) $this->RatingCode = $o['RatingCode'];
        if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
        if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
        if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
        if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
        if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
        if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
        if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
        if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
        if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
        if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
        if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
        if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
        if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
        if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
        if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
        if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
        if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
        if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
        if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
        if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
        if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
        if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('Customer', $this->Customer);
        if (isset($this->Service)) $o['Service'] = JsonConverters::to('Service', $this->Service);
        if (isset($this->CalendarExport)) $o['CalendarExport'] = JsonConverters::to('CalendarExport', $this->CalendarExport);
        if (isset($this->Log)) $o['Log'] = JsonConverters::toArray('BookingLog', $this->Log);
        if (isset($this->PaymentLog)) $o['PaymentLog'] = JsonConverters::toArray('PaymentLog', $this->PaymentLog);
        if (isset($this->CheckoutLogs)) $o['CheckoutLogs'] = JsonConverters::toArray('PaymentDetails', $this->CheckoutLogs);
        if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('BookingPrice', $this->Prices);
        if (isset($this->Status)) $o['Status'] = JsonConverters::to('BookingStatusEnum', $this->Status);
        if (isset($this->isReserved)) $o['isReserved'] = $this->isReserved;
        if (isset($this->StatusName)) $o['StatusName'] = $this->StatusName;
        if (isset($this->Company)) $o['Company'] = JsonConverters::to('Company', $this->Company);
        if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
        if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
        if (isset($this->BookingStatus)) $o['BookingStatus'] = JsonConverters::to('BookingStatus', $this->BookingStatus);
        if (isset($this->TotalPrice)) $o['TotalPrice'] = $this->TotalPrice;
        if (isset($this->TotalSpots)) $o['TotalSpots'] = $this->TotalSpots;
        if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('Resource', $this->Resources);
        if (isset($this->ExternalReferences)) $o['ExternalReferences'] = JsonConverters::toArray('ExternalReference', $this->ExternalReferences);
        if (isset($this->BookedResources)) $o['BookedResources'] = JsonConverters::toArray('BookedResourceType', $this->BookedResources);
        if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
        if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->LastTimeToUnBook)) $o['LastTimeToUnBook'] = JsonConverters::to('DateTime', $this->LastTimeToUnBook);
        if (isset($this->PriceMappings)) $o['PriceMappings'] = JsonConverters::toArray('PriceMapping', $this->PriceMappings);
        if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
        if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
        if (isset($this->UnbookedOn)) $o['UnbookedOn'] = JsonConverters::to('DateTime', $this->UnbookedOn);
        if (isset($this->UnbookedComments)) $o['UnbookedComments'] = $this->UnbookedComments;
        if (isset($this->BookedComments)) $o['BookedComments'] = $this->BookedComments;
        if (isset($this->BookedBy)) $o['BookedBy'] = $this->BookedBy;
        if (isset($this->UnBookedBy)) $o['UnBookedBy'] = $this->UnBookedBy;
        if (isset($this->SendSmsReminder)) $o['SendSmsReminder'] = $this->SendSmsReminder;
        if (isset($this->SendEmailReminder)) $o['SendEmailReminder'] = $this->SendEmailReminder;
        if (isset($this->SendSmsConfirmation)) $o['SendSmsConfirmation'] = $this->SendSmsConfirmation;
        if (isset($this->RebateCode)) $o['RebateCode'] = $this->RebateCode;
        if (isset($this->Comments)) $o['Comments'] = $this->Comments;
        if (isset($this->IpAddress)) $o['IpAddress'] = $this->IpAddress;
        if (isset($this->NumberOfBookedSpots)) $o['NumberOfBookedSpots'] = $this->NumberOfBookedSpots;
        if (isset($this->CommentsToCustomer)) $o['CommentsToCustomer'] = $this->CommentsToCustomer;
        if (isset($this->PaymentExpiration)) $o['PaymentExpiration'] = JsonConverters::to('DateTime', $this->PaymentExpiration);
        if (isset($this->PriceVat)) $o['PriceVat'] = $this->PriceVat;
        if (isset($this->SendEmailConfirmation)) $o['SendEmailConfirmation'] = $this->SendEmailConfirmation;
        if (isset($this->CancellationCode)) $o['CancellationCode'] = $this->CancellationCode;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->RatingCode)) $o['RatingCode'] = $this->RatingCode;
        if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
        if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
        if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
        if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
        if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
        if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
        if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
        if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
        if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
        if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
        if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
        if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
        if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
        if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
        if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
        if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
        if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
        if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
        if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
        if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
        if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
        if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
        return empty($o) ? new class(){} : $o;
    }
}

class Service extends BaseModel implements ICustomFieldTable, IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var array<ResourceType>|null */
        public ?array $ResourceTypes=null,

        // @Ignore()
        /** @var array<Resource>|null */
        public ?array $Resources=null,

        // @Ignore()
        /** @var TotalPriceInformation|null */
        public ?TotalPriceInformation $TotalPrice=null,

        // @Ignore()
        /** @var array<ServicePrice>|null */
        public ?array $Prices=null,

        // @Ignore()
        /** @var array<BookingStatusOptions>|null */
        public ?array $BookingStatusOptions=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $IsGroupBooking=null,

        // @Ignore()
        /** @var bool|null */
        public ?bool $IsMultipleResource=null,

        // @Ignore()
        /** @var BookingSettings|null */
        public ?BookingSettings $Settings=null,

        // @Ignore()
        /** @var PaymentSetting|null */
        public ?PaymentSetting $PaymentSetting=null,

        // @Ignore()
        /** @var array<CustomFieldConfig>|null */
        public ?array $BookingCustomFieldsConfig=null,

        // @Ignore()
        /** @var array<CustomFieldConfig>|null */
        public ?array $CustomerCustomFieldsConfig=null,

        // @Ignore()
        /** @var array<CustomFieldConfig>|null */
        public ?array $CustomFieldsConfig=null,

        // @Ignore()
        /** @var array<CustomFieldDataResponse>|null */
        public ?array $CustomFieldsData=null,

        // @Ignore()
        /** @var array<ISchedule>|null */
        public ?array $Schedules=null,

        // @Ignore()
        /** @var array<Booking>|null */
        public ?array $CustomerActiveBookings=null,

        // @Ignore()
        /** @var ScheduleType|null */
        public ?ScheduleType $ScheduleType=null,

        // @Ignore()
        /** @var DateInterval|null */
        public ?DateInterval $LastTimeToUnbookThreshold=null,

        // @Ignore()
        /** @var DateInterval|null */
        public ?DateInterval $LastTimeToBookThreshold=null,

        // @Ignore()
        /** @var AverageRatingScore|null */
        public ?AverageRatingScore $RatingScore=null,

        // @Ignore()
        /** @var array<Rating>|null */
        public ?array $Ratings=null,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        /** @var string|null */
        public ?string $Group=null,
        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        // @Required()
        /** @var int */
        public int $SortOrder=0,

        // @Required()
        /** @var int */
        public int $PauseAfterBooking=0,

        // @Required()
        /** @var int */
        public int $UnbookBeforeDays=0,

        // @Required()
        /** @var int */
        public int $UnbookBeforeHours=0,

        // @Required()
        /** @var int */
        public int $UnbookBeforeMinutes=0,

        // @Required()
        /** @var int */
        public int $BookBeforeDays=0,

        // @Required()
        /** @var int */
        public int $BookBeforeHours=0,

        // @Required()
        /** @var int */
        public int $BookBeforeMinutes=0,

        /** @var int|null */
        public ?int $Duration=null,
        /** @var int */
        public int $DurationTypeId=0,
        /** @var int|null */
        public ?int $MinDuration=null,
        /** @var int|null */
        public ?int $MaxDuration=null,
        /** @var int|null */
        public ?int $DurationInterval=null,
        /** @var int|null */
        public ?int $TotalSpots=null,
        /** @var string|null */
        public ?string $ImageUrl=null,
        // @Required()
        /** @var int */
        public int $ScheduleTypeId=0,

        // @Required()
        /** @var DateTime */
        public DateTime $UpdatedDate=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),

        // @Required()
        /** @var bool|null */
        public ?bool $OnlyVisibleByAdmin=null,

        // @Required()
        /** @var int */
        public int $MaxNumberOfSpotsPerBooking=0,

        // @Required()
        /** @var int */
        public int $MinNumberOfResourcesToBook=0,

        // @Required()
        /** @var int */
        public int $MaxNumberOfResourcesToBook=0,

        // @Required()
        /** @var bool|null */
        public ?bool $IsPaymentEnabled=null,

        // @Required()
        /** @var int */
        public int $MaxPaymentTime=0,

        // @Required()
        /** @var bool|null */
        public ?bool $LockSpotsToBooking=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableBookingQueue=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var int */
        public int $BookingStatusId=0,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableCodeLockSync=null,

        // @Required()
        /** @var bool|null */
        public ?bool $EnableCustomerManualPayment=null,

        /** @var int|null */
        public ?int $PriceViewTypeId=null,
        /** @var string|null */
        public ?string $TextField1=null,
        /** @var string|null */
        public ?string $TextField2=null,
        /** @var string|null */
        public ?string $TextField3=null,
        /** @var string|null */
        public ?string $TextField4=null,
        /** @var string|null */
        public ?string $TextField5=null,
        /** @var string|null */
        public ?string $TextField6=null,
        /** @var string|null */
        public ?string $TextField7=null,
        /** @var string|null */
        public ?string $TextField8=null,
        /** @var string|null */
        public ?string $TextField9=null,
        /** @var string|null */
        public ?string $TextField10=null,
        /** @var string|null */
        public ?string $TextField11=null,
        /** @var string|null */
        public ?string $TextField12=null,
        /** @var string|null */
        public ?string $TextField13=null,
        /** @var string|null */
        public ?string $TextField14=null,
        /** @var string|null */
        public ?string $TextField15=null,
        /** @var string|null */
        public ?string $TextField16=null,
        /** @var string|null */
        public ?string $TextField17=null,
        /** @var string|null */
        public ?string $TextField18=null,
        /** @var string|null */
        public ?string $TextField19=null,
        /** @var string|null */
        public ?string $TextField20=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['ResourceTypes'])) $this->ResourceTypes = JsonConverters::fromArray('ResourceType', $o['ResourceTypes']);
        if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('Resource', $o['Resources']);
        if (isset($o['TotalPrice'])) $this->TotalPrice = JsonConverters::from('TotalPriceInformation', $o['TotalPrice']);
        if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('ServicePrice', $o['Prices']);
        if (isset($o['BookingStatusOptions'])) $this->BookingStatusOptions = JsonConverters::fromArray('BookingStatusOptions', $o['BookingStatusOptions']);
        if (isset($o['IsGroupBooking'])) $this->IsGroupBooking = $o['IsGroupBooking'];
        if (isset($o['IsMultipleResource'])) $this->IsMultipleResource = $o['IsMultipleResource'];
        if (isset($o['Settings'])) $this->Settings = JsonConverters::from('BookingSettings', $o['Settings']);
        if (isset($o['PaymentSetting'])) $this->PaymentSetting = JsonConverters::from('PaymentSetting', $o['PaymentSetting']);
        if (isset($o['BookingCustomFieldsConfig'])) $this->BookingCustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['BookingCustomFieldsConfig']);
        if (isset($o['CustomerCustomFieldsConfig'])) $this->CustomerCustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomerCustomFieldsConfig']);
        if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
        if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
        if (isset($o['Schedules'])) $this->Schedules = JsonConverters::fromArray('ISchedule', $o['Schedules']);
        if (isset($o['CustomerActiveBookings'])) $this->CustomerActiveBookings = JsonConverters::fromArray('Booking', $o['CustomerActiveBookings']);
        if (isset($o['ScheduleType'])) $this->ScheduleType = JsonConverters::from('ScheduleType', $o['ScheduleType']);
        if (isset($o['LastTimeToUnbookThreshold'])) $this->LastTimeToUnbookThreshold = JsonConverters::from('DateInterval', $o['LastTimeToUnbookThreshold']);
        if (isset($o['LastTimeToBookThreshold'])) $this->LastTimeToBookThreshold = JsonConverters::from('DateInterval', $o['LastTimeToBookThreshold']);
        if (isset($o['RatingScore'])) $this->RatingScore = JsonConverters::from('AverageRatingScore', $o['RatingScore']);
        if (isset($o['Ratings'])) $this->Ratings = JsonConverters::fromArray('Rating', $o['Ratings']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Group'])) $this->Group = $o['Group'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
        if (isset($o['PauseAfterBooking'])) $this->PauseAfterBooking = $o['PauseAfterBooking'];
        if (isset($o['UnbookBeforeDays'])) $this->UnbookBeforeDays = $o['UnbookBeforeDays'];
        if (isset($o['UnbookBeforeHours'])) $this->UnbookBeforeHours = $o['UnbookBeforeHours'];
        if (isset($o['UnbookBeforeMinutes'])) $this->UnbookBeforeMinutes = $o['UnbookBeforeMinutes'];
        if (isset($o['BookBeforeDays'])) $this->BookBeforeDays = $o['BookBeforeDays'];
        if (isset($o['BookBeforeHours'])) $this->BookBeforeHours = $o['BookBeforeHours'];
        if (isset($o['BookBeforeMinutes'])) $this->BookBeforeMinutes = $o['BookBeforeMinutes'];
        if (isset($o['Duration'])) $this->Duration = $o['Duration'];
        if (isset($o['DurationTypeId'])) $this->DurationTypeId = $o['DurationTypeId'];
        if (isset($o['MinDuration'])) $this->MinDuration = $o['MinDuration'];
        if (isset($o['MaxDuration'])) $this->MaxDuration = $o['MaxDuration'];
        if (isset($o['DurationInterval'])) $this->DurationInterval = $o['DurationInterval'];
        if (isset($o['TotalSpots'])) $this->TotalSpots = $o['TotalSpots'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['ScheduleTypeId'])) $this->ScheduleTypeId = $o['ScheduleTypeId'];
        if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['OnlyVisibleByAdmin'])) $this->OnlyVisibleByAdmin = $o['OnlyVisibleByAdmin'];
        if (isset($o['MaxNumberOfSpotsPerBooking'])) $this->MaxNumberOfSpotsPerBooking = $o['MaxNumberOfSpotsPerBooking'];
        if (isset($o['MinNumberOfResourcesToBook'])) $this->MinNumberOfResourcesToBook = $o['MinNumberOfResourcesToBook'];
        if (isset($o['MaxNumberOfResourcesToBook'])) $this->MaxNumberOfResourcesToBook = $o['MaxNumberOfResourcesToBook'];
        if (isset($o['IsPaymentEnabled'])) $this->IsPaymentEnabled = $o['IsPaymentEnabled'];
        if (isset($o['MaxPaymentTime'])) $this->MaxPaymentTime = $o['MaxPaymentTime'];
        if (isset($o['LockSpotsToBooking'])) $this->LockSpotsToBooking = $o['LockSpotsToBooking'];
        if (isset($o['EnableBookingQueue'])) $this->EnableBookingQueue = $o['EnableBookingQueue'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['BookingStatusId'])) $this->BookingStatusId = $o['BookingStatusId'];
        if (isset($o['EnableCodeLockSync'])) $this->EnableCodeLockSync = $o['EnableCodeLockSync'];
        if (isset($o['EnableCustomerManualPayment'])) $this->EnableCustomerManualPayment = $o['EnableCustomerManualPayment'];
        if (isset($o['PriceViewTypeId'])) $this->PriceViewTypeId = $o['PriceViewTypeId'];
        if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
        if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
        if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
        if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
        if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
        if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
        if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
        if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
        if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
        if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
        if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
        if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
        if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
        if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
        if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
        if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
        if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
        if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
        if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
        if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->ResourceTypes)) $o['ResourceTypes'] = JsonConverters::toArray('ResourceType', $this->ResourceTypes);
        if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('Resource', $this->Resources);
        if (isset($this->TotalPrice)) $o['TotalPrice'] = JsonConverters::to('TotalPriceInformation', $this->TotalPrice);
        if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('ServicePrice', $this->Prices);
        if (isset($this->BookingStatusOptions)) $o['BookingStatusOptions'] = JsonConverters::toArray('BookingStatusOptions', $this->BookingStatusOptions);
        if (isset($this->IsGroupBooking)) $o['IsGroupBooking'] = $this->IsGroupBooking;
        if (isset($this->IsMultipleResource)) $o['IsMultipleResource'] = $this->IsMultipleResource;
        if (isset($this->Settings)) $o['Settings'] = JsonConverters::to('BookingSettings', $this->Settings);
        if (isset($this->PaymentSetting)) $o['PaymentSetting'] = JsonConverters::to('PaymentSetting', $this->PaymentSetting);
        if (isset($this->BookingCustomFieldsConfig)) $o['BookingCustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->BookingCustomFieldsConfig);
        if (isset($this->CustomerCustomFieldsConfig)) $o['CustomerCustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomerCustomFieldsConfig);
        if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
        if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
        if (isset($this->Schedules)) $o['Schedules'] = JsonConverters::toArray('ISchedule', $this->Schedules);
        if (isset($this->CustomerActiveBookings)) $o['CustomerActiveBookings'] = JsonConverters::toArray('Booking', $this->CustomerActiveBookings);
        if (isset($this->ScheduleType)) $o['ScheduleType'] = JsonConverters::to('ScheduleType', $this->ScheduleType);
        if (isset($this->LastTimeToUnbookThreshold)) $o['LastTimeToUnbookThreshold'] = JsonConverters::to('DateInterval', $this->LastTimeToUnbookThreshold);
        if (isset($this->LastTimeToBookThreshold)) $o['LastTimeToBookThreshold'] = JsonConverters::to('DateInterval', $this->LastTimeToBookThreshold);
        if (isset($this->RatingScore)) $o['RatingScore'] = JsonConverters::to('AverageRatingScore', $this->RatingScore);
        if (isset($this->Ratings)) $o['Ratings'] = JsonConverters::toArray('Rating', $this->Ratings);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Group)) $o['Group'] = $this->Group;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
        if (isset($this->PauseAfterBooking)) $o['PauseAfterBooking'] = $this->PauseAfterBooking;
        if (isset($this->UnbookBeforeDays)) $o['UnbookBeforeDays'] = $this->UnbookBeforeDays;
        if (isset($this->UnbookBeforeHours)) $o['UnbookBeforeHours'] = $this->UnbookBeforeHours;
        if (isset($this->UnbookBeforeMinutes)) $o['UnbookBeforeMinutes'] = $this->UnbookBeforeMinutes;
        if (isset($this->BookBeforeDays)) $o['BookBeforeDays'] = $this->BookBeforeDays;
        if (isset($this->BookBeforeHours)) $o['BookBeforeHours'] = $this->BookBeforeHours;
        if (isset($this->BookBeforeMinutes)) $o['BookBeforeMinutes'] = $this->BookBeforeMinutes;
        if (isset($this->Duration)) $o['Duration'] = $this->Duration;
        if (isset($this->DurationTypeId)) $o['DurationTypeId'] = $this->DurationTypeId;
        if (isset($this->MinDuration)) $o['MinDuration'] = $this->MinDuration;
        if (isset($this->MaxDuration)) $o['MaxDuration'] = $this->MaxDuration;
        if (isset($this->DurationInterval)) $o['DurationInterval'] = $this->DurationInterval;
        if (isset($this->TotalSpots)) $o['TotalSpots'] = $this->TotalSpots;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->ScheduleTypeId)) $o['ScheduleTypeId'] = $this->ScheduleTypeId;
        if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->OnlyVisibleByAdmin)) $o['OnlyVisibleByAdmin'] = $this->OnlyVisibleByAdmin;
        if (isset($this->MaxNumberOfSpotsPerBooking)) $o['MaxNumberOfSpotsPerBooking'] = $this->MaxNumberOfSpotsPerBooking;
        if (isset($this->MinNumberOfResourcesToBook)) $o['MinNumberOfResourcesToBook'] = $this->MinNumberOfResourcesToBook;
        if (isset($this->MaxNumberOfResourcesToBook)) $o['MaxNumberOfResourcesToBook'] = $this->MaxNumberOfResourcesToBook;
        if (isset($this->IsPaymentEnabled)) $o['IsPaymentEnabled'] = $this->IsPaymentEnabled;
        if (isset($this->MaxPaymentTime)) $o['MaxPaymentTime'] = $this->MaxPaymentTime;
        if (isset($this->LockSpotsToBooking)) $o['LockSpotsToBooking'] = $this->LockSpotsToBooking;
        if (isset($this->EnableBookingQueue)) $o['EnableBookingQueue'] = $this->EnableBookingQueue;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->BookingStatusId)) $o['BookingStatusId'] = $this->BookingStatusId;
        if (isset($this->EnableCodeLockSync)) $o['EnableCodeLockSync'] = $this->EnableCodeLockSync;
        if (isset($this->EnableCustomerManualPayment)) $o['EnableCustomerManualPayment'] = $this->EnableCustomerManualPayment;
        if (isset($this->PriceViewTypeId)) $o['PriceViewTypeId'] = $this->PriceViewTypeId;
        if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
        if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
        if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
        if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
        if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
        if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
        if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
        if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
        if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
        if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
        if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
        if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
        if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
        if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
        if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
        if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
        if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
        if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
        if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
        if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
        return empty($o) ? new class(){} : $o;
    }
}

class CustomFieldServiceRelation extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var int */
        public int $CustomFieldConfigId=0,

        // @Required()
        /** @var int */
        public int $ServiceId=0,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

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

class CustomFieldConfig extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var array<CustomFieldValue>|null */
        public ?array $Values=null,

        /** @var CustomField|null */
        public ?CustomField $CustomField=null,
        // @Ignore()
        /** @var RegEx|null */
        public ?RegEx $RegEx=null,

        // @Ignore()
        /** @var array<Service>|null */
        public ?array $Services=null,

        /** @var array<CustomFieldServiceRelation>|null */
        public ?array $CustomFieldServiceRelation=null,
        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        /** @var int|null */
        public ?int $GroupId=null,
        // @Required()
        /** @var int */
        public int $FieldId=0,

        // @Required()
        /** @var int */
        public int $IconId=0,

        /** @var int|null */
        public ?int $RegExId=null,
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $Description='',

        // @Required()
        /** @var string */
        public string $Datatype='',

        // @Required()
        /** @var int */
        public int $MaxLength=0,

        // @Required()
        /** @var bool|null */
        public ?bool $IsPublic=null,

        // @Required()
        /** @var bool|null */
        public ?bool $IsHidden=null,

        // @Required()
        /** @var bool|null */
        public ?bool $IsMandatory=null,

        /** @var string|null */
        public ?string $DefaultValue=null,
        /** @var string|null */
        public ?string $RegExErrorMessage=null,
        /** @var string|null */
        public ?string $MandatoryErrorMessage=null,
        /** @var int|null */
        public ?int $Width=null,
        // @Required()
        /** @var bool|null */
        public ?bool $MultipleLineText=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Values'])) $this->Values = JsonConverters::fromArray('CustomFieldValue', $o['Values']);
        if (isset($o['CustomField'])) $this->CustomField = JsonConverters::from('CustomField', $o['CustomField']);
        if (isset($o['RegEx'])) $this->RegEx = JsonConverters::from('RegEx', $o['RegEx']);
        if (isset($o['Services'])) $this->Services = JsonConverters::fromArray('Service', $o['Services']);
        if (isset($o['CustomFieldServiceRelation'])) $this->CustomFieldServiceRelation = JsonConverters::fromArray('CustomFieldServiceRelation', $o['CustomFieldServiceRelation']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['GroupId'])) $this->GroupId = $o['GroupId'];
        if (isset($o['FieldId'])) $this->FieldId = $o['FieldId'];
        if (isset($o['IconId'])) $this->IconId = $o['IconId'];
        if (isset($o['RegExId'])) $this->RegExId = $o['RegExId'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Datatype'])) $this->Datatype = $o['Datatype'];
        if (isset($o['MaxLength'])) $this->MaxLength = $o['MaxLength'];
        if (isset($o['IsPublic'])) $this->IsPublic = $o['IsPublic'];
        if (isset($o['IsHidden'])) $this->IsHidden = $o['IsHidden'];
        if (isset($o['IsMandatory'])) $this->IsMandatory = $o['IsMandatory'];
        if (isset($o['DefaultValue'])) $this->DefaultValue = $o['DefaultValue'];
        if (isset($o['RegExErrorMessage'])) $this->RegExErrorMessage = $o['RegExErrorMessage'];
        if (isset($o['MandatoryErrorMessage'])) $this->MandatoryErrorMessage = $o['MandatoryErrorMessage'];
        if (isset($o['Width'])) $this->Width = $o['Width'];
        if (isset($o['MultipleLineText'])) $this->MultipleLineText = $o['MultipleLineText'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Values)) $o['Values'] = JsonConverters::toArray('CustomFieldValue', $this->Values);
        if (isset($this->CustomField)) $o['CustomField'] = JsonConverters::to('CustomField', $this->CustomField);
        if (isset($this->RegEx)) $o['RegEx'] = JsonConverters::to('RegEx', $this->RegEx);
        if (isset($this->Services)) $o['Services'] = JsonConverters::toArray('Service', $this->Services);
        if (isset($this->CustomFieldServiceRelation)) $o['CustomFieldServiceRelation'] = JsonConverters::toArray('CustomFieldServiceRelation', $this->CustomFieldServiceRelation);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->GroupId)) $o['GroupId'] = $this->GroupId;
        if (isset($this->FieldId)) $o['FieldId'] = $this->FieldId;
        if (isset($this->IconId)) $o['IconId'] = $this->IconId;
        if (isset($this->RegExId)) $o['RegExId'] = $this->RegExId;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Datatype)) $o['Datatype'] = $this->Datatype;
        if (isset($this->MaxLength)) $o['MaxLength'] = $this->MaxLength;
        if (isset($this->IsPublic)) $o['IsPublic'] = $this->IsPublic;
        if (isset($this->IsHidden)) $o['IsHidden'] = $this->IsHidden;
        if (isset($this->IsMandatory)) $o['IsMandatory'] = $this->IsMandatory;
        if (isset($this->DefaultValue)) $o['DefaultValue'] = $this->DefaultValue;
        if (isset($this->RegExErrorMessage)) $o['RegExErrorMessage'] = $this->RegExErrorMessage;
        if (isset($this->MandatoryErrorMessage)) $o['MandatoryErrorMessage'] = $this->MandatoryErrorMessage;
        if (isset($this->Width)) $o['Width'] = $this->Width;
        if (isset($this->MultipleLineText)) $o['MultipleLineText'] = $this->MultipleLineText;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        return empty($o) ? new class(){} : $o;
    }
}

class Resource extends BaseModel implements ICustomFieldTable, IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
    public function __construct(
        // @Ignore()
        /** @var int */
        public int $Priority=0,

        // @Ignore()
        /** @var array<ISchedule>|null */
        public ?array $Schedules=null,

        // @Ignore()
        /** @var array<ITimeException>|null */
        public ?array $Exceptions=null,

        // @Ignore()
        /** @var array<IBookedTime>|null */
        public ?array $Bookings=null,

        // @Ignore()
        /** @var array<CustomFieldConfig>|null */
        public ?array $CustomFieldsConfig=null,

        // @Ignore()
        /** @var array<CustomFieldDataResponse>|null */
        public ?array $CustomFieldsData=null,

        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var int */
        public int $Id=0,
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $ImageUrl=null,
        // @Required()
        /** @var DateTime */
        public DateTime $UpdatedDate=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),

        // @Required()
        /** @var string */
        public string $Color='',

        /** @var string|null */
        public ?string $Email=null,
        /** @var string|null */
        public ?string $MobilePhone=null,
        /** @var bool|null */
        public ?bool $EmailNotification=null,
        /** @var bool|null */
        public ?bool $SMSNotification=null,
        // @Required()
        /** @var bool|null */
        public ?bool $SendSMSReminder=null,

        // @Required()
        /** @var bool|null */
        public ?bool $SendEmailReminder=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $AccessGroup=null,
        /** @var string|null */
        public ?string $TextField1=null,
        /** @var string|null */
        public ?string $TextField2=null,
        /** @var string|null */
        public ?string $TextField3=null,
        /** @var string|null */
        public ?string $TextField4=null,
        /** @var string|null */
        public ?string $TextField5=null,
        /** @var string|null */
        public ?string $TextField6=null,
        /** @var string|null */
        public ?string $TextField7=null,
        /** @var string|null */
        public ?string $TextField8=null,
        /** @var string|null */
        public ?string $TextField9=null,
        /** @var string|null */
        public ?string $TextField10=null,
        /** @var string|null */
        public ?string $TextField11=null,
        /** @var string|null */
        public ?string $TextField12=null,
        /** @var string|null */
        public ?string $TextField13=null,
        /** @var string|null */
        public ?string $TextField14=null,
        /** @var string|null */
        public ?string $TextField15=null,
        /** @var string|null */
        public ?string $TextField16=null,
        /** @var string|null */
        public ?string $TextField17=null,
        /** @var string|null */
        public ?string $TextField18=null,
        /** @var string|null */
        public ?string $TextField19=null,
        /** @var string|null */
        public ?string $TextField20=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Priority'])) $this->Priority = $o['Priority'];
        if (isset($o['Schedules'])) $this->Schedules = JsonConverters::fromArray('ISchedule', $o['Schedules']);
        if (isset($o['Exceptions'])) $this->Exceptions = JsonConverters::fromArray('ITimeException', $o['Exceptions']);
        if (isset($o['Bookings'])) $this->Bookings = JsonConverters::fromArray('IBookedTime', $o['Bookings']);
        if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
        if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['Color'])) $this->Color = $o['Color'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
        if (isset($o['EmailNotification'])) $this->EmailNotification = $o['EmailNotification'];
        if (isset($o['SMSNotification'])) $this->SMSNotification = $o['SMSNotification'];
        if (isset($o['SendSMSReminder'])) $this->SendSMSReminder = $o['SendSMSReminder'];
        if (isset($o['SendEmailReminder'])) $this->SendEmailReminder = $o['SendEmailReminder'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['AccessGroup'])) $this->AccessGroup = $o['AccessGroup'];
        if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
        if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
        if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
        if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
        if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
        if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
        if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
        if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
        if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
        if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
        if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
        if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
        if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
        if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
        if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
        if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
        if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
        if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
        if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
        if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Priority)) $o['Priority'] = $this->Priority;
        if (isset($this->Schedules)) $o['Schedules'] = JsonConverters::toArray('ISchedule', $this->Schedules);
        if (isset($this->Exceptions)) $o['Exceptions'] = JsonConverters::toArray('ITimeException', $this->Exceptions);
        if (isset($this->Bookings)) $o['Bookings'] = JsonConverters::toArray('IBookedTime', $this->Bookings);
        if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
        if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->Color)) $o['Color'] = $this->Color;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
        if (isset($this->EmailNotification)) $o['EmailNotification'] = $this->EmailNotification;
        if (isset($this->SMSNotification)) $o['SMSNotification'] = $this->SMSNotification;
        if (isset($this->SendSMSReminder)) $o['SendSMSReminder'] = $this->SendSMSReminder;
        if (isset($this->SendEmailReminder)) $o['SendEmailReminder'] = $this->SendEmailReminder;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->AccessGroup)) $o['AccessGroup'] = $this->AccessGroup;
        if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
        if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
        if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
        if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
        if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
        if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
        if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
        if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
        if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
        if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
        if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
        if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
        if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
        if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
        if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
        if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
        if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
        if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
        if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
        if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
        return empty($o) ? new class(){} : $o;
    }
}

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
class TestRecurringSchedule implements ICompany, IInterval, JsonSerializable
{
    public function __construct(
        /** @description The company id, if empty will use the company id for the user you are logged in with. */
        // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
        /** @var string|null */
        public ?string $CompanyId=null,

        /** @description From what datetime to show available times */
        // @ApiMember(DataType="dateTime", Description="From what datetime to show available times", IsRequired=true, ParameterType="query")
        /** @var DateTime */
        public DateTime $From=new DateTime(),

        /** @description To what datetime to show available times */
        // @ApiMember(DataType="dateTime", Description="To what datetime to show available times", IsRequired=true, ParameterType="query")
        /** @var DateTime */
        public DateTime $To=new DateTime(),

        /** @description The Service Duration to be faked if there is no Service selected */
        // @ApiMember(Description="The Service Duration to be faked if there is no Service selected")
        /** @var int|null */
        public ?int $Duration=null,

        /** @description Time interval for available times. Here you set the interval at which times should appear. For example, if you select the range 15minutes, and your service has an duration of 1 hour and opening hours are 9AM to 6PM you will see the following suggested times: 09AM-10PM 09:15AM-10:15PM, 09:30AM-10:30PM ,  ..... 04:45PM-05:45, 05:00PM-06:00PM */
        // @ApiMember(Description="Time interval for available times. Here you set the interval at which times should appear. For example, if you select the range 15minutes, and your service has an duration of 1 hour and opening hours are 9AM to 6PM you will see the following suggested times: 09AM-10PM 09:15AM-10:15PM, 09:30AM-10:30PM ,  ..... 04:45PM-05:45, 05:00PM-06:00PM", IsRequired=true)
        /** @var int */
        public int $TimeInterval=0,

        /** @description Allow bookings end time exceeds the opening hours Here you can choose whether it should be possible to make a reservation exceeding the opening hours. This should be ticked when a service duration is longer than 24 hours (possible to book over midnight). */
        // @ApiMember(Description="Allow bookings end time exceeds the opening hours Here you can choose whether it should be possible to make a reservation exceeding the opening hours. This should be ticked when a service duration is longer than 24 hours (possible to book over midnight).", IsRequired=true)
        /** @var bool|null */
        public ?bool $EnableBookingUntilClosingTime=null,

        /** @description The timestamp to which the schedule is valid from */
        // @ApiMember(Description="The timestamp to which the schedule is valid from", IsRequired=true)
        /** @var DateTime */
        public DateTime $ValidFrom=new DateTime(),

        /** @description The timestamp to which the schedule is valid to */
        // @ApiMember(Description="The timestamp to which the schedule is valid to", IsRequired=true)
        /** @var DateTime */
        public DateTime $ValidTo=new DateTime(),

        /** @description The time for the schedule opening hours (starttime) */
        // @ApiMember(Description="The time for the schedule opening hours (starttime)", IsRequired=true)
        /** @var DateInterval|null */
        public ?DateInterval $StartTime=null,

        /** @description The time for the schedule opening hours (endtime) */
        // @ApiMember(Description="The time for the schedule opening hours (endtime)", IsRequired=true)
        /** @var DateInterval|null */
        public ?DateInterval $EndTime=null,

        /** @description The number of days the schedule is valid from todays date */
        // @ApiMember(Description="The number of days the schedule is valid from todays date", IsRequired=true)
        /** @var int */
        public int $NumberOfScheduleDays=0,

        /** @description If recurring, an array indicating which days of the week the schedule recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs */
        // @ApiMember(Description="If recurring, an array indicating which days of the week the schedule recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs")
        /** @var int[]|null */
        public ?array $DaysOfWeek=null,

        /** @description If not recuring, an array indicating which dates that are open for the schedule. */
        // @ApiMember(Description="If not recuring, an array indicating which dates that are open for the schedule.")
        /** @var array<AddRecurringScheduleDate>|null */
        public ?array $ScheduleDates=null,

        /** @description Schedule exceptions. For example closed on lunch time between 12AM and 1PM. These times will be removed from the recurring schedule. */
        // @ApiMember(Description="Schedule exceptions. For example closed on lunch time between 12AM and 1PM. These times will be removed from the recurring schedule.")
        /** @var array<ScheduleException>|null */
        public ?array $Exceptions=null,

        // @ApiMember()
        /** @var array<AddScheduleService>|null */
        public ?array $Services=null,

        // @ApiMember()
        /** @var array<Resource>|null */
        public ?array $Resources=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
        if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
        if (isset($o['Duration'])) $this->Duration = $o['Duration'];
        if (isset($o['TimeInterval'])) $this->TimeInterval = $o['TimeInterval'];
        if (isset($o['EnableBookingUntilClosingTime'])) $this->EnableBookingUntilClosingTime = $o['EnableBookingUntilClosingTime'];
        if (isset($o['ValidFrom'])) $this->ValidFrom = JsonConverters::from('DateTime', $o['ValidFrom']);
        if (isset($o['ValidTo'])) $this->ValidTo = JsonConverters::from('DateTime', $o['ValidTo']);
        if (isset($o['StartTime'])) $this->StartTime = JsonConverters::from('DateInterval', $o['StartTime']);
        if (isset($o['EndTime'])) $this->EndTime = JsonConverters::from('DateInterval', $o['EndTime']);
        if (isset($o['NumberOfScheduleDays'])) $this->NumberOfScheduleDays = $o['NumberOfScheduleDays'];
        if (isset($o['DaysOfWeek'])) $this->DaysOfWeek = JsonConverters::fromArray('int', $o['DaysOfWeek']);
        if (isset($o['ScheduleDates'])) $this->ScheduleDates = JsonConverters::fromArray('AddRecurringScheduleDate', $o['ScheduleDates']);
        if (isset($o['Exceptions'])) $this->Exceptions = JsonConverters::fromArray('ScheduleException', $o['Exceptions']);
        if (isset($o['Services'])) $this->Services = JsonConverters::fromArray('AddScheduleService', $o['Services']);
        if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('Resource', $o['Resources']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
        if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
        if (isset($this->Duration)) $o['Duration'] = $this->Duration;
        if (isset($this->TimeInterval)) $o['TimeInterval'] = $this->TimeInterval;
        if (isset($this->EnableBookingUntilClosingTime)) $o['EnableBookingUntilClosingTime'] = $this->EnableBookingUntilClosingTime;
        if (isset($this->ValidFrom)) $o['ValidFrom'] = JsonConverters::to('DateTime', $this->ValidFrom);
        if (isset($this->ValidTo)) $o['ValidTo'] = JsonConverters::to('DateTime', $this->ValidTo);
        if (isset($this->StartTime)) $o['StartTime'] = JsonConverters::to('DateInterval', $this->StartTime);
        if (isset($this->EndTime)) $o['EndTime'] = JsonConverters::to('DateInterval', $this->EndTime);
        if (isset($this->NumberOfScheduleDays)) $o['NumberOfScheduleDays'] = $this->NumberOfScheduleDays;
        if (isset($this->DaysOfWeek)) $o['DaysOfWeek'] = JsonConverters::toArray('int', $this->DaysOfWeek);
        if (isset($this->ScheduleDates)) $o['ScheduleDates'] = JsonConverters::toArray('AddRecurringScheduleDate', $this->ScheduleDates);
        if (isset($this->Exceptions)) $o['Exceptions'] = JsonConverters::toArray('ScheduleException', $this->Exceptions);
        if (isset($this->Services)) $o['Services'] = JsonConverters::toArray('AddScheduleService', $this->Services);
        if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('Resource', $this->Resources);
        return empty($o) ? new class(){} : $o;
    }
}

class Currency extends BaseModel implements JsonSerializable
{
    public function __construct(
        // @Required()
        /** @var string */
        public string $Name='',

        // @Required()
        /** @var string */
        public string $CurrencySign='',

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        // @Required()
        /** @var string */
        public string $Id=''
    ) {
    }

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

class Customer extends BaseModel implements IUser, ICustomFieldTable, JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $IdentityId=0,
        /** @var string */
        public string $Id='',
        // @Ignore()
        /** @var string */
        public string $CustomerId='',

        // @Ignore()
        /** @var array<UserAccessKeys>|null */
        public ?array $AccessKeys=null,

        /** @var string|null */
        public ?string $Email=null,
        // @Ignore()
        /** @var array<ExternalReference>|null */
        public ?array $ExternalReferences=null,

        // @Ignore()
        /** @var array<CustomFieldConfig>|null */
        public ?array $CustomFieldsConfig=null,

        // @Ignore()
        /** @var array<CustomFieldDataResponse>|null */
        public ?array $CustomFieldsData=null,

        // @Ignore()
        /** @var array<CustomerComment>|null */
        public ?array $Comments=null,

        /** @var string|null */
        public ?string $Firstname=null,
        // @Ignore()
        /** @var string|null */
        public ?string $ImageUrl=null,

        // @Required()
        /** @var bool|null */
        public ?bool $Active=null,

        /** @var string|null */
        public ?string $FacebookUsername=null,
        // @Required()
        /** @var DateTime */
        public DateTime $Updated=new DateTime(),

        // @Required()
        /** @var DateTime */
        public DateTime $Created=new DateTime(),

        /** @var string|null */
        public ?string $IpAddress=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $TextField1=null,
        /** @var string|null */
        public ?string $TextField2=null,
        /** @var string|null */
        public ?string $TextField3=null,
        /** @var string|null */
        public ?string $TextField4=null,
        /** @var string|null */
        public ?string $TextField5=null,
        /** @var string|null */
        public ?string $TextField6=null,
        /** @var string|null */
        public ?string $TextField7=null,
        /** @var string|null */
        public ?string $TextField8=null,
        /** @var string|null */
        public ?string $TextField9=null,
        /** @var string|null */
        public ?string $TextField10=null,
        /** @var string|null */
        public ?string $TextField11=null,
        /** @var string|null */
        public ?string $TextField12=null,
        /** @var string|null */
        public ?string $TextField13=null,
        /** @var string|null */
        public ?string $TextField14=null,
        /** @var string|null */
        public ?string $TextField15=null,
        /** @var string|null */
        public ?string $TextField16=null,
        /** @var string|null */
        public ?string $TextField17=null,
        /** @var string|null */
        public ?string $TextField18=null,
        /** @var string|null */
        public ?string $TextField19=null,
        /** @var string|null */
        public ?string $TextField20=null,
        /** @var string */
        public string $UserId='',
        /** @var string|null */
        public ?string $Lastname=null,
        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $CorporateIdentityNumber=null,
        /** @var string|null */
        public ?string $InvoiceAddress1=null,
        /** @var string|null */
        public ?string $InvoiceAddress2=null,
        /** @var string|null */
        public ?string $InvoiceCity=null,
        /** @var string|null */
        public ?string $InvoicePostalCode=null,
        /** @var string|null */
        public ?string $InvoiceCountryCode=null,
        // @Required()
        /** @var string */
        public string $CompanyId='',

        /** @var bool|null */
        public ?bool $SubscribedToNewsletter=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['IdentityId'])) $this->IdentityId = $o['IdentityId'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['AccessKeys'])) $this->AccessKeys = JsonConverters::fromArray('UserAccessKeys', $o['AccessKeys']);
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['ExternalReferences'])) $this->ExternalReferences = JsonConverters::fromArray('ExternalReference', $o['ExternalReferences']);
        if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
        if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
        if (isset($o['Comments'])) $this->Comments = JsonConverters::fromArray('CustomerComment', $o['Comments']);
        if (isset($o['Firstname'])) $this->Firstname = $o['Firstname'];
        if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['FacebookUsername'])) $this->FacebookUsername = $o['FacebookUsername'];
        if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
        if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
        if (isset($o['IpAddress'])) $this->IpAddress = $o['IpAddress'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
        if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
        if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
        if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
        if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
        if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
        if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
        if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
        if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
        if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
        if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
        if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
        if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
        if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
        if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
        if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
        if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
        if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
        if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
        if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
        if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
        if (isset($o['UserId'])) $this->UserId = $o['UserId'];
        if (isset($o['Lastname'])) $this->Lastname = $o['Lastname'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['CorporateIdentityNumber'])) $this->CorporateIdentityNumber = $o['CorporateIdentityNumber'];
        if (isset($o['InvoiceAddress1'])) $this->InvoiceAddress1 = $o['InvoiceAddress1'];
        if (isset($o['InvoiceAddress2'])) $this->InvoiceAddress2 = $o['InvoiceAddress2'];
        if (isset($o['InvoiceCity'])) $this->InvoiceCity = $o['InvoiceCity'];
        if (isset($o['InvoicePostalCode'])) $this->InvoicePostalCode = $o['InvoicePostalCode'];
        if (isset($o['InvoiceCountryCode'])) $this->InvoiceCountryCode = $o['InvoiceCountryCode'];
        if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
        if (isset($o['SubscribedToNewsletter'])) $this->SubscribedToNewsletter = $o['SubscribedToNewsletter'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->IdentityId)) $o['IdentityId'] = $this->IdentityId;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->AccessKeys)) $o['AccessKeys'] = JsonConverters::toArray('UserAccessKeys', $this->AccessKeys);
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->ExternalReferences)) $o['ExternalReferences'] = JsonConverters::toArray('ExternalReference', $this->ExternalReferences);
        if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
        if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
        if (isset($this->Comments)) $o['Comments'] = JsonConverters::toArray('CustomerComment', $this->Comments);
        if (isset($this->Firstname)) $o['Firstname'] = $this->Firstname;
        if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->FacebookUsername)) $o['FacebookUsername'] = $this->FacebookUsername;
        if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
        if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
        if (isset($this->IpAddress)) $o['IpAddress'] = $this->IpAddress;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
        if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
        if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
        if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
        if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
        if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
        if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
        if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
        if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
        if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
        if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
        if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
        if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
        if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
        if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
        if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
        if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
        if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
        if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
        if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
        if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
        if (isset($this->UserId)) $o['UserId'] = $this->UserId;
        if (isset($this->Lastname)) $o['Lastname'] = $this->Lastname;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->CorporateIdentityNumber)) $o['CorporateIdentityNumber'] = $this->CorporateIdentityNumber;
        if (isset($this->InvoiceAddress1)) $o['InvoiceAddress1'] = $this->InvoiceAddress1;
        if (isset($this->InvoiceAddress2)) $o['InvoiceAddress2'] = $this->InvoiceAddress2;
        if (isset($this->InvoiceCity)) $o['InvoiceCity'] = $this->InvoiceCity;
        if (isset($this->InvoicePostalCode)) $o['InvoicePostalCode'] = $this->InvoicePostalCode;
        if (isset($this->InvoiceCountryCode)) $o['InvoiceCountryCode'] = $this->InvoiceCountryCode;
        if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
        if (isset($this->SubscribedToNewsletter)) $o['SubscribedToNewsletter'] = $this->SubscribedToNewsletter;
        return empty($o) ? new class(){} : $o;
    }
}

PHP TestRecurringSchedule DTOs

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

HTTP + XML

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

POST /schedules/recurring/test HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<TestRecurringSchedule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DaysOfWeek xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </DaysOfWeek>
  <Duration>0</Duration>
  <EnableBookingUntilClosingTime>false</EnableBookingUntilClosingTime>
  <EndTime>PT0S</EndTime>
  <Exceptions>
    <ScheduleException>
      <EndTime>PT0S</EndTime>
      <StartTime>PT0S</StartTime>
    </ScheduleException>
  </Exceptions>
  <From>0001-01-01T00:00:00</From>
  <NumberOfScheduleDays>0</NumberOfScheduleDays>
  <Resources xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Db">
    <d2p1:Resource>
      <d2p1:AccessGroup>String</d2p1:AccessGroup>
      <d2p1:Active>false</d2p1:Active>
      <d2p1:Bookings xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
      <d2p1:Color>String</d2p1:Color>
      <d2p1:CompanyId>00000000-0000-0000-0000-000000000000</d2p1:CompanyId>
      <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
      <d2p1:CustomFieldsConfig i:nil="true" />
      <d2p1:CustomFieldsData i:nil="true" />
      <d2p1:Description>String</d2p1:Description>
      <d2p1:Email>String</d2p1:Email>
      <d2p1:EmailNotification>false</d2p1:EmailNotification>
      <d2p1:Exceptions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
      <d2p1:Id>0</d2p1:Id>
      <d2p1:ImageUrl>String</d2p1:ImageUrl>
      <d2p1:MobilePhone>String</d2p1:MobilePhone>
      <d2p1:ModifiedDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </d2p1:ModifiedDate>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Priority>0</d2p1:Priority>
      <d2p1:SMSNotification>false</d2p1:SMSNotification>
      <d2p1:Schedules xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
      <d2p1:SendEmailReminder>false</d2p1:SendEmailReminder>
      <d2p1:SendSMSReminder>false</d2p1:SendSMSReminder>
      <d2p1:TextField1>String</d2p1:TextField1>
      <d2p1:TextField10>String</d2p1:TextField10>
      <d2p1:TextField11>String</d2p1:TextField11>
      <d2p1:TextField12>String</d2p1:TextField12>
      <d2p1:TextField13>String</d2p1:TextField13>
      <d2p1:TextField14>String</d2p1:TextField14>
      <d2p1:TextField15>String</d2p1:TextField15>
      <d2p1:TextField16>String</d2p1:TextField16>
      <d2p1:TextField17>String</d2p1:TextField17>
      <d2p1:TextField18>String</d2p1:TextField18>
      <d2p1:TextField19>String</d2p1:TextField19>
      <d2p1:TextField2>String</d2p1:TextField2>
      <d2p1:TextField20>String</d2p1:TextField20>
      <d2p1:TextField3>String</d2p1:TextField3>
      <d2p1:TextField4>String</d2p1:TextField4>
      <d2p1:TextField5>String</d2p1:TextField5>
      <d2p1:TextField6>String</d2p1:TextField6>
      <d2p1:TextField7>String</d2p1:TextField7>
      <d2p1:TextField8>String</d2p1:TextField8>
      <d2p1:TextField9>String</d2p1:TextField9>
      <d2p1:UpdatedDate>0001-01-01T00:00:00</d2p1:UpdatedDate>
    </d2p1:Resource>
  </Resources>
  <ScheduleDates>
    <AddRecurringScheduleDate>
      <Date>0001-01-01T00:00:00</Date>
      <EndTime>PT0S</EndTime>
      <StartTime>PT0S</StartTime>
    </AddRecurringScheduleDate>
  </ScheduleDates>
  <Services>
    <AddScheduleService>
      <Id>0</Id>
    </AddScheduleService>
  </Services>
  <StartTime>PT0S</StartTime>
  <TimeInterval>0</TimeInterval>
  <To>0001-01-01T00:00:00</To>
  <ValidFrom>0001-01-01T00:00:00</ValidFrom>
  <ValidTo>0001-01-01T00:00:00</ValidTo>
</TestRecurringSchedule>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AvailableTimesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <ServiceId>0</ServiceId>
  <Times>
    <AvailableTimesSum>
      <ExceptionTexts i:nil="true" />
      <Free>0</Free>
      <FreeSpots>0</FreeSpots>
      <From>0001-01-01T00:00:00</From>
      <To>0001-01-01T00:00:00</To>
    </AvailableTimesSum>
  </Times>
  <TimesFreeTextMultiple>String</TimesFreeTextMultiple>
  <TimesFreeTextSingle>String</TimesFreeTextSingle>
</AvailableTimesResponse>