| All Verbs | /api/component/{ApplianceComponentId}/help/ |
|---|
<?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 HelpContentModel implements JsonSerializable
{
public function __construct(
/** @description Content Name - Can be used as a heading/title. */
// @ApiMember(Description="Content Name - Can be used as a heading/title.", ParameterType="query")
/** @var string|null */
public ?string $Name=null,
/** @description URL containing the help notes. This will either be a web page or a html blob file containing the information. */
// @ApiMember(Description="URL containing the help notes. This will either be a web page or a html blob file containing the information.", ParameterType="query")
/** @var string|null */
public ?string $URL=null,
/** @description If true, the URL is a blob file and details should be shown in a pop up or tooltip, if false, this is a full URL to a web page and should be opened in a new tab. */
// @ApiMember(Description="If true, the URL is a blob file and details should be shown in a pop up or tooltip, if false, this is a full URL to a web page and should be opened in a new tab.", ParameterType="query")
/** @var bool|null */
public ?bool $IsSnippet=null,
/** @description If true, this content is for external client/users. False means it is a developer note. */
// @ApiMember(Description="If true, this content is for external client/users. False means it is a developer note.", ParameterType="query")
/** @var bool|null */
public ?bool $IsUserFacing=null,
/** @description If you have multiple snippets, this is an order you should display them in. */
// @ApiMember(Description="If you have multiple snippets, this is an order you should display them in.", ParameterType="query")
/** @var int */
public int $Index=0,
/** @description This is the document status of the help content. It will be either draft or final. */
// @ApiMember(Description="This is the document status of the help content. It will be either draft or final.", ParameterType="query")
/** @var string */
public string $StatusId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['URL'])) $this->URL = $o['URL'];
if (isset($o['IsSnippet'])) $this->IsSnippet = $o['IsSnippet'];
if (isset($o['IsUserFacing'])) $this->IsUserFacing = $o['IsUserFacing'];
if (isset($o['Index'])) $this->Index = $o['Index'];
if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->URL)) $o['URL'] = $this->URL;
if (isset($this->IsSnippet)) $o['IsSnippet'] = $this->IsSnippet;
if (isset($this->IsUserFacing)) $o['IsUserFacing'] = $this->IsUserFacing;
if (isset($this->Index)) $o['Index'] = $this->Index;
if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
return empty($o) ? new class(){} : $o;
}
}
// @ApiResponse(Description="A list of help content")
class GetApplianceComponentHelpResponse implements JsonSerializable
{
public function __construct(
/** @description List of help content. */
// @ApiMember(Description="List of help content.", ParameterType="query")
/** @var array<HelpContentModel>|null */
public ?array $HelpContent=null,
/** @description Response Status */
// @ApiMember(Description="Response Status", ParameterType="query")
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['HelpContent'])) $this->HelpContent = JsonConverters::fromArray('HelpContentModel', $o['HelpContent']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->HelpContent)) $o['HelpContent'] = JsonConverters::toArray('HelpContentModel', $this->HelpContent);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
/** @description Get all help content for the specified UI Appliance Component */
// @Api(Description="Get all help content for the specified UI Appliance Component")
class GetApplianceComponentHelp implements JsonSerializable
{
public function __construct(
/** @description Appliance Component Id to retrieve help for. */
// @ApiMember(Description="Appliance Component Id to retrieve help for.", ParameterType="path")
/** @var string */
public string $ApplianceComponentId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ApplianceComponentId'])) $this->ApplianceComponentId = $o['ApplianceComponentId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ApplianceComponentId)) $o['ApplianceComponentId'] = $this->ApplianceComponentId;
return empty($o) ? new class(){} : $o;
}
}
PHP GetApplianceComponentHelp 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.
POST /api/component/{ApplianceComponentId}/help/ HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"ApplianceComponentId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"HelpContent":[{"Name":"String","URL":"String","IsSnippet":false,"IsUserFacing":false,"Index":0,"StatusId":"00000000-0000-0000-0000-000000000000"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}