Class BetaTelemetryDestinationDisabledReason
-
- All Implemented Interfaces:
public final class BetaTelemetryDestinationDisabledReasonWhy the destination is disabled:
callerwhen a caller disabled it, or the reason the API disabled it automatically (sustained_failure,invalid_address, orredirect). Every automatic disable is reversible with an update that setsstatetoenabled. An update that setsdisabledon a destination that is already disabled keeps its reason.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaTelemetryDestinationDisabledReason.VisitorAn interface that defines how to map each variant of BetaTelemetryDestinationDisabledReason to a value of type T.
public final classBetaTelemetryDestinationDisabledReason.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaTelemetryDestinationDisabledReasonCaller>caller()A caller disabled the destination with an update that set statetodisabled.final Optional<BetaTelemetryDestinationDisabledReasonSustainedFailure>sustainedFailure()The API disabled the destination because deliveries to it failed, with no successful delivery in between, for longer than a threshold that Anthropic configures and that is not part of this contract. final Optional<BetaTelemetryDestinationDisabledReasonInvalidAddress>invalidAddress()The API disabled the destination because deliveries to it failed for longer than the same threshold as for sustained_failure, and the most recent failed delivery failed with an invalid address: the DNS answer says that the endpoint's hostname doesn't exist or doesn't have an address, or the address that the API would connect to isn't publicly routable or is reserved, for example a loopback, link-local, private-network, or cloud-metadata address.final Optional<BetaTelemetryDestinationDisabledReasonRedirect>redirect()The API disabled the destination because the endpoint answered a delivery with a 3xx status. final Optional<JsonValue>_json()final BetaTelemetryDestinationDisabledReason.Typetype()final BooleanisCaller()final BooleanisSustainedFailure()final BooleanisInvalidAddress()final BooleanisRedirect()final BetaTelemetryDestinationDisabledReasonCallerasCaller()A caller disabled the destination with an update that set statetodisabled.final BetaTelemetryDestinationDisabledReasonSustainedFailureasSustainedFailure()The API disabled the destination because deliveries to it failed, with no successful delivery in between, for longer than a threshold that Anthropic configures and that is not part of this contract. final BetaTelemetryDestinationDisabledReasonInvalidAddressasInvalidAddress()The API disabled the destination because deliveries to it failed for longer than the same threshold as for sustained_failure, and the most recent failed delivery failed with an invalid address: the DNS answer says that the endpoint's hostname doesn't exist or doesn't have an address, or the address that the API would connect to isn't publicly routable or is reserved, for example a loopback, link-local, private-network, or cloud-metadata address.final BetaTelemetryDestinationDisabledReasonRedirectasRedirect()The API disabled the destination because the endpoint answered a delivery with a 3xx status. final <T extends Any> Taccept(BetaTelemetryDestinationDisabledReason.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaTelemetryDestinationDisabledReasonvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaTelemetryDestinationDisabledReasonofCaller(BetaTelemetryDestinationDisabledReasonCaller caller)A caller disabled the destination with an update that set statetodisabled.final static BetaTelemetryDestinationDisabledReasonofSustainedFailure(BetaTelemetryDestinationDisabledReasonSustainedFailure sustainedFailure)The API disabled the destination because deliveries to it failed, with no successful delivery in between, for longer than a threshold that Anthropic configures and that is not part of this contract. final static BetaTelemetryDestinationDisabledReasonofInvalidAddress(BetaTelemetryDestinationDisabledReasonInvalidAddress invalidAddress)The API disabled the destination because deliveries to it failed for longer than the same threshold as for sustained_failure, and the most recent failed delivery failed with an invalid address: the DNS answer says that the endpoint's hostname doesn't exist or doesn't have an address, or the address that the API would connect to isn't publicly routable or is reserved, for example a loopback, link-local, private-network, or cloud-metadata address.final static BetaTelemetryDestinationDisabledReasonofRedirect(BetaTelemetryDestinationDisabledReasonRedirect redirect)The API disabled the destination because the endpoint answered a delivery with a 3xx status. -
-
Method Detail
-
caller
final Optional<BetaTelemetryDestinationDisabledReasonCaller> caller()
A caller disabled the destination with an update that set
statetodisabled.
-
sustainedFailure
final Optional<BetaTelemetryDestinationDisabledReasonSustainedFailure> sustainedFailure()
The API disabled the destination because deliveries to it failed, with no successful delivery in between, for longer than a threshold that Anthropic configures and that is not part of this contract. The reason is
invalid_addressinstead when the most recent failed delivery failed with an invalid address.
-
invalidAddress
final Optional<BetaTelemetryDestinationDisabledReasonInvalidAddress> invalidAddress()
The API disabled the destination because deliveries to it failed for longer than the same threshold as for
sustained_failure, and the most recent failed delivery failed with an invalid address: the DNS answer says that the endpoint's hostname doesn't exist or doesn't have an address, or the address that the API would connect to isn't publicly routable or is reserved, for example a loopback, link-local, private-network, or cloud-metadata address. The API doesn't connect to such an address, and retries the delivery a bounded number of times as it does after a timeout. A timeout or a server failure of the DNS lookup is a temporary DNS failure instead, not an invalid address.
-
redirect
final Optional<BetaTelemetryDestinationDisabledReasonRedirect> redirect()
The API disabled the destination because the endpoint answered a delivery with a 3xx status. Redirects are never followed, and one such answer disables the destination at once.
-
type
final BetaTelemetryDestinationDisabledReason.Type type()
-
isSustainedFailure
final Boolean isSustainedFailure()
-
isInvalidAddress
final Boolean isInvalidAddress()
-
isRedirect
final Boolean isRedirect()
-
asCaller
final BetaTelemetryDestinationDisabledReasonCaller asCaller()
A caller disabled the destination with an update that set
statetodisabled.
-
asSustainedFailure
final BetaTelemetryDestinationDisabledReasonSustainedFailure asSustainedFailure()
The API disabled the destination because deliveries to it failed, with no successful delivery in between, for longer than a threshold that Anthropic configures and that is not part of this contract. The reason is
invalid_addressinstead when the most recent failed delivery failed with an invalid address.
-
asInvalidAddress
final BetaTelemetryDestinationDisabledReasonInvalidAddress asInvalidAddress()
The API disabled the destination because deliveries to it failed for longer than the same threshold as for
sustained_failure, and the most recent failed delivery failed with an invalid address: the DNS answer says that the endpoint's hostname doesn't exist or doesn't have an address, or the address that the API would connect to isn't publicly routable or is reserved, for example a loopback, link-local, private-network, or cloud-metadata address. The API doesn't connect to such an address, and retries the delivery a bounded number of times as it does after a timeout. A timeout or a server failure of the DNS lookup is a temporary DNS failure instead, not an invalid address.
-
asRedirect
final BetaTelemetryDestinationDisabledReasonRedirect asRedirect()
The API disabled the destination because the endpoint answered a delivery with a 3xx status. Redirects are never followed, and one such answer disables the destination at once.
-
accept
final <T extends Any> T accept(BetaTelemetryDestinationDisabledReason.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 = betaTelemetryDestinationDisabledReason.accept(new BetaTelemetryDestinationDisabledReason.Visitor<Optional<String>>() { @Override public Optional<String> visitCaller(BetaTelemetryDestinationDisabledReasonCaller caller) { return Optional.of(caller.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaTelemetryDestinationDisabledReason 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.
-
ofCaller
final static BetaTelemetryDestinationDisabledReason ofCaller(BetaTelemetryDestinationDisabledReasonCaller caller)
A caller disabled the destination with an update that set
statetodisabled.
-
ofSustainedFailure
final static BetaTelemetryDestinationDisabledReason ofSustainedFailure(BetaTelemetryDestinationDisabledReasonSustainedFailure sustainedFailure)
The API disabled the destination because deliveries to it failed, with no successful delivery in between, for longer than a threshold that Anthropic configures and that is not part of this contract. The reason is
invalid_addressinstead when the most recent failed delivery failed with an invalid address.
-
ofInvalidAddress
final static BetaTelemetryDestinationDisabledReason ofInvalidAddress(BetaTelemetryDestinationDisabledReasonInvalidAddress invalidAddress)
The API disabled the destination because deliveries to it failed for longer than the same threshold as for
sustained_failure, and the most recent failed delivery failed with an invalid address: the DNS answer says that the endpoint's hostname doesn't exist or doesn't have an address, or the address that the API would connect to isn't publicly routable or is reserved, for example a loopback, link-local, private-network, or cloud-metadata address. The API doesn't connect to such an address, and retries the delivery a bounded number of times as it does after a timeout. A timeout or a server failure of the DNS lookup is a temporary DNS failure instead, not an invalid address.
-
ofRedirect
final static BetaTelemetryDestinationDisabledReason ofRedirect(BetaTelemetryDestinationDisabledReasonRedirect redirect)
The API disabled the destination because the endpoint answered a delivery with a 3xx status. Redirects are never followed, and one such answer disables the destination at once.
-
-
-
-