Module: Anthropic::Models::Beta::Organization::BetaExternalKey::Attachment

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

Overview

Whether any workspace uses this config to encrypt its data — counting live and archived workspaces (an archived workspace's data remains encrypted under the config), excluding deleted ones. Only an attached config is used by the encryption path; an unattached config is inert and can be deleted.

See Also:

  • Anthropic::Models::Beta::Organization::BetaExternalKey#attachment

Defined Under Namespace

Modules: Type

Class Method Summary collapse

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::Organization::BetaExternalKeyAttachedAttachment, Anthropic::Models::Beta::Organization::BetaExternalKeyUnattachedAttachment

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

Parameters:

  • type (Symbol, String)
  • args (Hash{Symbol=>Object})

    Attributes for the chosen variant.

Returns:

Raises:

  • (ArgumentError)


122
123
124
125
126
127
128
129
130
131
# File 'lib/anthropic/models/beta/organization/beta_external_key.rb', line 122

def self.new(type:, **args)
  case type.to_sym
  when :attached
    Anthropic::Beta::Organization::BetaExternalKeyAttachedAttachment.new(**args)
  when :unattached
    Anthropic::Beta::Organization::BetaExternalKeyUnattachedAttachment.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/beta_external_key.rb', line 106

Instance Method Details

#self?.variants::Array[Anthropic::Models::Beta::Organization::BetaExternalKey::attachment]

Returns:

  • (::Array[Anthropic::Models::Beta::Organization::BetaExternalKey::attachment])


74
# File 'sig/anthropic/models/beta/organization/beta_external_key.rbs', line 74

def self?.variants: -> ::Array[Anthropic::Models::Beta::Organization::BetaExternalKey::attachment]