Class Dataset

java.lang.Object
com.qtsurfer.api.client.model.Dataset

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.14.0") public class Dataset extends Object
A dataset's own metadata — not its data. `currentVersionId` is what a prepare against `exchangeId: user` reads by default; see `DatasetVersion` for what a version carries. `from`/`to`/`cadence`/`timestampUnit`/`bytes`/`rows`/`gaps`/`largestGapSteps` mirror that current version's own discovered range, cadence, timestamp unit and metrics, so you don't need a second call to `GET /datasets/{datasetId}/uploads/{uploadId}` just to see what a dataset covers.
  • Field Details

  • Constructor Details

    • Dataset

      public Dataset()
  • Method Details

    • datasetId

      public Dataset datasetId(@Nonnull String datasetId)
    • getDatasetId

      @Nonnull public String getDatasetId()
      Opaque id, returned by `POST /datasets`.
      Returns:
      datasetId
    • setDatasetId

      public void setDatasetId(@Nonnull String datasetId)
    • name

      public Dataset name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Unique among your datasets.
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • type

      public Dataset type(@Nonnull Dataset.TypeEnum type)
    • getType

      @Nonnull public Dataset.TypeEnum getType()
      `ticker` for an upload or a `dex` import with no `cadence` requested (native per-trade data). `klines` for a `dex` import that requested a candle `cadence` — pre-aggregated bars rather than raw ticks. Purely informational; both shapes are read the same way.
      Returns:
      type
    • setType

      public void setType(@Nonnull Dataset.TypeEnum type)
    • instrument

      public Dataset instrument(@Nonnull String instrument)
    • getInstrument

      @Nonnull public String getInstrument()
      Exchange instrument identifier (e.g. a currency pair)
      Returns:
      instrument
    • setInstrument

      public void setInstrument(@Nonnull String instrument)
    • createdAt

      public Dataset createdAt(@Nonnull OffsetDateTime createdAt)
    • getCreatedAt

      @Nonnull public OffsetDateTime getCreatedAt()
      When the dataset was created.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nonnull OffsetDateTime createdAt)
    • currentVersionId

      public Dataset currentVersionId(@Nullable String currentVersionId)
    • getCurrentVersionId

      @Nullable public String getCurrentVersionId()
      The id of the most recently finalized, successfully ingested version. Absent until at least one upload has finished ingesting.
      Returns:
      currentVersionId
    • setCurrentVersionId

      public void setCurrentVersionId(@Nullable String currentVersionId)
    • updatedAt

      public Dataset updatedAt(@Nullable OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      When `currentVersionId` last changed. Absent until it has a value.
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nullable OffsetDateTime updatedAt)
    • from

      public Dataset from(@Nullable OffsetDateTime from)
    • getFrom

      @Nullable public OffsetDateTime getFrom()
      Start of `currentVersionId`'s own data range, as discovered at ingest time. Absent until a version exists.
      Returns:
      from
    • setFrom

      public void setFrom(@Nullable OffsetDateTime from)
    • to

      public Dataset to(@Nullable OffsetDateTime to)
    • getTo

      @Nullable public OffsetDateTime getTo()
      End of `currentVersionId`'s own data range, as discovered at ingest time. Absent until a version exists.
      Returns:
      to
    • setTo

      public void setTo(@Nullable OffsetDateTime to)
    • cadence

      public Dataset cadence(@Nullable String cadence)
    • getCadence

      @Nullable public String getCadence()
      `currentVersionId`'s own discovered cadence — a fixed grid (e.g. `1s`, `1m`, `1h`) or `rt` (see `DatasetVersion.cadence`). Absent until a version exists.
      Returns:
      cadence
    • setCadence

      public void setCadence(@Nullable String cadence)
    • timestampUnit

      public Dataset timestampUnit(@Nullable Dataset.TimestampUnitEnum timestampUnit)
    • getTimestampUnit

      @Nullable public Dataset.TimestampUnitEnum getTimestampUnit()
      `currentVersionId`'s own timestamp unit (see `DatasetVersion.timestampUnit`) — decode the `timestamp` column of `dataUrl`'s file accordingly. Present only when `status` is `ready`.
      Returns:
      timestampUnit
    • setTimestampUnit

      public void setTimestampUnit(@Nullable Dataset.TimestampUnitEnum timestampUnit)
    • status

      public Dataset status(@Nonnull Dataset.StatusEnum status)
    • getStatus

      @Nonnull public Dataset.StatusEnum getStatus()
      * `ready` — `currentVersionId` is set; `from`/`to`/`cadence`/`bytes`/`rows`/`gaps`/ `largestGapSteps` describe it. * `failed` — the most recent upload/import attempt failed. `currentVersionId` and the fields above are absent — there is nothing to read yet. See `error`. * `pending` — nothing has ever been attempted (just created, or an upload was never finalized).
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull Dataset.StatusEnum status)
    • bytes

      public Dataset bytes(@Nullable Integer bytes)
    • getBytes

      @Nullable public Integer getBytes()
      Size of `currentVersionId`'s own stored file. Present only when `status` is `ready` — see `DatasetVersion.bytes` for what it measures exactly.
      Returns:
      bytes
    • setBytes

      public void setBytes(@Nullable Integer bytes)
    • rows

      public Dataset rows(@Nullable Integer rows)
    • getRows

      @Nullable public Integer getRows()
      `currentVersionId`'s own row count. Present only when `status` is `ready`.
      Returns:
      rows
    • setRows

      public void setRows(@Nullable Integer rows)
    • gaps

      public Dataset gaps(@Nullable Integer gaps)
    • getGaps

      @Nullable public Integer getGaps()
      `currentVersionId`'s own gap count at its discovered cadence. Present only when `status` is `ready`.
      Returns:
      gaps
    • setGaps

      public void setGaps(@Nullable Integer gaps)
    • largestGapSteps

      public Dataset largestGapSteps(@Nullable Integer largestGapSteps)
    • getLargestGapSteps

      @Nullable public Integer getLargestGapSteps()
      `currentVersionId`'s own largest gap, in units of its discovered cadence step. Present only when `status` is `ready`.
      Returns:
      largestGapSteps
    • setLargestGapSteps

      public void setLargestGapSteps(@Nullable Integer largestGapSteps)
    • error

      public Dataset error(@Nullable String error)
    • getError

      @Nullable public String getError()
      A human-readable reason the most recent upload/import attempt failed. Present only when `status` is `failed`.
      Returns:
      error
    • setError

      public void setError(@Nullable String error)
    • equals

      public boolean equals(Object o)
      Return true if this Dataset object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUrlQueryString

      public String toUrlQueryString()
      Convert the instance into URL query string.
      Returns:
      URL query string
    • toUrlQueryString

      public String toUrlQueryString(String prefix)
      Convert the instance into URL query string.
      Parameters:
      prefix - prefix of the query string
      Returns:
      URL query string