Trendsic Platform Service

<back to all web services

ComplianceSummaryRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/records/compliance/summary
<?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 ComplianceSummaryDto implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Total=0,
        /** @var int */
        public int $Eligible=0,
        /** @var int */
        public int $Held=0,
        /** @var int */
        public int $Unscheduled=0,
        /** @var int */
        public int $PendingTrigger=0,
        /** @var int */
        public int $Running=0,
        /** @var int */
        public int $OverdueCheckouts=0,
        /** @var int */
        public int $OverdueRequests=0,
        /** @var int */
        public int $QaOpen=0,
        /** @var int */
        public int $RequestsOnTime90d=0,
        /** @var int */
        public int $Sessions90d=0,
        /** @var int */
        public int $Certs90d=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Total'])) $this->Total = $o['Total'];
        if (isset($o['Eligible'])) $this->Eligible = $o['Eligible'];
        if (isset($o['Held'])) $this->Held = $o['Held'];
        if (isset($o['Unscheduled'])) $this->Unscheduled = $o['Unscheduled'];
        if (isset($o['PendingTrigger'])) $this->PendingTrigger = $o['PendingTrigger'];
        if (isset($o['Running'])) $this->Running = $o['Running'];
        if (isset($o['OverdueCheckouts'])) $this->OverdueCheckouts = $o['OverdueCheckouts'];
        if (isset($o['OverdueRequests'])) $this->OverdueRequests = $o['OverdueRequests'];
        if (isset($o['QaOpen'])) $this->QaOpen = $o['QaOpen'];
        if (isset($o['RequestsOnTime90d'])) $this->RequestsOnTime90d = $o['RequestsOnTime90d'];
        if (isset($o['Sessions90d'])) $this->Sessions90d = $o['Sessions90d'];
        if (isset($o['Certs90d'])) $this->Certs90d = $o['Certs90d'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Total)) $o['Total'] = $this->Total;
        if (isset($this->Eligible)) $o['Eligible'] = $this->Eligible;
        if (isset($this->Held)) $o['Held'] = $this->Held;
        if (isset($this->Unscheduled)) $o['Unscheduled'] = $this->Unscheduled;
        if (isset($this->PendingTrigger)) $o['PendingTrigger'] = $this->PendingTrigger;
        if (isset($this->Running)) $o['Running'] = $this->Running;
        if (isset($this->OverdueCheckouts)) $o['OverdueCheckouts'] = $this->OverdueCheckouts;
        if (isset($this->OverdueRequests)) $o['OverdueRequests'] = $this->OverdueRequests;
        if (isset($this->QaOpen)) $o['QaOpen'] = $this->QaOpen;
        if (isset($this->RequestsOnTime90d)) $o['RequestsOnTime90d'] = $this->RequestsOnTime90d;
        if (isset($this->Sessions90d)) $o['Sessions90d'] = $this->Sessions90d;
        if (isset($this->Certs90d)) $o['Certs90d'] = $this->Certs90d;
        return empty($o) ? new class(){} : $o;
    }
}

class ComplianceExceptionDto implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Kind=null,
        /** @var int */
        public int $Count=0,
        /** @var string|null */
        public ?string $RefRoute=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['Count'])) $this->Count = $o['Count'];
        if (isset($o['RefRoute'])) $this->RefRoute = $o['RefRoute'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->Count)) $o['Count'] = $this->Count;
        if (isset($this->RefRoute)) $o['RefRoute'] = $this->RefRoute;
        return empty($o) ? new class(){} : $o;
    }
}

class ComplianceSummaryResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var ComplianceSummaryDto|null */
        public ?ComplianceSummaryDto $Summary=null,
        /** @var array<ComplianceExceptionDto>|null */
        public ?array $Exceptions=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
        if (isset($o['Summary'])) $this->Summary = JsonConverters::from('ComplianceSummaryDto', $o['Summary']);
        if (isset($o['Exceptions'])) $this->Exceptions = JsonConverters::fromArray('ComplianceExceptionDto', $o['Exceptions']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        if (isset($this->Summary)) $o['Summary'] = JsonConverters::to('ComplianceSummaryDto', $this->Summary);
        if (isset($this->Exceptions)) $o['Exceptions'] = JsonConverters::toArray('ComplianceExceptionDto', $this->Exceptions);
        return empty($o) ? new class(){} : $o;
    }
}

class ComplianceSummaryRequest implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

PHP ComplianceSummaryRequest DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/records/compliance/summary HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Summary: 
	{
		Total: 0,
		Eligible: 0,
		Held: 0,
		Unscheduled: 0,
		PendingTrigger: 0,
		Running: 0,
		OverdueCheckouts: 0,
		OverdueRequests: 0,
		QaOpen: 0,
		RequestsOnTime90d: 0,
		Sessions90d: 0,
		Certs90d: 0
	},
	Exceptions: 
	[
		{
			Kind: String,
			Count: 0,
			RefRoute: String
		}
	]
}