Trendsic Platform Service

<back to all web services

IntegrationsProvidersRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/integrations/providers
<?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 ProviderView implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Key=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Category=null,
        /** @var string|null */
        public ?string $Blurb=null,
        /** @var string|null */
        public ?string $Mono=null,
        /** @var string|null */
        public ?string $AuthMode=null,
        /** @var bool|null */
        public ?bool $Available=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var string|null */
        public ?string $Health=null,
        /** @var string|null */
        public ?string $StatusDetail=null,
        /** @var string|null */
        public ?string $AccountLabel=null,
        /** @var string|null */
        public ?string $Environment=null,
        /** @var DateTime|null */
        public ?DateTime $LastActivityAt=null,
        /** @var string|null */
        public ?string $ManageRoute=null,
        /** @var array<string>|null */
        public ?array $Actions=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Key'])) $this->Key = $o['Key'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Category'])) $this->Category = $o['Category'];
        if (isset($o['Blurb'])) $this->Blurb = $o['Blurb'];
        if (isset($o['Mono'])) $this->Mono = $o['Mono'];
        if (isset($o['AuthMode'])) $this->AuthMode = $o['AuthMode'];
        if (isset($o['Available'])) $this->Available = $o['Available'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['Health'])) $this->Health = $o['Health'];
        if (isset($o['StatusDetail'])) $this->StatusDetail = $o['StatusDetail'];
        if (isset($o['AccountLabel'])) $this->AccountLabel = $o['AccountLabel'];
        if (isset($o['Environment'])) $this->Environment = $o['Environment'];
        if (isset($o['LastActivityAt'])) $this->LastActivityAt = JsonConverters::from('DateTime', $o['LastActivityAt']);
        if (isset($o['ManageRoute'])) $this->ManageRoute = $o['ManageRoute'];
        if (isset($o['Actions'])) $this->Actions = JsonConverters::fromArray('string', $o['Actions']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Key)) $o['Key'] = $this->Key;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Category)) $o['Category'] = $this->Category;
        if (isset($this->Blurb)) $o['Blurb'] = $this->Blurb;
        if (isset($this->Mono)) $o['Mono'] = $this->Mono;
        if (isset($this->AuthMode)) $o['AuthMode'] = $this->AuthMode;
        if (isset($this->Available)) $o['Available'] = $this->Available;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->Health)) $o['Health'] = $this->Health;
        if (isset($this->StatusDetail)) $o['StatusDetail'] = $this->StatusDetail;
        if (isset($this->AccountLabel)) $o['AccountLabel'] = $this->AccountLabel;
        if (isset($this->Environment)) $o['Environment'] = $this->Environment;
        if (isset($this->LastActivityAt)) $o['LastActivityAt'] = JsonConverters::to('DateTime', $this->LastActivityAt);
        if (isset($this->ManageRoute)) $o['ManageRoute'] = $this->ManageRoute;
        if (isset($this->Actions)) $o['Actions'] = JsonConverters::toArray('string', $this->Actions);
        return empty($o) ? new class(){} : $o;
    }
}

class IntegrationsProvidersResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<ProviderView>|null */
        public ?array $Providers=null,
        /** @var int */
        public int $ConnectedCount=0,
        /** @var int */
        public int $NeedsAttentionCount=0,
        /** @var int */
        public int $AvailableCount=0,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

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

PHP IntegrationsProvidersRequest 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/integrations/providers HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Providers: 
	[
		{
			Key: String,
			Name: String,
			Category: String,
			Blurb: String,
			Mono: String,
			AuthMode: String,
			Available: False,
			Status: String,
			Health: String,
			StatusDetail: String,
			AccountLabel: String,
			Environment: String,
			LastActivityAt: 0001-01-01,
			ManageRoute: String,
			Actions: 
			[
				String
			]
		}
	],
	ConnectedCount: 0,
	NeedsAttentionCount: 0,
	AvailableCount: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}