GET | /RestApi/diagnostics/uncached-pages |
---|
<?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 GetUncachedPages implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $CountOnly=null,
/** @var int */
public int $Skip=0,
/** @var int */
public int $Take=0,
/** @var string */
public string $SiteRootNodeId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CountOnly'])) $this->CountOnly = $o['CountOnly'];
if (isset($o['Skip'])) $this->Skip = $o['Skip'];
if (isset($o['Take'])) $this->Take = $o['Take'];
if (isset($o['SiteRootNodeId'])) $this->SiteRootNodeId = $o['SiteRootNodeId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CountOnly)) $o['CountOnly'] = $this->CountOnly;
if (isset($this->Skip)) $o['Skip'] = $this->Skip;
if (isset($this->Take)) $o['Take'] = $this->Take;
if (isset($this->SiteRootNodeId)) $o['SiteRootNodeId'] = $this->SiteRootNodeId;
return empty($o) ? new class(){} : $o;
}
}
class PageProxy implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $ParentPagesTitles=null,
/** @var string|null */
public ?string $WorkflowStatus=null,
/** @var bool|null */
public ?bool $HasDraftNewerThanPublished=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['ParentPagesTitles'])) $this->ParentPagesTitles = $o['ParentPagesTitles'];
if (isset($o['WorkflowStatus'])) $this->WorkflowStatus = $o['WorkflowStatus'];
if (isset($o['HasDraftNewerThanPublished'])) $this->HasDraftNewerThanPublished = $o['HasDraftNewerThanPublished'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->ParentPagesTitles)) $o['ParentPagesTitles'] = $this->ParentPagesTitles;
if (isset($this->WorkflowStatus)) $o['WorkflowStatus'] = $this->WorkflowStatus;
if (isset($this->HasDraftNewerThanPublished)) $o['HasDraftNewerThanPublished'] = $this->HasDraftNewerThanPublished;
return empty($o) ? new class(){} : $o;
}
}
class UncachedPagesProxy implements JsonSerializable
{
public function __construct(
/** @var array<PageProxy>|null */
public ?array $NotCachedPages=null,
/** @var int */
public int $CountAllSites=0,
/** @var int */
public int $CountCurrentSite=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['NotCachedPages'])) $this->NotCachedPages = JsonConverters::fromArray('PageProxy', $o['NotCachedPages']);
if (isset($o['CountAllSites'])) $this->CountAllSites = $o['CountAllSites'];
if (isset($o['CountCurrentSite'])) $this->CountCurrentSite = $o['CountCurrentSite'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->NotCachedPages)) $o['NotCachedPages'] = JsonConverters::toArray('PageProxy', $this->NotCachedPages);
if (isset($this->CountAllSites)) $o['CountAllSites'] = $this->CountAllSites;
if (isset($this->CountCurrentSite)) $o['CountCurrentSite'] = $this->CountCurrentSite;
return empty($o) ? new class(){} : $o;
}
}
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/diagnostics/uncached-pages HTTP/1.1 Host: www.asg.com.au Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"NotCachedPages":[{"Title":"String","ParentPagesTitles":"String","WorkflowStatus":"String","HasDraftNewerThanPublished":false}],"CountAllSites":0,"CountCurrentSite":0}