Class BetaDreamingError
-
- All Implemented Interfaces:
public final class BetaDreamingError
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaDreamingError.VisitorAn interface that defines how to map each variant of BetaDreamingError to a value of type T.
public final classBetaDreamingError.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaInvalidRequestError>invalidRequest()final Optional<BetaAuthenticationError>authentication()final Optional<BetaBillingError>billing()final Optional<BetaPermissionError>permission()final Optional<BetaNotFoundError>notFound()final Optional<BetaRateLimitError>rateLimit()final Optional<BetaGatewayTimeoutError>timeout()final Optional<BetaApiError>api()final Optional<BetaOverloadedError>overloaded()final Optional<BetaTargetStoreHeldError>conflict()Returned with status 409 when a request to create a dream sets output_behaviortoupdate_existingand another dream that writes into the same memory store hasn't fully stopped.final Optional<JsonValue>_json()final BetaDreamingError.Typetype()final Optional<String>message()final BooleanisInvalidRequest()final BooleanisAuthentication()final BooleanisBilling()final BooleanisPermission()final BooleanisNotFound()final BooleanisRateLimit()final BooleanisTimeout()final BooleanisApi()final BooleanisOverloaded()final BooleanisConflict()final BetaInvalidRequestErrorasInvalidRequest()final BetaAuthenticationErrorasAuthentication()final BetaBillingErrorasBilling()final BetaPermissionErrorasPermission()final BetaNotFoundErrorasNotFound()final BetaRateLimitErrorasRateLimit()final BetaGatewayTimeoutErrorasTimeout()final BetaApiErrorasApi()final BetaOverloadedErrorasOverloaded()final BetaTargetStoreHeldErrorasConflict()Returned with status 409 when a request to create a dream sets output_behaviortoupdate_existingand another dream that writes into the same memory store hasn't fully stopped.final <T extends Any> Taccept(BetaDreamingError.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaDreamingErrorvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaDreamingErrorofInvalidRequest(BetaInvalidRequestError invalidRequest)final static BetaDreamingErrorofInvalidRequest(String message)Returns an immutable instance of BetaDreamingError whose ofInvalidRequest variant is built from the given required message. final static BetaDreamingErrorofAuthentication(BetaAuthenticationError authentication)final static BetaDreamingErrorofAuthentication(String message)Returns an immutable instance of BetaDreamingError whose ofAuthentication variant is built from the given required message. final static BetaDreamingErrorofBilling(BetaBillingError billing)final static BetaDreamingErrorofBilling(String message)Returns an immutable instance of BetaDreamingError whose ofBilling variant is built from the given required message. final static BetaDreamingErrorofPermission(BetaPermissionError permission)final static BetaDreamingErrorofPermission(String message)Returns an immutable instance of BetaDreamingError whose ofPermission variant is built from the given required message. final static BetaDreamingErrorofNotFound(BetaNotFoundError notFound)final static BetaDreamingErrorofNotFound(String message)Returns an immutable instance of BetaDreamingError whose ofNotFound variant is built from the given required message. final static BetaDreamingErrorofRateLimit(BetaRateLimitError rateLimit)final static BetaDreamingErrorofRateLimit(String message)Returns an immutable instance of BetaDreamingError whose ofRateLimit variant is built from the given required message. final static BetaDreamingErrorofTimeout(BetaGatewayTimeoutError timeout)final static BetaDreamingErrorofTimeout(String message)Returns an immutable instance of BetaDreamingError whose ofTimeout variant is built from the given required message. final static BetaDreamingErrorofApi(BetaApiError api)final static BetaDreamingErrorofApi(String message)Returns an immutable instance of BetaDreamingError whose ofApi variant is built from the given required message. final static BetaDreamingErrorofOverloaded(BetaOverloadedError overloaded)final static BetaDreamingErrorofOverloaded(String message)Returns an immutable instance of BetaDreamingError whose ofOverloaded variant is built from the given required message. final static BetaDreamingErrorofConflict(BetaTargetStoreHeldError conflict)Returned with status 409 when a request to create a dream sets output_behaviortoupdate_existingand another dream that writes into the same memory store hasn't fully stopped.-
-
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()
-
conflict
final Optional<BetaTargetStoreHeldError> conflict()
Returned with status 409 when a request to create a dream sets
output_behaviortoupdate_existingand another dream that writes into the same memory store hasn't fully stopped.The other dream is
pendingorrunning, or it has just stopped and is still finishing its last writes.messagegives the ID of the other dream when the server can identify it. If that dream has already reachedcompleted,failed, orcanceled, retry after a short wait. Otherwise, wait for the other dream to end or cancel it, then retry. The response sets thex-should-retryheader tofalse.
-
type
final BetaDreamingError.Type type()
-
isInvalidRequest
final Boolean isInvalidRequest()
-
isAuthentication
final Boolean isAuthentication()
-
isPermission
final Boolean isPermission()
-
isNotFound
final Boolean isNotFound()
-
isRateLimit
final Boolean isRateLimit()
-
isOverloaded
final Boolean isOverloaded()
-
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()
-
asConflict
final BetaTargetStoreHeldError asConflict()
Returned with status 409 when a request to create a dream sets
output_behaviortoupdate_existingand another dream that writes into the same memory store hasn't fully stopped.The other dream is
pendingorrunning, or it has just stopped and is still finishing its last writes.messagegives the ID of the other dream when the server can identify it. If that dream has already reachedcompleted,failed, orcanceled, retry after a short wait. Otherwise, wait for the other dream to end or cancel it, then retry. The response sets thex-should-retryheader tofalse.
-
accept
final <T extends Any> T accept(BetaDreamingError.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 = betaDreamingError.accept(new BetaDreamingError.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 BetaDreamingError 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 BetaDreamingError ofInvalidRequest(BetaInvalidRequestError invalidRequest)
-
ofInvalidRequest
final static BetaDreamingError ofInvalidRequest(String message)
Returns an immutable instance of BetaDreamingError whose ofInvalidRequest variant is built from the given required message.
-
ofAuthentication
final static BetaDreamingError ofAuthentication(BetaAuthenticationError authentication)
-
ofAuthentication
final static BetaDreamingError ofAuthentication(String message)
Returns an immutable instance of BetaDreamingError whose ofAuthentication variant is built from the given required message.
-
ofBilling
final static BetaDreamingError ofBilling(BetaBillingError billing)
-
ofBilling
final static BetaDreamingError ofBilling(String message)
Returns an immutable instance of BetaDreamingError whose ofBilling variant is built from the given required message.
-
ofPermission
final static BetaDreamingError ofPermission(BetaPermissionError permission)
-
ofPermission
final static BetaDreamingError ofPermission(String message)
Returns an immutable instance of BetaDreamingError whose ofPermission variant is built from the given required message.
-
ofNotFound
final static BetaDreamingError ofNotFound(BetaNotFoundError notFound)
-
ofNotFound
final static BetaDreamingError ofNotFound(String message)
Returns an immutable instance of BetaDreamingError whose ofNotFound variant is built from the given required message.
-
ofRateLimit
final static BetaDreamingError ofRateLimit(BetaRateLimitError rateLimit)
-
ofRateLimit
final static BetaDreamingError ofRateLimit(String message)
Returns an immutable instance of BetaDreamingError whose ofRateLimit variant is built from the given required message.
-
ofTimeout
final static BetaDreamingError ofTimeout(BetaGatewayTimeoutError timeout)
-
ofTimeout
final static BetaDreamingError ofTimeout(String message)
Returns an immutable instance of BetaDreamingError whose ofTimeout variant is built from the given required message.
-
ofApi
final static BetaDreamingError ofApi(BetaApiError api)
-
ofApi
final static BetaDreamingError ofApi(String message)
Returns an immutable instance of BetaDreamingError whose ofApi variant is built from the given required message.
-
ofOverloaded
final static BetaDreamingError ofOverloaded(BetaOverloadedError overloaded)
-
ofOverloaded
final static BetaDreamingError ofOverloaded(String message)
Returns an immutable instance of BetaDreamingError whose ofOverloaded variant is built from the given required message.
-
ofConflict
final static BetaDreamingError ofConflict(BetaTargetStoreHeldError conflict)
Returned with status 409 when a request to create a dream sets
output_behaviortoupdate_existingand another dream that writes into the same memory store hasn't fully stopped.The other dream is
pendingorrunning, or it has just stopped and is still finishing its last writes.messagegives the ID of the other dream when the server can identify it. If that dream has already reachedcompleted,failed, orcanceled, retry after a short wait. Otherwise, wait for the other dream to end or cancel it, then retry. The response sets thex-should-retryheader tofalse.
-
-
-
-