Nephila RiskStore

<back to all web services

IngestEventSetRequest

General
Requires Authentication
The following routes are available for this service:
POST/api/riskstore/eventset/ingestIngest EventSet RequestIngest EventSet Request
import 'package:servicestack/servicestack.dart';

enum ProcessingStatus
{
    New,
    Processing,
    Failed,
    Successful,
}

class EventSetTelemetry implements IConvertible
{
    int? eventSetId;
    DateTime? startedDateTimeUtc;
    DateTime? endedDateTimeUct;
    int? eventLossCount;

    EventSetTelemetry({this.eventSetId,this.startedDateTimeUtc,this.endedDateTimeUct,this.eventLossCount});
    EventSetTelemetry.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        eventSetId = json['eventSetId'];
        startedDateTimeUtc = JsonConverters.fromJson(json['startedDateTimeUtc'],'DateTime',context!);
        endedDateTimeUct = JsonConverters.fromJson(json['endedDateTimeUct'],'DateTime',context!);
        eventLossCount = json['eventLossCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'eventSetId': eventSetId,
        'startedDateTimeUtc': JsonConverters.toJson(startedDateTimeUtc,'DateTime',context!),
        'endedDateTimeUct': JsonConverters.toJson(endedDateTimeUct,'DateTime',context!),
        'eventLossCount': eventLossCount
    };

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

class EventSet implements IConvertible
{
    int? eventSetId;
    ProcessingStatus? processingStatus;
    String? sourceModelSystem;
    String? sourceEventSetId;
    String? modelId;
    int? perspectiveId;
    int? simulationCount;
    String? programCalculationId;
    String? description;
    double? limit;
    int? reinstatements;
    String? eventSourceType;
    String? eventSetOriginId;
    String? eventSetOriginName;
    String? eventSetOriginType;
    String? sourceEventSetLossContainer;
    String? sourceEventSetLossPath;
    String? resolution;
    String? resultsHash;
    double? expectedLossAggregate;
    double? expectedLossOccurrence;
    double? probabilityOfAttachment;
    double? probabilityOfExhaustion;
    DateTime? approvedDateTimeUtc;
    String? approvedBy;
    int? eventSourceId;
    DateTime? validFromUtc;
    DateTime? validToUtc;
    String? container;
    String? blobName;
    DateTime? updatedDateUtc;
    bool? isArchived;
    String? archivedLossDataBlobPath;
    String? archivedLossDataHash;
    EventSetTelemetry? eventSetTelemetry;

