DigiOffice Gateway Web Services

<back to all web services

GetRegistrationprofileFieldStates

Requires Authentication
<?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};


enum MessageType : int
{
    case Information = 1;
    case Warning = 2;
    case Error = 3;
    case Success = 4;
}

class InformationMessageBase implements IInformationMessage, JsonSerializable
{
    public function __construct(
        /** @var MessageType|null */
        public ?MessageType $Type=null,
        /** @var string|null */
        public ?string $Summary=null,
        /** @var string|null */
        public ?string $FullMessage=null,
        /** @var string|null */
        public ?string $FieldName=null,
        /** @var bool|null */
        public ?bool $KeepOpen=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Type'])) $this->Type = JsonConverters::from('MessageType', $o['Type']);
        if (isset($o['Summary'])) $this->Summary = $o['Summary'];
        if (isset($o['FullMessage'])) $this->FullMessage = $o['FullMessage'];
        if (isset($o['FieldName'])) $this->FieldName = $o['FieldName'];
        if (isset($o['KeepOpen'])) $this->KeepOpen = $o['KeepOpen'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Type)) $o['Type'] = JsonConverters::to('MessageType', $this->Type);
        if (isset($this->Summary)) $o['Summary'] = $this->Summary;
        if (isset($this->FullMessage)) $o['FullMessage'] = $this->FullMessage;
        if (isset($this->FieldName)) $o['FieldName'] = $this->FieldName;
        if (isset($this->KeepOpen)) $o['KeepOpen'] = $this->KeepOpen;
        return empty($o) ? new class(){} : $o;
    }
}

/**
 * @template array of InformationMessageBase
 */
class InformationMessages extends \ArrayObject implements IInformationMessages, JsonSerializable
{
    public function __construct(InformationMessageBase ...$items) {
        parent::__construct($items, \ArrayObject::STD_PROP_LIST);
    }
    
    /** @throws \Exception */
    public function append($value): void {
        if ($value instanceof InformationMessageBase)
            parent::append($value);
        else
            throw new \Exception("Can only append a InformationMessageBase to " . __CLASS__);
    }
    
    /** @throws Exception */
    public function fromMap($o): void {
        foreach ($o as $item) {
            $el = new InformationMessageBase();
            $el->fromMap($item);
            $this->append($el);
        }
    }
    
    /** @throws Exception */
    public function jsonSerialize(): array {
        return parent::getArrayCopy();
    }
}

class FieldState implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $Required=null,
        /** @var bool|null */
        public ?bool $Visible=null,
        /** @var bool|null */
        public ?bool $Readonly=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Required'])) $this->Required = $o['Required'];
        if (isset($o['Visible'])) $this->Visible = $o['Visible'];
        if (isset($o['Readonly'])) $this->Readonly = $o['Readonly'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Required)) $o['Required'] = $this->Required;
        if (isset($this->Visible)) $o['Visible'] = $this->Visible;
        if (isset($this->Readonly)) $o['Readonly'] = $this->Readonly;
        return empty($o) ? new class(){} : $o;
    }
}

class RegistrationProfileFieldStateBase extends FieldState implements JsonSerializable
{
    /**
     * @param bool|null $Required
     * @param bool|null $Visible
     * @param bool|null $Readonly
     */
    public function __construct(
        ?bool $Required=null,
        ?bool $Visible=null,
        ?bool $Readonly=null,
        /** @var string */
        public string $DocumentFieldID=''
    ) {
        parent::__construct($Required,$Visible,$Readonly);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['DocumentFieldID'])) $this->DocumentFieldID = $o['DocumentFieldID'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->DocumentFieldID)) $o['DocumentFieldID'] = $this->DocumentFieldID;
        return empty($o) ? new class(){} : $o;
    }
}

