Evo Voice

<back to all web services

PatchSystemSettings

Updates the system settings

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
PATCHY/system/settings
<?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 EntityInfo implements JsonSerializable
{
    public function __construct(
        /** @description The ID of the object */
        // @ApiMember(Description="The ID of the object")
        /** @var string|null */
        public ?string $id=null,

        /** @description The date the object was created */
        // @ApiMember(Description="The date the object was created")
        /** @var string|null */
        public ?string $dateCreated=null,

        /** @description The date the object was last modified */
        // @ApiMember(Description="The date the object was last modified")
        /** @var string|null */
        public ?string $dateLastModified=null,

        /** @description The user that created this object */
        // @ApiMember(Description="The user that created this object")
        /** @var string|null */
        public ?string $createdBy=null,

        /** @description The user that last modified this object */
        // @ApiMember(Description="The user that last modified this object")
        /** @var string|null */
        public ?string $lastModifiedBy=null
    ) {
    }

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

enum ValueTypes : string
{
    case NotSpecified = 'NotSpecified';
    case String = 'String';
    case Boolean = 'Boolean';
    case Number = 'Number';
    case List = 'List';
    case Struct = 'Struct';
    case Transition = 'Transition';
    case Custom = 'Custom';
    case Date = 'Date';
    case AudioFile = 'AudioFile';
    case TimeZoneId = 'TimeZoneId';
    case PhoneNumber = 'PhoneNumber';
    case User = 'User';
    case Endpoint = 'Endpoint';
    case Time = 'Time';
    case File = 'File';
    case FaxNumber = 'FaxNumber';
    case EmailAccount = 'EmailAccount';
    case Customer = 'Customer';
    case Flow = 'Flow';
    case Team = 'Team';
    case FlowReference = 'FlowReference';
    case Integration = 'Integration';
    case Assistant = 'Assistant';
}

enum UIHints : string
{
    case None = 'None';
    case LargeText = 'LargeText';
    case InlineForm = 'InlineForm';
    case Password = 'Password';
    case InlineStruct = 'InlineStruct';
}

class DataType implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $typeName=null,
        /** @var array<DataField>|null */
        public ?array $fields=null
    ) {
    }

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

/**
 * @template array of String
 * @template array1 of Value
 */
class Struct extends array implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

class Value implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $boolValue=null,
        /** @var string|null */
        public ?string $stringValue=null,
        /** @var float|null */
        public ?float $numberValue=null,
        /** @var array<Struct>|null */
        public ?array $listValue=null,
        /** @var Struct|null */
        public ?Struct $structValue=null
    ) {
    }

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

enum DataFieldUniqueness : string
{
    case NotUnique = 'NotUnique';
    case Unique = 'Unique';
    case UniqueToCustomer = 'UniqueToCustomer';
}

enum UserDataFieldModes : string
{
    case Hidden = 'Hidden';
    case ReadOnly = 'ReadOnly';
    case ReadWrite = 'ReadWrite';
}

