<?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};
enum AnalysisType : string
{
case NotSet = 'NotSet';
case Standard = 'Standard';
case RunOff = 'RunOff';
}
enum SimulationLossPerspective : string
{
case NotSet = 'NotSet';
case Agg = 'Agg';
case Occ = 'Occ';
}
enum ReinsurancePremiumLossType : string
{
case NotSet = 'NotSet';
case Net = 'Net';
case Gross = 'Gross';
}
enum ResultOutputLevel : string
{
case NotSet = 'NotSet';
case PortfolioMetrics = 'PortfolioMetrics';
case Curve = 'Curve';
case YLT = 'YLT';
case TailIntensity = 'TailIntensity';
case DealYlt = 'DealYlt';
case DealElt = 'DealElt';
case DealEltWithIndustryLoss = 'DealEltWithIndustryLoss';
case PortfolioElt = 'PortfolioElt';
case PortfolioEltWithIndustryLoss = 'PortfolioEltWithIndustryLoss';
case EventSetGeneration = 'EventSetGeneration';
case PortfolioRaps = 'PortfolioRaps';
case DealRaps = 'DealRaps';
case PortfolioSepyIndustryLoss = 'PortfolioSepyIndustryLoss';
case DealSepyIndustryLoss = 'DealSepyIndustryLoss';
}
class AnalysisPortfolioEventSetResult implements IObjectWithId, IHasAnalysisId, JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
/** @var int */
public int $id=0,
// @DataMember(Order=2)
/** @var int */
public int $analysisId=0,
// @DataMember(Order=3)
/** @var int */
public int $analysisPortfolioEventSetConfigurationId=0,
// @DataMember(Order=4)
/** @var int */
public int $analysisResultId=0,
// @DataMember(Order=5)
/** @var string|null */
public ?string $portfolioName=null,
// @DataMember(Order=6)
/** @var string */
public string $rowIdentifier=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['analysisId'])) $this->analysisId = $o['analysisId'];
if (isset($o['analysisPortfolioEventSetConfigurationId'])) $this->analysisPortfolioEventSetConfigurationId = $o['analysisPortfolioEventSetConfigurationId'];
if (isset($o['analysisResultId'])) $this->analysisResultId = $o['analysisResultId'];
if (isset($o['portfolioName'])) $this->portfolioName = $o['portfolioName'];
if (isset($o['rowIdentifier'])) $this->rowIdentifier = $o['rowIdentifier'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->analysisId)) $o['analysisId'] = $this->analysisId;
if (isset($this->analysisPortfolioEventSetConfigurationId)) $o['analysisPortfolioEventSetConfigurationId'] = $this->analysisPortfolioEventSetConfigurationId;
if (isset($this->analysisResultId)) $o['analysisResultId'] = $this->analysisResultId;
if (isset($this->portfolioName)) $o['portfolioName'] = $this->portfolioName;
if (isset($this->rowIdentifier)) $o['rowIdentifier'] = $this->rowIdentifier;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class AnalysisResult implements IObjectWithId, JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
/** @var int */
public int $id=0,
// @DataMember(Order=2)
/** @var int */
public int $analysisId=0,
// @DataMember(Order=3)
/** @var int */
public int $analysisConfigurationId=0,
// @DataMember(Order=4)
/** @var string|null */
public ?string $container=null,
// @DataMember(Order=5)
/** @var string|null */
public ?string $blobName=null,
// @DataMember(Order=6)
/** @var string|null */
public ?string $resultTableName=null,
// @DataMember(Order=7)
/** @var AnalysisType|null */
public ?AnalysisType $analysisType=null,
// @DataMember(Order=8)
/** @var SimulationLossPerspective|null */
public ?SimulationLossPerspective $simulationLossPerspective=null,
// @DataMember(Order=9)
/** @var ReinsurancePremiumLossType|null */
public ?ReinsurancePremiumLossType $reinsurancePremiumLossType=null,
// @DataMember(Order=10)
/** @var ResultOutputLevel|null */
public ?ResultOutputLevel $outputLevel=null,
// @DataMember(Order=11)
/** @var int */
public int $metaRiskId=0,
// @DataMember(Order=12)
/** @var array<AnalysisPortfolioEventSetResult>|null */
public ?array $analysisPortfolioEventSetResults=null,
// @DataMember(Order=13)
/** @var string */
public string $rowIdentifier=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['analysisId'])) $this->analysisId = $o['analysisId'];
if (isset($o['analysisConfigurationId'])) $this->analysisConfigurationId = $o['analysisConfigurationId'];
if (isset($o['container'])) $this->container = $o['container'];
if (isset($o['blobName'])) $this->blobName = $o['blobName'];
if (isset($o['resultTableName'])) $this->resultTableName = $o['resultTableName'];
if (isset($o['analysisType'])) $this->analysisType = JsonConverters::from('AnalysisType', $o['analysisType']);
if (isset($o['simulationLossPerspective'])) $this->simulationLossPerspective = JsonConverters::from('SimulationLossPerspective', $o['simulationLossPerspective']);
if (isset($o['reinsurancePremiumLossType'])) $this->reinsurancePremiumLossType = JsonConverters::from('ReinsurancePremiumLossType', $o['reinsurancePremiumLossType']);
if (isset($o['outputLevel'])) $this->outputLevel = JsonConverters::from('ResultOutputLevel', $o['outputLevel']);
if (isset($o['metaRiskId'])) $this->metaRiskId = $o['metaRiskId'];
if (isset($o['analysisPortfolioEventSetResults'])) $this->analysisPortfolioEventSetResults = JsonConverters::fromArray('AnalysisPortfolioEventSetResult', $o['analysisPortfolioEventSetResults']);
if (isset($o['rowIdentifier'])) $this->rowIdentifier = $o['rowIdentifier'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->analysisId)) $o['analysisId'] = $this->analysisId;
if (isset($this->analysisConfigurationId)) $o['analysisConfigurationId'] = $this->analysisConfigurationId;
if (isset($this->container)) $o['container'] = $this->container;
if (isset($this->blobName)) $o['blobName'] = $this->blobName;
if (isset($this->resultTableName)) $o['resultTableName'] = $this->resultTableName;
if (isset($this->analysisType)) $o['analysisType'] = JsonConverters::to('AnalysisType', $this->analysisType);
if (isset($this->simulationLossPerspective)) $o['simulationLossPerspective'] = JsonConverters::to('SimulationLossPerspective', $this->simulationLossPerspective);
if (isset($this->reinsurancePremiumLossType)) $o['reinsurancePremiumLossType'] = JsonConverters::to('ReinsurancePremiumLossType', $this->reinsurancePremiumLossType);
if (isset($this->outputLevel)) $o['outputLevel'] = JsonConverters::to('ResultOutputLevel', $this->outputLevel);
if (isset($this->metaRiskId)) $o['metaRiskId'] = $this->metaRiskId;
if (isset($this->analysisPortfolioEventSetResults)) $o['analysisPortfolioEventSetResults'] = JsonConverters::toArray('AnalysisPortfolioEventSetResult', $this->analysisPortfolioEventSetResults);
if (isset($this->rowIdentifier)) $o['rowIdentifier'] = $this->rowIdentifier;
return empty($o) ? new class(){} : $o;
}
}
class ProcessHotPathRollupOutputPersistenceRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $id='',
/** @var array<AnalysisResult>|null */
public ?array $outputDetails=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['outputDetails'])) $this->outputDetails = JsonConverters::fromArray('AnalysisResult', $o['outputDetails']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->outputDetails)) $o['outputDetails'] = JsonConverters::toArray('AnalysisResult', $this->outputDetails);
return empty($o) ? new class(){} : $o;
}
}
PHP ProcessHotPathRollupOutputPersistenceRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/oneway/ProcessHotPathRollupOutputPersistenceRequest HTTP/1.1
Host: riskstoreng-dev.nephila.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ProcessHotPathRollupOutputPersistenceRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Requests">
<Id>00000000-0000-0000-0000-000000000000</Id>
<OutputDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Types">
<d2p1:AnalysisResult>
<d2p1:Id>0</d2p1:Id>
<d2p1:AnalysisId>0</d2p1:AnalysisId>
<d2p1:AnalysisConfigurationId>0</d2p1:AnalysisConfigurationId>
<d2p1:Container>String</d2p1:Container>
<d2p1:BlobName>String</d2p1:BlobName>
<d2p1:ResultTableName>String</d2p1:ResultTableName>
<d2p1:AnalysisType>NotSet</d2p1:AnalysisType>
<d2p1:SimulationLossPerspective>NotSet</d2p1:SimulationLossPerspective>
<d2p1:ReinsurancePremiumLossType>NotSet</d2p1:ReinsurancePremiumLossType>
<d2p1:OutputLevel>NotSet</d2p1:OutputLevel>
<d2p1:MetaRiskId>0</d2p1:MetaRiskId>
<d2p1:AnalysisPortfolioEventSetResults>
<d2p1:AnalysisPortfolioEventSetResult>
<d2p1:AnalysisId>0</d2p1:AnalysisId>
<d2p1:AnalysisPortfolioEventSetConfigurationId>0</d2p1:AnalysisPortfolioEventSetConfigurationId>
<d2p1:AnalysisResultId>0</d2p1:AnalysisResultId>
<d2p1:Id>0</d2p1:Id>
<d2p1:PortfolioName>String</d2p1:PortfolioName>
<d2p1:RowIdentifier>00000000-0000-0000-0000-000000000000</d2p1:RowIdentifier>
</d2p1:AnalysisPortfolioEventSetResult>
</d2p1:AnalysisPortfolioEventSetResults>
<d2p1:RowIdentifier>00000000-0000-0000-0000-000000000000</d2p1:RowIdentifier>
</d2p1:AnalysisResult>
</OutputDetails>
</ProcessHotPathRollupOutputPersistenceRequest>