Class: Anthropic::Models::Beta::BetaWebFetchBlockParam

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_web_fetch_block_param.rb,
sig/anthropic/models/beta/beta_web_fetch_block_param.rbs

Instance Attribute 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 ⇒ BetaWebFetchBlockParam

Returns a new instance of BetaWebFetchBlockParam.

Parameters:

  • content: (Anthropic::Beta::BetaRequestDocumentBlock)
  • url: (String)
  • retrieved_at: (String, nil)
  • type: (:web_fetch_result)


23
24
25
26
27
28
# File 'sig/anthropic/models/beta/beta_web_fetch_block_param.rbs', line 23

def initialize: (
  content: Anthropic::Beta::BetaRequestDocumentBlock,
  url: String,
  ?retrieved_at: String?,
  ?type: :web_fetch_result
) -> void

Instance Attribute Details

#content ⇒ Anthropic::Models::Beta::BetaRequestDocumentBlock

Parameters:

  • value (Anthropic::Beta::BetaRequestDocumentBlock)

Returns:



10
# File 'lib/anthropic/models/beta/beta_web_fetch_block_param.rb', line 10

required :content, -> { Anthropic::Beta::BetaRequestDocumentBlock }

#retrieved_at ⇒ String?

ISO 8601 timestamp when the content was retrieved

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


27
# File 'lib/anthropic/models/beta/beta_web_fetch_block_param.rb', line 27

optional :retrieved_at, String, nil?: true

#type ⇒ Symbol, :web_fetch_result

Parameters:

  • value (:web_fetch_result)

Returns:

  • (Symbol, :web_fetch_result)


15
# File 'lib/anthropic/models/beta/beta_web_fetch_block_param.rb', line 15

required :type, const: :web_fetch_result

#url ⇒ String

Fetched content URL

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/anthropic/models/beta/beta_web_fetch_block_param.rb', line 21

required :url, String

Instance Method Details

#to_hash ⇒ { content: Anthropic::Beta::BetaRequestDocumentBlock, type: :web_fetch_result, url: String, retrieved_at: String? }

Returns:

  • ({ content: Anthropic::Beta::BetaRequestDocumentBlock, type: :web_fetch_result, url: String, retrieved_at: String? })


30
31
32
33
34
35
# File 'sig/anthropic/models/beta/beta_web_fetch_block_param.rbs', line 30

def to_hash: -> {
  content: Anthropic::Beta::BetaRequestDocumentBlock,
  type: :web_fetch_result,
  url: String,
  retrieved_at: String?
}