class DataField implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var ValueTypes|null */
        public ?ValueTypes $type=null,
        /** @var UIHints|null */
        public ?UIHints $uiHint=null,
        /** @var string|null */
        public ?string $uiTab=null,
        /** @var bool|null */
        public ?bool $isAsync=null,
        /** @var bool|null */
        public ?bool $disableBinding=null,
        /** @var DataType|null */
        public ?DataType $structType=null,
        /** @var DataType|null */
        public ?DataType $listType=null,
        /** @var string|null */
        public ?string $description=null,
        /** @var array<string>|null */
        public ?array $possibleValues=null,
        /** @var bool|null */
        public ?bool $isOutput=null,
        /** @var string|null */
        public ?string $customFieldValuesUrl=null,
        /** @var Value|null */
        public ?Value $defaultValue=null,
        /** @var string|null */
        public ?string $transitionNameFormat=null,
        /** @var DataFieldUniqueness|null */
        public ?DataFieldUniqueness $uniqueness=null,
        /** @var bool|null */
        public ?bool $voiceOnly=null,
        /** @var string|null */
        public ?string $conditionalVisibilityField=null,
        /** @var string|null */
        public ?string $conditionalVisibilityValue=null,
        /** @var bool|null */
        public ?bool $noEvalTemplate=null,
        /** @var UserDataFieldModes|null */
        public ?UserDataFieldModes $userMode=null,
        /** @var bool|null */
        public ?bool $anyValueType=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['type'])) $this->type = JsonConverters::from('ValueTypes', $o['type']);
        if (isset($o['uiHint'])) $this->uiHint = JsonConverters::from('UIHints', $o['uiHint']);
        if (isset($o['uiTab'])) $this->uiTab = $o['uiTab'];
        if (isset($o['isAsync'])) $this->isAsync = $o['isAsync'];
        if (isset($o['disableBinding'])) $this->disableBinding = $o['disableBinding'];
        if (isset($o['structType'])) $this->structType = JsonConverters::from('DataType', $o['structType']);
        if (isset($o['listType'])) $this->listType = JsonConverters::from('DataType', $o['listType']);
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['possibleValues'])) $this->possibleValues = JsonConverters::fromArray('string', $o['possibleValues']);
        if (isset($o['isOutput'])) $this->isOutput = $o['isOutput'];
        if (isset($o['customFieldValuesUrl'])) $this->customFieldValuesUrl = $o['customFieldValuesUrl'];
        if (isset($o['defaultValue'])) $this->defaultValue = JsonConverters::from('Value', $o['defaultValue']);
        if (isset($o['transitionNameFormat'])) $this->transitionNameFormat = $o['transitionNameFormat'];
        if (isset($o['uniqueness'])) $this->uniqueness = JsonConverters::from('DataFieldUniqueness', $o['uniqueness']);
        if (isset($o['voiceOnly'])) $this->voiceOnly = $o['voiceOnly'];
        if (isset($o['conditionalVisibilityField'])) $this->conditionalVisibilityField = $o['conditionalVisibilityField'];
        if (isset($o['conditionalVisibilityValue'])) $this->conditionalVisibilityValue = $o['conditionalVisibilityValue'];
        if (isset($o['noEvalTemplate'])) $this->noEvalTemplate = $o['noEvalTemplate'];
        if (isset($o['userMode'])) $this->userMode = JsonConverters::from('UserDataFieldModes', $o['userMode']);
        if (isset($o['anyValueType'])) $this->anyValueType = $o['anyValueType'];
    }
    
    /** @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->type)) $o['type'] = JsonConverters::to('ValueTypes', $this->type);
        if (isset($this->uiHint)) $o['uiHint'] = JsonConverters::to('UIHints', $this->uiHint);
        if (isset($this->uiTab)) $o['uiTab'] = $this->uiTab;
        if (isset($this->isAsync)) $o['isAsync'] = $this->isAsync;
        if (isset($this->disableBinding)) $o['disableBinding'] = $this->disableBinding;
        if (isset($this->structType)) $o['structType'] = JsonConverters::to('DataType', $this->structType);
        if (isset($this->listType)) $o['listType'] = JsonConverters::to('DataType', $this->listType);
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->possibleValues)) $o['possibleValues'] = JsonConverters::toArray('string', $this->possibleValues);
        if (isset($this->isOutput)) $o['isOutput'] = $this->isOutput;
        if (isset($this->customFieldValuesUrl)) $o['customFieldValuesUrl'] = $this->customFieldValuesUrl;
        if (isset($this->defaultValue)) $o['defaultValue'] = JsonConverters::to('Value', $this->defaultValue);
        if (isset($this->transitionNameFormat)) $o['transitionNameFormat'] = $this->transitionNameFormat;
        if (isset($this->uniqueness)) $o['uniqueness'] = JsonConverters::to('DataFieldUniqueness', $this->uniqueness);
        if (isset($this->voiceOnly)) $o['voiceOnly'] = $this->voiceOnly;
        if (isset($this->conditionalVisibilityField)) $o['conditionalVisibilityField'] = $this->conditionalVisibilityField;
        if (isset($this->conditionalVisibilityValue)) $o['conditionalVisibilityValue'] = $this->conditionalVisibilityValue;
        if (isset($this->noEvalTemplate)) $o['noEvalTemplate'] = $this->noEvalTemplate;
        if (isset($this->userMode)) $o['userMode'] = JsonConverters::to('UserDataFieldModes', $this->userMode);
        if (isset($this->anyValueType)) $o['anyValueType'] = $this->anyValueType;
        return empty($o) ? new class(){} : $o;
    }
}

class SystemSettingsField extends DataField implements JsonSerializable
{
    /**
     * @param string|null $id
     * @param string|null $name
     * @param ValueTypes|null $type
     * @param UIHints|null $uiHint
     * @param string|null $uiTab
     * @param bool|null $isAsync
     * @param bool|null $disableBinding
     * @param DataType|null $structType
     * @param DataType|null $listType
     * @param string|null $description
     * @param array<string>|null $possibleValues
     * @param bool|null $isOutput
     * @param string|null $customFieldValuesUrl
     * @param Value|null $defaultValue
     * @param string|null $transitionNameFormat
     * @param DataFieldUniqueness|null $uniqueness
     * @param bool|null $voiceOnly
     * @param string|null $conditionalVisibilityField
     * @param string|null $conditionalVisibilityValue
     * @param bool|null $noEvalTemplate
     * @param UserDataFieldModes|null $userMode
     * @param bool|null $anyValueType
     */
    public function __construct(
        ?string $id=null,
        ?string $name=null,
        ?ValueTypes $type=null,
        ?UIHints $uiHint=null,
        ?string $uiTab=null,
        ?bool $isAsync=null,
        ?bool $disableBinding=null,
        ?DataType $structType=null,
        ?DataType $listType=null,
        ?string $description=null,
        ?array $possibleValues=null,
        ?bool $isOutput=null,
        ?string $customFieldValuesUrl=null,
        ?Value $defaultValue=null,
        ?string $transitionNameFormat=null,
        ?DataFieldUniqueness $uniqueness=null,
        ?bool $voiceOnly=null,
        ?string $conditionalVisibilityField=null,
        ?string $conditionalVisibilityValue=null,
        ?bool $noEvalTemplate=null,
        ?UserDataFieldModes $userMode=null,
        ?bool $anyValueType=null,
        /** @var Value|null */
        public ?Value $value=null
    ) {
        parent::__construct($id,$name,$type,$uiHint,$uiTab,$isAsync,$disableBinding,$structType,$listType,$description,$possibleValues,$isOutput,$customFieldValuesUrl,$defaultValue,$transitionNameFormat,$uniqueness,$voiceOnly,$conditionalVisibilityField,$conditionalVisibilityValue,$noEvalTemplate,$userMode,$anyValueType);
    }

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

