Class BetaManagedAgentsError
-
- All Implemented Interfaces:
public final class BetaManagedAgentsError
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsError.VisitorAn interface that defines how to map each variant of BetaManagedAgentsError to a value of type T.
-
Method Summary
-
-
Method Detail
-
invalidRequest
final Optional<BetaInvalidRequestError> invalidRequest()
-
authentication
final Optional<BetaAuthenticationError> authentication()
-
billing
final Optional<BetaBillingError> billing()
-
permission
final Optional<BetaPermissionError> permission()
-
notFound
final Optional<BetaNotFoundError> notFound()
-
rateLimit
final Optional<BetaRateLimitError> rateLimit()
-
timeout
final Optional<BetaGatewayTimeoutError> timeout()
-
api
final Optional<BetaApiError> api()
-
overloaded
final Optional<BetaOverloadedError> overloaded()
-
memoryPreconditionFailed
final Optional<BetaManagedAgentsMemoryPreconditionFailedError> memoryPreconditionFailed()
-
memoryPathConflict
final Optional<BetaManagedAgentsMemoryPathConflictError> memoryPathConflict()
-
conflict
final Optional<BetaManagedAgentsConflictError> conflict()
-
isInvalidRequest
final Boolean isInvalidRequest()
-
isAuthentication
final Boolean isAuthentication()
-
isPermission
final Boolean isPermission()
-
isNotFound
final Boolean isNotFound()
-
isRateLimit
final Boolean isRateLimit()
-
isOverloaded
final Boolean isOverloaded()
-
isMemoryPreconditionFailed
final Boolean isMemoryPreconditionFailed()
-
isMemoryPathConflict
final Boolean isMemoryPathConflict()
-
isConflict
final Boolean isConflict()
-
asInvalidRequest
final BetaInvalidRequestError asInvalidRequest()
-
asAuthentication
final BetaAuthenticationError asAuthentication()
-
asBilling
final BetaBillingError asBilling()
-
asPermission
final BetaPermissionError asPermission()
-
asNotFound
final BetaNotFoundError asNotFound()
-
asRateLimit
final BetaRateLimitError asRateLimit()
-
asTimeout
final BetaGatewayTimeoutError asTimeout()
-
asApi
final BetaApiError asApi()
-
asOverloaded
final BetaOverloadedError asOverloaded()
-
asMemoryPreconditionFailed
final BetaManagedAgentsMemoryPreconditionFailedError asMemoryPreconditionFailed()
-
asMemoryPathConflict
final BetaManagedAgentsMemoryPathConflictError asMemoryPathConflict()
-
asConflict
final BetaManagedAgentsConflictError asConflict()
-
accept
final <T extends Any> T accept(BetaManagedAgentsError.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 = betaManagedAgentsError.accept(new BetaManagedAgentsError.Visitor<Optional<String>>() { @Override public Optional<String> visitInvalidRequest(BetaInvalidRequestError invalidRequest) { return Optional.of(invalidRequest.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaManagedAgentsError 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.
-
ofInvalidRequest
final static BetaManagedAgentsError ofInvalidRequest(BetaInvalidRequestError invalidRequest)
-
ofAuthentication
final static BetaManagedAgentsError ofAuthentication(BetaAuthenticationError authentication)
-
ofBilling
final static BetaManagedAgentsError ofBilling(BetaBillingError billing)
-
ofPermission
final static BetaManagedAgentsError ofPermission(BetaPermissionError permission)
-
ofNotFound
final static BetaManagedAgentsError ofNotFound(BetaNotFoundError notFound)
-
ofRateLimit
final static BetaManagedAgentsError ofRateLimit(BetaRateLimitError rateLimit)
-
ofTimeout
final static BetaManagedAgentsError ofTimeout(BetaGatewayTimeoutError timeout)
-
ofApi
final static BetaManagedAgentsError ofApi(BetaApiError api)
-
ofOverloaded
final static BetaManagedAgentsError ofOverloaded(BetaOverloadedError overloaded)
-
ofMemoryPreconditionFailed
final static BetaManagedAgentsError ofMemoryPreconditionFailed(BetaManagedAgentsMemoryPreconditionFailedError memoryPreconditionFailed)
-
ofMemoryPathConflict
final static BetaManagedAgentsError ofMemoryPathConflict(BetaManagedAgentsMemoryPathConflictError memoryPathConflict)
-
ofConflict
final static BetaManagedAgentsError ofConflict(BetaManagedAgentsConflictError conflict)
-
-
-
-