| All Verbs | /api/quadrant | ||
|---|---|---|---|
| All Verbs | /api/core/quadrant |
<?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 ListItemModel implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ListItemId='',
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $ShortName=null,
/** @var bool|null */
public ?bool $IsDefault=null,
/** @var int */
public int $Order=0,
/** @var string */
public string $ListItemTrafficLightId='',
/** @var string */
public string $PrimaryListItemImageId='',
/** @var string|null */
public ?string $PrimaryListItemImageUrl=null,
/** @var string|null */
public ?string $PrimaryImageThumbnailUrl=null,
/** @var string */
public string $OwnerContactId='',
/** @var string|null */
public ?string $RecordStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ListItemId'])) $this->ListItemId = $o['ListItemId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ShortName'])) $this->ShortName = $o['ShortName'];
if (isset($o['IsDefault'])) $this->IsDefault = $o['IsDefault'];
if (isset($o['Order'])) $this->Order = $o['Order'];
if (isset($o['ListItemTrafficLightId'])) $this->ListItemTrafficLightId = $o['ListItemTrafficLightId'];
if (isset($o['PrimaryListItemImageId'])) $this->PrimaryListItemImageId = $o['PrimaryListItemImageId'];
if (isset($o['PrimaryListItemImageUrl'])) $this->PrimaryListItemImageUrl = $o['PrimaryListItemImageUrl'];
if (isset($o['PrimaryImageThumbnailUrl'])) $this->PrimaryImageThumbnailUrl = $o['PrimaryImageThumbnailUrl'];
if (isset($o['OwnerContactId'])) $this->OwnerContactId = $o['OwnerContactId'];
if (isset($o['RecordStatus'])) $this->RecordStatus = $o['RecordStatus'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ListItemId)) $o['ListItemId'] = $this->ListItemId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ShortName)) $o['ShortName'] = $this->ShortName;
if (isset($this->IsDefault)) $o['IsDefault'] = $this->IsDefault;
if (isset($this->Order)) $o['Order'] = $this->Order;
if (isset($this->ListItemTrafficLightId)) $o['ListItemTrafficLightId'] = $this->ListItemTrafficLightId;
if (isset($this->PrimaryListItemImageId)) $o['PrimaryListItemImageId'] = $this->PrimaryListItemImageId;
if (isset($this->PrimaryListItemImageUrl)) $o['PrimaryListItemImageUrl'] = $this->PrimaryListItemImageUrl;
if (isset($this->PrimaryImageThumbnailUrl)) $o['PrimaryImageThumbnailUrl'] = $this->PrimaryImageThumbnailUrl;
if (isset($this->OwnerContactId)) $o['OwnerContactId'] = $this->OwnerContactId;
if (isset($this->RecordStatus)) $o['RecordStatus'] = $this->RecordStatus;
return empty($o) ? new class(){} : $o;
}
}
class ProfileLicenseeRoleView implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ApplianceId='',
/** @var string|null */
public ?string $ApplianceName=null,
/** @var string */
public string $ProfileId='',
/** @var string|null */
public ?string $ProfileName=null,
/** @var bool|null */
public ?bool $IsDefaultProfile=null,
/** @var string */
public string $ContactId='',
/** @var string|null */
public ?string $ContactName=null,
/** @var string */
public string $ContactTypeId='',
/** @var string */
public string $LicenseeContactRoleConnectionId='',
/** @var string */
public string $UserContactRoleConnectionId='',
/** @var string */
public string $RoleId='',
/** @var string|null */
public ?string $RoleName=null,
/** @var string */
public string $LicenseeContactId='',
/** @var string|null */
public ?string $LicenseeContactName=null,
/** @var int */
public int $RoleOrder=0,
/** @var string|null */
public ?string $ProfileImageUrl=null,
/** @var string|null */
public ?string $ProfileThumbnailImageUrl=null,
/** @var bool|null */
public ?bool $IsLicenseeRole=null,
/** @var bool|null */
public ?bool $IsManageContactsRole=null,
/** @var bool|null */
public ?bool $IsPlatformRole=null,
/** @var bool|null */
public ?bool $IsDefault=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ApplianceId'])) $this->ApplianceId = $o['ApplianceId'];
if (isset($o['ApplianceName'])) $this->ApplianceName = $o['ApplianceName'];
if (isset($o['ProfileId'])) $this->ProfileId = $o['ProfileId'];
if (isset($o['ProfileName'])) $this->ProfileName = $o['ProfileName'];
if (isset($o['IsDefaultProfile'])) $this->IsDefaultProfile = $o['IsDefaultProfile'];
if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
if (isset($o['ContactName'])) $this->ContactName = $o['ContactName'];
if (isset($o['ContactTypeId'])) $this->ContactTypeId = $o['ContactTypeId'];
if (isset($o['LicenseeContactRoleConnectionId'])) $this->LicenseeContactRoleConnectionId = $o['LicenseeContactRoleConnectionId'];
if (isset($o['UserContactRoleConnectionId'])) $this->UserContactRoleConnectionId = $o['UserContactRoleConnectionId'];
if (isset($o['RoleId'])) $this->RoleId = $o['RoleId'];
if (isset($o['RoleName'])) $this->RoleName = $o['RoleName'];
if (isset($o['LicenseeContactId'])) $this->LicenseeContactId = $o['LicenseeContactId'];
if (isset($o['LicenseeContactName'])) $this->LicenseeContactName = $o['LicenseeContactName'];
if (isset($o['RoleOrder'])) $this->RoleOrder = $o['RoleOrder'];
if (isset($o['ProfileImageUrl'])) $this->ProfileImageUrl = $o['ProfileImageUrl'];
if (isset($o['ProfileThumbnailImageUrl'])) $this->ProfileThumbnailImageUrl = $o['ProfileThumbnailImageUrl'];
if (isset($o['IsLicenseeRole'])) $this->IsLicenseeRole = $o['IsLicenseeRole'];
if (isset($o['IsManageContactsRole'])) $this->IsManageContactsRole = $o['IsManageContactsRole'];
if (isset($o['IsPlatformRole'])) $this->IsPlatformRole = $o['IsPlatformRole'];
if (isset($o['IsDefault'])) $this->IsDefault = $o['IsDefault'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ApplianceId)) $o['ApplianceId'] = $this->ApplianceId;
if (isset($this->ApplianceName)) $o['ApplianceName'] = $this->ApplianceName;
if (isset($this->ProfileId)) $o['ProfileId'] = $this->ProfileId;
if (isset($this->ProfileName)) $o['ProfileName'] = $this->ProfileName;
if (isset($this->IsDefaultProfile)) $o['IsDefaultProfile'] = $this->IsDefaultProfile;
if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
if (isset($this->ContactName)) $o['ContactName'] = $this->ContactName;
if (isset($this->ContactTypeId)) $o['ContactTypeId'] = $this->ContactTypeId;
if (isset($this->LicenseeContactRoleConnectionId)) $o['LicenseeContactRoleConnectionId'] = $this->LicenseeContactRoleConnectionId;
if (isset($this->UserContactRoleConnectionId)) $o['UserContactRoleConnectionId'] = $this->UserContactRoleConnectionId;
if (isset($this->RoleId)) $o['RoleId'] = $this->RoleId;
if (isset($this->RoleName)) $o['RoleName'] = $this->RoleName;
if (isset($this->LicenseeContactId)) $o['LicenseeContactId'] = $this->LicenseeContactId;
if (isset($this->LicenseeContactName)) $o['LicenseeContactName'] = $this->LicenseeContactName;
if (isset($this->RoleOrder)) $o['RoleOrder'] = $this->RoleOrder;
if (isset($this->ProfileImageUrl)) $o['ProfileImageUrl'] = $this->ProfileImageUrl;
if (isset($this->ProfileThumbnailImageUrl)) $o['ProfileThumbnailImageUrl'] = $this->ProfileThumbnailImageUrl;
if (isset($this->IsLicenseeRole)) $o['IsLicenseeRole'] = $this->IsLicenseeRole;
if (isset($this->IsManageContactsRole)) $o['IsManageContactsRole'] = $this->IsManageContactsRole;
if (isset($this->IsPlatformRole)) $o['IsPlatformRole'] = $this->IsPlatformRole;
if (isset($this->IsDefault)) $o['IsDefault'] = $this->IsDefault;
return empty($o) ? new class(){} : $o;
}
}
class QuadrantModel implements JsonSerializable
{
public function __construct(
/** @var array<ListItemModel>|null */
public ?array $Appliances=null,
/** @var string */
public string $UserProfileId='',
/** @var string */
public string $RoleConnectionId='',
/** @var string */
public string $LicenseeContactId='',
/** @var string|null */
public ?string $LicenseeContactName=null,
/** @var string */
public string $ApplianceId='',
/** @var string|null */
public ?string $FullName=null,
/** @var string */
public string $ImpersonatingUserProfileId='',
/** @var array<ProfileLicenseeRoleView>|null */
public ?array $Connections=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Appliances'])) $this->Appliances = JsonConverters::fromArray('ListItemModel', $o['Appliances']);
if (isset($o['UserProfileId'])) $this->UserProfileId = $o['UserProfileId'];
if (isset($o['RoleConnectionId'])) $this->RoleConnectionId = $o['RoleConnectionId'];
if (isset($o['LicenseeContactId'])) $this->LicenseeContactId = $o['LicenseeContactId'];
if (isset($o['LicenseeContactName'])) $this->LicenseeContactName = $o['LicenseeContactName'];
if (isset($o['ApplianceId'])) $this->ApplianceId = $o['ApplianceId'];
if (isset($o['FullName'])) $this->FullName = $o['FullName'];
if (isset($o['ImpersonatingUserProfileId'])) $this->ImpersonatingUserProfileId = $o['ImpersonatingUserProfileId'];
if (isset($o['Connections'])) $this->Connections = JsonConverters::fromArray('ProfileLicenseeRoleView', $o['Connections']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Appliances)) $o['Appliances'] = JsonConverters::toArray('ListItemModel', $this->Appliances);
if (isset($this->UserProfileId)) $o['UserProfileId'] = $this->UserProfileId;
if (isset($this->RoleConnectionId)) $o['RoleConnectionId'] = $this->RoleConnectionId;
if (isset($this->LicenseeContactId)) $o['LicenseeContactId'] = $this->LicenseeContactId;
if (isset($this->LicenseeContactName)) $o['LicenseeContactName'] = $this->LicenseeContactName;
if (isset($this->ApplianceId)) $o['ApplianceId'] = $this->ApplianceId;
if (isset($this->FullName)) $o['FullName'] = $this->FullName;
if (isset($this->ImpersonatingUserProfileId)) $o['ImpersonatingUserProfileId'] = $this->ImpersonatingUserProfileId;
if (isset($this->Connections)) $o['Connections'] = JsonConverters::toArray('ProfileLicenseeRoleView', $this->Connections);
return empty($o) ? new class(){} : $o;
}
}
class GetQuadrantResponse implements JsonSerializable
{
public function __construct(
/** @var QuadrantModel|null */
public ?QuadrantModel $Quadrant=null,
/** @var array<string>|null */
public ?array $Permissions=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Quadrant'])) $this->Quadrant = JsonConverters::from('QuadrantModel', $o['Quadrant']);
if (isset($o['Permissions'])) $this->Permissions = JsonConverters::fromArray('Guid', $o['Permissions']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Quadrant)) $o['Quadrant'] = JsonConverters::to('QuadrantModel', $this->Quadrant);
if (isset($this->Permissions)) $o['Permissions'] = JsonConverters::toArray('Guid', $this->Permissions);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
/** @description Get quadrant data for the perspective session id specified in the authentication token */
// @Api(Description="Get quadrant data for the perspective session id specified in the authentication token")
class GetQuadrant implements JsonSerializable
{
public function __construct(
/** @var string */
public string $PerspectiveSessionId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PerspectiveSessionId'])) $this->PerspectiveSessionId = $o['PerspectiveSessionId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PerspectiveSessionId)) $o['PerspectiveSessionId'] = $this->PerspectiveSessionId;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/quadrant HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"PerspectiveSessionId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Quadrant":{"Appliances":[{"ListItemId":"00000000-0000-0000-0000-000000000000","Name":"String","Description":"String","ShortName":"String","IsDefault":false,"Order":0,"ListItemTrafficLightId":"00000000-0000-0000-0000-000000000000","PrimaryListItemImageId":"00000000-0000-0000-0000-000000000000","PrimaryListItemImageUrl":"String","PrimaryImageThumbnailUrl":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000","RecordStatus":"String"}],"UserProfileId":"00000000-0000-0000-0000-000000000000","RoleConnectionId":"00000000-0000-0000-0000-000000000000","LicenseeContactId":"00000000-0000-0000-0000-000000000000","LicenseeContactName":"String","ApplianceId":"00000000-0000-0000-0000-000000000000","FullName":"String","ImpersonatingUserProfileId":"00000000-0000-0000-0000-000000000000","Connections":[{"ApplianceId":"00000000-0000-0000-0000-000000000000","ApplianceName":"String","ProfileId":"00000000-0000-0000-0000-000000000000","ProfileName":"String","IsDefaultProfile":false,"ContactId":"00000000-0000-0000-0000-000000000000","ContactName":"String","ContactTypeId":"00000000-0000-0000-0000-000000000000","LicenseeContactRoleConnectionId":"00000000-0000-0000-0000-000000000000","UserContactRoleConnectionId":"00000000-0000-0000-0000-000000000000","RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String","LicenseeContactId":"00000000-0000-0000-0000-000000000000","LicenseeContactName":"String","RoleOrder":0,"ProfileImageUrl":"String","ProfileThumbnailImageUrl":"String","IsLicenseeRole":false,"IsManageContactsRole":false,"IsPlatformRole":false,"IsDefault":false}]},"Permissions":["00000000-0000-0000-0000-000000000000"],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}