<?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};
// @DataContract
class MetaDataField implements JsonSerializable
{
public function __construct(
// @DataMember
/** @var string|null */
public ?string $ID=null,
// @DataMember
/** @var string|null */
public ?string $DocumentVeldID=null,
// @DataMember
/** @var string|null */
public ?string $Name=null,
// @DataMember
/** @var string|null */
public ?string $Label=null,
// @DataMember
/** @var string|null */
public ?string $Datatype=null,
// @DataMember
/** @var string|null */
public ?string $PrintLabel=null,
// @DataMember
/** @var string|null */
public ?string $Entity=null,
// @DataMember
/** @var string|null */
public ?string $PrintValue=null,
// @DataMember
/** @var string|null */
public ?string $RegistrationValue=null,
// @DataMember
/** @var string|null */
public ?string $SPSiteColumnName=null,
// @DataMember
/** @var string|null */
public ?string $ShadowName=null,
// @DataMember
/** @var string|null */
public ?string $ShadowDatatype=null,
// @DataMember
/** @var string|null */
public ?string $ShadowSPSiteColumnName=null,
// @DataMember
/** @var string|null */
public ?string $ShadowSPSiteColumnRegistrationValue=null,
// @DataMember
/** @var string|null */
public ?string $ShadowRegistrationValue=null,
// @DataMember
/** @var bool|null */
public ?bool $IsKeyField=null,
// @DataMember
/** @var bool|null */
public ?bool $KopierenBijNieuweVersie=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ID'])) $this->ID = $o['ID'];
if (isset($o['DocumentVeldID'])) $this->DocumentVeldID = $o['DocumentVeldID'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['Datatype'])) $this->Datatype = $o['Datatype'];
if (isset($o['PrintLabel'])) $this->PrintLabel = $o['PrintLabel'];
if (isset($o['Entity'])) $this->Entity = $o['Entity'];
if (isset($o['PrintValue'])) $this->PrintValue = $o['PrintValue'];
if (isset($o['RegistrationValue'])) $this->RegistrationValue = $o['RegistrationValue'];
if (isset($o['SPSiteColumnName'])) $this->SPSiteColumnName = $o['SPSiteColumnName'];
if (isset($o['ShadowName'])) $this->ShadowName = $o['ShadowName'];
if (isset($o['ShadowDatatype'])) $this->ShadowDatatype = $o['ShadowDatatype'];
if (isset($o['ShadowSPSiteColumnName'])) $this->ShadowSPSiteColumnName = $o['ShadowSPSiteColumnName'];
if (isset($o['ShadowSPSiteColumnRegistrationValue'])) $this->ShadowSPSiteColumnRegistrationValue = $o['ShadowSPSiteColumnRegistrationValue'];
if (isset($o['ShadowRegistrationValue'])) $this->ShadowRegistrationValue = $o['ShadowRegistrationValue'];
if (isset($o['IsKeyField'])) $this->IsKeyField = $o['IsKeyField'];
if (isset($o['KopierenBijNieuweVersie'])) $this->KopierenBijNieuweVersie = $o['KopierenBijNieuweVersie'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ID)) $o['ID'] = $this->ID;
if (isset($this->DocumentVeldID)) $o['DocumentVeldID'] = $this->DocumentVeldID;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->Datatype)) $o['Datatype'] = $this->Datatype;
if (isset($this->PrintLabel)) $o['PrintLabel'] = $this->PrintLabel;
if (isset($this->Entity)) $o['Entity'] = $this->Entity;
if (isset($this->PrintValue)) $o['PrintValue'] = $this->PrintValue;
if (isset($this->RegistrationValue)) $o['RegistrationValue'] = $this->RegistrationValue;
if (isset($this->SPSiteColumnName)) $o['SPSiteColumnName'] = $this->SPSiteColumnName;
if (isset($this->ShadowName)) $o['ShadowName'] = $this->ShadowName;
if (isset($this->ShadowDatatype)) $o['ShadowDatatype'] = $this->ShadowDatatype;
if (isset($this->ShadowSPSiteColumnName)) $o['ShadowSPSiteColumnName'] = $this->ShadowSPSiteColumnName;
if (isset($this->ShadowSPSiteColumnRegistrationValue)) $o['ShadowSPSiteColumnRegistrationValue'] = $this->ShadowSPSiteColumnRegistrationValue;
if (isset($this->ShadowRegistrationValue)) $o['ShadowRegistrationValue'] = $this->ShadowRegistrationValue;
if (isset($this->IsKeyField)) $o['IsKeyField'] = $this->IsKeyField;
if (isset($this->KopierenBijNieuweVersie)) $o['KopierenBijNieuweVersie'] = $this->KopierenBijNieuweVersie;
return empty($o) ? new class(){} : $o;
}
}
class Bookmark implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $RemoveLastBreak=null,
/** @var bool|null */
public ?bool $ReplaceOnChange=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RemoveLastBreak'])) $this->RemoveLastBreak = $o['RemoveLastBreak'];
if (isset($o['ReplaceOnChange'])) $this->ReplaceOnChange = $o['ReplaceOnChange'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RemoveLastBreak)) $o['RemoveLastBreak'] = $this->RemoveLastBreak;
if (isset($this->ReplaceOnChange)) $o['ReplaceOnChange'] = $this->ReplaceOnChange;
return empty($o) ? new class(){} : $o;
}
}
class Mailings implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
class AttachmentMailing implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
interface IInformationMessages
{
}
class DocumentResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $DocumentID='',
/** @var string|null */
public ?string $DocumentNr=null,
/** @var string */
public string $RootDocumentID='',
/** @var array<MetaDataField>|null */
public ?array $MetaData=null,
/** @var array<Bookmark>|null */
public ?array $Bookmarks=null,
/** @var Mailings|null */
public ?Mailings $Mailings=null,
/** @var array<AttachmentMailing>|null */
public ?array $AttachmentsMailings=null,
/** @var IInformationMessages|null */
public ?IInformationMessages $Messages=null,
/** @var string|null */
public ?string $SourceDocumentPath=null,
/** @var string|null */
public ?string $DestinationDocumentPath=null,
/** @var string|null */
public ?string $SharePointContentTypeName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DocumentID'])) $this->DocumentID = $o['DocumentID'];
if (isset($o['DocumentNr'])) $this->DocumentNr = $o['DocumentNr'];
if (isset($o['RootDocumentID'])) $this->RootDocumentID = $o['RootDocumentID'];
if (isset($o['MetaData'])) $this->MetaData = JsonConverters::fromArray('MetaDataField', $o['MetaData']);
if (isset($o['Bookmarks'])) $this->Bookmarks = JsonConverters::fromArray('Bookmark', $o['Bookmarks']);
if (isset($o['Mailings'])) $this->Mailings = JsonConverters::from('Mailings', $o['Mailings']);
if (isset($o['AttachmentsMailings'])) $this->AttachmentsMailings = JsonConverters::fromArray('AttachmentMailing', $o['AttachmentsMailings']);
if (isset($o['Messages'])) $this->Messages = JsonConverters::from('IInformationMessages', $o['Messages']);
if (isset($o['SourceDocumentPath'])) $this->SourceDocumentPath = $o['SourceDocumentPath'];
if (isset($o['DestinationDocumentPath'])) $this->DestinationDocumentPath = $o['DestinationDocumentPath'];
if (isset($o['SharePointContentTypeName'])) $this->SharePointContentTypeName = $o['SharePointContentTypeName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DocumentID)) $o['DocumentID'] = $this->DocumentID;
if (isset($this->DocumentNr)) $o['DocumentNr'] = $this->DocumentNr;
if (isset($this->RootDocumentID)) $o['RootDocumentID'] = $this->RootDocumentID;
if (isset($this->MetaData)) $o['MetaData'] = JsonConverters::toArray('MetaDataField', $this->MetaData);
if (isset($this->Bookmarks)) $o['Bookmarks'] = JsonConverters::toArray('Bookmark', $this->Bookmarks);
if (isset($this->Mailings)) $o['Mailings'] = JsonConverters::to('Mailings', $this->Mailings);
if (isset($this->AttachmentsMailings)) $o['AttachmentsMailings'] = JsonConverters::toArray('AttachmentMailing', $this->AttachmentsMailings);
if (isset($this->Messages)) $o['Messages'] = JsonConverters::to('IInformationMessages', $this->Messages);
if (isset($this->SourceDocumentPath)) $o['SourceDocumentPath'] = $this->SourceDocumentPath;
if (isset($this->DestinationDocumentPath)) $o['DestinationDocumentPath'] = $this->DestinationDocumentPath;
if (isset($this->SharePointContentTypeName)) $o['SharePointContentTypeName'] = $this->SharePointContentTypeName;
return empty($o) ? new class(){} : $o;
}
}
enum DocInfoSilentMode : string
{
case Off = 'Off';
case AllowUserInteraction = 'AllowUserInteraction';
case DoNotAllowUserInteraction = 'DoNotAllowUserInteraction';
}
class AddDocument implements JsonSerializable
{
public function __construct(
/** @var string */
public string $RegistrationProfileID='',
/** @var string|null */
public ?string $DocumentID=null,
/** @var string|null */
public ?string $RootDocumentID=null,
/** @var int|null */
public ?int $AssignToUserID=null,
/** @var int|null */
public ?int $AssignToGroupID=null,
/** @var array<MetaDataField>|null */
public ?array $MetaData=null,
/** @var Mailings|null */
public ?Mailings $Mailings=null,
/** @var array<AttachmentMailing>|null */
public ?array $AttachmentsMailings=null,
/** @var string|null */
public ?string $FileID=null,
/** @var DocInfoSilentMode|null */
public ?DocInfoSilentMode $SilentMode=null,
/** @var bool|null */
public ?bool $updateStorageSystem=null,
/** @var int|null */
public ?int $MessageQueueId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RegistrationProfileID'])) $this->RegistrationProfileID = $o['RegistrationProfileID'];
if (isset($o['DocumentID'])) $this->DocumentID = $o['DocumentID'];
if (isset($o['RootDocumentID'])) $this->RootDocumentID = $o['RootDocumentID'];
if (isset($o['AssignToUserID'])) $this->AssignToUserID = $o['AssignToUserID'];
if (isset($o['AssignToGroupID'])) $this->AssignToGroupID = $o['AssignToGroupID'];
if (isset($o['MetaData'])) $this->MetaData = JsonConverters::fromArray('MetaDataField', $o['MetaData']);
if (isset($o['Mailings'])) $this->Mailings = JsonConverters::from('Mailings', $o['Mailings']);
if (isset($o['AttachmentsMailings'])) $this->AttachmentsMailings = JsonConverters::fromArray('AttachmentMailing', $o['AttachmentsMailings']);
if (isset($o['FileID'])) $this->FileID = $o['FileID'];
if (isset($o['SilentMode'])) $this->SilentMode = JsonConverters::from('DocInfoSilentMode', $o['SilentMode']);
if (isset($o['updateStorageSystem'])) $this->updateStorageSystem = $o['updateStorageSystem'];
if (isset($o['MessageQueueId'])) $this->MessageQueueId = $o['MessageQueueId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RegistrationProfileID)) $o['RegistrationProfileID'] = $this->RegistrationProfileID;
if (isset($this->DocumentID)) $o['DocumentID'] = $this->DocumentID;
if (isset($this->RootDocumentID)) $o['RootDocumentID'] = $this->RootDocumentID;
if (isset($this->AssignToUserID)) $o['AssignToUserID'] = $this->AssignToUserID;
if (isset($this->AssignToGroupID)) $o['AssignToGroupID'] = $this->AssignToGroupID;
if (isset($this->MetaData)) $o['MetaData'] = JsonConverters::toArray('MetaDataField', $this->MetaData);
if (isset($this->Mailings)) $o['Mailings'] = JsonConverters::to('Mailings', $this->Mailings);
if (isset($this->AttachmentsMailings)) $o['AttachmentsMailings'] = JsonConverters::toArray('AttachmentMailing', $this->AttachmentsMailings);
if (isset($this->FileID)) $o['FileID'] = $this->FileID;
if (isset($this->SilentMode)) $o['SilentMode'] = JsonConverters::to('DocInfoSilentMode', $this->SilentMode);
if (isset($this->updateStorageSystem)) $o['updateStorageSystem'] = $this->updateStorageSystem;
if (isset($this->MessageQueueId)) $o['MessageQueueId'] = $this->MessageQueueId;
return empty($o) ? new class(){} : $o;
}
}
class AddDocumentByEmailMessageId implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $ItemId=null,
/** @var string|null */
public ?string $EwsUrl=null,
/** @var string|null */
public ?string $Token=null,
/** @var string|null */
public ?string $DocumentId=null,
/** @var AddDocument|null */
public ?AddDocument $documentToAdd=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ItemId'])) $this->ItemId = $o['ItemId'];
if (isset($o['EwsUrl'])) $this->EwsUrl = $o['EwsUrl'];
if (isset($o['Token'])) $this->Token = $o['Token'];
if (isset($o['DocumentId'])) $this->DocumentId = $o['DocumentId'];
if (isset($o['documentToAdd'])) $this->documentToAdd = JsonConverters::from('AddDocument', $o['documentToAdd']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ItemId)) $o['ItemId'] = $this->ItemId;
if (isset($this->EwsUrl)) $o['EwsUrl'] = $this->EwsUrl;
if (isset($this->Token)) $o['Token'] = $this->Token;
if (isset($this->DocumentId)) $o['DocumentId'] = $this->DocumentId;
if (isset($this->documentToAdd)) $o['documentToAdd'] = JsonConverters::to('AddDocument', $this->documentToAdd);
return empty($o) ? new class(){} : $o;
}
}
PHP AddDocumentByEmailMessageId DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/reply/AddDocumentByEmailMessageId HTTP/1.1
Host: dogw.klokgroep.nl
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"ItemId":"String","EwsUrl":"String","Token":"String","DocumentId":"String","documentToAdd":{"RegistrationProfileID":"00000000-0000-0000-0000-000000000000","DocumentID":"00000000-0000-0000-0000-000000000000","RootDocumentID":"00000000-0000-0000-0000-000000000000","AssignToUserID":0,"AssignToGroupID":0,"MetaData":[{"ID":"00000000-0000-0000-0000-000000000000","DocumentVeldID":"00000000-0000-0000-0000-000000000000","Name":"String","Label":"String","Datatype":"String","PrintLabel":"String","Entity":"String","PrintValue":"String","RegistrationValue":"String","SPSiteColumnName":"String","ShadowName":"String","ShadowDatatype":"String","ShadowSPSiteColumnName":"String","ShadowSPSiteColumnRegistrationValue":"String","ShadowRegistrationValue":"String","IsKeyField":false,"KopierenBijNieuweVersie":false}],"Mailings":{},"AttachmentsMailings":[{}],"FileID":"00000000-0000-0000-0000-000000000000","SilentMode":"Off","updateStorageSystem":false,"MessageQueueId":0}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"DocumentID":"00000000-0000-0000-0000-000000000000","DocumentNr":"String","RootDocumentID":"00000000-0000-0000-0000-000000000000","MetaData":[{"ID":"00000000-0000-0000-0000-000000000000","DocumentVeldID":"00000000-0000-0000-0000-000000000000","Name":"String","Label":"String","Datatype":"String","PrintLabel":"String","Entity":"String","PrintValue":"String","RegistrationValue":"String","SPSiteColumnName":"String","ShadowName":"String","ShadowDatatype":"String","ShadowSPSiteColumnName":"String","ShadowSPSiteColumnRegistrationValue":"String","ShadowRegistrationValue":"String","IsKeyField":false,"KopierenBijNieuweVersie":false}],"Bookmarks":[{"RemoveLastBreak":false,"ReplaceOnChange":false}],"Mailings":{},"AttachmentsMailings":[{}],"Messages":null,"SourceDocumentPath":"String","DestinationDocumentPath":"String","SharePointContentTypeName":"String"}