Module: Anthropic::Models::Beta::EnvironmentUpdateParams::Config

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

Overview

Updated environment configuration

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:, networking:, packages:) ⇒ Anthropic::Beta::BetaCloudConfigParams .new(type:) ⇒ Anthropic::Beta::BetaSelfHostedConfigParams .new(type:, networking:, packages:) ⇒ Anthropic::Models::Beta::EnvironmentUpdateParams::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::EnvironmentUpdateParams::Config for more details.

Overloads:

  • .new(type:, networking:, packages:) ⇒ Anthropic::Beta::BetaCloudConfigParams

    Parameters:

    • type: (:cloud, "cloud")
    • networking: (Anthropic::Models::Beta::BetaCloudConfigParams::networking, nil)
    • packages: (Anthropic::Beta::BetaPackagesParams, nil)

    Returns:

    • (Anthropic::Beta::BetaCloudConfigParams)
  • .new(type:) ⇒ Anthropic::Beta::BetaSelfHostedConfigParams

    Parameters:

    • type: (:self_hosted, "self_hosted")

    Returns:

    • (Anthropic::Beta::BetaSelfHostedConfigParams)
  • .new(type:, networking:, packages:) ⇒ Anthropic::Models::Beta::EnvironmentUpdateParams::config

    Parameters:

    • type: (Anthropic::Models::Beta::EnvironmentUpdateParams::Config::type_, String)
    • networking: (Anthropic::Models::Beta::BetaCloudConfigParams::networking, nil)
    • packages: (Anthropic::Beta::BetaPackagesParams, nil)

    Returns:

    • (Anthropic::Models::Beta::EnvironmentUpdateParams::config)

Parameters:

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

    Attributes for the chosen variant.

    @option args [Anthropic::Models::Beta::BetaUnrestrictedNetwork, Anthropic::Models::Beta::BetaLimitedNetworkParams, nil] :networking Network configuration policy. Omit on update to preserve the existing value.

    @option args [Anthropic::Models::Beta::BetaPackagesParams, nil] :packages Package manager configuration. Under limited networking, requires

Returns:

Raises:

  • (ArgumentError)


133
134
135
136
137
138
139
140
141
142
# File 'lib/anthropic/models/beta/environment_update_params.rb', line 133

def self.new(type:, **args)
  case type.to_sym
  when :cloud
    Anthropic::Beta::BetaCloudConfigParams.new(**args)
  when :self_hosted
    Anthropic::Beta::BetaSelfHostedConfigParams.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/environment_update_params.rb', line 110

.variants ⇒ Array(Anthropic::Models::Beta::BetaCloudConfigParams, Anthropic::Models::Beta::BetaSelfHostedConfigParams)



# File 'lib/anthropic/models/beta/environment_update_params.rb', line 114