Module: Anthropic::Models::Beta::Organization::BetaAnalyticsFederatedActorProvider

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/organization/beta_analytics_federated_actor_provider.rb,
sig/anthropic/models/beta/organization/beta_analytics_federated_actor_provider.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:, account_id:, signed_principal:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAWSProvider .new(type:, subscription_id:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAzureProvider .new(type:, project_number:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorGCPProvider .new(type:, issuer:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorOIDCProvider .new(type:, account_id:, signed_principal:, subscription_id:, project_number:, issuer:) ⇒ Anthropic::Models::Beta::Organization::beta_analytics_federated_actor_provider

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

Overloads:

  • .new(type:, account_id:, signed_principal:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAWSProvider

    Parameters:

    • type: (:aws, "aws")
    • account_id: (String)
    • signed_principal: (String)

    Returns:

    • (Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAWSProvider)
  • .new(type:, subscription_id:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAzureProvider

    Parameters:

    • type: (:azure, "azure")
    • subscription_id: (String)

    Returns:

    • (Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAzureProvider)
  • .new(type:, project_number:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorGCPProvider

    Parameters:

    • type: (:gcp, "gcp")
    • project_number: (String)

    Returns:

    • (Anthropic::Beta::Organization::BetaAnalyticsFederatedActorGCPProvider)
  • .new(type:, issuer:) ⇒ Anthropic::Beta::Organization::BetaAnalyticsFederatedActorOIDCProvider

    Parameters:

    • type: (:oidc, "oidc")
    • issuer: (String, nil)

    Returns:

    • (Anthropic::Beta::Organization::BetaAnalyticsFederatedActorOIDCProvider)
  • .new(type:, account_id:, signed_principal:, subscription_id:, project_number:, issuer:) ⇒ Anthropic::Models::Beta::Organization::beta_analytics_federated_actor_provider

    Parameters:

    • type: (Anthropic::Models::Beta::Organization::BetaAnalyticsFederatedActorProvider::type_, String)
    • account_id: (String)
    • signed_principal: (String)
    • subscription_id: (String)
    • project_number: (String)
    • issuer: (String, nil)

    Returns:

    • (Anthropic::Models::Beta::Organization::beta_analytics_federated_actor_provider)

Parameters:

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

    Attributes for the chosen variant.

    @option args [String] :account_id The AWS account the organization is bound to.

    @option args [String] :signed_principal The AWS-signed ARN of the IAM principal that made the requests.

    @option args [String] :subscription_id The Azure subscription the organization is bound to.

    @option args [String] :project_number The Google Cloud project the organization is bound to.

    @option args [String, nil] :issuer The federation issuer's URL.

Returns:

Raises:

  • (ArgumentError)


54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/anthropic/models/beta/organization/beta_analytics_federated_actor_provider.rb', line 54

def self.new(type:, **args)
  case type.to_sym
  when :aws
    Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAWSProvider.new(**args)
  when :azure
    Anthropic::Beta::Organization::BetaAnalyticsFederatedActorAzureProvider.new(**args)
  when :gcp
    Anthropic::Beta::Organization::BetaAnalyticsFederatedActorGCPProvider.new(**args)
  when :oidc
    Anthropic::Beta::Organization::BetaAnalyticsFederatedActorOIDCProvider.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/beta_analytics_federated_actor_provider.rb', line 28