Class BetaTelemetryDestinationDisabledReason

  • All Implemented Interfaces:

    
    public final class BetaTelemetryDestinationDisabledReason
    
                        

    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.

    • Constructor Detail

    • Method Detail

      • 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_address instead 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.

      • 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_address instead 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.

      • 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.

      • 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.