Nephila RiskStore

<back to all web services

GetCacheStatusRequest

General
Requires Authentication
Requires any of the roles:Riskstore.Read, Riskstore.Write, Riskstore.Admin
The following routes are available for this service:
GET/api/riskstore/cache/statusCheck the cache status
<?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 GetCacheStatusRespone implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $linking=null,
        /** @var bool|null */
        public ?bool $eventSource=null,
        /** @var bool|null */
        public ?bool $eventSourcePerspective=null,
        /** @var bool|null */
        public ?bool $metaRisk=null,
        /** @var bool|null */
        public ?bool $eventLosses=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['linking'])) $this->linking = $o['linking'];
        if (isset($o['eventSource'])) $this->eventSource = $o['eventSource'];
        if (isset($o['eventSourcePerspective'])) $this->eventSourcePerspective = $o['eventSourcePerspective'];
        if (isset($o['metaRisk'])) $this->metaRisk = $o['metaRisk'];
        if (isset($o['eventLosses'])) $this->eventLosses = $o['eventLosses'];
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->linking)) $o['linking'] = $this->linking;
        if (isset($this->eventSource)) $o['eventSource'] = $this->eventSource;
        if (isset($this->eventSourcePerspective)) $o['eventSourcePerspective'] = $this->eventSourcePerspective;
        if (isset($this->metaRisk)) $o['metaRisk'] = $this->metaRisk;
        if (isset($this->eventLosses)) $o['eventLosses'] = $this->eventLosses;
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class GetCacheStatusRequest implements IGet, JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetCacheStatusRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/riskstore/cache/status HTTP/1.1 
Host: riskstoreng-dev.nephila.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	linking: False,
	eventSource: False,
	eventSourcePerspective: False,
	metaRisk: False,
	eventLosses: False,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}