Trendsic Platform Service

<back to all web services

LobbyChimeRequest

Requires Authentication
The following routes are available for this service:
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;
    }
}

PHP LobbyChimeRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"LocationId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Settings":{"LocationId":"00000000000000000000000000000000","WaitSource":"String","MonitorChime":"String","HasUploadedChime":false,"ChimeUrl":"String","MonitorVolume":0,"MonitorAnnounce":false,"MonitorAnnounceTemplate":"String","MonitorVoice":"String","MonitorVoiceRate":0,"MonitorRepeatAfterSec":0,"MonitorTicketOnly":false,"LobbyZoneMode":"String","LobbyTakeoverEveryMin":0,"LobbyTakeoverSec":0,"LobbyIdleScreen":false,"TimeZone":"String"},"Chimes":[{"Key":"String","Label":"String","Url":"String"}]}