| GET,OPTIONS | /v1/engine/errors |
|---|
<?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 WorkflowErrorGroupView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ErrorGroupId=0,
/** @var int */
public int $WorkflowId=0,
/** @var string|null */
public ?string $WorkflowName=null,
/** @var string|null */
public ?string $NodeId=null,
/** @var string|null */
public ?string $Kind=null,
/** @var string|null */
public ?string $Message=null,
/** @var string|null */
public ?string $FixText=null,
/** @var int */
public int $Count=0,
/** @var DateTime */
public DateTime $FirstSeen=new DateTime(),
/** @var DateTime */
public DateTime $LastSeen=new DateTime(),
/** @var string|null */
public ?string $Status=null,
/** @var array<string>|null */
public ?array $Records=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ErrorGroupId'])) $this->ErrorGroupId = $o['ErrorGroupId'];
if (isset($o['WorkflowId'])) $this->WorkflowId = $o['WorkflowId'];
if (isset($o['WorkflowName'])) $this->WorkflowName = $o['WorkflowName'];
if (isset($o['NodeId'])) $this->NodeId = $o['NodeId'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['FixText'])) $this->FixText = $o['FixText'];
if (isset($o['Count'])) $this->Count = $o['Count'];
if (isset($o['FirstSeen'])) $this->FirstSeen = JsonConverters::from('DateTime', $o['FirstSeen']);
if (isset($o['LastSeen'])) $this->LastSeen = JsonConverters::from('DateTime', $o['LastSeen']);
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Records'])) $this->Records = JsonConverters::fromArray('string', $o['Records']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ErrorGroupId)) $o['ErrorGroupId'] = $this->ErrorGroupId;
if (isset($this->WorkflowId)) $o['WorkflowId'] = $this->WorkflowId;
if (isset($this->WorkflowName)) $o['WorkflowName'] = $this->WorkflowName;
if (isset($this->NodeId)) $o['NodeId'] = $this->NodeId;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->FixText)) $o['FixText'] = $this->FixText;
if (isset($this->Count)) $o['Count'] = $this->Count;
if (isset($this->FirstSeen)) $o['FirstSeen'] = JsonConverters::to('DateTime', $this->FirstSeen);
if (isset($this->LastSeen)) $o['LastSeen'] = JsonConverters::to('DateTime', $this->LastSeen);
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Records)) $o['Records'] = JsonConverters::toArray('string', $this->Records);
return empty($o) ? new class(){} : $o;
}
}
class EngineErrorsResponse implements JsonSerializable
{
public function __construct(
/** @var array<WorkflowErrorGroupView>|null */
public ?array $Errors=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Errors'])) $this->Errors = JsonConverters::fromArray('WorkflowErrorGroupView', $o['Errors']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Errors)) $o['Errors'] = JsonConverters::toArray('WorkflowErrorGroupView', $this->Errors);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class EngineErrorsRequest implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/engine/errors HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Errors":[{"ErrorGroupId":0,"WorkflowId":0,"WorkflowName":"String","NodeId":"String","Kind":"String","Message":"String","FixText":"String","Count":0,"FirstSeen":"0001-01-01T00:00:00.0000000","LastSeen":"0001-01-01T00:00:00.0000000","Status":"String","Records":["String"]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}