Module: Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitValue::Source

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/organization/workspaces/workspace_rate_limit_value.rb,
sig/anthropic/models/organization/workspaces/workspace_rate_limit_value.rbs

Overview

Where value comes from. organization values are listed only when include_inherited is true, and then value equals org_limit.

See Also:

  • Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitValue#source

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:) ⇒ Anthropic::Organization::Workspaces::WorkspaceRateLimitWorkspaceSource .new(type:) ⇒ Anthropic::Organization::Workspaces::WorkspaceRateLimitOrganizationSource .new(type:) ⇒ Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitValue::source

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

Overloads:

  • .new(type:) ⇒ Anthropic::Organization::Workspaces::WorkspaceRateLimitWorkspaceSource

    Parameters:

    • type: (:workspace, "workspace")

    Returns:

    • (Anthropic::Organization::Workspaces::WorkspaceRateLimitWorkspaceSource)
  • .new(type:) ⇒ Anthropic::Organization::Workspaces::WorkspaceRateLimitOrganizationSource

    Parameters:

    • type: (:organization, "organization")

    Returns:

    • (Anthropic::Organization::Workspaces::WorkspaceRateLimitOrganizationSource)
  • .new(type:) ⇒ Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitValue::source

    Parameters:

    • type: (Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitValue::Source::type_, String)

    Returns:

    • (Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitValue::source)

Parameters:

Returns:

Raises:

  • (ArgumentError)


84
85
86
87
88
89
90
91
92
93
# File 'lib/anthropic/models/organization/workspaces/workspace_rate_limit_value.rb', line 84

def self.new(type:, **args)
  case type.to_sym
  when :workspace
    Anthropic::Organization::Workspaces::WorkspaceRateLimitWorkspaceSource.new(**args)
  when :organization
    Anthropic::Organization::Workspaces::WorkspaceRateLimitOrganizationSource.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/organization/workspaces/workspace_rate_limit_value.rb', line 68

.variants ⇒ Array(Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitWorkspaceSource, Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitOrganizationSource)



# File 'lib/anthropic/models/organization/workspaces/workspace_rate_limit_value.rb', line 72