Module: Anthropic::Models::Beta::DeploymentUpdateParams::Resource

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

Overview

Union of resources that can be mounted into a session.

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::BetaManagedAgentsGitHubRepositoryResourceParams, ...

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::DeploymentUpdateParams::Resource for more details.

Parameters:

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

    Attributes for the chosen variant.

    @option args [String] :authorization_token GitHub authorization token used to clone the repository.

    @option args [String] :url Github URL of the repository

    @option args [Anthropic::Models::Beta::BetaManagedAgentsBranchCheckout, Anthropic::Models::Beta::BetaManagedAgentsCommitCheckout, nil] :checkout Branch or commit to check out. Defaults to the repository's default branch.

    @option args [String, nil] :mount_path Mount path in the container. Defaults to /workspace/<repo-name>.

    @option args [String] :file_id ID of a previously uploaded file.

    @option args [String] :memory_store_id The memory store ID (memstore_...). Must belong to the caller's organization and

    @option args [Symbol, Anthropic::Models::Beta::BetaManagedAgentsMemoryStoreResourceParam::Access, nil] :access Access mode for an attached memory store.

    @option args [String, nil] :instructions Per-attachment guidance for the agent on how to use this store. Rendered into th

Returns:

Raises:

  • (ArgumentError)


188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/anthropic/models/beta/deployment_update_params.rb', line 188

def self.new(type:, **args)
  case type.to_sym
  when :github_repository
    Anthropic::Beta::BetaManagedAgentsGitHubRepositoryResourceParams.new(**args)
  when :file
    Anthropic::Beta::BetaManagedAgentsFileResourceParams.new(**args)
  when :memory_store
    Anthropic::Beta::BetaManagedAgentsMemoryStoreResourceParam.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

Instance Method Details

#self?.variants::Array[Anthropic::Models::Beta::DeploymentUpdateParams::resource]

Returns:

  • (::Array[Anthropic::Models::Beta::DeploymentUpdateParams::resource])


113
# File 'sig/anthropic/models/beta/deployment_update_params.rbs', line 113

def self?.variants: -> ::Array[Anthropic::Models::Beta::DeploymentUpdateParams::resource]