Nephila RiskStore

<back to all web services

GetEventSetMetricsRequest

EventSets
Requires Authentication
The following routes are available for this service:
GET/api/riskstore/eventset/metricsGet event set metrics, used by the Excel Add-On
import 'package:servicestack/servicestack.dart';

class DealEventSetMetric implements IConvertible
{
    String? sourceModelSystem;
    String? modelId;
    String? sourceEventSetId;
    int? eventSetId;
    int? perspectiveId;
    double? elAgg;
    double? elOcc;
    double? pAtt;
    double? pExh;
    String? sourceDealId;
    String? sourceDealSystem;
    DateTime? approvedDateTimeUtc;

    DealEventSetMetric({this.sourceModelSystem,this.modelId,this.sourceEventSetId,this.eventSetId,this.perspectiveId,this.elAgg,this.elOcc,this.pAtt,this.pExh,this.sourceDealId,this.sourceDealSystem,this.approvedDateTimeUtc});
    DealEventSetMetric.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        sourceModelSystem = json['sourceModelSystem'];
        modelId = json['modelId'];
        sourceEventSetId = json['sourceEventSetId'];
        eventSetId = json['eventSetId'];
        perspectiveId = json['perspectiveId'];
        elAgg = JsonConverters.toDouble(json['elAgg']);
        elOcc = JsonConverters.toDouble(json['elOcc']);
        pAtt = JsonConverters.toDouble(json['pAtt']);
        pExh = JsonConverters.toDouble(json['pExh']);
        sourceDealId = json['sourceDealId'];
        sourceDealSystem = json['sourceDealSystem'];
        approvedDateTimeUtc = JsonConverters.fromJson(json['approvedDateTimeUtc'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'sourceModelSystem': sourceModelSystem,
        'modelId': modelId,
        'sourceEventSetId': sourceEventSetId,
        'eventSetId': eventSetId,
        'perspectiveId': perspectiveId,
        'elAgg': elAgg,
        'elOcc': elOcc,
        'pAtt': pAtt,
        'pExh': pExh,
        'sourceDealId': sourceDealId,
        'sourceDealSystem': sourceDealSystem,
        'approvedDateTimeUtc': JsonConverters.toJson(approvedDateTimeUtc,'DateTime',context!)
    };

    getTypeName() => "DealEventSetMetric";
    TypeContext? context = _ctx;
}

class GetEventSetMetricsResponse implements IConvertible
{
    List<DealEventSetMetric>? dealEventSetMetrics;
    ResponseStatus? responseStatus;

    GetEventSetMetricsResponse({this.dealEventSetMetrics,this.responseStatus});
    GetEventSetMetricsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        dealEventSetMetrics = JsonConverters.fromJson(json['dealEventSetMetrics'],'List<DealEventSetMetric>',context!);
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'dealEventSetMetrics': JsonConverters.toJson(dealEventSetMetrics,'List<DealEventSetMetric>',context!),
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "GetEventSetMetricsResponse";
    TypeContext? context = _ctx;
}

class GetEventSetMetricsRequest implements IGet, IConvertible
{
    /**
    * The analysis id to get the event set metrics for
    */
    // @ApiMember(DataType="integer", Description="The analysis id to get the event set metrics for", Format="int64", IsRequired=true)
    int? analysisId;

    GetEventSetMetricsRequest({this.analysisId});
    GetEventSetMetricsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        analysisId = json['analysisId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'analysisId': analysisId
    };

    getTypeName() => "GetEventSetMetricsRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'riskstoreng_dev.nephila.com', types: <String, TypeInfo> {
    'DealEventSetMetric': TypeInfo(TypeOf.Class, create:() => DealEventSetMetric()),
    'GetEventSetMetricsResponse': TypeInfo(TypeOf.Class, create:() => GetEventSetMetricsResponse()),
    'List<DealEventSetMetric>': TypeInfo(TypeOf.Class, create:() => <DealEventSetMetric>[]),
    'GetEventSetMetricsRequest': TypeInfo(TypeOf.Class, create:() => GetEventSetMetricsRequest()),
});

Dart GetEventSetMetricsRequest DTOs

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

HTTP + XML

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

GET /api/riskstore/eventset/metrics HTTP/1.1 
Host: riskstoreng-dev.nephila.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetEventSetMetricsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Requests">
  <DealEventSetMetrics xmlns:d2p1="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Types">
    <d2p1:DealEventSetMetric>
      <d2p1:ApprovedDateTimeUtc>0001-01-01T00:00:00</d2p1:ApprovedDateTimeUtc>
      <d2p1:ELAgg>0</d2p1:ELAgg>
      <d2p1:ELOcc>0</d2p1:ELOcc>
      <d2p1:EventSetId>0</d2p1:EventSetId>
      <d2p1:ModelId>String</d2p1:ModelId>
      <d2p1:PAtt>0</d2p1:PAtt>
      <d2p1:PExh>0</d2p1:PExh>
      <d2p1:PerspectiveId>0</d2p1:PerspectiveId>
      <d2p1:SourceDealId>String</d2p1:SourceDealId>
      <d2p1:SourceDealSystem>String</d2p1:SourceDealSystem>
      <d2p1:SourceEventSetId>String</d2p1:SourceEventSetId>
      <d2p1:SourceModelSystem>String</d2p1:SourceModelSystem>
    </d2p1:DealEventSetMetric>
  </DealEventSetMetrics>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</GetEventSetMetricsResponse>