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: 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 82

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_submit_response.rb', line 18

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

#created_atString

When the batch was created.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :created_at, String

#creditsContextDev::Models::BatchSubmitResponse::Credits

What accepting this batch cost.



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

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:



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

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:



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

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

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

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



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

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

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

API key usage for this request.



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

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

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

How pages will be selected.

Parameters:

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

Returns:



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

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:



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

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

#tagsArray<String>

Tags stored on the batch.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


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

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)


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

optional :webhook_secret, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {