Module: Anthropic::Models::Organization::Workspaces::WorkspaceRateLimit::Group

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

Overview

The rate-limit group this entry's limits apply to. Its type equals group_type.

See Also:

  • Anthropic::Models::Organization::Workspaces::WorkspaceRateLimit#group

Defined Under Namespace

Modules: Type

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::Organization::OrganizationRateLimitModelGroup, ...

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::Organization::Workspaces::WorkspaceRateLimit::Group for more details.

Parameters:

  • type (Symbol, Anthropic::Models::Organization::Workspaces::WorkspaceRateLimit::Group::Type, String)
  • args (Hash{Symbol=>Object}) —

    Attributes for the chosen variant.

    @option args [String] :id Opaque identifier of the rate-limit group (for example, `rlg_01VPTCmyiu5ZLsWkcxY

    @option args [String] :display_name Human-readable name of the model group (for example, Claude Sonnet 4.x). For d

Returns:

Raises:

  • (ArgumentError)


124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/anthropic/models/organization/workspaces/workspace_rate_limit.rb', line 124

def self.new(type:, **args)
  case type.to_sym
  when :model_group
    Anthropic::Organization::OrganizationRateLimitModelGroup.new(**args)
  when :batch
    Anthropic::Organization::OrganizationRateLimitBatchGroup.new(**args)
  when :token_count
    Anthropic::Organization::OrganizationRateLimitTokenCountGroup.new(**args)
  when :files
    Anthropic::Organization::OrganizationRateLimitFilesGroup.new(**args)
  when :skills
    Anthropic::Organization::OrganizationRateLimitSkillsGroup.new(**args)
  when :web_search
    Anthropic::Organization::OrganizationRateLimitWebSearchGroup.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.rb', line 100


Instance Method Details

#self?.variants ⇒ ::Array[Anthropic::Models::Organization::Workspaces::WorkspaceRateLimit::group]

Returns:

  • (::Array[Anthropic::Models::Organization::Workspaces::WorkspaceRateLimit::group])


80
# File 'sig/anthropic/models/organization/workspaces/workspace_rate_limit.rbs', line 80

def self?.variants: -> ::Array[Anthropic::Models::Organization::Workspaces::WorkspaceRateLimit::group]