class CustomerDataField extends DataField implements JsonSerializable
{
    /**
     * @param string|null $id
     * @param string|null $name
     * @param ValueTypes|null $type
     * @param UIHints|null $uiHint
     * @param string|null $uiTab
     * @param bool|null $isAsync
     * @param bool|null $disableBinding
     * @param DataType|null $structType
     * @param DataType|null $listType
     * @param string|null $description
     * @param array<string>|null $possibleValues
     * @param bool|null $isOutput
     * @param string|null $customFieldValuesUrl
     * @param Value|null $defaultValue
     * @param string|null $transitionNameFormat
     * @param DataFieldUniqueness|null $uniqueness
     * @param bool|null $voiceOnly
     * @param string|null $conditionalVisibilityField
     * @param string|null $conditionalVisibilityValue
     * @param bool|null $noEvalTemplate
     * @param UserDataFieldModes|null $userMode
     * @param bool|null $anyValueType
     */
    public function __construct(
        ?string $id=null,
        ?string $name=null,
        ?ValueTypes $type=null,
        ?UIHints $uiHint=null,
        ?string $uiTab=null,
        ?bool $isAsync=null,
        ?bool $disableBinding=null,
        ?DataType $structType=null,
        ?DataType $listType=null,
        ?string $description=null,
        ?array $possibleValues=null,
        ?bool $isOutput=null,
        ?string $customFieldValuesUrl=null,
        ?Value $defaultValue=null,
        ?string $transitionNameFormat=null,
        ?DataFieldUniqueness $uniqueness=null,
        ?bool $voiceOnly=null,
        ?string $conditionalVisibilityField=null,
        ?string $conditionalVisibilityValue=null,
        ?bool $noEvalTemplate=null,
        ?UserDataFieldModes $userMode=null,
        ?bool $anyValueType=null,
        /** @var bool|null */
        public ?bool $showInSearch=null
    ) {
        parent::__construct($id,$name,$type,$uiHint,$uiTab,$isAsync,$disableBinding,$structType,$listType,$description,$possibleValues,$isOutput,$customFieldValuesUrl,$defaultValue,$transitionNameFormat,$uniqueness,$voiceOnly,$conditionalVisibilityField,$conditionalVisibilityValue,$noEvalTemplate,$userMode,$anyValueType);
    }

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

enum EndpointTypes : string
{
    case PhoneNumber = 'PhoneNumber';
    case User = 'User';
    case FaxNumber = 'FaxNumber';
    case EmailAddress = 'EmailAddress';
    case Unused_1 = 'Unused_1';
    case Unused_2 = 'Unused_2';
    case Unused_3 = 'Unused_3';
    case Unused_4 = 'Unused_4';
    case Unused_5 = 'Unused_5';
    case Team = 'Team';
    case Assistant = 'Assistant';
}

class EndpointDataField extends DataField implements JsonSerializable
{
    /**
     * @param string|null $id
     * @param string|null $name
     * @param ValueTypes|null $type
     * @param UIHints|null $uiHint
     * @param string|null $uiTab
     * @param bool|null $isAsync
     * @param bool|null $disableBinding
     * @param DataType|null $structType
     * @param DataType|null $listType
     * @param string|null $description
     * @param array<string>|null $possibleValues
     * @param bool|null $isOutput
     * @param string|null $customFieldValuesUrl
     * @param Value|null $defaultValue
     * @param string|null $transitionNameFormat
     * @param DataFieldUniqueness|null $uniqueness
     * @param bool|null $voiceOnly
     * @param string|null $conditionalVisibilityField
     * @param string|null $conditionalVisibilityValue
     * @param bool|null $noEvalTemplate
     * @param UserDataFieldModes|null $userMode
     * @param bool|null $anyValueType
     */
    public function __construct(
        ?string $id=null,
        ?string $name=null,
        ?ValueTypes $type=null,
        ?UIHints $uiHint=null,
        ?string $uiTab=null,
        ?bool $isAsync=null,
        ?bool $disableBinding=null,
        ?DataType $structType=null,
        ?DataType $listType=null,
        ?string $description=null,
        ?array $possibleValues=null,
        ?bool $isOutput=null,
        ?string $customFieldValuesUrl=null,
        ?Value $defaultValue=null,
        ?string $transitionNameFormat=null,
        ?DataFieldUniqueness $uniqueness=null,
        ?bool $voiceOnly=null,
        ?string $conditionalVisibilityField=null,
        ?string $conditionalVisibilityValue=null,
        ?bool $noEvalTemplate=null,
        ?UserDataFieldModes $userMode=null,
        ?bool $anyValueType=null,
        /** @var bool|null */
        public ?bool $showInSearch=null,
        /** @var bool|null */
        public ?bool $showInLists=null,
        /** @var EndpointTypes|null */
        public ?EndpointTypes $endpointType=null,
        /** @var bool|null */
        public ?bool $isCallerId=null,
        /** @var bool|null */
        public ?bool $isKnob=null
    ) {
        parent::__construct($id,$name,$type,$uiHint,$uiTab,$isAsync,$disableBinding,$structType,$listType,$description,$possibleValues,$isOutput,$customFieldValuesUrl,$defaultValue,$transitionNameFormat,$uniqueness,$voiceOnly,$conditionalVisibilityField,$conditionalVisibilityValue,$noEvalTemplate,$userMode,$anyValueType);
    }

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

class EmailAccount implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $server=null,
        /** @var string|null */
        public ?string $userName=null,
        /** @var int */
        public int $port=0,
        /** @var string|null */
        public ?string $emailAddress=null,
        /** @var string|null */
        public ?string $displayName=null,
        /** @var string|null */
        public ?string $password=null
    ) {
    }

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

enum TagColors : string
{
    case Magenta = 'Magenta';
    case Red = 'Red';
    case Volcano = 'Volcano';
    case Orange = 'Orange';
    case Gold = 'Gold';
    case Lime = 'Lime';
    case Green = 'Green';
    case Cyan = 'Cyan';
    case Blue = 'Blue';
    case GeekBlue = 'GeekBlue';
    case Purple = 'Purple';
}

class Tag implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var TagColors|null */
        public ?TagColors $color=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 = JsonConverters::from('TagColors', $o['color']);
    }
    
    /** @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'] = JsonConverters::to('TagColors', $this->color);
        return empty($o) ? new class(){} : $o;
    }
}

enum TwilioSipRegions : string
{
    case NorthAmericaVirginia = 'NorthAmericaVirginia';
    case NorthAmericaOregon = 'NorthAmericaOregon';
    case EuropeIreland = 'EuropeIreland';
    case EuropeFrankfurt = 'EuropeFrankfurt';
    case AsiaPacificSingapore = 'AsiaPacificSingapore';
    case AsiaPacificTokyo = 'AsiaPacificTokyo';
    case AsiaPacificSydney = 'AsiaPacificSydney';
    case SouthAmericaSanPaolo = 'SouthAmericaSanPaolo';
}

class SystemSettingsInfo extends EntityInfo implements JsonSerializable
{
    /**
     * @param string|null $id
     * @param string|null $dateCreated
     * @param string|null $dateLastModified
     * @param string|null $createdBy
     * @param string|null $lastModifiedBy
     */
    public function __construct(
        ?string $id=null,
        ?string $dateCreated=null,
        ?string $dateLastModified=null,
        ?string $createdBy=null,
        ?string $lastModifiedBy=null,
        /** @description Use to override the system time for testing */
        // @ApiMember(Description="Use to override the system time for testing")
        /** @var bool|null */
        public ?bool $overrideSystemTime=null,

        /** @description The system override time zone */
        // @ApiMember(Description="The system override time zone")
        /** @var string|null */
        public ?string $overrideSystemTimeZoneId=null,

        /** @description The system override date/time */
        // @ApiMember(Description="The system override date/time")
        /** @var string|null */
        public ?string $overrideSystemDateTime=null,

        /** @description The list of system settings fields */
        // @ApiMember(Description="The list of system settings fields")
        /** @var array<SystemSettingsField>|null */
        public ?array $systemFields=null,

        /** @description The list of customer metadata fields */
        // @ApiMember(Description="The list of customer metadata fields")
        /** @var array<CustomerDataField>|null */
        public ?array $customerFields=null,

        /** @description The list of endpoint metadata fields */
        // @ApiMember(Description="The list of endpoint metadata fields")
        /** @var array<EndpointDataField>|null */
        public ?array $endpointFields=null,

        /** @description The list of email accounts */
        // @ApiMember(Description="The list of email accounts")
        /** @var array<EmailAccount>|null */
        public ?array $emailAccounts=null,

        /** @description The list of tags in the system */
        // @ApiMember(Description="The list of tags in the system")
        /** @var array<Tag>|null */
        public ?array $tags=null,

        /** @description Documentation for the account */
        // @ApiMember(Description="Documentation for the account")
        /** @var string|null */
        public ?string $documentation=null,

        /** @description The number of days recordings are retained */
        // @ApiMember(Description="The number of days recordings are retained")
        /** @var int */
        public int $recordingRetentionDays=0,

        /** @description Enable the SIP refer beta */
        // @ApiMember(Description="Enable the SIP refer beta")
        /** @var bool|null */
        public ?bool $enableSipRefer=null,

        /** @description The number of seconds after which we automatically logoff a not ready agent */
        // @ApiMember(Description="The number of seconds after which we automatically logoff a not ready agent")
        /** @var int */
        public int $autoAgentLogoffSeconds=0,

        /** @description The default SIP region for new devices */
        // @ApiMember(Description="The default SIP region for new devices")
        /** @var TwilioSipRegions|null */
        public ?TwilioSipRegions $defaultSipRegion=null
    ) {
        parent::__construct($id,$dateCreated,$dateLastModified,$createdBy,$lastModifiedBy);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['overrideSystemTime'])) $this->overrideSystemTime = $o['overrideSystemTime'];
        if (isset($o['overrideSystemTimeZoneId'])) $this->overrideSystemTimeZoneId = $o['overrideSystemTimeZoneId'];
        if (isset($o['overrideSystemDateTime'])) $this->overrideSystemDateTime = $o['overrideSystemDateTime'];
        if (isset($o['systemFields'])) $this->systemFields = JsonConverters::fromArray('SystemSettingsField', $o['systemFields']);
        if (isset($o['customerFields'])) $this->customerFields = JsonConverters::fromArray('CustomerDataField', $o['customerFields']);
        if (isset($o['endpointFields'])) $this->endpointFields = JsonConverters::fromArray('EndpointDataField', $o['endpointFields']);
        if (isset($o['emailAccounts'])) $this->emailAccounts = JsonConverters::fromArray('EmailAccount', $o['emailAccounts']);
        if (isset($o['tags'])) $this->tags = JsonConverters::fromArray('Tag', $o['tags']);
        if (isset($o['documentation'])) $this->documentation = $o['documentation'];
        if (isset($o['recordingRetentionDays'])) $this->recordingRetentionDays = $o['recordingRetentionDays'];
        if (isset($o['enableSipRefer'])) $this->enableSipRefer = $o['enableSipRefer'];
        if (isset($o['autoAgentLogoffSeconds'])) $this->autoAgentLogoffSeconds = $o['autoAgentLogoffSeconds'];
        if (isset($o['defaultSipRegion'])) $this->defaultSipRegion = JsonConverters::from('TwilioSipRegions', $o['defaultSipRegion']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->overrideSystemTime)) $o['overrideSystemTime'] = $this->overrideSystemTime;
        if (isset($this->overrideSystemTimeZoneId)) $o['overrideSystemTimeZoneId'] = $this->overrideSystemTimeZoneId;
        if (isset($this->overrideSystemDateTime)) $o['overrideSystemDateTime'] = $this->overrideSystemDateTime;
        if (isset($this->systemFields)) $o['systemFields'] = JsonConverters::toArray('SystemSettingsField', $this->systemFields);
        if (isset($this->customerFields)) $o['customerFields'] = JsonConverters::toArray('CustomerDataField', $this->customerFields);
        if (isset($this->endpointFields)) $o['endpointFields'] = JsonConverters::toArray('EndpointDataField', $this->endpointFields);
        if (isset($this->emailAccounts)) $o['emailAccounts'] = JsonConverters::toArray('EmailAccount', $this->emailAccounts);
        if (isset($this->tags)) $o['tags'] = JsonConverters::toArray('Tag', $this->tags);
        if (isset($this->documentation)) $o['documentation'] = $this->documentation;
        if (isset($this->recordingRetentionDays)) $o['recordingRetentionDays'] = $this->recordingRetentionDays;
        if (isset($this->enableSipRefer)) $o['enableSipRefer'] = $this->enableSipRefer;
        if (isset($this->autoAgentLogoffSeconds)) $o['autoAgentLogoffSeconds'] = $this->autoAgentLogoffSeconds;
        if (isset($this->defaultSipRegion)) $o['defaultSipRegion'] = JsonConverters::to('TwilioSipRegions', $this->defaultSipRegion);
        return empty($o) ? new class(){} : $o;
    }
}

