Module: Anthropic::Models::Messages::MessageBatchResult
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/messages/message_batch_result.rb
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.
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Messages::MessageBatchSucceededResult, ...
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::Messages::MessageBatchSucceededResult, Anthropic::Models::Messages::MessageBatchErroredResult, Anthropic::Models::Messages::MessageBatchCanceledResult, Anthropic::Models::Messages::MessageBatchExpiredResult)
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::Messages::MessageBatchSucceededResult, ...
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/anthropic/models/messages/message_batch_result.rb', line 52 def self.new(type:, **args) case type.to_sym when :succeeded Anthropic::Messages::MessageBatchSucceededResult.new(**args) when :errored Anthropic::Messages::MessageBatchErroredResult.new(**args) when :canceled Anthropic::Messages::MessageBatchCanceledResult.new(**args) when :expired Anthropic::Messages::MessageBatchExpiredResult.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/messages/message_batch_result.rb', line 32
|
.variants ⇒ Array(Anthropic::Models::Messages::MessageBatchSucceededResult, Anthropic::Models::Messages::MessageBatchErroredResult, Anthropic::Models::Messages::MessageBatchCanceledResult, Anthropic::Models::Messages::MessageBatchExpiredResult)
|
|
# File 'lib/anthropic/models/messages/message_batch_result.rb', line 36
|