Module: Anthropic::Models::Beta::Organization::BetaTelemetryDestinationState

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

Overview

Whether a telemetry destination receives deliveries.

A caller can set either state. The API also disables an enabled destination on its own in some cases. The reason of the disabled state says whether a caller or the API disabled the destination and, when the API did, why.

See the OpenTelemetry export guide to learn when the API disables a destination.

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::BetaTelemetryDestinationStateEnabled .new(type:, reason:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationStateDisabled .new(type:, reason:) ⇒ Anthropic::Models::Beta::Organization::beta_telemetry_destination_state

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

Overloads:

  • .new(type:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationStateEnabled

    Parameters:

    • type: (:enabled, "enabled")

    Returns:

    • (Anthropic::Beta::Organization::BetaTelemetryDestinationStateEnabled)
  • .new(type:, reason:) ⇒ Anthropic::Beta::Organization::BetaTelemetryDestinationStateDisabled

    Parameters:

    • type: (:disabled, "disabled")
    • reason: (Anthropic::Models::Beta::Organization::beta_telemetry_destination_disabled_reason)

    Returns:

    • (Anthropic::Beta::Organization::BetaTelemetryDestinationStateDisabled)
  • .new(type:, reason:) ⇒ Anthropic::Models::Beta::Organization::beta_telemetry_destination_state

    Parameters:

    • type: (Anthropic::Models::Beta::Organization::BetaTelemetryDestinationState::type_, String)
    • reason: (Anthropic::Models::Beta::Organization::beta_telemetry_destination_disabled_reason)

    Returns:

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

Parameters:

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

    Attributes for the chosen variant.

    @option args [Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonCaller, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonSustainedFailure, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonInvalidAddress, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationDisabledReasonRedirect] :reason Whether a caller or the API disabled the destination and, when the API did, why.

Returns:

Raises:

  • (ArgumentError)


57
58
59
60
61
62
63
64
65
66
# File 'lib/anthropic/models/beta/organization/beta_telemetry_destination_state.rb', line 57

def self.new(type:, **args)
  case type.to_sym
  when :enabled
    Anthropic::Beta::Organization::BetaTelemetryDestinationStateEnabled.new(**args)
  when :disabled
    Anthropic::Beta::Organization::BetaTelemetryDestinationStateDisabled.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_state.rb', line 35

.variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaTelemetryDestinationStateEnabled, Anthropic::Models::Beta::Organization::BetaTelemetryDestinationStateDisabled)



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