Module: Anthropic::Models::Beta::Sessions::ResourceUpdateResponse

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

Overview

The updated session resource.

See Also:

  • Anthropic::Resources::Beta::Sessions::Resources#update

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:, id:, created_at:, mount_path:, updated_at:, url:, checkout:) ⇒ Anthropic::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource .new(type:, id:, created_at:, file_id:, mount_path:, updated_at:) ⇒ Anthropic::Beta::Sessions::BetaManagedAgentsFileResource .new(type:, memory_store_id:, access:, description:, instructions:, mount_path:, name:) ⇒ Anthropic::Beta::Sessions::BetaManagedAgentsMemoryStoreResource .new(type:, id:, created_at:, mount_path:, updated_at:, url:, checkout:, file_id:, memory_store_id:, access:, description:, instructions:, name:) ⇒ Anthropic::Models::Beta::Sessions::resource_update_response

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::Sessions::ResourceUpdateResponse for more details.

Overloads:

  • .new(type:, id:, created_at:, mount_path:, updated_at:, url:, checkout:) ⇒ Anthropic::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource

    Parameters:

    • type: (:github_repository, "github_repository")
    • id: (String)
    • created_at: (Time)
    • mount_path: (String)
    • updated_at: (Time)
    • url: (String)
    • checkout: (Anthropic::Models::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource::checkout, nil)

    Returns:

    • (Anthropic::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource)
  • .new(type:, id:, created_at:, file_id:, mount_path:, updated_at:) ⇒ Anthropic::Beta::Sessions::BetaManagedAgentsFileResource

    Parameters:

    • type: (:file, "file")
    • id: (String)
    • created_at: (Time)
    • file_id: (String)
    • mount_path: (String)
    • updated_at: (Time)

    Returns:

    • (Anthropic::Beta::Sessions::BetaManagedAgentsFileResource)
  • .new(type:, memory_store_id:, access:, description:, instructions:, mount_path:, name:) ⇒ Anthropic::Beta::Sessions::BetaManagedAgentsMemoryStoreResource

    Parameters:

    • type: (:memory_store, "memory_store")
    • memory_store_id: (String)
    • access: (Anthropic::Models::Beta::Sessions::BetaManagedAgentsMemoryStoreResource::access, nil)
    • description: (String)
    • instructions: (String, nil)
    • mount_path: (String, nil)
    • name: (String, nil)

    Returns:

    • (Anthropic::Beta::Sessions::BetaManagedAgentsMemoryStoreResource)
  • .new(type:, id:, created_at:, mount_path:, updated_at:, url:, checkout:, file_id:, memory_store_id:, access:, description:, instructions:, name:) ⇒ Anthropic::Models::Beta::Sessions::resource_update_response

    Parameters:

    • type: (Anthropic::Models::Beta::Sessions::ResourceUpdateResponse::type_, String)
    • id: (String)
    • created_at: (Time)
    • mount_path: (String, String, nil)
    • updated_at: (Time)
    • url: (String)
    • checkout: (Anthropic::Models::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource::checkout, nil)
    • file_id: (String)
    • memory_store_id: (String)
    • access: (Anthropic::Models::Beta::Sessions::BetaManagedAgentsMemoryStoreResource::access, nil)
    • description: (String)
    • instructions: (String, nil)
    • name: (String, nil)

    Returns:

    • (Anthropic::Models::Beta::Sessions::resource_update_response)

Parameters:

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

    Attributes for the chosen variant.

    @option args [String] :id

    @option args [Time] :created_at A timestamp in RFC 3339 format

    @option args [String, String, nil] :mount_path Filesystem path where the store is mounted in the session container, e.g. /mnt/m

    @option args [Time] :updated_at A timestamp in RFC 3339 format

    @option args [String] :url

    @option args [Anthropic::Models::Beta::BetaManagedAgentsBranchCheckout, Anthropic::Models::Beta::BetaManagedAgentsCommitCheckout, nil] :checkout

    @option args [String] :file_id

    @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::Sessions::BetaManagedAgentsMemoryStoreResource::Access, nil] :access Access mode for the mounted store. Defaults to read_write. read_only mounts

    @option args [String] :description Description of the memory store, snapshotted at attach time. Rendered into the a

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

    @option args [String, nil] :name Display name of the memory store, snapshotted at attach time. Later edits to the

Returns:

Raises:

  • (ArgumentError)


72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/anthropic/models/beta/sessions/resource_update_response.rb', line 72

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

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/sessions/resource_update_response.rb', line 29

.variants ⇒ Array(Anthropic::Models::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource, Anthropic::Models::Beta::Sessions::BetaManagedAgentsFileResource, Anthropic::Models::Beta::Sessions::BetaManagedAgentsMemoryStoreResource)



# File 'lib/anthropic/models/beta/sessions/resource_update_response.rb', line 33