Module: Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsMode

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

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::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsOrganizationMode .new(type:) ⇒ Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsRBACGroupsMode .new(type:) ⇒ Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::beta_claude_code_managed_settings_mode

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::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsOrganizationMode

    Parameters:

    • type: (:organization, "organization")

    Returns:

    • (Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsOrganizationMode)
  • .new(type:) ⇒ Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsRBACGroupsMode

    Parameters:

    • type: (:rbac_groups, "rbac_groups")

    Returns:

    • (Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsRBACGroupsMode)
  • .new(type:) ⇒ Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::beta_claude_code_managed_settings_mode

    Parameters:

    • type: (Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsMode::type_, String)

    Returns:

    • (Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::beta_claude_code_managed_settings_mode)

Parameters:

Returns:

Raises:

  • (ArgumentError)


42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rb', line 42

def self.new(type:, **args)
  case type.to_sym
  when :organization
    Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsOrganizationMode.new(
      **args
    )
  when :rbac_groups
    Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsRBACGroupsMode.new(
      **args
    )
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rb', line 26

.variants ⇒ Array(Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsOrganizationMode, Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsRBACGroupsMode)



# File 'lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rb', line 30