/** @description Updates the system settings */
// @Api(Description="Updates the system settings")
class PatchSystemSettings implements IPatch, JsonSerializable
{
    public function __construct(
        /** @description Use to override the system time for testing */
        // @ApiMember(Description="Use to override the system time for testing")
        /** @var bool|null */
        public ?bool $overrideSystemTime=null,

        /** @description The system override time zone */
        // @ApiMember(Description="The system override time zone")
        /** @var string|null */
        public ?string $overrideSystemTimeZoneId=null,

        /** @description The system override date/time */
        // @ApiMember(Description="The system override date/time")
        /** @var string|null */
        public ?string $overrideSystemDateTime=null,

        /** @description The account ID of the system settings */
        // @ApiMember(Description="The account ID of the system settings")
        /** @var string|null */
        public ?string $accountId=null,

        /** @description The list of system settings fields */
        // @ApiMember(Description="The list of system settings fields")
        /** @var array<SystemSettingsField>|null */
        public ?array $systemFields=null,

        /** @description The list of customer fields */
        // @ApiMember(Description="The list of customer fields")
        /** @var array<CustomerDataField>|null */
        public ?array $customerFields=null,

        /** @description The list of endpoint fields */
        // @ApiMember(Description="The list of endpoint fields")
        /** @var array<EndpointDataField>|null */
        public ?array $endpointFields=null,

        /** @description The list of email accounts */
        // @ApiMember(Description="The list of email accounts")
        /** @var array<EmailAccount>|null */
        public ?array $emailAccounts=null,

        /** @description The list of tags */
        // @ApiMember(Description="The list of tags")
        /** @var array<Tag>|null */
        public ?array $tags=null,

        /** @description Documentation for the account */
        // @ApiMember(Description="Documentation for the account")
        /** @var string|null */
        public ?string $documentation=null,

        /** @description The number of days recordings are retained */
        // @ApiMember(Description="The number of days recordings are retained")
        /** @var int|null */
        public ?int $recordingRetentionDays=null,

        /** @description Enable the SIP refer beta */
        // @ApiMember(Description="Enable the SIP refer beta")
        /** @var bool|null */
        public ?bool $enableSipRefer=null,

        /** @description The number of seconds after which we automatically logoff a not ready agent */
        // @ApiMember(Description="The number of seconds after which we automatically logoff a not ready agent")
        /** @var int|null */
        public ?int $autoAgentLogoffSeconds=null,

        /** @description The default SIP region for new devices */
        // @ApiMember(Description="The default SIP region for new devices")
        /** @var TwilioSipRegions|null */
        public ?TwilioSipRegions $defaultSipRegion=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['overrideSystemTime'])) $this->overrideSystemTime = $o['overrideSystemTime'];
        if (isset($o['overrideSystemTimeZoneId'])) $this->overrideSystemTimeZoneId = $o['overrideSystemTimeZoneId'];
        if (isset($o['overrideSystemDateTime'])) $this->overrideSystemDateTime = $o['overrideSystemDateTime'];
        if (isset($o['accountId'])) $this->accountId = $o['accountId'];
        if (isset($o['systemFields'])) $this->systemFields = JsonConverters::fromArray('SystemSettingsField', $o['systemFields']);
        if (isset($o['customerFields'])) $this->customerFields = JsonConverters::fromArray('CustomerDataField', $o['customerFields']);
        if (isset($o['endpointFields'])) $this->endpointFields = JsonConverters::fromArray('EndpointDataField', $o['endpointFields']);
        if (isset($o['emailAccounts'])) $this->emailAccounts = JsonConverters::fromArray('EmailAccount', $o['emailAccounts']);
        if (isset($o['tags'])) $this->tags = JsonConverters::fromArray('Tag', $o['tags']);
        if (isset($o['documentation'])) $this->documentation = $o['documentation'];
        if (isset($o['recordingRetentionDays'])) $this->recordingRetentionDays = $o['recordingRetentionDays'];
        if (isset($o['enableSipRefer'])) $this->enableSipRefer = $o['enableSipRefer'];
        if (isset($o['autoAgentLogoffSeconds'])) $this->autoAgentLogoffSeconds = $o['autoAgentLogoffSeconds'];
        if (isset($o['defaultSipRegion'])) $this->defaultSipRegion = JsonConverters::from('TwilioSipRegions', $o['defaultSipRegion']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->overrideSystemTime)) $o['overrideSystemTime'] = $this->overrideSystemTime;
        if (isset($this->overrideSystemTimeZoneId)) $o['overrideSystemTimeZoneId'] = $this->overrideSystemTimeZoneId;
        if (isset($this->overrideSystemDateTime)) $o['overrideSystemDateTime'] = $this->overrideSystemDateTime;
        if (isset($this->accountId)) $o['accountId'] = $this->accountId;
        if (isset($this->systemFields)) $o['systemFields'] = JsonConverters::toArray('SystemSettingsField', $this->systemFields);
        if (isset($this->customerFields)) $o['customerFields'] = JsonConverters::toArray('CustomerDataField', $this->customerFields);
        if (isset($this->endpointFields)) $o['endpointFields'] = JsonConverters::toArray('EndpointDataField', $this->endpointFields);
        if (isset($this->emailAccounts)) $o['emailAccounts'] = JsonConverters::toArray('EmailAccount', $this->emailAccounts);
        if (isset($this->tags)) $o['tags'] = JsonConverters::toArray('Tag', $this->tags);
        if (isset($this->documentation)) $o['documentation'] = $this->documentation;
        if (isset($this->recordingRetentionDays)) $o['recordingRetentionDays'] = $this->recordingRetentionDays;
        if (isset($this->enableSipRefer)) $o['enableSipRefer'] = $this->enableSipRefer;
        if (isset($this->autoAgentLogoffSeconds)) $o['autoAgentLogoffSeconds'] = $this->autoAgentLogoffSeconds;
        if (isset($this->defaultSipRegion)) $o['defaultSipRegion'] = JsonConverters::to('TwilioSipRegions', $this->defaultSipRegion);
        return empty($o) ? new class(){} : $o;
    }
}

