Module: Anthropic::Models::BrowserStateChange
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/browser_state_change.rb,
sig/anthropic/models/browser_state_change.rbs
Overview
A tab this call's execution opened that remains open at its end — the creation
delta of the tabs inventory, not an event log.
Carries only the tab_id; the tab's title and url live on its tabs entry,
which must include the same tab_id. A tab opened during a failed call gets no
deferred tab_opened; it simply appears in the next result's tabs inventory.
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::BrowserStateChangeTabOpened, ...
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .values ⇒ Array<Symbol>
- .variants ⇒ Array(Anthropic::Models::BrowserStateChangeTabOpened, Anthropic::Models::BrowserStateChangeDownloadStarted, Anthropic::Models::BrowserStateChangeDownloadCompleted, Anthropic::Models::BrowserStateChangeDownloadFailed)
Instance Method Summary collapse
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Class Method Details
.new(type:, **args) ⇒ Anthropic::Models::BrowserStateChangeTabOpened, ...
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
Some parameter documentations has been truncated, see Anthropic::Models::BrowserStateChange for more details.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/anthropic/models/browser_state_change.rb', line 76 def self.new(type:, **args) case type.to_sym when :tab_opened Anthropic::BrowserStateChangeTabOpened.new(**args) when :download_started Anthropic::BrowserStateChangeDownloadStarted.new(**args) when :download_completed Anthropic::BrowserStateChangeDownloadCompleted.new(**args) when :download_failed Anthropic::BrowserStateChangeDownloadFailed.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/browser_state_change.rb', line 45
|
.variants ⇒ Array(Anthropic::Models::BrowserStateChangeTabOpened, Anthropic::Models::BrowserStateChangeDownloadStarted, Anthropic::Models::BrowserStateChangeDownloadCompleted, Anthropic::Models::BrowserStateChangeDownloadFailed)
|
|
# File 'lib/anthropic/models/browser_state_change.rb', line 49
|
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::browser_state_change]
26 |
# File 'sig/anthropic/models/browser_state_change.rbs', line 26
def self?.variants: -> ::Array[Anthropic::Models::browser_state_change]
|