Module: Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReason

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

Overview

Why the destination is disabled: caller when a caller disabled it, or the reason the API disabled it automatically (sustained_failure, invalid_address, or redirect). Every automatic disable is reversible with an update that sets state to enabled. An update that sets disabled on a destination that is already disabled keeps its reason.

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::BetaTelemetryDestinationDisabledReasonCaller .new(type:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure .new(type:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress .new(type:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect .new(type:) ⇒ Anthropic::Models::Beta::Organization::beta_telemetry_destination_disabled_reason

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::BetaTelemetryDestinationDisabledReasonCaller

    Parameters:

    • type: (:caller, "caller")

    Returns:

    • (Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonCaller)
  • .new(type:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure

    Parameters:

    • type: (:sustained_failure, "sustained_failure")

    Returns:

    • (Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure)
  • .new(type:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress

    Parameters:

    • type: (:invalid_address, "invalid_address")

    Returns:

    • (Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress)
  • .new(type:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect

    Parameters:

    • type: (:redirect, "redirect")

    Returns:

    • (Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect)
  • .new(type:) ⇒ Anthropic::Models::Beta::Organization::beta_telemetry_destination_disabled_reason

    Parameters:

    • type: (Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReason::type_, String)

    Returns:

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

Parameters:

Returns:

Raises:

  • (ArgumentError)


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

def self.new(type:, **args)
  case type.to_sym
  when :caller
    Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonCaller.new(**args)
  when :sustained_failure
    Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure.new(**args)
  when :invalid_address
    Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress.new(**args)
  when :redirect
    Anthropic::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/beta_telemetry_destination_disabled_reason.rb', line 39