| Required roles: | Administrator, Administrator | Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator |
| PUT,DELETE,OPTIONS | /v1/SlotDistrict/{ID} | ||
|---|---|---|---|
| POST,OPTIONS | /v1/SlotDistrict |
<?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 SchoolAgent implements JsonSerializable
{
public function __construct(
/** @var int */
public int $AgentId=0,
/** @var string|null */
public ?string $AgentName=null,
/** @var int */
public int $SlotDistrictApprovalID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
if (isset($o['AgentName'])) $this->AgentName = $o['AgentName'];
if (isset($o['SlotDistrictApprovalID'])) $this->SlotDistrictApprovalID = $o['SlotDistrictApprovalID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
if (isset($this->AgentName)) $o['AgentName'] = $this->AgentName;
if (isset($this->SlotDistrictApprovalID)) $o['SlotDistrictApprovalID'] = $this->SlotDistrictApprovalID;
return empty($o) ? new class(){} : $o;
}
}
class SlotDistrictSchool implements JsonSerializable
{
public function __construct(
/** @var int */
public int $SchoolId=0,
/** @var string|null */
public ?string $SchoolName=null,
/** @var array<SchoolAgent>|null */
public ?array $AgentList=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SchoolId'])) $this->SchoolId = $o['SchoolId'];
if (isset($o['SchoolName'])) $this->SchoolName = $o['SchoolName'];
if (isset($o['AgentList'])) $this->AgentList = JsonConverters::fromArray('SchoolAgent', $o['AgentList']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SchoolId)) $o['SchoolId'] = $this->SchoolId;
if (isset($this->SchoolName)) $o['SchoolName'] = $this->SchoolName;
if (isset($this->AgentList)) $o['AgentList'] = JsonConverters::toArray('SchoolAgent', $this->AgentList);
return empty($o) ? new class(){} : $o;
}
}
class SlotDistrict implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ID=0,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $County=null,
/** @var int */
public int $DistrictId=0,
/** @var string|null */
public ?string $DistrictName=null,
/** @var string|null */
public ?string $Address_Physical=null,
/** @var string|null */
public ?string $Address_Mailing=null,
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $Zip=null,
/** @var string|null */
public ?string $Zip_4=null,
/** @var int */
public int $StateId=0,
/** @var string|null */
public ?string $State=null,
/** @var string|null */
public ?string $Phone=null,
/** @var float|null */
public ?float $NumEmployees=null,
/** @var int|null */
public ?int $NumSchools=null,
/** @var string|null */
public ?string $Type=null,
/** @var bool|null */
public ?bool $Status_NLG=null,
/** @var bool|null */
public ?bool $Status_Midland=null,
/** @var bool|null */
public ?bool $Status_Great_American=null,
/** @var bool|null */
public ?bool $Status_VOYA=null,
/** @var int|null */
public ?int $MVP=null,
/** @var int|null */
public ?int $RVP=null,
/** @var array<SlotDistrictSchool>|null */
public ?array $Schools=null,
/** @var float|null */
public ?float $MilesAway=null,
/** @var bool|null */
public ?bool $HasComments=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['County'])) $this->County = $o['County'];
if (isset($o['DistrictId'])) $this->DistrictId = $o['DistrictId'];
if (isset($o['DistrictName'])) $this->DistrictName = $o['DistrictName'];
if (isset($o['Address_Physical'])) $this->Address_Physical = $o['Address_Physical'];
if (isset($o['Address_Mailing'])) $this->Address_Mailing = $o['Address_Mailing'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['Zip'])) $this->Zip = $o['Zip'];
if (isset($o['Zip_4'])) $this->Zip_4 = $o['Zip_4'];
if (isset($o['StateId'])) $this->StateId = $o['StateId'];
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['NumEmployees'])) $this->NumEmployees = $o['NumEmployees'];
if (isset($o['NumSchools'])) $this->NumSchools = $o['NumSchools'];
if (isset($o['Type'])) $this->Type = $o['Type'];
if (isset($o['Status_NLG'])) $this->Status_NLG = $o['Status_NLG'];
if (isset($o['Status_Midland'])) $this->Status_Midland = $o['Status_Midland'];
if (isset($o['Status_Great_American'])) $this->Status_Great_American = $o['Status_Great_American'];
if (isset($o['Status_VOYA'])) $this->Status_VOYA = $o['Status_VOYA'];
if (isset($o['MVP'])) $this->MVP = $o['MVP'];
if (isset($o['RVP'])) $this->RVP = $o['RVP'];
if (isset($o['Schools'])) $this->Schools = JsonConverters::fromArray('SlotDistrictSchool', $o['Schools']);
if (isset($o['MilesAway'])) $this->MilesAway = $o['MilesAway'];
if (isset($o['HasComments'])) $this->HasComments = $o['HasComments'];
}
/** @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->County)) $o['County'] = $this->County;
if (isset($this->DistrictId)) $o['DistrictId'] = $this->DistrictId;
if (isset($this->DistrictName)) $o['DistrictName'] = $this->DistrictName;
if (isset($this->Address_Physical)) $o['Address_Physical'] = $this->Address_Physical;
if (isset($this->Address_Mailing)) $o['Address_Mailing'] = $this->Address_Mailing;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->Zip)) $o['Zip'] = $this->Zip;
if (isset($this->Zip_4)) $o['Zip_4'] = $this->Zip_4;
if (isset($this->StateId)) $o['StateId'] = $this->StateId;
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->NumEmployees)) $o['NumEmployees'] = $this->NumEmployees;
if (isset($this->NumSchools)) $o['NumSchools'] = $this->NumSchools;
if (isset($this->Type)) $o['Type'] = $this->Type;
if (isset($this->Status_NLG)) $o['Status_NLG'] = $this->Status_NLG;
if (isset($this->Status_Midland)) $o['Status_Midland'] = $this->Status_Midland;
if (isset($this->Status_Great_American)) $o['Status_Great_American'] = $this->Status_Great_American;
if (isset($this->Status_VOYA)) $o['Status_VOYA'] = $this->Status_VOYA;
if (isset($this->MVP)) $o['MVP'] = $this->MVP;
if (isset($this->RVP)) $o['RVP'] = $this->RVP;
if (isset($this->Schools)) $o['Schools'] = JsonConverters::toArray('SlotDistrictSchool', $this->Schools);
if (isset($this->MilesAway)) $o['MilesAway'] = $this->MilesAway;
if (isset($this->HasComments)) $o['HasComments'] = $this->HasComments;
return empty($o) ? new class(){} : $o;
}
}
class SlotDistrictResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<SlotDistrict>|null */
public ?array $SlotDistrict=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['SlotDistrict'])) $this->SlotDistrict = JsonConverters::fromArray('SlotDistrict', $o['SlotDistrict']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->SlotDistrict)) $o['SlotDistrict'] = JsonConverters::toArray('SlotDistrict', $this->SlotDistrict);
return empty($o) ? new class(){} : $o;
}
}
class SlotDistrictRequest implements JsonSerializable
{
public function __construct(
/** @var SlotDistrict|null */
public ?SlotDistrict $SlotDistrict=null,
/** @var int */
public int $ID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SlotDistrict'])) $this->SlotDistrict = JsonConverters::from('SlotDistrict', $o['SlotDistrict']);
if (isset($o['ID'])) $this->ID = $o['ID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SlotDistrict)) $o['SlotDistrict'] = JsonConverters::to('SlotDistrict', $this->SlotDistrict);
if (isset($this->ID)) $o['ID'] = $this->ID;
return empty($o) ? new class(){} : $o;
}
}
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.
POST /v1/SlotDistrict HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"SlotDistrict":{"ID":0,"Name":"String","County":"String","DistrictId":0,"DistrictName":"String","Address_Physical":"String","Address_Mailing":"String","City":"String","Zip":"String","Zip_4":"String","StateId":0,"State":"String","Phone":"String","NumEmployees":0,"NumSchools":0,"Type":"String","Status_NLG":false,"Status_Midland":false,"Status_Great_American":false,"Status_VOYA":false,"MVP":0,"RVP":0,"Schools":[{"SchoolId":0,"SchoolName":"String","AgentList":[{"AgentId":0,"AgentName":"String","SlotDistrictApprovalID":0}]}],"MilesAway":0,"HasComments":false},"ID":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"SlotDistrict":[{"ID":0,"Name":"String","County":"String","DistrictId":0,"DistrictName":"String","Address_Physical":"String","Address_Mailing":"String","City":"String","Zip":"String","Zip_4":"String","StateId":0,"State":"String","Phone":"String","NumEmployees":0,"NumSchools":0,"Type":"String","Status_NLG":false,"Status_Midland":false,"Status_Great_American":false,"Status_VOYA":false,"MVP":0,"RVP":0,"Schools":[{"SchoolId":0,"SchoolName":"String","AgentList":[{"AgentId":0,"AgentName":"String","SlotDistrictApprovalID":0}]}],"MilesAway":0,"HasComments":false}]}