| POST | /debriefreview/list |
|---|
<?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 ApiSkipTakePagedServiceRequest implements ISkipTakePagedServiceRequest, JsonSerializable
{
public function __construct(
/** @var int */
public int $skip=0,
/** @var int */
public int $take=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['skip'])) $this->skip = $o['skip'];
if (isset($o['take'])) $this->take = $o['take'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->skip)) $o['skip'] = $this->skip;
if (isset($this->take)) $o['take'] = $this->take;
return empty($o) ? new class(){} : $o;
}
}
class ApiSkipTakePagedTableRequest extends ApiSkipTakePagedServiceRequest implements IOrderKey, JsonSerializable
{
/**
* @param int $skip
* @param int $take
*/
public function __construct(
int $skip=0,
int $take=0,
/** @var int */
public int $requestNumber=0,
/** @var string|null */
public ?string $searchQuery=null,
/** @var string|null */
public ?string $orderKey=null,
/** @var bool|null */
public ?bool $orderAscending=null
) {
parent::__construct($skip,$take);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['requestNumber'])) $this->requestNumber = $o['requestNumber'];
if (isset($o['searchQuery'])) $this->searchQuery = $o['searchQuery'];
if (isset($o['orderKey'])) $this->orderKey = $o['orderKey'];
if (isset($o['orderAscending'])) $this->orderAscending = $o['orderAscending'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->requestNumber)) $o['requestNumber'] = $this->requestNumber;
if (isset($this->searchQuery)) $o['searchQuery'] = $this->searchQuery;
if (isset($this->orderKey)) $o['orderKey'] = $this->orderKey;
if (isset($this->orderAscending)) $o['orderAscending'] = $this->orderAscending;
return empty($o) ? new class(){} : $o;
}
}
class DebriefReviewListItem implements JsonSerializable
{
public function __construct(
/** @var int */
public int $id=0,
/** @var string|null */
public ?string $submittedBy=null,
/** @var string|null */
public ?string $companyName=null,
/** @var string|null */
public ?string $meetingSubject=null,
/** @var string|null */
public ?string $dateSubmitted=null,
/** @var string|null */
public ?string $overallScore=null,
/** @var int */
public int $generalManagerId=0,
/** @var bool|null */
public ?bool $generalManagerReviewed=null,
/** @var int */
public int $generalManagerRating=0,
/** @var int */
public int $seniorManagerId=0,
/** @var bool|null */
public ?bool $seniorManagerReviewed=null,
/** @var int */
public int $seniorManagerRating=0,
/** @var int */
public int $divisionalManagerId=0,
/** @var bool|null */
public ?bool $divisionalManagerReviewed=null,
/** @var int */
public int $divisionalManagerRating=0,
/** @var int */
public int $departmentManagerId=0,
/** @var bool|null */
public ?bool $departmentManagerReviewed=null,
/** @var int */
public int $departmentManagerRating=0,
/** @var int */
public int $managerId=0,
/** @var bool|null */
public ?bool $managerReviewed=null,
/** @var int */
public int $managerRating=0,
/** @var int */
public int $campaignManagerId=0,
/** @var bool|null */
public ?bool $campaignManagerReviewed=null,
/** @var int */
public int $campaignManagerRating=0,
/** @var int */
public int $portfolioManagerId=0,
/** @var bool|null */
public ?bool $portfolioManagerReviewed=null,
/** @var int */
public int $portfolioManagerRating=0,
/** @var float */
public float $age=0.0,
/** @var string|null */
public ?string $ageColour=null,
/** @var bool|null */
public ?bool $markedAsRead=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['submittedBy'])) $this->submittedBy = $o['submittedBy'];
if (isset($o['companyName'])) $this->companyName = $o['companyName'];
if (isset($o['meetingSubject'])) $this->meetingSubject = $o['meetingSubject'];
if (isset($o['dateSubmitted'])) $this->dateSubmitted = $o['dateSubmitted'];
if (isset($o['overallScore'])) $this->overallScore = $o['overallScore'];
if (isset($o['generalManagerId'])) $this->generalManagerId = $o['generalManagerId'];
if (isset($o['generalManagerReviewed'])) $this->generalManagerReviewed = $o['generalManagerReviewed'];
if (isset($o['generalManagerRating'])) $this->generalManagerRating = $o['generalManagerRating'];
if (isset($o['seniorManagerId'])) $this->seniorManagerId = $o['seniorManagerId'];
if (isset($o['seniorManagerReviewed'])) $this->seniorManagerReviewed = $o['seniorManagerReviewed'];
if (isset($o['seniorManagerRating'])) $this->seniorManagerRating = $o['seniorManagerRating'];
if (isset($o['divisionalManagerId'])) $this->divisionalManagerId = $o['divisionalManagerId'];
if (isset($o['divisionalManagerReviewed'])) $this->divisionalManagerReviewed = $o['divisionalManagerReviewed'];
if (isset($o['divisionalManagerRating'])) $this->divisionalManagerRating = $o['divisionalManagerRating'];
if (isset($o['departmentManagerId'])) $this->departmentManagerId = $o['departmentManagerId'];
if (isset($o['departmentManagerReviewed'])) $this->departmentManagerReviewed = $o['departmentManagerReviewed'];
if (isset($o['departmentManagerRating'])) $this->departmentManagerRating = $o['departmentManagerRating'];
if (isset($o['managerId'])) $this->managerId = $o['managerId'];
if (isset($o['managerReviewed'])) $this->managerReviewed = $o['managerReviewed'];
if (isset($o['managerRating'])) $this->managerRating = $o['managerRating'];
if (isset($o['campaignManagerId'])) $this->campaignManagerId = $o['campaignManagerId'];
if (isset($o['campaignManagerReviewed'])) $this->campaignManagerReviewed = $o['campaignManagerReviewed'];
if (isset($o['campaignManagerRating'])) $this->campaignManagerRating = $o['campaignManagerRating'];
if (isset($o['portfolioManagerId'])) $this->portfolioManagerId = $o['portfolioManagerId'];
if (isset($o['portfolioManagerReviewed'])) $this->portfolioManagerReviewed = $o['portfolioManagerReviewed'];
if (isset($o['portfolioManagerRating'])) $this->portfolioManagerRating = $o['portfolioManagerRating'];
if (isset($o['age'])) $this->age = $o['age'];
if (isset($o['ageColour'])) $this->ageColour = $o['ageColour'];
if (isset($o['markedAsRead'])) $this->markedAsRead = $o['markedAsRead'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->submittedBy)) $o['submittedBy'] = $this->submittedBy;
if (isset($this->companyName)) $o['companyName'] = $this->companyName;
if (isset($this->meetingSubject)) $o['meetingSubject'] = $this->meetingSubject;
if (isset($this->dateSubmitted)) $o['dateSubmitted'] = $this->dateSubmitted;
if (isset($this->overallScore)) $o['overallScore'] = $this->overallScore;
if (isset($this->generalManagerId)) $o['generalManagerId'] = $this->generalManagerId;
if (isset($this->generalManagerReviewed)) $o['generalManagerReviewed'] = $this->generalManagerReviewed;
if (isset($this->generalManagerRating)) $o['generalManagerRating'] = $this->generalManagerRating;
if (isset($this->seniorManagerId)) $o['seniorManagerId'] = $this->seniorManagerId;
if (isset($this->seniorManagerReviewed)) $o['seniorManagerReviewed'] = $this->seniorManagerReviewed;
if (isset($this->seniorManagerRating)) $o['seniorManagerRating'] = $this->seniorManagerRating;
if (isset($this->divisionalManagerId)) $o['divisionalManagerId'] = $this->divisionalManagerId;
if (isset($this->divisionalManagerReviewed)) $o['divisionalManagerReviewed'] = $this->divisionalManagerReviewed;
if (isset($this->divisionalManagerRating)) $o['divisionalManagerRating'] = $this->divisionalManagerRating;
if (isset($this->departmentManagerId)) $o['departmentManagerId'] = $this->departmentManagerId;
if (isset($this->departmentManagerReviewed)) $o['departmentManagerReviewed'] = $this->departmentManagerReviewed;
if (isset($this->departmentManagerRating)) $o['departmentManagerRating'] = $this->departmentManagerRating;
if (isset($this->managerId)) $o['managerId'] = $this->managerId;
if (isset($this->managerReviewed)) $o['managerReviewed'] = $this->managerReviewed;
if (isset($this->managerRating)) $o['managerRating'] = $this->managerRating;
if (isset($this->campaignManagerId)) $o['campaignManagerId'] = $this->campaignManagerId;
if (isset($this->campaignManagerReviewed)) $o['campaignManagerReviewed'] = $this->campaignManagerReviewed;
if (isset($this->campaignManagerRating)) $o['campaignManagerRating'] = $this->campaignManagerRating;
if (isset($this->portfolioManagerId)) $o['portfolioManagerId'] = $this->portfolioManagerId;
if (isset($this->portfolioManagerReviewed)) $o['portfolioManagerReviewed'] = $this->portfolioManagerReviewed;
if (isset($this->portfolioManagerRating)) $o['portfolioManagerRating'] = $this->portfolioManagerRating;
if (isset($this->age)) $o['age'] = $this->age;
if (isset($this->ageColour)) $o['ageColour'] = $this->ageColour;
if (isset($this->markedAsRead)) $o['markedAsRead'] = $this->markedAsRead;
return empty($o) ? new class(){} : $o;
}
}
class EnumOption implements JsonSerializable
{
public function __construct(
/** @var int */
public int $value=0,
/** @var string|null */
public ?string $label=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['value'])) $this->value = $o['value'];
if (isset($o['label'])) $this->label = $o['label'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->value)) $o['value'] = $this->value;
if (isset($this->label)) $o['label'] = $this->label;
return empty($o) ? new class(){} : $o;
}
}
/**
* @template SkipTakePagedTableListResponse of DebriefReviewListItem
*/
class DebriefReviewListResponse extends SkipTakePagedTableListResponse implements JsonSerializable
{
/**
* @param string|null $description
* @param string|null $heading
* @param bool|null $wasSuccessful
* @param Object|null $modelState
* @param int $total
* @param int $skip
* @param int $take
* @param int $requestNumber
* @param array<T>|null $listItems
*/
public function __construct(
?string $description=null,
?string $heading=null,
?bool $wasSuccessful=null,
?Object $modelState=null,
int $total=0,
int $skip=0,
int $take=0,
int $requestNumber=0,
?array $listItems=null,
/** @var array<EnumOption>|null */
public ?array $readStatuses=null
) {
parent::__construct($description,$heading,$wasSuccessful,$modelState,$total,$skip,$take,$requestNumber,$listItems);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['readStatuses'])) $this->readStatuses = JsonConverters::fromArray('EnumOption', $o['readStatuses']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->readStatuses)) $o['readStatuses'] = JsonConverters::toArray('EnumOption', $this->readStatuses);
return empty($o) ? new class(){} : $o;
}
}
enum DateFilterType : int
{
case All = 0;
case Before = 1;
case After = 2;
case Range = 3;
}
class DateFilter implements JsonSerializable
{
public function __construct(
/** @var DateFilterType|null */
public ?DateFilterType $filterType=null,
/** @var array<DateTime>|null */
public ?array $dates=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['filterType'])) $this->filterType = JsonConverters::from('DateFilterType', $o['filterType']);
if (isset($o['dates'])) $this->dates = JsonConverters::fromArray('DateTime', $o['dates']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->filterType)) $o['filterType'] = JsonConverters::to('DateFilterType', $this->filterType);
if (isset($this->dates)) $o['dates'] = JsonConverters::toArray('DateTime', $this->dates);
return empty($o) ? new class(){} : $o;
}
}
enum DebriefReadStatusType : int
{
case All = 0;
case Unread = 1;
case Read = 2;
}
class DebriefReviewListRequest extends ApiSkipTakePagedTableRequest implements JsonSerializable
{
/**
* @param int $skip
* @param int $take
* @param int $requestNumber
* @param string|null $searchQuery
* @param string|null $orderKey
* @param bool|null $orderAscending
*/
public function __construct(
int $skip=0,
int $take=0,
int $requestNumber=0,
?string $searchQuery=null,
?string $orderKey=null,
?bool $orderAscending=null,
/** @var bool|null */
public ?bool $all=null,
/** @var DateFilter|null */
public ?DateFilter $dateCaptured=null,
/** @var DebriefReadStatusType|null */
public ?DebriefReadStatusType $readStatus=null
) {
parent::__construct($skip,$take,$requestNumber,$searchQuery,$orderKey,$orderAscending);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['all'])) $this->all = $o['all'];
if (isset($o['dateCaptured'])) $this->dateCaptured = JsonConverters::from('DateFilter', $o['dateCaptured']);
if (isset($o['readStatus'])) $this->readStatus = JsonConverters::from('DebriefReadStatusType', $o['readStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->all)) $o['all'] = $this->all;
if (isset($this->dateCaptured)) $o['dateCaptured'] = JsonConverters::to('DateFilter', $this->dateCaptured);
if (isset($this->readStatus)) $o['readStatus'] = JsonConverters::to('DebriefReadStatusType', $this->readStatus);
return empty($o) ? new class(){} : $o;
}
}
class ApiServiceResponse implements IServiceResponse, JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $description=null,
/** @var string|null */
public ?string $heading=null,
/** @var bool|null */
public ?bool $wasSuccessful=null,
/** @var Object|null */
public ?Object $modelState=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['heading'])) $this->heading = $o['heading'];
if (isset($o['wasSuccessful'])) $this->wasSuccessful = $o['wasSuccessful'];
if (isset($o['modelState'])) $this->modelState = JsonConverters::from('Object', $o['modelState']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->heading)) $o['heading'] = $this->heading;
if (isset($this->wasSuccessful)) $o['wasSuccessful'] = $this->wasSuccessful;
if (isset($this->modelState)) $o['modelState'] = JsonConverters::to('Object', $this->modelState);
return empty($o) ? new class(){} : $o;
}
}
class SkipTakePagedServiceResponse extends ApiServiceResponse implements ISkipTakePagedServiceResponse, ISkipTakePagedServiceRequest, JsonSerializable
{
/**
* @param string|null $description
* @param string|null $heading
* @param bool|null $wasSuccessful
* @param Object|null $modelState
*/
public function __construct(
?string $description=null,
?string $heading=null,
?bool $wasSuccessful=null,
?Object $modelState=null,
/** @var int */
public int $total=0,
/** @var int */
public int $skip=0,
/** @var int */
public int $take=0
) {
parent::__construct($description,$heading,$wasSuccessful,$modelState);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['total'])) $this->total = $o['total'];
if (isset($o['skip'])) $this->skip = $o['skip'];
if (isset($o['take'])) $this->take = $o['take'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->total)) $o['total'] = $this->total;
if (isset($this->skip)) $o['skip'] = $this->skip;
if (isset($this->take)) $o['take'] = $this->take;
return empty($o) ? new class(){} : $o;
}
}
class ApiSkipTakePagedTableResponse extends SkipTakePagedServiceResponse implements JsonSerializable
{
/**
* @param string|null $description
* @param string|null $heading
* @param bool|null $wasSuccessful
* @param Object|null $modelState
* @param int $total
* @param int $skip
* @param int $take
*/
public function __construct(
?string $description=null,
?string $heading=null,
?bool $wasSuccessful=null,
?Object $modelState=null,
int $total=0,
int $skip=0,
int $take=0,
/** @var int */
public int $requestNumber=0
) {
parent::__construct($description,$heading,$wasSuccessful,$modelState,$total,$skip,$take);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['requestNumber'])) $this->requestNumber = $o['requestNumber'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->requestNumber)) $o['requestNumber'] = $this->requestNumber;
return empty($o) ? new class(){} : $o;
}
}
/**
* @template T
*/
class SkipTakePagedTableListResponse extends ApiSkipTakePagedTableResponse implements JsonSerializable
{
public array $genericArgs = [];
public static function create(array $genericArgs=[]): SkipTakePagedTableListResponse {
$to = new SkipTakePagedTableListResponse();
$to->genericArgs = $genericArgs;
return $to;
}
/**
* @param string|null $description
* @param string|null $heading
* @param bool|null $wasSuccessful
* @param Object|null $modelState
* @param int $total
* @param int $skip
* @param int $take
* @param int $requestNumber
*/
public function __construct(
mixed $description=null,
mixed $heading=null,
mixed $wasSuccessful=null,
mixed $modelState=null,
mixed $total=0,
mixed $skip=0,
mixed $take=0,
mixed $requestNumber=0,
/** @var array<T>|null */
public mixed $listItems=null
) {
parent::__construct($description,$heading,$wasSuccessful,$modelState,$total,$skip,$take,$requestNumber);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['listItems'])) $this->listItems = JsonConverters::fromArray($this->genericArgs[0], $o['listItems']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->listItems)) $o['listItems'] = JsonConverters::toArray($this->genericArgs[0], $this->listItems);
return empty($o) ? new class(){} : $o;
}
}
PHP DebriefReviewListRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /debriefreview/list HTTP/1.1
Host: cochraneplus-api-dev.happen.zone
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"all":false,"dateCaptured":{"filterType":0,"dates":["0001-01-01T00:00:00.0000000"]},"readStatus":0,"requestNumber":0,"searchQuery":"String","orderKey":"String","orderAscending":false,"skip":0,"take":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'DebriefReviewListResponse' using the custom 'csv' filter}Cannot dynamically create an instance of type 'WebService.ServiceModel.DebriefReviewListResponse'. Reason: No parameterless constructor defined.