<?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 ConditionalFormatting implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Color=null,
/** @var bool|null */
public ?bool $Bold=null,
/** @var bool|null */
public ?bool $Italic=null,
/** @var bool|null */
public ?bool $StrikeThrough=null,
/** @var bool|null */
public ?bool $Underline=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['Bold'])) $this->Bold = $o['Bold'];
if (isset($o['Italic'])) $this->Italic = $o['Italic'];
if (isset($o['StrikeThrough'])) $this->StrikeThrough = $o['StrikeThrough'];
if (isset($o['Underline'])) $this->Underline = $o['Underline'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->Bold)) $o['Bold'] = $this->Bold;
if (isset($this->Italic)) $o['Italic'] = $this->Italic;
if (isset($this->StrikeThrough)) $o['StrikeThrough'] = $this->StrikeThrough;
if (isset($this->Underline)) $o['Underline'] = $this->Underline;
return empty($o) ? new class(){} : $o;
}
}
class OutlookAddinOptions implements JsonSerializable
{
public function __construct(
/** @var ConditionalFormatting|null */
public ?ConditionalFormatting $RegisteredMail=null,
/** @var ConditionalFormatting|null */
public ?ConditionalFormatting $ToRegisterMail=null,
/** @var ConditionalFormatting|null */
public ?ConditionalFormatting $ErrorMail=null,
/** @var bool|null */
public ?bool $ForceerOpmaak=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RegisteredMail'])) $this->RegisteredMail = JsonConverters::from('ConditionalFormatting', $o['RegisteredMail']);
if (isset($o['ToRegisterMail'])) $this->ToRegisterMail = JsonConverters::from('ConditionalFormatting', $o['ToRegisterMail']);
if (isset($o['ErrorMail'])) $this->ErrorMail = JsonConverters::from('ConditionalFormatting', $o['ErrorMail']);
if (isset($o['ForceerOpmaak'])) $this->ForceerOpmaak = $o['ForceerOpmaak'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RegisteredMail)) $o['RegisteredMail'] = JsonConverters::to('ConditionalFormatting', $this->RegisteredMail);
if (isset($this->ToRegisterMail)) $o['ToRegisterMail'] = JsonConverters::to('ConditionalFormatting', $this->ToRegisterMail);
if (isset($this->ErrorMail)) $o['ErrorMail'] = JsonConverters::to('ConditionalFormatting', $this->ErrorMail);
if (isset($this->ForceerOpmaak)) $o['ForceerOpmaak'] = $this->ForceerOpmaak;
return empty($o) ? new class(){} : $o;
}
}
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 /json/oneway/OutlookAddinOptions HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: application/json
Content-Type: application/json
Content-Length: length
{"RegisteredMail":{"Color":"String","Bold":false,"Italic":false,"StrikeThrough":false,"Underline":false},"ToRegisterMail":{"Color":"String","Bold":false,"Italic":false,"StrikeThrough":false,"Underline":false},"ErrorMail":{"Color":"String","Bold":false,"Italic":false,"StrikeThrough":false,"Underline":false},"ForceerOpmaak":false}