TranslationErrorCode Class

public final class TranslationErrorCode
extends ExpandableStringEnum<TranslationErrorCode>

Enums containing high level error codes.

Field Summary

Modifier and Type Field and Description
static final TranslationErrorCode INTERNAL_SERVER_ERROR

InternalServerError.

static final TranslationErrorCode INVALID_ARGUMENT

InvalidArgument.

static final TranslationErrorCode INVALID_REQUEST

InvalidRequest.

static final TranslationErrorCode REQUEST_RATE_TOO_HIGH

RequestRateTooHigh.

static final TranslationErrorCode RESOURCE_NOT_FOUND

ResourceNotFound.

static final TranslationErrorCode SERVICE_UNAVAILABLE

ServiceUnavailable.

static final TranslationErrorCode UNAUTHORIZED

Unauthorized.

Constructor Summary

Constructor Description
TranslationErrorCode()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of TranslationErrorCode value.

Method Summary

Modifier and Type Method and Description
static TranslationErrorCode fromString(String name)

Creates or finds a TranslationErrorCode from its string representation.

static Collection<TranslationErrorCode> values()

Gets known TranslationErrorCode values.

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

Use the fromString(String name) factory method.

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:

name - a name to look for.

Returns:

the corresponding TranslationErrorCode.

values

public static Collection<TranslationErrorCode> values()

Gets known TranslationErrorCode values.

Returns:

known TranslationErrorCode values.

Applies to