    EventSet({this.eventSetId,this.processingStatus,this.sourceModelSystem,this.sourceEventSetId,this.modelId,this.perspectiveId,this.simulationCount,this.programCalculationId,this.description,this.limit,this.reinstatements,this.eventSourceType,this.eventSetOriginId,this.eventSetOriginName,this.eventSetOriginType,this.sourceEventSetLossContainer,this.sourceEventSetLossPath,this.resolution,this.resultsHash,this.expectedLossAggregate,this.expectedLossOccurrence,this.probabilityOfAttachment,this.probabilityOfExhaustion,this.approvedDateTimeUtc,this.approvedBy,this.eventSourceId,this.validFromUtc,this.validToUtc,this.container,this.blobName,this.updatedDateUtc,this.isArchived,this.archivedLossDataBlobPath,this.archivedLossDataHash,this.eventSetTelemetry});
    EventSet.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        eventSetId = json['eventSetId'];
        processingStatus = JsonConverters.fromJson(json['processingStatus'],'ProcessingStatus',context!);
        sourceModelSystem = json['sourceModelSystem'];
        sourceEventSetId = json['sourceEventSetId'];
        modelId = json['modelId'];
        perspectiveId = json['perspectiveId'];
        simulationCount = json['simulationCount'];
        programCalculationId = json['programCalculationId'];
        description = json['description'];
        limit = JsonConverters.toDouble(json['limit']);
        reinstatements = json['reinstatements'];
        eventSourceType = json['eventSourceType'];
        eventSetOriginId = json['eventSetOriginId'];
        eventSetOriginName = json['eventSetOriginName'];
        eventSetOriginType = json['eventSetOriginType'];
        sourceEventSetLossContainer = json['sourceEventSetLossContainer'];
        sourceEventSetLossPath = json['sourceEventSetLossPath'];
        resolution = json['resolution'];
        resultsHash = json['resultsHash'];
        expectedLossAggregate = JsonConverters.toDouble(json['expectedLossAggregate']);
        expectedLossOccurrence = JsonConverters.toDouble(json['expectedLossOccurrence']);
        probabilityOfAttachment = JsonConverters.toDouble(json['probabilityOfAttachment']);
        probabilityOfExhaustion = JsonConverters.toDouble(json['probabilityOfExhaustion']);
        approvedDateTimeUtc = JsonConverters.fromJson(json['approvedDateTimeUtc'],'DateTime',context!);
        approvedBy = json['approvedBy'];
        eventSourceId = json['eventSourceId'];
        validFromUtc = JsonConverters.fromJson(json['validFromUtc'],'DateTime',context!);
        validToUtc = JsonConverters.fromJson(json['validToUtc'],'DateTime',context!);
        container = json['container'];
        blobName = json['blobName'];
        updatedDateUtc = JsonConverters.fromJson(json['updatedDateUtc'],'DateTime',context!);
        isArchived = json['isArchived'];
        archivedLossDataBlobPath = json['archivedLossDataBlobPath'];
        archivedLossDataHash = json['archivedLossDataHash'];
        eventSetTelemetry = JsonConverters.fromJson(json['eventSetTelemetry'],'EventSetTelemetry',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'eventSetId': eventSetId,
        'processingStatus': JsonConverters.toJson(processingStatus,'ProcessingStatus',context!),
        'sourceModelSystem': sourceModelSystem,
        'sourceEventSetId': sourceEventSetId,
        'modelId': modelId,
        'perspectiveId': perspectiveId,
        'simulationCount': simulationCount,
        'programCalculationId': programCalculationId,
        'description': description,
        'limit': limit,
        'reinstatements': reinstatements,
        'eventSourceType': eventSourceType,
        'eventSetOriginId': eventSetOriginId,
        'eventSetOriginName': eventSetOriginName,
        'eventSetOriginType': eventSetOriginType,
        'sourceEventSetLossContainer': sourceEventSetLossContainer,
        'sourceEventSetLossPath': sourceEventSetLossPath,
        'resolution': resolution,
        'resultsHash': resultsHash,
        'expectedLossAggregate': expectedLossAggregate,
        'expectedLossOccurrence': expectedLossOccurrence,
        'probabilityOfAttachment': probabilityOfAttachment,
        'probabilityOfExhaustion': probabilityOfExhaustion,
        'approvedDateTimeUtc': JsonConverters.toJson(approvedDateTimeUtc,'DateTime',context!),
        'approvedBy': approvedBy,
        'eventSourceId': eventSourceId,
        'validFromUtc': JsonConverters.toJson(validFromUtc,'DateTime',context!),
        'validToUtc': JsonConverters.toJson(validToUtc,'DateTime',context!),
        'container': container,
        'blobName': blobName,
        'updatedDateUtc': JsonConverters.toJson(updatedDateUtc,'DateTime',context!),
        'isArchived': isArchived,
        'archivedLossDataBlobPath': archivedLossDataBlobPath,
        'archivedLossDataHash': archivedLossDataHash,
        'eventSetTelemetry': JsonConverters.toJson(eventSetTelemetry,'EventSetTelemetry',context!)
    };

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

class IngestEventSetRequest implements IPost, IConvertible
{
    EventSet? eventSet;

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

