| POST,DELETE,OPTIONS | /v1/queue/lobby-settings/{LocationId}/chime |
|---|
<?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 LobbySettings implements JsonSerializable
{
public function __construct(
/** @var string */
public string $LocationId='',
/** @var string|null */
public ?string $WaitSource=null,
/** @var string|null */
public ?string $MonitorChime=null,
/** @var bool|null */
public ?bool $HasUploadedChime=null,
/** @var string|null */
public ?string $ChimeUrl=null,
/** @var int */
public int $MonitorVolume=0,
/** @var bool|null */
public ?bool $MonitorAnnounce=null,
/** @var string|null */
public ?string $MonitorAnnounceTemplate=null,
/** @var string|null */
public ?string $MonitorVoice=null,
/** @var float */
public float $MonitorVoiceRate=0.0,
/** @var int|null */
public ?int $MonitorRepeatAfterSec=null,
/** @var bool|null */
public ?bool $MonitorTicketOnly=null,
/** @var string|null */
public ?string $LobbyZoneMode=null,
/** @var int|null */
public ?int $LobbyTakeoverEveryMin=null,
/** @var int|null */
public ?int $LobbyTakeoverSec=null,
/** @var bool|null */
public ?bool $LobbyIdleScreen=null,
/** @var string|null */
public ?string $TimeZone=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['LocationId'])) $this->LocationId = $o['LocationId'];
if (isset($o['WaitSource'])) $this->WaitSource = $o['WaitSource'];
if (isset($o['MonitorChime'])) $this->MonitorChime = $o['MonitorChime'];
if (isset($o['HasUploadedChime'])) $this->HasUploadedChime = $o['HasUploadedChime'];
if (isset($o['ChimeUrl'])) $this->ChimeUrl = $o['ChimeUrl'];
if (isset($o['MonitorVolume'])) $this->MonitorVolume = $o['MonitorVolume'];
if (isset($o['MonitorAnnounce'])) $this->MonitorAnnounce = $o['MonitorAnnounce'];
if (isset($o['MonitorAnnounceTemplate'])) $this->MonitorAnnounceTemplate = $o['MonitorAnnounceTemplate'];
if (isset($o['MonitorVoice'])) $this->MonitorVoice = $o['MonitorVoice'];
if (isset($o['MonitorVoiceRate'])) $this->MonitorVoiceRate = $o['MonitorVoiceRate'];
if (isset($o['MonitorRepeatAfterSec'])) $this->MonitorRepeatAfterSec = $o['MonitorRepeatAfterSec'];
if (isset($o['MonitorTicketOnly'])) $this->MonitorTicketOnly = $o['MonitorTicketOnly'];
if (isset($o['LobbyZoneMode'])) $this->LobbyZoneMode = $o['LobbyZoneMode'];
if (isset($o['LobbyTakeoverEveryMin'])) $this->LobbyTakeoverEveryMin = $o['LobbyTakeoverEveryMin'];
if (isset($o['LobbyTakeoverSec'])) $this->LobbyTakeoverSec = $o['LobbyTakeoverSec'];
if (isset($o['LobbyIdleScreen'])) $this->LobbyIdleScreen = $o['LobbyIdleScreen'];
if (isset($o['TimeZone'])) $this->TimeZone = $o['TimeZone'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->LocationId)) $o['LocationId'] = $this->LocationId;
if (isset($this->WaitSource)) $o['WaitSource'] = $this->WaitSource;
if (isset($this->MonitorChime)) $o['MonitorChime'] = $this->MonitorChime;
if (isset($this->HasUploadedChime)) $o['HasUploadedChime'] = $this->HasUploadedChime;
if (isset($this->ChimeUrl)) $o['ChimeUrl'] = $this->ChimeUrl;
if (isset($this->MonitorVolume)) $o['MonitorVolume'] = $this->MonitorVolume;
if (isset($this->MonitorAnnounce)) $o['MonitorAnnounce'] = $this->MonitorAnnounce;
if (isset($this->MonitorAnnounceTemplate)) $o['MonitorAnnounceTemplate'] = $this->MonitorAnnounceTemplate;
if (isset($this->MonitorVoice)) $o['MonitorVoice'] = $this->MonitorVoice;
if (isset($this->MonitorVoiceRate)) $o['MonitorVoiceRate'] = $this->MonitorVoiceRate;
if (isset($this->MonitorRepeatAfterSec)) $o['MonitorRepeatAfterSec'] = $this->MonitorRepeatAfterSec;
if (isset($this->MonitorTicketOnly)) $o['MonitorTicketOnly'] = $this->MonitorTicketOnly;
if (isset($this->LobbyZoneMode)) $o['LobbyZoneMode'] = $this->LobbyZoneMode;
if (isset($this->LobbyTakeoverEveryMin)) $o['LobbyTakeoverEveryMin'] = $this->LobbyTakeoverEveryMin;
if (isset($this->LobbyTakeoverSec)) $o['LobbyTakeoverSec'] = $this->LobbyTakeoverSec;
if (isset($this->LobbyIdleScreen)) $o['LobbyIdleScreen'] = $this->LobbyIdleScreen;
if (isset($this->TimeZone)) $o['TimeZone'] = $this->TimeZone;
return empty($o) ? new class(){} : $o;
}
}
class LobbyChimeOption implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Key=null,
/** @var string|null */
public ?string $Label=null,
/** @var string|null */
public ?string $Url=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Key'])) $this->Key = $o['Key'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['Url'])) $this->Url = $o['Url'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Key)) $o['Key'] = $this->Key;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->Url)) $o['Url'] = $this->Url;
return empty($o) ? new class(){} : $o;
}
}
class LobbySettingsResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var LobbySettings|null */
public ?LobbySettings $Settings=null,
/** @var array<LobbyChimeOption>|null */
public ?array $Chimes=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Settings'])) $this->Settings = JsonConverters::from('LobbySettings', $o['Settings']);
if (isset($o['Chimes'])) $this->Chimes = JsonConverters::fromArray('LobbyChimeOption', $o['Chimes']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Settings)) $o['Settings'] = JsonConverters::to('LobbySettings', $this->Settings);
if (isset($this->Chimes)) $o['Chimes'] = JsonConverters::toArray('LobbyChimeOption', $this->Chimes);
return empty($o) ? new class(){} : $o;
}
}
class LobbyChimeRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $LocationId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['LocationId'])) $this->LocationId = $o['LocationId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->LocationId)) $o['LocationId'] = $this->LocationId;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/queue/lobby-settings/{LocationId}/chime HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<LobbyChimeRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<LocationId>00000000-0000-0000-0000-000000000000</LocationId>
</LobbyChimeRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<LobbySettingsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Chimes>
<LobbyChimeOption>
<Key>String</Key>
<Label>String</Label>
<Url>String</Url>
</LobbyChimeOption>
</Chimes>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Settings>
<ChimeUrl>String</ChimeUrl>
<HasUploadedChime>false</HasUploadedChime>
<LobbyIdleScreen>false</LobbyIdleScreen>
<LobbyTakeoverEveryMin>0</LobbyTakeoverEveryMin>
<LobbyTakeoverSec>0</LobbyTakeoverSec>
<LobbyZoneMode>String</LobbyZoneMode>
<LocationId>00000000-0000-0000-0000-000000000000</LocationId>
<MonitorAnnounce>false</MonitorAnnounce>
<MonitorAnnounceTemplate>String</MonitorAnnounceTemplate>
<MonitorChime>String</MonitorChime>
<MonitorRepeatAfterSec>0</MonitorRepeatAfterSec>
<MonitorTicketOnly>false</MonitorTicketOnly>
<MonitorVoice>String</MonitorVoice>
<MonitorVoiceRate>0</MonitorVoiceRate>
<MonitorVolume>0</MonitorVolume>
<TimeZone>String</TimeZone>
<WaitSource>String</WaitSource>
</Settings>
</LobbySettingsResponse>