Module: Anthropic::Models::Beta::Organization::BetaExternalStorage::Status

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/organization/beta_external_storage.rb,
sig/anthropic/models/beta/organization/beta_external_storage.rbs

Overview

See Also:

  • Anthropic::Models::Beta::Organization::BetaExternalStorage#status

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type

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:) ⇒ Anthropic::Beta::Organization::BetaPendingConfigurationExternalStorageStatus .new(type:, healthy:, last_checked_at:) ⇒ Anthropic::Beta::Organization::BetaAvailableExternalStorageStatus .new(type:, healthy:, last_checked_at:) ⇒ Anthropic::Beta::Organization::BetaActiveExternalStorageStatus .new(type:, healthy:, last_checked_at:, removal_started:) ⇒ Anthropic::Beta::Organization::BetaDrainingExternalStorageStatus .new(type:, healthy:, last_checked_at:, removal_started:) ⇒ Anthropic::Models::Beta::Organization::BetaExternalStorage::status

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::Beta::Organization::BetaExternalStorage::Status for more details.

Overloads:

  • .new(type:) ⇒ Anthropic::Beta::Organization::BetaPendingConfigurationExternalStorageStatus

    Parameters:

    • type: (:pending_configuration, "pending_configuration")

    Returns:

    • (Anthropic::Beta::Organization::BetaPendingConfigurationExternalStorageStatus)
  • .new(type:, healthy:, last_checked_at:) ⇒ Anthropic::Beta::Organization::BetaAvailableExternalStorageStatus

    Parameters:

    • type: (:available, "available")
    • healthy: (Boolean)
    • last_checked_at: (Time)

    Returns:

    • (Anthropic::Beta::Organization::BetaAvailableExternalStorageStatus)
  • .new(type:, healthy:, last_checked_at:) ⇒ Anthropic::Beta::Organization::BetaActiveExternalStorageStatus

    Parameters:

    • type: (:active, "active")
    • healthy: (Boolean)
    • last_checked_at: (Time)

    Returns:

    • (Anthropic::Beta::Organization::BetaActiveExternalStorageStatus)
  • .new(type:, healthy:, last_checked_at:, removal_started:) ⇒ Anthropic::Beta::Organization::BetaDrainingExternalStorageStatus

    Parameters:

    • type: (:draining, "draining")
    • healthy: (Boolean)
    • last_checked_at: (Time)
    • removal_started: (Boolean)

    Returns:

    • (Anthropic::Beta::Organization::BetaDrainingExternalStorageStatus)
  • .new(type:, healthy:, last_checked_at:, removal_started:) ⇒ Anthropic::Models::Beta::Organization::BetaExternalStorage::status

    Parameters:

    • type: (Anthropic::Models::Beta::Organization::BetaExternalStorage::Status::type_, String)
    • healthy: (Boolean)
    • last_checked_at: (Time)
    • removal_started: (Boolean)

    Returns:

    • (Anthropic::Models::Beta::Organization::BetaExternalStorage::status)

Parameters:

  • type (Symbol, Anthropic::Models::Beta::Organization::BetaExternalStorage::Status::Type, String)
  • args (Hash{Symbol=>Object}) —

    Attributes for the chosen variant.

    @option args [Boolean] :healthy Whether the bucket passed its latest recorded check. It can stay true after th

    @option args [Time] :last_checked_at When the bucket's latest recorded check ran, in RFC 3339.

    @option args [Boolean] :removal_started True once a delete has started removing this storage, which can't be undone. It

Returns:

Raises:

  • (ArgumentError)


198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/anthropic/models/beta/organization/beta_external_storage.rb', line 198

def self.new(type:, **args)
  case type.to_sym
  when :pending_configuration
    Anthropic::Beta::Organization::BetaPendingConfigurationExternalStorageStatus.new(**args)
  when :available
    Anthropic::Beta::Organization::BetaAvailableExternalStorageStatus.new(**args)
  when :active
    Anthropic::Beta::Organization::BetaActiveExternalStorageStatus.new(**args)
  when :draining
    Anthropic::Beta::Organization::BetaDrainingExternalStorageStatus.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/beta_external_storage.rb', line 172