    fromMap(Map<String, dynamic> json) {
        eventSet = JsonConverters.fromJson(json['eventSet'],'EventSet',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'eventSet': JsonConverters.toJson(eventSet,'EventSet',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'riskstoreng_dev.nephila.com', types: <String, TypeInfo> {
    'ProcessingStatus': TypeInfo(TypeOf.Enum, enumValues:ProcessingStatus.values),
    'EventSetTelemetry': TypeInfo(TypeOf.Class, create:() => EventSetTelemetry()),
    'EventSet': TypeInfo(TypeOf.Class, create:() => EventSet()),
    'IngestEventSetRequest': TypeInfo(TypeOf.Class, create:() => IngestEventSetRequest()),
});

Dart IngestEventSetRequest 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.

POST /api/riskstore/eventset/ingest HTTP/1.1 
Host: riskstoreng-dev.nephila.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<IngestEventSetRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Requests">
  <EventSet xmlns:d2p1="http://schemas.datacontract.org/2004/07/Nephila.RiskStore.ServiceModel.Types">
    <d2p1:ApprovedBy>String</d2p1:ApprovedBy>
    <d2p1:ApprovedDateTimeUtc>0001-01-01T00:00:00</d2p1:ApprovedDateTimeUtc>
    <d2p1:ArchivedLossDataBlobPath>String</d2p1:ArchivedLossDataBlobPath>
    <d2p1:ArchivedLossDataHash>String</d2p1:ArchivedLossDataHash>
    <d2p1:BlobName>String</d2p1:BlobName>
    <d2p1:Container>String</d2p1:Container>
    <d2p1:Description>String</d2p1:Description>
    <d2p1:EventSetId>0</d2p1:EventSetId>
    <d2p1:EventSetOriginId>String</d2p1:EventSetOriginId>
    <d2p1:EventSetOriginName>String</d2p1:EventSetOriginName>
    <d2p1:EventSetOriginType>String</d2p1:EventSetOriginType>
    <d2p1:EventSetTelemetry>
      <d2p1:EndedDateTimeUct>0001-01-01T00:00:00</d2p1:EndedDateTimeUct>
      <d2p1:EventLossCount>0</d2p1:EventLossCount>
      <d2p1:EventSetId>0</d2p1:EventSetId>
      <d2p1:StartedDateTimeUtc>0001-01-01T00:00:00</d2p1:StartedDateTimeUtc>
    </d2p1:EventSetTelemetry>
    <d2p1:EventSourceId>0</d2p1:EventSourceId>
    <d2p1:EventSourceType>String</d2p1:EventSourceType>
    <d2p1:ExpectedLossAggregate>0</d2p1:ExpectedLossAggregate>
    <d2p1:ExpectedLossOccurrence>0</d2p1:ExpectedLossOccurrence>
    <d2p1:IsArchived>false</d2p1:IsArchived>
    <d2p1:Limit>0</d2p1:Limit>
    <d2p1:ModelId>String</d2p1:ModelId>
    <d2p1:PerspectiveId>0</d2p1:PerspectiveId>
    <d2p1:ProbabilityOfAttachment>0</d2p1:ProbabilityOfAttachment>
    <d2p1:ProbabilityOfExhaustion>0</d2p1:ProbabilityOfExhaustion>
    <d2p1:ProcessingStatus>New</d2p1:ProcessingStatus>
    <d2p1:ProgramCalculationId>String</d2p1:ProgramCalculationId>
    <d2p1:Reinstatements>0</d2p1:Reinstatements>
    <d2p1:Resolution>String</d2p1:Resolution>
    <d2p1:ResultsHash>String</d2p1:ResultsHash>
    <d2p1:SimulationCount>0</d2p1:SimulationCount>
    <d2p1:SourceEventSetId>String</d2p1:SourceEventSetId>
    <d2p1:SourceEventSetLossContainer>String</d2p1:SourceEventSetLossContainer>
    <d2p1:SourceEventSetLossPath>String</d2p1:SourceEventSetLossPath>
    <d2p1:SourceModelSystem>String</d2p1:SourceModelSystem>
    <d2p1:UpdatedDateUtc>0001-01-01T00:00:00</d2p1:UpdatedDateUtc>
    <d2p1:ValidFromUtc>0001-01-01T00:00:00</d2p1:ValidFromUtc>
    <d2p1:ValidToUtc>0001-01-01T00:00:00</d2p1:ValidToUtc>
  </EventSet>
</IngestEventSetRequest>