class RegistrationProfileFieldStates implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $ReadOnly=null,
        /** @var InformationMessages|null */
        public ?InformationMessages $Messages=null,
        /** @var array<RegistrationProfileFieldStateBase>|null */
        public ?array $ControlStates=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ReadOnly'])) $this->ReadOnly = $o['ReadOnly'];
        if (isset($o['Messages'])) $this->Messages = JsonConverters::from('InformationMessages', $o['Messages']);
        if (isset($o['ControlStates'])) $this->ControlStates = JsonConverters::fromArray('RegistrationProfileFieldStateBase', $o['ControlStates']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ReadOnly)) $o['ReadOnly'] = $this->ReadOnly;
        if (isset($this->Messages)) $o['Messages'] = JsonConverters::to('InformationMessages', $this->Messages);
        if (isset($this->ControlStates)) $o['ControlStates'] = JsonConverters::toArray('RegistrationProfileFieldStateBase', $this->ControlStates);
        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 GetRegistrationprofileFieldStates implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $RegistrationprofileID='',
        /** @var string|null */
        public ?string $DocumentID=null,
        /** @var int|null */
        public ?int $QueueDocumentID=null,
        /** @var string|null */
        public ?string $StandardDocumentID=null,
        /** @var array<string>|null */
        public ?array $RequestTriggeredByDependentDocumentFieldIds=null,
        /** @var array<RegistrationProfileFieldValue>|null */
        public ?array $CurrentRegistrationprofileFieldValues=null,
        /** @var bool|null */
        public ?bool $IsOffice365Context=null,
        /** @var bool|null */
        public ?bool $IsOpenedFromNonDMSLocation=null,
        /** @var string|null */
        public ?string $PidTag=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['QueueDocumentID'])) $this->QueueDocumentID = $o['QueueDocumentID'];
        if (isset($o['StandardDocumentID'])) $this->StandardDocumentID = $o['StandardDocumentID'];
        if (isset($o['RequestTriggeredByDependentDocumentFieldIds'])) $this->RequestTriggeredByDependentDocumentFieldIds = JsonConverters::fromArray('Guid', $o['RequestTriggeredByDependentDocumentFieldIds']);
        if (isset($o['CurrentRegistrationprofileFieldValues'])) $this->CurrentRegistrationprofileFieldValues = JsonConverters::fromArray('RegistrationProfileFieldValue', $o['CurrentRegistrationprofileFieldValues']);
        if (isset($o['IsOffice365Context'])) $this->IsOffice365Context = $o['IsOffice365Context'];
        if (isset($o['IsOpenedFromNonDMSLocation'])) $this->IsOpenedFromNonDMSLocation = $o['IsOpenedFromNonDMSLocation'];
        if (isset($o['PidTag'])) $this->PidTag = $o['PidTag'];
    }
    
    /** @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->QueueDocumentID)) $o['QueueDocumentID'] = $this->QueueDocumentID;
        if (isset($this->StandardDocumentID)) $o['StandardDocumentID'] = $this->StandardDocumentID;
        if (isset($this->RequestTriggeredByDependentDocumentFieldIds)) $o['RequestTriggeredByDependentDocumentFieldIds'] = JsonConverters::toArray('Guid', $this->RequestTriggeredByDependentDocumentFieldIds);
        if (isset($this->CurrentRegistrationprofileFieldValues)) $o['CurrentRegistrationprofileFieldValues'] = JsonConverters::toArray('RegistrationProfileFieldValue', $this->CurrentRegistrationprofileFieldValues);
        if (isset($this->IsOffice365Context)) $o['IsOffice365Context'] = $this->IsOffice365Context;
        if (isset($this->IsOpenedFromNonDMSLocation)) $o['IsOpenedFromNonDMSLocation'] = $this->IsOpenedFromNonDMSLocation;
        if (isset($this->PidTag)) $o['PidTag'] = $this->PidTag;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetRegistrationprofileFieldStates DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/GetRegistrationprofileFieldStates HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"RegistrationprofileID":"00000000-0000-0000-0000-000000000000","DocumentID":"00000000-0000-0000-0000-000000000000","QueueDocumentID":0,"StandardDocumentID":"00000000-0000-0000-0000-000000000000","RequestTriggeredByDependentDocumentFieldIds":["00000000-0000-0000-0000-000000000000"],"CurrentRegistrationprofileFieldValues":[{"DocumentFieldID":"00000000-0000-0000-0000-000000000000","Value":"String","ShadowValue":"String","IsModifiedByUser":false}],"IsOffice365Context":false,"IsOpenedFromNonDMSLocation":false,"PidTag":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ReadOnly":false,"Messages":[{}],"ControlStates":[{"DocumentFieldID":"00000000-0000-0000-0000-000000000000","Required":false,"Visible":false,"Readonly":false}]}