Class: ContextDev::Models::BatchSubmitResponse

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

Overview

See Also:

  • ContextDev::Resources::Batch#submit

Defined Under Namespace

Modules: Format, Mode, Status Classes: CacheMetadata, Credits, InvalidURL, KeyMetadata

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(reason:, url:) ⇒ Object

Parameters:

  • reason (String)

    Why it was rejected.

  • url (String)

    Rejected URL.



# File 'lib/context_dev/models/batch_submit_response.rb', line 90

Instance Attribute Details

#cache_metadataContextDev::Models::BatchSubmitResponse::CacheMetadata

Cache outcome for this response. Composite responses are hits only when every cache-controlled fetch contributing to the output was a hit; age_ms is the oldest contributing hit.



19
# File 'lib/context_dev/models/batch_submit_response.rb', line 19

required :cache_metadata, -> { ContextDev::Models::BatchSubmitResponse::CacheMetadata }

#crawlContextDev::Models::CrawlControls?

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

Parameters:

Returns:



26
# File 'lib/context_dev/models/batch_submit_response.rb', line 26

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

#created_atString

When the batch was created.

Parameters:

  • value (String)

Returns:

  • (String)


32
# File 'lib/context_dev/models/batch_submit_response.rb', line 32

required :created_at, String

#creditsContextDev::Models::BatchSubmitResponse::Credits

What accepting this batch cost.



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

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

#format_Symbol, ContextDev::Models::BatchSubmitResponse::Format

What each page will be returned as.

Parameters:

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

Returns:



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

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

#idString

Batch ID. Poll GET /batch/batch_id with it.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#inputContextDev::Models::Intake

What submission took in, and what it charged for.

Parameters:

Returns:



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

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

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

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



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

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

#key_metadataContextDev::Models::BatchSubmitResponse::KeyMetadata?

API key usage for this request.



81
# File 'lib/context_dev/models/batch_submit_response.rb', line 81

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

#modeSymbol, ContextDev::Models::BatchSubmitResponse::Mode

How pages will be selected.

Parameters:

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

Returns:



63
# File 'lib/context_dev/models/batch_submit_response.rb', line 63

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

#statusSymbol, ContextDev::Models::BatchSubmitResponse::Status

Always queued. An accepted batch has not started yet.

Parameters:

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

Returns:



69
# File 'lib/context_dev/models/batch_submit_response.rb', line 69

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

#tagsArray<String>

Tags stored on the batch.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


75
# File 'lib/context_dev/models/batch_submit_response.rb', line 75

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

#webhook_secretString?

Signing secret for the completion webhook, returned only here and never again. Store it now; it is not repeated by GET /batch/batch_id.

Parameters:

  • (String)

Returns:

  • (String, nil)


88
# File 'lib/context_dev/models/batch_submit_response.rb', line 88

optional :webhook_secret, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/batch_submit_response.rb', line 158

Instance Method Details

#to_hash{

Returns:

  • ({)


69
# File 'sig/context_dev/models/batch_submit_response.rbs', line 69

def to_hash: -> {