<?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 RegisterDocumentResponse implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $IsSucces=null,
/** @var string */
public string $DocumentId='',
/** @var array<string>|null */
public ?array $ErrorMessages=null,
/** @var string|null */
public ?string $Ooxml=null,
/** @description Is it a corporate identity document? */
// @ApiMember(Description="Is it a corporate identity document?", IsRequired=true)
/** @var bool|null */
public ?bool $IsCorporateIdentity=null,
/** @var array<string,string>|null */
public ?array $DocumentVariables=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['IsSucces'])) $this->IsSucces = $o['IsSucces'];
if (isset($o['DocumentId'])) $this->DocumentId = $o['DocumentId'];
if (isset($o['ErrorMessages'])) $this->ErrorMessages = JsonConverters::fromArray('string', $o['ErrorMessages']);
if (isset($o['Ooxml'])) $this->Ooxml = $o['Ooxml'];
if (isset($o['IsCorporateIdentity'])) $this->IsCorporateIdentity = $o['IsCorporateIdentity'];
if (isset($o['DocumentVariables'])) $this->DocumentVariables = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['DocumentVariables']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->IsSucces)) $o['IsSucces'] = $this->IsSucces;
if (isset($this->DocumentId)) $o['DocumentId'] = $this->DocumentId;
if (isset($this->ErrorMessages)) $o['ErrorMessages'] = JsonConverters::toArray('string', $this->ErrorMessages);
if (isset($this->Ooxml)) $o['Ooxml'] = $this->Ooxml;
if (isset($this->IsCorporateIdentity)) $o['IsCorporateIdentity'] = $this->IsCorporateIdentity;
if (isset($this->DocumentVariables)) $o['DocumentVariables'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->DocumentVariables);
return empty($o) ? new class(){} : $o;
}
}
class RegistrationValue implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Key='',
/** @var string|null */
public ?string $Value=null,
/** @var string|null */
public ?string $ShadowValue=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Key'])) $this->Key = $o['Key'];
if (isset($o['Value'])) $this->Value = $o['Value'];
if (isset($o['ShadowValue'])) $this->ShadowValue = $o['ShadowValue'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Key)) $o['Key'] = $this->Key;
if (isset($this->Value)) $o['Value'] = $this->Value;
if (isset($this->ShadowValue)) $o['ShadowValue'] = $this->ShadowValue;
return empty($o) ? new class(){} : $o;
}
}
class Transition implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ID='',
/** @var string|null */
public ?string $Reason=null,
/** @var DateTime|null */
public ?DateTime $DelayDate=null,
/** @var string|null */
public ?string $DelayReason=null,
/** @var array<int>|null */
public ?array $UserIDs=null,
/** @var array<int>|null */
public ?array $GroupIDs=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ID'])) $this->ID = $o['ID'];
if (isset($o['Reason'])) $this->Reason = $o['Reason'];
if (isset($o['DelayDate'])) $this->DelayDate = JsonConverters::from('DateTime', $o['DelayDate']);
if (isset($o['DelayReason'])) $this->DelayReason = $o['DelayReason'];
if (isset($o['UserIDs'])) $this->UserIDs = JsonConverters::fromArray('int', $o['UserIDs']);
if (isset($o['GroupIDs'])) $this->GroupIDs = JsonConverters::fromArray('int', $o['GroupIDs']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ID)) $o['ID'] = $this->ID;
if (isset($this->Reason)) $o['Reason'] = $this->Reason;
if (isset($this->DelayDate)) $o['DelayDate'] = JsonConverters::to('DateTime', $this->DelayDate);
if (isset($this->DelayReason)) $o['DelayReason'] = $this->DelayReason;
if (isset($this->UserIDs)) $o['UserIDs'] = JsonConverters::toArray('int', $this->UserIDs);
if (isset($this->GroupIDs)) $o['GroupIDs'] = JsonConverters::toArray('int', $this->GroupIDs);
return empty($o) ? new class(){} : $o;
}
}
class Process implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ID=0,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $Coordinator=null,
/** @var bool|null */
public ?bool $Urgent=null,
/** @var array<Transition>|null */
public ?array $Transitions=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['Description'])) $this->Description = $o['Description'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['Coordinator'])) $this->Coordinator = $o['Coordinator'];
if (isset($o['Urgent'])) $this->Urgent = $o['Urgent'];
if (isset($o['Transitions'])) $this->Transitions = JsonConverters::fromArray('Transition', $o['Transitions']);
}
/** @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->Description)) $o['Description'] = $this->Description;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->Coordinator)) $o['Coordinator'] = $this->Coordinator;
if (isset($this->Urgent)) $o['Urgent'] = $this->Urgent;
if (isset($this->Transitions)) $o['Transitions'] = JsonConverters::toArray('Transition', $this->Transitions);
return empty($o) ? new class(){} : $o;
}
}
class RegisterDocument implements JsonSerializable
{
public function __construct(
/** @var string */
public string $RegistrationProfileID='',
/** @var array<RegistrationValue>|null */
public ?array $Values=null,
/** @var array<Process>|null */
public ?array $Processes=null,
/** @var string|null */
public ?string $DocumentUploadId=null,
/** @var string|null */
public ?string $DocumentId=null,
/** @var string|null */
public ?string $StandardDocumentID=null,
/** @var bool|null */
public ?bool $HasUnsavedChangesInDocument=null,
/** @var bool|null */
public ?bool $IsOpenedFromNonDMSLocation=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RegistrationProfileID'])) $this->RegistrationProfileID = $o['RegistrationProfileID'];
if (isset($o['Values'])) $this->Values = JsonConverters::fromArray('RegistrationValue', $o['Values']);
if (isset($o['Processes'])) $this->Processes = JsonConverters::fromArray('Process', $o['Processes']);
if (isset($o['DocumentUploadId'])) $this->DocumentUploadId = $o['DocumentUploadId'];
if (isset($o['DocumentId'])) $this->DocumentId = $o['DocumentId'];
if (isset($o['StandardDocumentID'])) $this->StandardDocumentID = $o['StandardDocumentID'];
if (isset($o['HasUnsavedChangesInDocument'])) $this->HasUnsavedChangesInDocument = $o['HasUnsavedChangesInDocument'];
if (isset($o['IsOpenedFromNonDMSLocation'])) $this->IsOpenedFromNonDMSLocation = $o['IsOpenedFromNonDMSLocation'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RegistrationProfileID)) $o['RegistrationProfileID'] = $this->RegistrationProfileID;
if (isset($this->Values)) $o['Values'] = JsonConverters::toArray('RegistrationValue', $this->Values);
if (isset($this->Processes)) $o['Processes'] = JsonConverters::toArray('Process', $this->Processes);
if (isset($this->DocumentUploadId)) $o['DocumentUploadId'] = $this->DocumentUploadId;
if (isset($this->DocumentId)) $o['DocumentId'] = $this->DocumentId;
if (isset($this->StandardDocumentID)) $o['StandardDocumentID'] = $this->StandardDocumentID;
if (isset($this->HasUnsavedChangesInDocument)) $o['HasUnsavedChangesInDocument'] = $this->HasUnsavedChangesInDocument;
if (isset($this->IsOpenedFromNonDMSLocation)) $o['IsOpenedFromNonDMSLocation'] = $this->IsOpenedFromNonDMSLocation;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/reply/RegisterDocument HTTP/1.1
Host: dogw.klokgroep.nl
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RegisterDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
<DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
<DocumentUploadId>String</DocumentUploadId>
<HasUnsavedChangesInDocument>false</HasUnsavedChangesInDocument>
<IsOpenedFromNonDMSLocation>false</IsOpenedFromNonDMSLocation>
<Processes xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Workflow">
<d2p1:Process>
<d2p1:Coordinator>String</d2p1:Coordinator>
<d2p1:Description>String</d2p1:Description>
<d2p1:ID>0</d2p1:ID>
<d2p1:Note>String</d2p1:Note>
<d2p1:Title>String</d2p1:Title>
<d2p1:Transitions>
<d2p1:Transition>
<d2p1:DelayDate>0001-01-01T00:00:00</d2p1:DelayDate>
<d2p1:DelayReason>String</d2p1:DelayReason>
<d2p1:GroupIDs xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:int>0</d6p1:int>
</d2p1:GroupIDs>
<d2p1:ID>00000000-0000-0000-0000-000000000000</d2p1:ID>
<d2p1:Reason>String</d2p1:Reason>
<d2p1:UserIDs xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:int>0</d6p1:int>
</d2p1:UserIDs>
</d2p1:Transition>
</d2p1:Transitions>
<d2p1:Urgent>false</d2p1:Urgent>
</d2p1:Process>
</Processes>
<RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
<StandardDocumentID>00000000-0000-0000-0000-000000000000</StandardDocumentID>
<Values xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Registrationprofile">
<d2p1:RegistrationValue>
<d2p1:Key>00000000-0000-0000-0000-000000000000</d2p1:Key>
<d2p1:ShadowValue>String</d2p1:ShadowValue>
<d2p1:Value>String</d2p1:Value>
</d2p1:RegistrationValue>
</Values>
</RegisterDocument>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RegisterDocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
<DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
<DocumentVariables xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<ErrorMessages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</ErrorMessages>
<IsCorporateIdentity>false</IsCorporateIdentity>
<IsSucces>false</IsSucces>
<Ooxml>String</Ooxml>
</RegisterDocumentResponse>