| POST | /api/processes/registrationform |
|---|
<?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 UserOrGroup implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ID=0,
/** @var string|null */
public ?string $Title=null,
/** @var bool|null */
public ?bool $IsChecked=null,
/** @var string|null */
public ?string $Image=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ID'])) $this->ID = $o['ID'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['IsChecked'])) $this->IsChecked = $o['IsChecked'];
if (isset($o['Image'])) $this->Image = $o['Image'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ID)) $o['ID'] = $this->ID;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->IsChecked)) $o['IsChecked'] = $this->IsChecked;
if (isset($this->Image)) $o['Image'] = $this->Image;
return empty($o) ? new class(){} : $o;
}
}
class User extends UserOrGroup implements JsonSerializable
{
/**
* @param int $ID
* @param string|null $Title
* @param bool|null $IsChecked
* @param string|null $Image
*/
public function __construct(
int $ID=0,
?string $Title=null,
?bool $IsChecked=null,
?string $Image=null
) {
parent::__construct($ID,$Title,$IsChecked,$Image);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Image'])) $this->Image = $o['Image'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Image)) $o['Image'] = $this->Image;
return empty($o) ? new class(){} : $o;
}
}
class Group extends UserOrGroup implements JsonSerializable
{
/**
* @param int $ID
* @param string|null $Title
* @param bool|null $IsChecked
* @param string|null $Image
*/
public function __construct(
int $ID=0,
?string $Title=null,
?bool $IsChecked=null,
?string $Image=null
) {
parent::__construct($ID,$Title,$IsChecked,$Image);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Image'])) $this->Image = $o['Image'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Image)) $o['Image'] = $this->Image;
return empty($o) ? new class(){} : $o;
}
}
class WorkflowTaskDelay implements JsonSerializable
{
public function __construct(
/** @var DateTime|null */
public ?DateTime $DelayDate=null,
/** @var string|null */
public ?string $Reason=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DelayDate'])) $this->DelayDate = JsonConverters::from('DateTime', $o['DelayDate']);
if (isset($o['Reason'])) $this->Reason = $o['Reason'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DelayDate)) $o['DelayDate'] = JsonConverters::to('DateTime', $this->DelayDate);
if (isset($this->Reason)) $o['Reason'] = $this->Reason;
return empty($o) ? new class(){} : $o;
}
}
class WorkflowTaskReason implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Reason=null,
/** @var bool|null */
public ?bool $Required=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Reason'])) $this->Reason = $o['Reason'];
if (isset($o['Required'])) $this->Required = $o['Required'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Reason)) $o['Reason'] = $this->Reason;
if (isset($this->Required)) $o['Required'] = $this->Required;
return empty($o) ? new class(){} : $o;
}
}
class WorkflowTaskAdhocTransition implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ID='',
/** @var string|null */
public ?string $Title=null,
/** @var bool|null */
public ?bool $AssignmentAllowed=null,
/** @var bool|null */
public ?bool $AssignmentRequired=null,
/** @var int */
public int $UserEnvironment=0,
/** @var array<User>|null */
public ?array $Users=null,
/** @var array<Group>|null */
public ?array $Groups=null,
/** @var WorkflowTaskDelay|null */
public ?WorkflowTaskDelay $Delay=null,
/** @var WorkflowTaskReason|null */
public ?WorkflowTaskReason $Reason=null,
/** @var array<UserOrGroup>|null */
public ?array $UsersOrGroups=null,
/** @var string|null */
public ?string $Value=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ID'])) $this->ID = $o['ID'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['AssignmentAllowed'])) $this->AssignmentAllowed = $o['AssignmentAllowed'];
if (isset($o['AssignmentRequired'])) $this->AssignmentRequired = $o['AssignmentRequired'];
if (isset($o['UserEnvironment'])) $this->UserEnvironment = $o['UserEnvironment'];
if (isset($o['Users'])) $this->Users = JsonConverters::fromArray('User', $o['Users']);
if (isset($o['Groups'])) $this->Groups = JsonConverters::fromArray('Group', $o['Groups']);
if (isset($o['Delay'])) $this->Delay = JsonConverters::from('WorkflowTaskDelay', $o['Delay']);
if (isset($o['Reason'])) $this->Reason = JsonConverters::from('WorkflowTaskReason', $o['Reason']);
if (isset($o['UsersOrGroups'])) $this->UsersOrGroups = JsonConverters::fromArray('UserOrGroup', $o['UsersOrGroups']);
if (isset($o['Value'])) $this->Value = $o['Value'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ID)) $o['ID'] = $this->ID;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->AssignmentAllowed)) $o['AssignmentAllowed'] = $this->AssignmentAllowed;
if (isset($this->AssignmentRequired)) $o['AssignmentRequired'] = $this->AssignmentRequired;
if (isset($this->UserEnvironment)) $o['UserEnvironment'] = $this->UserEnvironment;
if (isset($this->Users)) $o['Users'] = JsonConverters::toArray('User', $this->Users);
if (isset($this->Groups)) $o['Groups'] = JsonConverters::toArray('Group', $this->Groups);
if (isset($this->Delay)) $o['Delay'] = JsonConverters::to('WorkflowTaskDelay', $this->Delay);
if (isset($this->Reason)) $o['Reason'] = JsonConverters::to('WorkflowTaskReason', $this->Reason);
if (isset($this->UsersOrGroups)) $o['UsersOrGroups'] = JsonConverters::toArray('UserOrGroup', $this->UsersOrGroups);
if (isset($this->Value)) $o['Value'] = $this->Value;
return empty($o) ? new class(){} : $o;
}
}
class AdhocTransitionDetails implements JsonSerializable
{
public function __construct(
/** @var array<WorkflowTaskAdhocTransition>|null */
public ?array $AdhocTransitions=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AdhocTransitions'])) $this->AdhocTransitions = JsonConverters::fromArray('WorkflowTaskAdhocTransition', $o['AdhocTransitions']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AdhocTransitions)) $o['AdhocTransitions'] = JsonConverters::toArray('WorkflowTaskAdhocTransition', $this->AdhocTransitions);
return empty($o) ? new class(){} : $o;
}
}
class WorkflowTaskActionComment implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Comment=null,
/** @var bool|null */
public ?bool $Required=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Comment'])) $this->Comment = $o['Comment'];
if (isset($o['Required'])) $this->Required = $o['Required'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Comment)) $o['Comment'] = $this->Comment;
if (isset($this->Required)) $o['Required'] = $this->Required;
return empty($o) ? new class(){} : $o;
}
}
class SideStepDetails extends AdhocTransitionDetails implements JsonSerializable
{
/**
* @param array<WorkflowTaskAdhocTransition>|null $AdhocTransitions
*/
public function __construct(
?array $AdhocTransitions=null,
/** @var User|null */
public ?User $Coordinator=null,
/** @var WorkflowTaskActionComment|null */
public ?WorkflowTaskActionComment $Comment=null,
/** @var bool|null */
public ?bool $Urgent=null
) {
parent::__construct($AdhocTransitions);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Coordinator'])) $this->Coordinator = JsonConverters::from('User', $o['Coordinator']);
if (isset($o['Comment'])) $this->Comment = JsonConverters::from('WorkflowTaskActionComment', $o['Comment']);
if (isset($o['Urgent'])) $this->Urgent = $o['Urgent'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Coordinator)) $o['Coordinator'] = JsonConverters::to('User', $this->Coordinator);
if (isset($this->Comment)) $o['Comment'] = JsonConverters::to('WorkflowTaskActionComment', $this->Comment);
if (isset($this->Urgent)) $o['Urgent'] = $this->Urgent;
return empty($o) ? new class(){} : $o;
}
}
class ProcessDetails extends SideStepDetails implements JsonSerializable
{
/**
* @param array<WorkflowTaskAdhocTransition>|null $AdhocTransitions
* @param User|null $Coordinator
* @param WorkflowTaskActionComment|null $Comment
* @param bool|null $Urgent
*/
public function __construct(
?array $AdhocTransitions=null,
?User $Coordinator=null,
?WorkflowTaskActionComment $Comment=null,
?bool $Urgent=null,
/** @var bool|null */
public ?bool $ShowCoordinatorField=null
) {
parent::__construct($AdhocTransitions,$Coordinator,$Comment,$Urgent);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['ShowCoordinatorField'])) $this->ShowCoordinatorField = $o['ShowCoordinatorField'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->ShowCoordinatorField)) $o['ShowCoordinatorField'] = $this->ShowCoordinatorField;
return empty($o) ? new class(){} : $o;
}
}
class RegistrationProfileFieldValue implements JsonSerializable
{
public function __construct(
/** @var string */
public string $DocumentFieldID='',
/** @var string|null */
public ?string $Value=null,
/** @var string|null */
public ?string $ShadowValue=null,
/** @var bool|null */
public ?bool $IsModifiedByUser=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DocumentFieldID'])) $this->DocumentFieldID = $o['DocumentFieldID'];
if (isset($o['Value'])) $this->Value = $o['Value'];
if (isset($o['ShadowValue'])) $this->ShadowValue = $o['ShadowValue'];
if (isset($o['IsModifiedByUser'])) $this->IsModifiedByUser = $o['IsModifiedByUser'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DocumentFieldID)) $o['DocumentFieldID'] = $this->DocumentFieldID;
if (isset($this->Value)) $o['Value'] = $this->Value;
if (isset($this->ShadowValue)) $o['ShadowValue'] = $this->ShadowValue;
if (isset($this->IsModifiedByUser)) $o['IsModifiedByUser'] = $this->IsModifiedByUser;
return empty($o) ? new class(){} : $o;
}
}
class GetProcessDetailsRegistrationForm implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ProcessID=0,
/** @var string */
public string $RegistrationprofileID='',
/** @var string|null */
public ?string $DocumentID=null,
/** @var array<RegistrationProfileFieldValue>|null */
public ?array $CurrentRegistrationprofileFieldValues=null,
/** @var bool|null */
public ?bool $IsOffice365Context=null,
/** @var string|null */
public ?string $PidTag=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProcessID'])) $this->ProcessID = $o['ProcessID'];
if (isset($o['RegistrationprofileID'])) $this->RegistrationprofileID = $o['RegistrationprofileID'];
if (isset($o['DocumentID'])) $this->DocumentID = $o['DocumentID'];
if (isset($o['CurrentRegistrationprofileFieldValues'])) $this->CurrentRegistrationprofileFieldValues = JsonConverters::fromArray('RegistrationProfileFieldValue', $o['CurrentRegistrationprofileFieldValues']);
if (isset($o['IsOffice365Context'])) $this->IsOffice365Context = $o['IsOffice365Context'];
if (isset($o['PidTag'])) $this->PidTag = $o['PidTag'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProcessID)) $o['ProcessID'] = $this->ProcessID;
if (isset($this->RegistrationprofileID)) $o['RegistrationprofileID'] = $this->RegistrationprofileID;
if (isset($this->DocumentID)) $o['DocumentID'] = $this->DocumentID;
if (isset($this->CurrentRegistrationprofileFieldValues)) $o['CurrentRegistrationprofileFieldValues'] = JsonConverters::toArray('RegistrationProfileFieldValue', $this->CurrentRegistrationprofileFieldValues);
if (isset($this->IsOffice365Context)) $o['IsOffice365Context'] = $this->IsOffice365Context;
if (isset($this->PidTag)) $o['PidTag'] = $this->PidTag;
return empty($o) ? new class(){} : $o;
}
}
PHP GetProcessDetailsRegistrationForm DTOs
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.
POST /api/processes/registrationform HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ProcessID":0,"RegistrationprofileID":"00000000-0000-0000-0000-000000000000","DocumentID":"00000000-0000-0000-0000-000000000000","CurrentRegistrationprofileFieldValues":[{"DocumentFieldID":"00000000-0000-0000-0000-000000000000","Value":"String","ShadowValue":"String","IsModifiedByUser":false}],"IsOffice365Context":false,"PidTag":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ShowCoordinatorField":false,"Coordinator":{"Image":"Icons/User","ID":0,"Title":"String","IsChecked":false},"Comment":{"Comment":"String","Required":false},"Urgent":false,"AdhocTransitions":[{"ID":"00000000-0000-0000-0000-000000000000","Title":"String","AssignmentAllowed":false,"AssignmentRequired":false,"UserEnvironment":0,"Users":[{"Image":"Icons/User","ID":0,"Title":"String","IsChecked":false}],"Groups":[{"Image":"Icons/Group","ID":0,"Title":"String","IsChecked":false}],"Delay":{"DelayDate":"0001-01-01T00:00:00.0000000","Reason":"String"},"Reason":{"Reason":"String","Required":false},"UsersOrGroups":[{"__type":"IDB.API.DTO.User, IDB.API.DTO","Image":"Icons/User","ID":0,"Title":"String","IsChecked":false},{"__type":"IDB.API.DTO.Group, IDB.API.DTO","Image":"Icons/Group","ID":0,"Title":"String","IsChecked":false}],"Value":"String\r\nString"}]}