@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ValidationException extends AmazonPinpointSMSVoiceV2Exception
A validation exception for a field.
AmazonServiceException.ErrorType
Constructor and Description |
---|
ValidationException(String message)
Constructs a new ValidationException with the specified error message.
|
Modifier and Type | Method and Description |
---|---|
List<ValidationExceptionField> |
getFields()
The field that failed validation.
|
String |
getReason()
The reason for the exception.
|
void |
setFields(Collection<ValidationExceptionField> fields)
The field that failed validation.
|
void |
setReason(String reason)
The reason for the exception.
|
ValidationException |
withFields(Collection<ValidationExceptionField> fields)
The field that failed validation.
|
ValidationException |
withFields(ValidationExceptionField... fields)
The field that failed validation.
|
ValidationException |
withReason(String reason)
The reason for the exception.
|
ValidationException |
withReason(ValidationExceptionReason reason)
The reason for the exception.
|
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 void setReason(String reason)
The reason for the exception.
reason
- The reason for the exception.ValidationExceptionReason
public String getReason()
The reason for the exception.
ValidationExceptionReason
public ValidationException withReason(String reason)
The reason for the exception.
reason
- The reason for the exception.ValidationExceptionReason
public ValidationException withReason(ValidationExceptionReason reason)
The reason for the exception.
reason
- The reason for the exception.ValidationExceptionReason
public List<ValidationExceptionField> getFields()
The field that failed validation.
public void setFields(Collection<ValidationExceptionField> fields)
The field that failed validation.
fields
- The field that failed validation.public ValidationException withFields(ValidationExceptionField... fields)
The field that failed validation.
NOTE: This method appends the values to the existing list (if any). Use
setFields(java.util.Collection)
or withFields(java.util.Collection)
if you want to override the
existing values.
fields
- The field that failed validation.public ValidationException withFields(Collection<ValidationExceptionField> fields)
The field that failed validation.
fields
- The field that failed validation.