Module: Anthropic::Models::Beta::Messages::BetaMessageBatchResult
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/messages/beta_message_batch_result.rb,
sig/anthropic/models/beta/messages/beta_message_batch_result.rbs
Overview
Processing result for this request.
Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::Messages::BetaMessageBatchSucceededResult, ...
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .variants ⇒ Array(Anthropic::Models::Beta::Messages::BetaMessageBatchSucceededResult, Anthropic::Models::Beta::Messages::BetaMessageBatchErroredResult, Anthropic::Models::Beta::Messages::BetaMessageBatchCanceledResult, Anthropic::Models::Beta::Messages::BetaMessageBatchExpiredResult)
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::Beta::Messages::BetaMessageBatchSucceededResult, ...
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/anthropic/models/beta/messages/beta_message_batch_result.rb', line 41 def self.new(type:, **args) case type.to_sym when :succeeded Anthropic::Beta::Messages::BetaMessageBatchSucceededResult.new(**args) when :errored Anthropic::Beta::Messages::BetaMessageBatchErroredResult.new(**args) when :canceled Anthropic::Beta::Messages::BetaMessageBatchCanceledResult.new(**args) when :expired Anthropic::Beta::Messages::BetaMessageBatchExpiredResult.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.variants ⇒ Array(Anthropic::Models::Beta::Messages::BetaMessageBatchSucceededResult, Anthropic::Models::Beta::Messages::BetaMessageBatchErroredResult, Anthropic::Models::Beta::Messages::BetaMessageBatchCanceledResult, Anthropic::Models::Beta::Messages::BetaMessageBatchExpiredResult)
|
|
# File 'lib/anthropic/models/beta/messages/beta_message_batch_result.rb', line 25
|
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::Beta::Messages::beta_message_batch_result]
14 |
# File 'sig/anthropic/models/beta/messages/beta_message_batch_result.rbs', line 14
def self?.variants: -> ::Array[Anthropic::Models::Beta::Messages::beta_message_batch_result]
|