Module: Anthropic::Models::Beta::Organization::Plugins::BetaPluginShare::Target

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

Overview

Who the Plugin is shared with: organization (every member), rbac_group (one RBAC Group), or organization_member (one member).

See Also:

  • Anthropic::Models::Beta::Organization::Plugins::BetaPluginShare#target

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::BetaPluginTargetOrganization, ...

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

Parameters:

Returns:

Raises:

  • (ArgumentError)


95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/anthropic/models/beta/organization/plugins/beta_plugin_share.rb', line 95

def self.new(type:, **args)
  case type.to_sym
  when :organization
    Anthropic::Beta::Organization::BetaPluginTargetOrganization.new(**args)
  when :rbac_group
    Anthropic::Beta::Organization::BetaPluginTargetRBACGroup.new(**args)
  when :organization_member
    Anthropic::Beta::Organization::BetaPluginTargetOrganizationMember.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/plugins/beta_plugin_share.rb', line 75


.variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaPluginTargetOrganization, Anthropic::Models::Beta::Organization::BetaPluginTargetRBACGroup, Anthropic::Models::Beta::Organization::BetaPluginTargetOrganizationMember)



# File 'lib/anthropic/models/beta/organization/plugins/beta_plugin_share.rb', line 79


Instance Method Details

#self?.variants ⇒ ::Array[Anthropic::Models::Beta::Organization::Plugins::BetaPluginShare::target]

Returns:

  • (::Array[Anthropic::Models::Beta::Organization::Plugins::BetaPluginShare::target])


57
# File 'sig/anthropic/models/beta/organization/plugins/beta_plugin_share.rbs', line 57

def self?.variants: -> ::Array[Anthropic::Models::Beta::Organization::Plugins::BetaPluginShare::target]