Package com.qtsurfer.api.client.model
Class PrepareJobState
java.lang.Object
com.qtsurfer.api.client.model.PrepareJobState
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.14.0")
public class PrepareJobState
extends Object
State of a single-instrument prepare job — the `JobState` shape plus a coverage summary. A single-instrument prepare is always terminal (`status: Completed`): the client decides what to do from `coverageRatio` (e.g. execute if it is at or above a chosen threshold) rather than polling for missing hours that may never arrive — a missing hour for one instrument usually means low activity, not missing data. **Two coverage shapes, by exchange vs. dataset.** Against a managed exchange, coverage is walked hour by hour: `totalHours`/`hoursWithData`/`hoursWithoutData`. Against a dataset-backed prepare (`exchangeId: user`), coverage is reported on the dataset's own cadence grid instead — hour-walking a daily dataset would report `1/24` and read as broken — via `cadence`/`gaps`/`largestGapSteps`; `totalHours`/`hoursWithData`/ `hoursWithoutData` are absent in that case. `dataFrom`/`dataTo` are present either way, and `coverageRatio` too, computed accordingly — except against a dataset whose `cadence` is `rt`: with no fixed step there is no expected row count to measure against, so `coverageRatio` is absent and `gaps`/`largestGapSteps` are `0`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCurrent status of the job. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHoursWithoutDataItem(PrepareJobStateAllOfHoursWithoutData hoursWithoutDataItem) coverageRatio(Double coverageRatio) dataFrom(OffsetDateTime dataFrom) dataTo(OffsetDateTime dataTo) endTime(OffsetDateTime endTime) booleanReturn true if this PrepareJobState object is equal to o.The dataset version's own discovered cadence — a fixed grid (e.g.The amount of data processed so farIdentifier for the job's execution context.Against a managed exchange: `hoursWithData / totalHours` in `[0,1]` (`1.0` when `totalHours` is 0), the fraction of hours in the requested range that have served data.Start of the available data range for the prepared instrument.End of the available data range for the prepared instrument.Timestamp for when the preparation finishedgetGaps()Number of gaps in the dataset version at its own cadence, as discovered at ingest time.Number of hours in the range that have data.One entry per hour in the range that has no data, with a rationale.The largest gap in the dataset version, in units of its own cadence step.getSize()Total size of the data being preparedTimestamp for when the preparation startedCurrent status of the job.Detailed status information, if availableNumber of whole hours in the requested prepare range.inthashCode()hoursWithData(Integer hoursWithData) hoursWithoutData(List<PrepareJobStateAllOfHoursWithoutData> hoursWithoutData) largestGapSteps(Integer largestGapSteps) voidsetCadence(String cadence) voidsetCompleted(Integer completed) voidsetContextId(String contextId) voidsetCoverageRatio(Double coverageRatio) voidsetDataFrom(OffsetDateTime dataFrom) voidsetDataTo(OffsetDateTime dataTo) voidsetEndTime(OffsetDateTime endTime) voidvoidsetHoursWithData(Integer hoursWithData) voidsetHoursWithoutData(List<PrepareJobStateAllOfHoursWithoutData> hoursWithoutData) voidsetLargestGapSteps(Integer largestGapSteps) voidvoidsetStartTime(OffsetDateTime startTime) voidsetStatus(PrepareJobState.StatusEnum status) voidsetStatusDetail(String statusDetail) voidsetTotalHours(Integer totalHours) startTime(OffsetDateTime startTime) status(PrepareJobState.StatusEnum status) statusDetail(String statusDetail) toString()totalHours(Integer totalHours) Convert the instance into URL query string.toUrlQueryString(String prefix) Convert the instance into URL query string.
-
Field Details
-
JSON_PROPERTY_CONTEXT_ID
- See Also:
-
JSON_PROPERTY_STATUS
- See Also:
-
JSON_PROPERTY_STATUS_DETAIL
- See Also:
-
JSON_PROPERTY_SIZE
- See Also:
-
JSON_PROPERTY_COMPLETED
- See Also:
-
JSON_PROPERTY_START_TIME
- See Also:
-
JSON_PROPERTY_END_TIME
- See Also:
-
JSON_PROPERTY_DATA_FROM
- See Also:
-
JSON_PROPERTY_DATA_TO
- See Also:
-
JSON_PROPERTY_COVERAGE_RATIO
- See Also:
-
JSON_PROPERTY_TOTAL_HOURS
- See Also:
-
JSON_PROPERTY_HOURS_WITH_DATA
- See Also:
-
JSON_PROPERTY_CADENCE
- See Also:
-
JSON_PROPERTY_GAPS
- See Also:
-
JSON_PROPERTY_LARGEST_GAP_STEPS
- See Also:
-
JSON_PROPERTY_HOURS_WITHOUT_DATA
- See Also:
-
-
Constructor Details
-
PrepareJobState
public PrepareJobState()
-
-
Method Details
-
contextId
-
getContextId
Identifier for the job's execution context. Its current shape is a colon-delimited string encoding the data source type, an internal user id, the exchange, the job id, and the instrument — but that structure is not a committed contract and may change without notice. Treat it as an opaque token: store and pass it back, don't parse it.- Returns:
- contextId
-
setContextId
-
status
-
getStatus
Current status of the job. Treat `Completed | Aborted | Failed` as terminal; `New | Started` mean keep polling. A single-instrument prepare is always terminal (`Completed`) — decide from `PrepareJobState.coverageRatio` (or `dataFrom`/`dataTo` against an `rt` dataset, which has no ratio), not by polling.- Returns:
- status
-
setStatus
-
statusDetail
-
getStatusDetail
Detailed status information, if available- Returns:
- statusDetail
-
setStatusDetail
-
size
-
getSize
Total size of the data being prepared- Returns:
- size
-
setSize
-
completed
-
getCompleted
The amount of data processed so far- Returns:
- completed
-
setCompleted
-
startTime
-
getStartTime
Timestamp for when the preparation started- Returns:
- startTime
-
setStartTime
-
endTime
-
getEndTime
Timestamp for when the preparation finished- Returns:
- endTime
-
setEndTime
-
dataFrom
-
getDataFrom
Start of the available data range for the prepared instrument.- Returns:
- dataFrom
-
setDataFrom
-
dataTo
-
getDataTo
End of the available data range for the prepared instrument.- Returns:
- dataTo
-
setDataTo
-
coverageRatio
-
getCoverageRatio
Against a managed exchange: `hoursWithData / totalHours` in `[0,1]` (`1.0` when `totalHours` is 0), the fraction of hours in the requested range that have served data. Against a dataset (`exchangeId: user`): `rows / expectedStepsAtCadence` over the dataset version's own range — echoing what ingest computed once, not recomputed against a narrower prepare request. Absent for an `rt` dataset (no fixed step, so no expected row count). minimum: 0 maximum: 1- Returns:
- coverageRatio
-
setCoverageRatio
-
totalHours
-
getTotalHours
Number of whole hours in the requested prepare range. Managed exchanges only — absent for a dataset-backed prepare.- Returns:
- totalHours
-
setTotalHours
-
hoursWithData
-
getHoursWithData
Number of hours in the range that have data. Managed exchanges only — absent for a dataset-backed prepare.- Returns:
- hoursWithData
-
setHoursWithData
-
cadence
-
getCadence
The dataset version's own discovered cadence — a fixed grid (e.g. `1m`, `1h`) or `rt` (see `DatasetVersion.cadence`). Only present for a dataset-backed prepare (`exchangeId: user`).- Returns:
- cadence
-
setCadence
-
gaps
-
getGaps
Number of gaps in the dataset version at its own cadence, as discovered at ingest time. `0` for `rt`. Only present for a dataset-backed prepare.- Returns:
- gaps
-
setGaps
-
largestGapSteps
-
getLargestGapSteps
The largest gap in the dataset version, in units of its own cadence step. `0` for `rt`. Only present for a dataset-backed prepare.- Returns:
- largestGapSteps
-
setLargestGapSteps
-
hoursWithoutData
public PrepareJobState hoursWithoutData(@Nullable List<PrepareJobStateAllOfHoursWithoutData> hoursWithoutData) -
addHoursWithoutDataItem
public PrepareJobState addHoursWithoutDataItem(PrepareJobStateAllOfHoursWithoutData hoursWithoutDataItem) -
getHoursWithoutData
One entry per hour in the range that has no data, with a rationale. Managed exchanges only — absent for a dataset-backed prepare.- Returns:
- hoursWithoutData
-
setHoursWithoutData
public void setHoursWithoutData(@Nullable List<PrepareJobStateAllOfHoursWithoutData> hoursWithoutData) -
equals
Return true if this PrepareJobState object is equal to o. -
hashCode
public int hashCode() -
toString
-
toUrlQueryString
Convert the instance into URL query string.- Returns:
- URL query string
-
toUrlQueryString
Convert the instance into URL query string.- Parameters:
prefix- prefix of the query string- Returns:
- URL query string
-