TranslationErrorCode Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T> - com.
azure. ai. translation. document. models. TranslationErrorCode
- com.
- com.
public final class TranslationErrorCode
extends ExpandableStringEnum<TranslationErrorCode>
Enums containing high level error codes.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
static final
Translation |
INTERNAL_SERVER_ERROR
Internal |
|
static final
Translation |
INVALID_ARGUMENT
Invalid |
|
static final
Translation |
INVALID_REQUEST
Invalid |
|
static final
Translation |
REQUEST_RATE_TOO_HIGH
Request |
|
static final
Translation |
RESOURCE_NOT_FOUND
Resource |
|
static final
Translation |
SERVICE_UNAVAILABLE
Service |
|
static final
Translation |
UNAUTHORIZED
Unauthorized. |
Constructor Summary
| Constructor | Description |
|---|---|
| TranslationErrorCode() |
Deprecated
Use the fromString(String name) factory method.
Creates a new instance of Translation |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Translation |
fromString(String name)
Creates or finds a Translation |
|
static
Collection<Translation |
values()
Gets known Translation |
Methods inherited from ExpandableStringEnum
Methods inherited from java.lang.Object
Field Details
INTERNAL_SERVER_ERROR
public static final TranslationErrorCode INTERNAL_SERVER_ERROR
InternalServerError.
INVALID_ARGUMENT
public static final TranslationErrorCode INVALID_ARGUMENT
InvalidArgument.
INVALID_REQUEST
public static final TranslationErrorCode INVALID_REQUEST
InvalidRequest.
REQUEST_RATE_TOO_HIGH
public static final TranslationErrorCode REQUEST_RATE_TOO_HIGH
RequestRateTooHigh.
RESOURCE_NOT_FOUND
public static final TranslationErrorCode RESOURCE_NOT_FOUND
ResourceNotFound.
SERVICE_UNAVAILABLE
public static final TranslationErrorCode SERVICE_UNAVAILABLE
ServiceUnavailable.
UNAUTHORIZED
public static final TranslationErrorCode UNAUTHORIZED
Unauthorized.
Constructor Details
TranslationErrorCode
@Deprecated
public TranslationErrorCode()
Deprecated
Creates a new instance of TranslationErrorCode value.
Method Details
fromString
public static TranslationErrorCode fromString(String name)
Creates or finds a TranslationErrorCode from its string representation.
Parameters:
Returns:
values
public static Collection<TranslationErrorCode> values()
Gets known TranslationErrorCode values.
Returns: