Module: Anthropic::Models::Beta::Organization::BetaExternalStorage::ProviderConfig

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#provider_config

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:, account_id:, bucket_name:, region:) ⇒ Anthropic::Beta::Organization::BetaAWSExternalStorageConfig .new(type:, bucket_name:, project_number:, region:) ⇒ Anthropic::Beta::Organization::BetaGCPExternalStorageConfig .new(type:, bucket_name:, region:, account_id:, project_number:) ⇒ Anthropic::Models::Beta::Organization::BetaExternalStorage::provider_config

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

Overloads:

  • .new(type:, account_id:, bucket_name:, region:) ⇒ Anthropic::Beta::Organization::BetaAWSExternalStorageConfig

    Parameters:

    • type: (:aws, "aws")
    • account_id: (String)
    • bucket_name: (String)
    • region: (String)

    Returns:

    • (Anthropic::Beta::Organization::BetaAWSExternalStorageConfig)
  • .new(type:, bucket_name:, project_number:, region:) ⇒ Anthropic::Beta::Organization::BetaGCPExternalStorageConfig

    Parameters:

    • type: (:gcp, "gcp")
    • bucket_name: (String)
    • project_number: (String)
    • region: (String)

    Returns:

    • (Anthropic::Beta::Organization::BetaGCPExternalStorageConfig)
  • .new(type:, bucket_name:, region:, account_id:, project_number:) ⇒ Anthropic::Models::Beta::Organization::BetaExternalStorage::provider_config

    Parameters:

    • type: (Anthropic::Models::Beta::Organization::BetaExternalStorage::ProviderConfig::type_, String)
    • bucket_name: (String)
    • region: (String)
    • account_id: (String)
    • project_number: (String)

    Returns:

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

Parameters:

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

    Attributes for the chosen variant.

    @option args [String] :account_id 12-digit ID of the AWS account that owns the bucket.

    @option args [String] :bucket_name The bucket's name, without s3://.

    @option args [String] :region The bucket's AWS region.

    @option args [String] :project_number Number of the Google Cloud project that holds the bucket.

Returns:

Raises:

  • (ArgumentError)


131
132
133
134
135
136
137
138
139
140
# File 'lib/anthropic/models/beta/organization/beta_external_storage.rb', line 131

def self.new(type:, **args)
  case type.to_sym
  when :aws
    Anthropic::Beta::Organization::BetaAWSExternalStorageConfig.new(**args)
  when :gcp
    Anthropic::Beta::Organization::BetaGCPExternalStorageConfig.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 107

.variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaAWSExternalStorageConfig, Anthropic::Models::Beta::Organization::BetaGCPExternalStorageConfig)



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