Module: Anthropic::Models::Beta::Vaults::CredentialUpdateParams::Auth

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

Overview

Updated authentication details for a credential.

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::Vaults::BetaManagedAgentsMCPOAuthUpdateParams, ...

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

Parameters:

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

    Attributes for the chosen variant.

    @option args [String, nil] :access_token Updated OAuth access token.

    @option args [Time, nil] :expires_at A timestamp in RFC 3339 format

    @option args [Anthropic::Models::Beta::Vaults::BetaManagedAgentsMCPOAuthRefreshUpdateParams, nil] :refresh Parameters for updating OAuth refresh token configuration.

    @option args [String, nil] :token Updated static bearer token value.

    @option args [Anthropic::Models::Beta::Vaults::BetaManagedAgentsInjectionLocationUpdateParams] :injection_location Updated injection location.

    @option args [Anthropic::Models::Beta::Vaults::BetaManagedAgentsUnrestrictedCredentialNetworkingParams, Anthropic::Models::Beta::Vaults::BetaManagedAgentsLimitedCredentialNetworkingParams, nil] :networking Updated networking scope. Full replacement.

    @option args [String, nil] :secret_value Updated secret value.

Returns:

Raises:

  • (ArgumentError)


107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/anthropic/models/beta/vaults/credential_update_params.rb', line 107

def self.new(type:, **args)
  case type.to_sym
  when :mcp_oauth
    Anthropic::Beta::Vaults::BetaManagedAgentsMCPOAuthUpdateParams.new(**args)
  when :static_bearer
    Anthropic::Beta::Vaults::BetaManagedAgentsStaticBearerUpdateParams.new(**args)
  when :environment_variable
    Anthropic::Beta::Vaults::BetaManagedAgentsEnvironmentVariableUpdateParams.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

Instance Method Details

#self?.variants::Array[Anthropic::Models::Beta::Vaults::CredentialUpdateParams::auth]

Returns:

  • (::Array[Anthropic::Models::Beta::Vaults::CredentialUpdateParams::auth])


68
# File 'sig/anthropic/models/beta/vaults/credential_update_params.rbs', line 68

def self?.variants: -> ::Array[Anthropic::Models::Beta::Vaults::CredentialUpdateParams::auth]