Module: Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit::Group

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

Overview

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

See Also:

  • Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit#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::Beta::Organization::BetaOrganizationRateLimitModelGroup, ...

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::BetaOrganizationRateLimit::Group for more details.

Parameters:

  • type (Symbol, Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit::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)


128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/anthropic/models/beta/organization/beta_organization_rate_limit.rb', line 128

def self.new(type:, **args)
  case type.to_sym
  when :model_group
    Anthropic::Beta::Organization::BetaOrganizationRateLimitModelGroup.new(**args)
  when :batch
    Anthropic::Beta::Organization::BetaOrganizationRateLimitBatchGroup.new(**args)
  when :token_count
    Anthropic::Beta::Organization::BetaOrganizationRateLimitTokenCountGroup.new(**args)
  when :files
    Anthropic::Beta::Organization::BetaOrganizationRateLimitFilesGroup.new(**args)
  when :skills
    Anthropic::Beta::Organization::BetaOrganizationRateLimitSkillsGroup.new(**args)
  when :web_search
    Anthropic::Beta::Organization::BetaOrganizationRateLimitWebSearchGroup.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/beta_organization_rate_limit.rb', line 104

Instance Method Details

#self?.variants ⇒ ::Array[Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit::group]

Returns:

  • (::Array[Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit::group])


78
# File 'sig/anthropic/models/beta/organization/beta_organization_rate_limit.rbs', line 78

def self?.variants: -> ::Array[Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit::group]