| GET,OPTIONS | /v1/me/terminology |
|---|
<?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 GetMyTerminologyRequest implements IGet, JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
class TenantPlanModule implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Status=null,
/** @var DateTime|null */
public ?DateTime $ExpiresAt=null,
/** @var string|null */
public ?string $MeterKey=null,
/** @var int|null */
public ?int $Used=null,
/** @var int|null */
public ?int $Allowance=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['ExpiresAt'])) $this->ExpiresAt = JsonConverters::from('DateTime', $o['ExpiresAt']);
if (isset($o['MeterKey'])) $this->MeterKey = $o['MeterKey'];
if (isset($o['Used'])) $this->Used = $o['Used'];
if (isset($o['Allowance'])) $this->Allowance = $o['Allowance'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->ExpiresAt)) $o['ExpiresAt'] = JsonConverters::to('DateTime', $this->ExpiresAt);
if (isset($this->MeterKey)) $o['MeterKey'] = $this->MeterKey;
if (isset($this->Used)) $o['Used'] = $this->Used;
if (isset($this->Allowance)) $o['Allowance'] = $this->Allowance;
return empty($o) ? new class(){} : $o;
}
}
class GetMyTerminologyResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $PackCode=null,
/** @var array<string,string>|null */
public ?array $Terms=null,
/** @var array<string,bool>|null */
public ?array $Features=null,
/** @var array<string>|null */
public ?array $OutOfPack=null,
/** @var bool|null */
public ?bool $WorkspaceSetupCompleted=null,
/** @var array<string,bool>|null */
public ?array $Entitled=null,
/** @var array<string,string>|null */
public ?array $Reasons=null,
/** @var array<string,bool>|null */
public ?array $Chosen=null,
/** @var array<string,string>|null */
public ?array $FeatureModules=null,
/** @var array<string,TenantPlanModule>|null */
public ?array $Modules=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PackCode'])) $this->PackCode = $o['PackCode'];
if (isset($o['Terms'])) $this->Terms = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Terms']);
if (isset($o['Features'])) $this->Features = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $o['Features']);
if (isset($o['OutOfPack'])) $this->OutOfPack = JsonConverters::fromArray('string', $o['OutOfPack']);
if (isset($o['WorkspaceSetupCompleted'])) $this->WorkspaceSetupCompleted = $o['WorkspaceSetupCompleted'];
if (isset($o['Entitled'])) $this->Entitled = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $o['Entitled']);
if (isset($o['Reasons'])) $this->Reasons = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Reasons']);
if (isset($o['Chosen'])) $this->Chosen = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $o['Chosen']);
if (isset($o['FeatureModules'])) $this->FeatureModules = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['FeatureModules']);
if (isset($o['Modules'])) $this->Modules = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','TenantPlanModule']), $o['Modules']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PackCode)) $o['PackCode'] = $this->PackCode;
if (isset($this->Terms)) $o['Terms'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Terms);
if (isset($this->Features)) $o['Features'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $this->Features);
if (isset($this->OutOfPack)) $o['OutOfPack'] = JsonConverters::toArray('string', $this->OutOfPack);
if (isset($this->WorkspaceSetupCompleted)) $o['WorkspaceSetupCompleted'] = $this->WorkspaceSetupCompleted;
if (isset($this->Entitled)) $o['Entitled'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $this->Entitled);
if (isset($this->Reasons)) $o['Reasons'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Reasons);
if (isset($this->Chosen)) $o['Chosen'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $this->Chosen);
if (isset($this->FeatureModules)) $o['FeatureModules'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->FeatureModules);
if (isset($this->Modules)) $o['Modules'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','TenantPlanModule']), $this->Modules);
return empty($o) ? new class(){} : $o;
}
}
PHP GetMyTerminologyRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/me/terminology HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"PackCode":"String","Terms":{"String":"String"},"Features":{"String":false},"OutOfPack":["String"],"WorkspaceSetupCompleted":false,"Entitled":{"String":false},"Reasons":{"String":"String"},"Chosen":{"String":false},"FeatureModules":{"String":"String"},"Modules":{"String":{"Name":"String","Status":"String","ExpiresAt":"0001-01-01T00:00:00.0000000","MeterKey":"String","Used":0,"Allowance":0}}}