Class: Anthropic::Models::Beta::BetaWebSearchResultBlockParam

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_web_search_result_block_param.rb,
sig/anthropic/models/beta/beta_web_search_result_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 ⇒ BetaWebSearchResultBlockParam

Returns a new instance of BetaWebSearchResultBlockParam.

Parameters:

  • encrypted_content: (String)
  • title: (String)
  • url: (String)
  • page_age: (String, nil)
  • type: (:web_search_result)


26
27
28
29
30
31
32
# File 'sig/anthropic/models/beta/beta_web_search_result_block_param.rbs', line 26

def initialize: (
  encrypted_content: String,
  title: String,
  url: String,
  ?page_age: String?,
  ?type: :web_search_result
) -> void

Instance Attribute Details

#encrypted_content ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :encrypted_content, String

#page_age ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


30
# File 'lib/anthropic/models/beta/beta_web_search_result_block_param.rb', line 30

optional :page_age, String, nil?: true

#title ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :title, String

#type ⇒ Symbol, :web_search_result

Parameters:

  • value (:web_search_result)

Returns:

  • (Symbol, :web_search_result)


20
# File 'lib/anthropic/models/beta/beta_web_search_result_block_param.rb', line 20

required :type, const: :web_search_result

#url ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


25
# File 'lib/anthropic/models/beta/beta_web_search_result_block_param.rb', line 25

required :url, String

Instance Method Details

#to_hash ⇒ { encrypted_content: String, title: String, type: :web_search_result, url: String, page_age: String? }

Returns:

  • ({ encrypted_content: String, title: String, type: :web_search_result, url: String, page_age: String? })


34
35
36
37
38
39
40
# File 'sig/anthropic/models/beta/beta_web_search_result_block_param.rbs', line 34

def to_hash: -> {
  encrypted_content: String,
  title: String,
  type: :web_search_result,
  url: String,
  page_age: String?
}