@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ValidationException extends AWSDeadlineException
The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
AmazonServiceException.ErrorType
Constructor and Description |
---|
ValidationException(String message)
Constructs a new ValidationException with the specified error message.
|
Modifier and Type | Method and Description |
---|---|
ValidationException |
addContextEntry(String key,
String value)
Add a single Context entry
|
ValidationException |
clearContextEntries()
Removes all the entries added into Context.
|
Map<String,String> |
getContext()
Information about the resources in use when the exception was thrown.
|
List<ValidationExceptionField> |
getFieldList()
A list of fields that failed validation.
|
String |
getReason()
The reason that the request failed validation.
|
void |
setContext(Map<String,String> context)
Information about the resources in use when the exception was thrown.
|
void |
setFieldList(Collection<ValidationExceptionField> fieldList)
A list of fields that failed validation.
|
void |
setReason(String reason)
The reason that the request failed validation.
|
ValidationException |
withContext(Map<String,String> context)
Information about the resources in use when the exception was thrown.
|
ValidationException |
withFieldList(Collection<ValidationExceptionField> fieldList)
A list of fields that failed validation.
|
ValidationException |
withFieldList(ValidationExceptionField... fieldList)
A list of fields that failed validation.
|
ValidationException |
withReason(String reason)
The reason that the request failed validation.
|
ValidationException |
withReason(ValidationExceptionReason reason)
The reason that the request failed validation.
|
getErrorCode, getErrorMessage, getErrorType, getHttpHeaders, getMessage, getProxyHost, getRawResponse, getRawResponseContent, getRequestId, getServiceName, getStatusCode, setErrorCode, setErrorMessage, setErrorType, setHttpHeaders, setProxyHost, setRawResponse, setRawResponseContent, setRequestId, setServiceName, setStatusCode
isRetryable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ValidationException(String message)
message
- Describes the error encountered.public Map<String,String> getContext()
Information about the resources in use when the exception was thrown.
public void setContext(Map<String,String> context)
Information about the resources in use when the exception was thrown.
context
- Information about the resources in use when the exception was thrown.public ValidationException withContext(Map<String,String> context)
Information about the resources in use when the exception was thrown.
context
- Information about the resources in use when the exception was thrown.public ValidationException addContextEntry(String key, String value)
public ValidationException clearContextEntries()
public List<ValidationExceptionField> getFieldList()
A list of fields that failed validation.
public void setFieldList(Collection<ValidationExceptionField> fieldList)
A list of fields that failed validation.
fieldList
- A list of fields that failed validation.public ValidationException withFieldList(ValidationExceptionField... fieldList)
A list of fields that failed validation.
NOTE: This method appends the values to the existing list (if any). Use
setFieldList(java.util.Collection)
or withFieldList(java.util.Collection)
if you want to
override the existing values.
fieldList
- A list of fields that failed validation.public ValidationException withFieldList(Collection<ValidationExceptionField> fieldList)
A list of fields that failed validation.
fieldList
- A list of fields that failed validation.public void setReason(String reason)
The reason that the request failed validation.
reason
- The reason that the request failed validation.ValidationExceptionReason
public String getReason()
The reason that the request failed validation.
ValidationExceptionReason
public ValidationException withReason(String reason)
The reason that the request failed validation.
reason
- The reason that the request failed validation.ValidationExceptionReason
public ValidationException withReason(ValidationExceptionReason reason)
The reason that the request failed validation.
reason
- The reason that the request failed validation.ValidationExceptionReason