<?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 DocumentQueuedForRegistrationResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $DocumentQueuedForRegistrationID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DocumentQueuedForRegistrationID'])) $this->DocumentQueuedForRegistrationID = $o['DocumentQueuedForRegistrationID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DocumentQueuedForRegistrationID)) $o['DocumentQueuedForRegistrationID'] = $this->DocumentQueuedForRegistrationID;
return empty($o) ? new class(){} : $o;
}
}
// @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 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;
}
}
class AddDocumentQueuedForRegistration implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $RegistrationProfileID=null,
/** @var string|null */
public ?string $FileID=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $UploadOrigin=null,
/** @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
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RegistrationProfileID'])) $this->RegistrationProfileID = $o['RegistrationProfileID'];
if (isset($o['FileID'])) $this->FileID = $o['FileID'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['UploadOrigin'])) $this->UploadOrigin = $o['UploadOrigin'];
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']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RegistrationProfileID)) $o['RegistrationProfileID'] = $this->RegistrationProfileID;
if (isset($this->FileID)) $o['FileID'] = $this->FileID;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->UploadOrigin)) $o['UploadOrigin'] = $this->UploadOrigin;
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);
return empty($o) ? new class(){} : $o;
}
}
PHP AddDocumentQueuedForRegistration 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/AddDocumentQueuedForRegistration HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"RegistrationProfileID":"00000000-0000-0000-0000-000000000000","FileID":"00000000-0000-0000-0000-000000000000","Description":"String","Note":"String","UploadOrigin":"String","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":[{}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"DocumentQueuedForRegistrationID":0}