| POST | /api/riskstore/eventset/ingest | Ingest EventSet Request | Ingest EventSet Request |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class IngestEventSetRequest implements IPost
{
public EventSet eventSet = null;
public EventSet getEventSet() { return eventSet; }
public IngestEventSetRequest setEventSet(EventSet value) { this.eventSet = value; return this; }
}
public static class EventSet
{
public Long eventSetId = null;
public ProcessingStatus processingStatus = null;
public String sourceModelSystem = null;
public String sourceEventSetId = null;
public String modelId = null;
public Integer perspectiveId = null;
public Integer simulationCount = null;
public String programCalculationId = null;
public String description = null;
public Double limit = null;
public Integer reinstatements = null;
public String eventSourceType = null;
public String eventSetOriginId = null;
public String eventSetOriginName = null;
public String eventSetOriginType = null;
public String sourceEventSetLossContainer = null;
public String sourceEventSetLossPath = null;
public String resolution = null;
public String resultsHash = null;
public Double expectedLossAggregate = null;
public Double expectedLossOccurrence = null;
public Double probabilityOfAttachment = null;
public Double probabilityOfExhaustion = null;
public Date approvedDateTimeUtc = null;
public String approvedBy = null;
public Long eventSourceId = null;
public Date validFromUtc = null;
public Date validToUtc = null;
public String container = null;
public String blobName = null;
public Date updatedDateUtc = null;
public Boolean isArchived = null;
public String archivedLossDataBlobPath = null;
public String archivedLossDataHash = null;
public EventSetTelemetry eventSetTelemetry = null;
public Long getEventSetId() { return eventSetId; }
public EventSet setEventSetId(Long value) { this.eventSetId = value; return this; }
public ProcessingStatus getProcessingStatus() { return processingStatus; }
public EventSet setProcessingStatus(ProcessingStatus value) { this.processingStatus = value; return this; }
public String getSourceModelSystem() { return sourceModelSystem; }
public EventSet setSourceModelSystem(String value) { this.sourceModelSystem = value; return this; }
public String getSourceEventSetId() { return sourceEventSetId; }
public EventSet setSourceEventSetId(String value) { this.sourceEventSetId = value; return this; }
public String getModelId() { return modelId; }
public EventSet setModelId(String value) { this.modelId = value; return this; }
public Integer getPerspectiveId() { return perspectiveId; }
public EventSet setPerspectiveId(Integer value) { this.perspectiveId = value; return this; }
public Integer getSimulationCount() { return simulationCount; }
public EventSet setSimulationCount(Integer value) { this.simulationCount = value; return this; }
public String getProgramCalculationId() { return programCalculationId; }
public EventSet setProgramCalculationId(String value) { this.programCalculationId = value; return this; }
public String getDescription() { return description; }
public EventSet setDescription(String value) { this.description = value; return this; }
public Double getLimit() { return limit; }
public EventSet setLimit(Double value) { this.limit = value; return this; }
public Integer getReinstatements() { return reinstatements; }
public EventSet setReinstatements(Integer value) { this.reinstatements = value; return this; }
public String getEventSourceType() { return eventSourceType; }
public EventSet setEventSourceType(String value) { this.eventSourceType = value; return this; }
public String getEventSetOriginId() { return eventSetOriginId; }
public EventSet setEventSetOriginId(String value) { this.eventSetOriginId = value; return this; }
public String getEventSetOriginName() { return eventSetOriginName; }
public EventSet setEventSetOriginName(String value) { this.eventSetOriginName = value; return this; }
public String getEventSetOriginType() { return eventSetOriginType; }
public EventSet setEventSetOriginType(String value) { this.eventSetOriginType = value; return this; }
public String getSourceEventSetLossContainer() { return sourceEventSetLossContainer; }
public EventSet setSourceEventSetLossContainer(String value) { this.sourceEventSetLossContainer = value; return this; }
public String getSourceEventSetLossPath() { return sourceEventSetLossPath; }
public EventSet setSourceEventSetLossPath(String value) { this.sourceEventSetLossPath = value; return this; }
public String getResolution() { return resolution; }
public EventSet setResolution(String value) { this.resolution = value; return this; }
public String getResultsHash() { return resultsHash; }
public EventSet setResultsHash(String value) { this.resultsHash = value; return this; }
public Double getExpectedLossAggregate() { return expectedLossAggregate; }
public EventSet setExpectedLossAggregate(Double value) { this.expectedLossAggregate = value; return this; }
public Double getExpectedLossOccurrence() { return expectedLossOccurrence; }
public EventSet setExpectedLossOccurrence(Double value) { this.expectedLossOccurrence = value; return this; }
public Double getProbabilityOfAttachment() { return probabilityOfAttachment; }
public EventSet setProbabilityOfAttachment(Double value) { this.probabilityOfAttachment = value; return this; }
public Double getProbabilityOfExhaustion() { return probabilityOfExhaustion; }
public EventSet setProbabilityOfExhaustion(Double value) { this.probabilityOfExhaustion = value; return this; }
public Date getApprovedDateTimeUtc() { return approvedDateTimeUtc; }
public EventSet setApprovedDateTimeUtc(Date value) { this.approvedDateTimeUtc = value; return this; }
public String getApprovedBy() { return approvedBy; }
public EventSet setApprovedBy(String value) { this.approvedBy = value; return this; }
public Long getEventSourceId() { return eventSourceId; }
public EventSet setEventSourceId(Long value) { this.eventSourceId = value; return this; }
public Date getValidFromUtc() { return validFromUtc; }
public EventSet setValidFromUtc(Date value) { this.validFromUtc = value; return this; }
public Date getValidToUtc() { return validToUtc; }
public EventSet setValidToUtc(Date value) { this.validToUtc = value; return this; }
public String getContainer() { return container; }
public EventSet setContainer(String value) { this.container = value; return this; }
public String getBlobName() { return blobName; }
public EventSet setBlobName(String value) { this.blobName = value; return this; }
public Date getUpdatedDateUtc() { return updatedDateUtc; }
public EventSet setUpdatedDateUtc(Date value) { this.updatedDateUtc = value; return this; }
public Boolean getIsArchived() { return isArchived; }
public EventSet setIsArchived(Boolean value) { this.isArchived = value; return this; }
public String getArchivedLossDataBlobPath() { return archivedLossDataBlobPath; }
public EventSet setArchivedLossDataBlobPath(String value) { this.archivedLossDataBlobPath = value; return this; }
public String getArchivedLossDataHash() { return archivedLossDataHash; }
public EventSet setArchivedLossDataHash(String value) { this.archivedLossDataHash = value; return this; }
public EventSetTelemetry getEventSetTelemetry() { return eventSetTelemetry; }
public EventSet setEventSetTelemetry(EventSetTelemetry value) { this.eventSetTelemetry = value; return this; }
}
public static enum ProcessingStatus
{
New(0),
Processing(1),
Failed(10),
Successful(20);
private final int value;
ProcessingStatus(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class EventSetTelemetry
{
public Long eventSetId = null;
public Date startedDateTimeUtc = null;
public Date endedDateTimeUct = null;
public Integer eventLossCount = null;
public Long getEventSetId() { return eventSetId; }
public EventSetTelemetry setEventSetId(Long value) { this.eventSetId = value; return this; }
public Date getStartedDateTimeUtc() { return startedDateTimeUtc; }
public EventSetTelemetry setStartedDateTimeUtc(Date value) { this.startedDateTimeUtc = value; return this; }
public Date getEndedDateTimeUct() { return endedDateTimeUct; }
public EventSetTelemetry setEndedDateTimeUct(Date value) { this.endedDateTimeUct = value; return this; }
public Integer getEventLossCount() { return eventLossCount; }
public EventSetTelemetry setEventLossCount(Integer value) { this.eventLossCount = value; return this; }
}
}
Java IngestEventSetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
eventSet:
{
eventSetId: 0,
processingStatus: New,
sourceModelSystem: String,
sourceEventSetId: String,
modelId: String,
perspectiveId: 0,
simulationCount: 0,
programCalculationId: String,
description: String,
limit: 0,
reinstatements: 0,
eventSourceType: String,
eventSetOriginId: String,
eventSetOriginName: String,
eventSetOriginType: String,
sourceEventSetLossContainer: String,
sourceEventSetLossPath: String,
resolution: String,
resultsHash: String,
expectedLossAggregate: 0,
expectedLossOccurrence: 0,
probabilityOfAttachment: 0,
probabilityOfExhaustion: 0,
approvedDateTimeUtc: 0001-01-01,
approvedBy: String,
eventSourceId: 0,
validFromUtc: 0001-01-01,
validToUtc: 0001-01-01,
container: String,
blobName: String,
updatedDateUtc: 0001-01-01,
isArchived: False,
archivedLossDataBlobPath: String,
archivedLossDataHash: String,
eventSetTelemetry:
{
eventSetId: 0,
startedDateTimeUtc: 0001-01-01,
endedDateTimeUct: 0001-01-01,
eventLossCount: 0
}
}
}