Module: Anthropic::Models::Beta::Organization::BetaAPIKey::Scope
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/organization/beta_api_key.rb,
sig/anthropic/models/beta/organization/beta_api_key.rbs
Overview
Where the API key belongs: its Workspace
({"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's
real ID even when it is the organization's default Workspace), or the
organization ({"type": "organization"}) for a principal-bound API key that has
no Workspace.
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .values ⇒ Array<Symbol>
- .variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope)
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::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope
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::BetaAPIKey::Scope for more details.
210 211 212 213 214 215 216 217 218 219 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 210 def self.new(type:, **args) case type.to_sym when :organization Anthropic::Beta::Organization::BetaAPIKeyOrganizationScope.new(**args) when :workspace Anthropic::Beta::Organization::BetaAPIKeyWorkspaceScope.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 189
|
.variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope)
|
|
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 193
|
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::Beta::Organization::BetaAPIKey::scope]
125 |
# File 'sig/anthropic/models/beta/organization/beta_api_key.rbs', line 125
def self?.variants: -> ::Array[Anthropic::Models::Beta::Organization::BetaAPIKey::scope]
|