Class: ContextDev::Models::BatchRetrieveResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/batch_retrieve_response.rb,
sig/context_dev/models/batch_retrieve_response.rbs

Overview

See Also:

  • ContextDev::Resources::Batch#retrieve

Defined Under Namespace

Modules: Format, Mode, Status Classes: Credits, InvalidURL, KeyMetadata, Progress, Results, Timing

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(completed_at:, created_at:, started_at:) ⇒ Object

Parameters:

  • completed_at (String, nil)

    When processing finished. Null while active.

  • created_at (String)

    When the batch was created.

  • started_at (String, nil)

    When processing started. Null while queued.



# File 'lib/context_dev/models/batch_retrieve_response.rb', line 102

Instance Attribute Details

#crawlContextDev::Models::CrawlControls?

The crawl controls as submitted, so the limits requested can be compared against what the crawl reached.

Parameters:

Returns:



18
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 18

required :crawl, -> { ContextDev::CrawlControls }, nil?: true

#creditsContextDev::Models::BatchRetrieveResponse::Credits

What this batch has done to your credit balance.



24
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 24

required :credits, -> { ContextDev::Models::BatchRetrieveResponse::Credits }

#failureContextDev::Models::Failure?

A failure of the batch as a whole, distinct from the per-page failures in page_errors.

Parameters:

Returns:



31
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 31

required :failure, -> { ContextDev::Failure }, nil?: true

#format_Symbol, ContextDev::Models::BatchRetrieveResponse::Format

What each page is returned as. Matches input.data.format on the submit request.

Parameters:

  • value (ContextDev::Models::BatchRetrieveResponse::format_)

Returns:



38
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 38

required :format_, enum: -> { ContextDev::Models::BatchRetrieveResponse::Format }, api_name: :format

#idString

Batch ID used to retrieve or cancel the job.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 11

required :id, String

#inputContextDev::Models::Intake

What submission took in, and what it charged for.

Parameters:

Returns:



44
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 44

required :input, -> { ContextDev::Intake }

#invalid_urlsArray<ContextDev::Models::BatchRetrieveResponse::InvalidURL>

Rejected URLs, up to 100. These are not charged.



50
51
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 50

required :invalid_urls,
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BatchRetrieveResponse::InvalidURL] }

#key_metadataContextDev::Models::BatchRetrieveResponse::KeyMetadata?

API key usage for this request.



100
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 100

optional :key_metadata, -> { ContextDev::Models::BatchRetrieveResponse::KeyMetadata }

#modeSymbol, ContextDev::Models::BatchRetrieveResponse::Mode

How pages were selected. Matches input.mode on the submit request.

Parameters:

  • value (ContextDev::Models::BatchRetrieveResponse::mode)

Returns:



57
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 57

required :mode, enum: -> { ContextDev::Models::BatchRetrieveResponse::Mode }

#page_errorsArray<ContextDev::Models::PageErrorCount>

Individual page failures grouped by error code, sorted by count. Unrelated to failure, which is the batch itself failing.

Parameters:

Returns:



64
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 64

required :page_errors, -> { ContextDev::Internal::Type::ArrayOf[ContextDev::PageErrorCount] }

#progressContextDev::Models::BatchRetrieveResponse::Progress

Pages attempted so far. Use status to check completion.



70
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 70

required :progress, -> { ContextDev::Models::BatchRetrieveResponse::Progress }

#resultsContextDev::Models::BatchRetrieveResponse::Results?

Download links, available once the batch reaches a final status and null before then. GET /batch/batch_id/results serves the same records as paginated JSON.



77
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 77

required :results, -> { ContextDev::Models::BatchRetrieveResponse::Results }, nil?: true

#statusSymbol, ContextDev::Models::BatchRetrieveResponse::Status

Current state. completed, cancelled, and failed are final.

Parameters:

  • value (ContextDev::Models::BatchRetrieveResponse::status)

Returns:



83
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 83

required :status, enum: -> { ContextDev::Models::BatchRetrieveResponse::Status }

#tagsArray<String>

Tags stored on the batch at submission.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


89
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 89

required :tags, ContextDev::Internal::Type::ArrayOf[String]

#timingContextDev::Models::BatchRetrieveResponse::Timing



94
# File 'lib/context_dev/models/batch_retrieve_response.rb', line 94

required :timing, -> { ContextDev::Models::BatchRetrieveResponse::Timing }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/batch_retrieve_response.rb', line 183

Instance Method Details

#to_hash{

Returns:

  • ({)


75
# File 'sig/context_dev/models/batch_retrieve_response.rbs', line 75

def to_hash: -> {