PHP PatchSystemSettings DTOs

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

HTTP + CSV

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

POST /system/settings HTTP/1.1 
Host: team.evovoice.io 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"overrideSystemTime":false,"overrideSystemTimeZoneId":"String","overrideSystemDateTime":"String","accountId":"String","systemFields":[{"value":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"customerFields":[{"showInSearch":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"endpointFields":[{"showInSearch":false,"showInLists":false,"endpointType":"PhoneNumber","isCallerId":false,"isKnob":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"emailAccounts":[{"id":"String","server":"String","userName":"String","port":0,"emailAddress":"String","displayName":"String","password":"String"}],"tags":[{"id":"String","name":"String","color":"Magenta"}],"documentation":"String","recordingRetentionDays":0,"enableSipRefer":false,"autoAgentLogoffSeconds":0,"defaultSipRegion":"NorthAmericaVirginia"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"overrideSystemTime":false,"overrideSystemTimeZoneId":"String","overrideSystemDateTime":"String","systemFields":[{"value":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"customerFields":[{"showInSearch":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"endpointFields":[{"showInSearch":false,"showInLists":false,"endpointType":"PhoneNumber","isCallerId":false,"isKnob":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"emailAccounts":[{"id":"String","server":"String","userName":"String","port":0,"emailAddress":"String","displayName":"String","password":"String"}],"tags":[{"id":"String","name":"String","color":"Magenta"}],"documentation":"String","recordingRetentionDays":0,"enableSipRefer":false,"autoAgentLogoffSeconds":0,"defaultSipRegion":"NorthAmericaVirginia","id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}