Class: Anthropic::Models::Beta::BetaBrowserStateChangeDownloadFailed

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

Returns a new instance of BetaBrowserStateChangeDownloadFailed.

Parameters:

  • download_id: (String)
  • url: (String)
  • error: (String, nil)
  • type: (:download_failed)


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

def initialize: (
  download_id: String,
  url: String,
  ?error: String?,
  ?type: :download_failed
) -> void

Instance Attribute Details

#download_id ⇒ String

The caller-assigned identifier for this download, stable across the state changes reporting it.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/beta/beta_browser_state_change_download_failed.rb', line 12

required :download_id, String

#error ⇒ String?

The failure or cancellation detail, when known.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


29
# File 'lib/anthropic/models/beta/beta_browser_state_change_download_failed.rb', line 29

optional :error, String, nil?: true

#type ⇒ Symbol, :download_failed

Parameters:

  • value (:download_failed)

Returns:

  • (Symbol, :download_failed)


17
# File 'lib/anthropic/models/beta/beta_browser_state_change_download_failed.rb', line 17

required :type, const: :download_failed

#url ⇒ String

The final post-redirect URL the download was served from.

Parameters:

  • value (String)

Returns:

  • (String)


23
# File 'lib/anthropic/models/beta/beta_browser_state_change_download_failed.rb', line 23

required :url, String

Instance Method Details

#to_hash ⇒ { download_id: String, type: :download_failed, url: String, error: String? }

Returns:

  • ({ download_id: String, type: :download_failed, url: String, error: String? })


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

def to_hash: -> {
  download_id: String,
  type: :download_failed,
  url: String,
  error: String?
}