Class BetaTelemetryDestinationStateParams
-
- All Implemented Interfaces:
public final class BetaTelemetryDestinationStateParamsThe state to set on a telemetry destination, by
typealone.A caller can't set the
reasonof a disabled state. Only the API sets it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaTelemetryDestinationStateParams.VisitorAn interface that defines how to map each variant of BetaTelemetryDestinationStateParams to a value of type T.
public final classBetaTelemetryDestinationStateParams.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaTelemetryDestinationStateEnabledParams>enabled()Start deliveries to the telemetry destination again. final Optional<BetaTelemetryDestinationStateDisabledParams>disabled()Stop deliveries to the telemetry destination. final Optional<JsonValue>_json()final BetaTelemetryDestinationStateParams.Typetype()final BooleanisEnabled()final BooleanisDisabled()final BetaTelemetryDestinationStateEnabledParamsasEnabled()Start deliveries to the telemetry destination again. final BetaTelemetryDestinationStateDisabledParamsasDisabled()Stop deliveries to the telemetry destination. final <T extends Any> Taccept(BetaTelemetryDestinationStateParams.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaTelemetryDestinationStateParamsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaTelemetryDestinationStateParamsofEnabled(BetaTelemetryDestinationStateEnabledParams enabled)Start deliveries to the telemetry destination again. final static BetaTelemetryDestinationStateParamsofDisabled(BetaTelemetryDestinationStateDisabledParams disabled)Stop deliveries to the telemetry destination. -
-
Method Detail
-
enabled
final Optional<BetaTelemetryDestinationStateEnabledParams> enabled()
Start deliveries to the telemetry destination again.
This doesn't reset
delivery_health.
-
disabled
final Optional<BetaTelemetryDestinationStateDisabledParams> disabled()
Stop deliveries to the telemetry destination.
Spans produced while it is disabled aren't delivered later. A destination that is already disabled keeps its
reason.
-
type
final BetaTelemetryDestinationStateParams.Type type()
-
isDisabled
final Boolean isDisabled()
-
asEnabled
final BetaTelemetryDestinationStateEnabledParams asEnabled()
Start deliveries to the telemetry destination again.
This doesn't reset
delivery_health.
-
asDisabled
final BetaTelemetryDestinationStateDisabledParams asDisabled()
Stop deliveries to the telemetry destination.
Spans produced while it is disabled aren't delivered later. A destination that is already disabled keeps its
reason.
-
accept
final <T extends Any> T accept(BetaTelemetryDestinationStateParams.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = betaTelemetryDestinationStateParams.accept(new BetaTelemetryDestinationStateParams.Visitor<Optional<String>>() { @Override public Optional<String> visitEnabled(BetaTelemetryDestinationStateEnabledParams enabled) { return Optional.of(enabled.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaTelemetryDestinationStateParams validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofEnabled
final static BetaTelemetryDestinationStateParams ofEnabled(BetaTelemetryDestinationStateEnabledParams enabled)
Start deliveries to the telemetry destination again.
This doesn't reset
delivery_health.
-
ofDisabled
final static BetaTelemetryDestinationStateParams ofDisabled(BetaTelemetryDestinationStateDisabledParams disabled)
Stop deliveries to the telemetry destination.
Spans produced while it is disabled aren't delivered later. A destination that is already disabled keeps its
reason.
-
-
-
-