GET | /RestApi/recycle-bin/items/{id}/validaterestore |
---|
<?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 RecycelBinItemRequestBase implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class ModalMessageProxy implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $IsRecoverable=null,
/** @var string|null */
public ?string $HeaderText=null,
/** @var string|null */
public ?string $BodyText=null,
/** @var string|null */
public ?string $ActionButtonText=null,
/** @var bool|null */
public ?bool $HasCancelButton=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['IsRecoverable'])) $this->IsRecoverable = $o['IsRecoverable'];
if (isset($o['HeaderText'])) $this->HeaderText = $o['HeaderText'];
if (isset($o['BodyText'])) $this->BodyText = $o['BodyText'];
if (isset($o['ActionButtonText'])) $this->ActionButtonText = $o['ActionButtonText'];
if (isset($o['HasCancelButton'])) $this->HasCancelButton = $o['HasCancelButton'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->IsRecoverable)) $o['IsRecoverable'] = $this->IsRecoverable;
if (isset($this->HeaderText)) $o['HeaderText'] = $this->HeaderText;
if (isset($this->BodyText)) $o['BodyText'] = $this->BodyText;
if (isset($this->ActionButtonText)) $o['ActionButtonText'] = $this->ActionButtonText;
if (isset($this->HasCancelButton)) $o['HasCancelButton'] = $this->HasCancelButton;
return empty($o) ? new class(){} : $o;
}
}
class GetRecycleBinItemValidation extends RecycelBinItemRequestBase implements JsonSerializable
{
/**
* @param string $Id
*/
public function __construct(
string $Id=''
) {
parent::__construct($Id);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
PHP GetRecycleBinItemValidation 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.
GET /RestApi/recycle-bin/items/{id}/validaterestore HTTP/1.1 Host: www.asg.com.au Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"isRecoverable":false,"headerText":"String","bodyText":"String","actionButtonText":"String","hasCancelButton":false}