use of com.amazonaws.transform.ListUnmarshaller in project aws-sdk-android by aws-amplify.
the class InvalidContactFlowModuleExceptionUnmarshaller method unmarshall.
@Override
public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception {
InvalidContactFlowModuleException e = (InvalidContactFlowModuleException) super.unmarshall(error);
e.setErrorCode("InvalidContactFlowModuleException");
final AwsJsonReader jsonReader = JsonUtils.getJsonReader(new StringReader(error.get("Problems")));
e.setProblems(new ListUnmarshaller<ProblemDetail>(ProblemDetailJsonUnmarshaller.getInstance()).unmarshall(new JsonUnmarshallerContext(jsonReader)));
return e;
}
use of com.amazonaws.transform.ListUnmarshaller in project aws-sdk-android by aws-amplify.
the class InvalidContactFlowExceptionUnmarshaller method unmarshall.
@Override
public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception {
InvalidContactFlowException e = (InvalidContactFlowException) super.unmarshall(error);
e.setErrorCode("InvalidContactFlowException");
final AwsJsonReader jsonReader = JsonUtils.getJsonReader(new StringReader(error.get("problems")));
e.setProblems(new ListUnmarshaller<ProblemDetail>(ProblemDetailJsonUnmarshaller.getInstance()).unmarshall(new JsonUnmarshallerContext(jsonReader)));
return e;
}
use of com.amazonaws.transform.ListUnmarshaller in project aws-sdk-android by aws-amplify.
the class ValidationExceptionUnmarshaller method unmarshall.
@Override
public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception {
ValidationException e = (ValidationException) super.unmarshall(error);
e.setErrorCode("ValidationException");
final AwsJsonReader jsonReader = JsonUtils.getJsonReader(new StringReader(error.get("FieldList")));
e.setFieldList(new ListUnmarshaller<ValidationExceptionField>(ValidationExceptionFieldJsonUnmarshaller.getInstance()).unmarshall(new JsonUnmarshallerContext(jsonReader)));
e.setReason(String.valueOf(error.get("Reason")));
return e;
}
Aggregations