Module: Anthropic::Models::Beta::Organization::ExternalStorageCreateParams::ProviderConfig

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

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

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

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::ExternalStorageCreateParams::ProviderConfig for more details.

Overloads:

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

    Parameters:

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

    Returns:

    • (Anthropic::Beta::Organization::BetaAWSExternalStorageConfigParam)
  • .new(type:, bucket_name:, project_number:, region:) ⇒ Anthropic::Beta::Organization::BetaGCPExternalStorageConfigParam

    Parameters:

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

    Returns:

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

    Parameters:

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

    Returns:

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

Parameters:

  • type (Symbol, Anthropic::Models::Beta::Organization::ExternalStorageCreateParams::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://: 3 to 63 lower-case letters, digits and hyphe

    @option args [String] :region The bucket's AWS region. Activating the storage fails if Anthropic can't use buc

    @option args [String] :project_number Project number, not project ID, of the Google Cloud project that holds the bucke

Returns:

Raises:

  • (ArgumentError)


98
99
100
101
102
103
104
105
106
107
# File 'lib/anthropic/models/beta/organization/external_storage_create_params.rb', line 98

def self.new(type:, **args)
  case type.to_sym
  when :aws
    Anthropic::Beta::Organization::BetaAWSExternalStorageConfigParam.new(**args)
  when :gcp
    Anthropic::Beta::Organization::BetaGCPExternalStorageConfigParam.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/external_storage_create_params.rb', line 70

.variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaAWSExternalStorageConfigParam, Anthropic::Models::Beta::Organization::BetaGCPExternalStorageConfigParam)



# File 'lib/anthropic/models/beta/organization/external_storage_create_params.rb', line 74

Instance Method Details

#initialize(provider_config:, display_name: nil, user_profile_id: nil, betas: nil, request_options: {}) ⇒ void

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::ExternalStorageCreateParams for more details.

Parameters:



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/anthropic/models/beta/organization/external_storage_create_params.rb', line 53

module ProviderConfig
  extend Anthropic::Internal::Type::Union

  discriminator :type

  # An Amazon S3 bucket.
  variant :aws, -> { Anthropic::Beta::Organization::BetaAWSExternalStorageConfigParam }

  # A Google Cloud Storage bucket.
  variant :gcp, -> { Anthropic::Beta::Organization::BetaGCPExternalStorageConfigParam }

  module Type
    extend Anthropic::Internal::Type::Enum

    AWS = :aws
    GCP = :gcp

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @!method self.variants
  #   @return [Array(Anthropic::Models::Beta::Organization::BetaAWSExternalStorageConfigParam, Anthropic::Models::Beta::Organization::BetaGCPExternalStorageConfigParam)]

  # 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::ExternalStorageCreateParams::ProviderConfig}
  # for more details.
  #
  # @param type [Symbol, Anthropic::Models::Beta::Organization::ExternalStorageCreateParams::ProviderConfig::Type, String]
  #
  # @param 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://`: 3 to 63 lower-case letters, digits and hyphe
  #
  #   @option args [String] :region The bucket's AWS region. Activating the storage fails if Anthropic can't use buc
  #
  #   @option args [String] :project_number Project number, not project ID, of the Google Cloud project that holds the bucke
  #
  # @raise [ArgumentError]
  # @return [Anthropic::Models::Beta::Organization::BetaAWSExternalStorageConfigParam, Anthropic::Models::Beta::Organization::BetaGCPExternalStorageConfigParam]
  def self.new(type:, **args)
    case type.to_sym
    when :aws
      Anthropic::Beta::Organization::BetaAWSExternalStorageConfigParam.new(**args)
    when :gcp
      Anthropic::Beta::Organization::BetaGCPExternalStorageConfigParam.new(**args)
    else
      raise ArgumentError, "unknown type: #{type}"
    end
  end
end