Class: Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation

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

Returns a new instance of BetaCitationsWebSearchResultLocation.

Parameters:

  • cited_text: (String)
  • encrypted_index: (String)
  • title: (String, nil)
  • url: (String)
  • type: (:web_search_result_location)


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

def initialize: (
  cited_text: String,
  encrypted_index: String,
  title: String?,
  url: String,
  ?type: :web_search_result_location
) -> void

Instance Attribute Details

#cited_text ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :cited_text, String

#encrypted_index ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :encrypted_index, String

#title ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :title, String, nil?: true

#type ⇒ Symbol, :web_search_result_location

Parameters:

  • value (:web_search_result_location)

Returns:

  • (Symbol, :web_search_result_location)


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

required :type, const: :web_search_result_location

#url ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :url, String

Instance Method Details

#to_hash ⇒ { cited_text: String, encrypted_index: String, title: String?, type: :web_search_result_location, url: String }

Returns:

  • ({ cited_text: String, encrypted_index: String, title: String?, type: :web_search_result_location, url: String })


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

def to_hash: -> {
  cited_text: String,
  encrypted_index: String,
  title: String?,
  type: :web_search_result_location,
  url: String
}