| GET,OPTIONS | /v1/lobby/branches |
|---|
<?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 LobbyBranch implements JsonSerializable
{
public function __construct(
/** @var string */
public string $BranchId='',
/** @var string|null */
public ?string $Name=null,
/** @var bool|null */
public ?bool $Allowed=null,
/** @var int */
public int $TvCount=0,
/** @var string|null */
public ?string $ZoneMode=null,
/** @var int|null */
public ?int $TakeoverEveryMin=null,
/** @var int|null */
public ?int $TakeoverSec=null,
/** @var string|null */
public ?string $Density=null,
/** @var string|null */
public ?string $IdleMode=null,
/** @var int|null */
public ?int $IdleContentId=null,
/** @var bool|null */
public ?bool $ShowServices=null,
/** @var string|null */
public ?string $TimeZone=null,
/** @var string|null */
public ?string $BookingSlug=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BranchId'])) $this->BranchId = $o['BranchId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Allowed'])) $this->Allowed = $o['Allowed'];
if (isset($o['TvCount'])) $this->TvCount = $o['TvCount'];
if (isset($o['ZoneMode'])) $this->ZoneMode = $o['ZoneMode'];
if (isset($o['TakeoverEveryMin'])) $this->TakeoverEveryMin = $o['TakeoverEveryMin'];
if (isset($o['TakeoverSec'])) $this->TakeoverSec = $o['TakeoverSec'];
if (isset($o['Density'])) $this->Density = $o['Density'];
if (isset($o['IdleMode'])) $this->IdleMode = $o['IdleMode'];
if (isset($o['IdleContentId'])) $this->IdleContentId = $o['IdleContentId'];
if (isset($o['ShowServices'])) $this->ShowServices = $o['ShowServices'];
if (isset($o['TimeZone'])) $this->TimeZone = $o['TimeZone'];
if (isset($o['BookingSlug'])) $this->BookingSlug = $o['BookingSlug'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BranchId)) $o['BranchId'] = $this->BranchId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Allowed)) $o['Allowed'] = $this->Allowed;
if (isset($this->TvCount)) $o['TvCount'] = $this->TvCount;
if (isset($this->ZoneMode)) $o['ZoneMode'] = $this->ZoneMode;
if (isset($this->TakeoverEveryMin)) $o['TakeoverEveryMin'] = $this->TakeoverEveryMin;
if (isset($this->TakeoverSec)) $o['TakeoverSec'] = $this->TakeoverSec;
if (isset($this->Density)) $o['Density'] = $this->Density;
if (isset($this->IdleMode)) $o['IdleMode'] = $this->IdleMode;
if (isset($this->IdleContentId)) $o['IdleContentId'] = $this->IdleContentId;
if (isset($this->ShowServices)) $o['ShowServices'] = $this->ShowServices;
if (isset($this->TimeZone)) $o['TimeZone'] = $this->TimeZone;
if (isset($this->BookingSlug)) $o['BookingSlug'] = $this->BookingSlug;
return empty($o) ? new class(){} : $o;
}
}
class LobbyPolicy implements JsonSerializable
{
public function __construct(
/** @var array<string>|null */
public ?array $ImageExtensions=null,
/** @var int */
public int $MaxImageBytes=0,
/** @var int */
public int $MaxVideoBytes=0,
/** @var int */
public int $MaxVideoSec=0,
/** @var int */
public int $TitleMax=0,
/** @var int */
public int $HeadlineMax=0,
/** @var int */
public int $BodyMax=0,
/** @var int */
public int $CaptionMax=0,
/** @var int */
public int $DwellMin=0,
/** @var int */
public int $DwellMax=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ImageExtensions'])) $this->ImageExtensions = JsonConverters::fromArray('string', $o['ImageExtensions']);
if (isset($o['MaxImageBytes'])) $this->MaxImageBytes = $o['MaxImageBytes'];
if (isset($o['MaxVideoBytes'])) $this->MaxVideoBytes = $o['MaxVideoBytes'];
if (isset($o['MaxVideoSec'])) $this->MaxVideoSec = $o['MaxVideoSec'];
if (isset($o['TitleMax'])) $this->TitleMax = $o['TitleMax'];
if (isset($o['HeadlineMax'])) $this->HeadlineMax = $o['HeadlineMax'];
if (isset($o['BodyMax'])) $this->BodyMax = $o['BodyMax'];
if (isset($o['CaptionMax'])) $this->CaptionMax = $o['CaptionMax'];
if (isset($o['DwellMin'])) $this->DwellMin = $o['DwellMin'];
if (isset($o['DwellMax'])) $this->DwellMax = $o['DwellMax'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ImageExtensions)) $o['ImageExtensions'] = JsonConverters::toArray('string', $this->ImageExtensions);
if (isset($this->MaxImageBytes)) $o['MaxImageBytes'] = $this->MaxImageBytes;
if (isset($this->MaxVideoBytes)) $o['MaxVideoBytes'] = $this->MaxVideoBytes;
if (isset($this->MaxVideoSec)) $o['MaxVideoSec'] = $this->MaxVideoSec;
if (isset($this->TitleMax)) $o['TitleMax'] = $this->TitleMax;
if (isset($this->HeadlineMax)) $o['HeadlineMax'] = $this->HeadlineMax;
if (isset($this->BodyMax)) $o['BodyMax'] = $this->BodyMax;
if (isset($this->CaptionMax)) $o['CaptionMax'] = $this->CaptionMax;
if (isset($this->DwellMin)) $o['DwellMin'] = $this->DwellMin;
if (isset($this->DwellMax)) $o['DwellMax'] = $this->DwellMax;
return empty($o) ? new class(){} : $o;
}
}
class LobbyBranchesResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<LobbyBranch>|null */
public ?array $Branches=null,
/** @var LobbyPolicy|null */
public ?LobbyPolicy $Policy=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Branches'])) $this->Branches = JsonConverters::fromArray('LobbyBranch', $o['Branches']);
if (isset($o['Policy'])) $this->Policy = JsonConverters::from('LobbyPolicy', $o['Policy']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Branches)) $o['Branches'] = JsonConverters::toArray('LobbyBranch', $this->Branches);
if (isset($this->Policy)) $o['Policy'] = JsonConverters::to('LobbyPolicy', $this->Policy);
return empty($o) ? new class(){} : $o;
}
}
class LobbyBranchesRequest implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/lobby/branches HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
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"}},"Branches":[{"BranchId":"00000000000000000000000000000000","Name":"String","Allowed":false,"TvCount":0,"ZoneMode":"String","TakeoverEveryMin":0,"TakeoverSec":0,"Density":"String","IdleMode":"String","IdleContentId":0,"ShowServices":false,"TimeZone":"String","BookingSlug":"String"}],"Policy":{"ImageExtensions":["String"],"MaxImageBytes":0,"MaxVideoBytes":0,"MaxVideoSec":0,"TitleMax":0,"HeadlineMax":0,"BodyMax":0,"CaptionMax":0,"DwellMin":0,"DwellMax":0}}