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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"dealEventSetMetrics":[{"sourceModelSystem":"String","modelId":"String","sourceEventSetId":"String","eventSetId":0,"perspectiveId":0,"elAgg":0,"elOcc":0,"pAtt":0,"pExh":0,"sourceDealId":"String","sourceDealSystem":"String","approvedDateTimeUtc":"0001-01-01T00:00:00.0000000Z"}],"responseStatus":{"__type":"ServiceStack.ResponseStatus, ServiceStack.Interfaces","errorCode":"String","message":"String","stackTrace":"String","errors":[{"__type":"ServiceStack.ResponseError, ServiceStack.Interfaces","errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}