use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class StartDocumentAnalysisResultJsonUnmarshaller method unmarshall.
public StartDocumentAnalysisResult unmarshall(JsonUnmarshallerContext context) throws Exception {
StartDocumentAnalysisResult startDocumentAnalysisResult = new StartDocumentAnalysisResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("JobId")) {
startDocumentAnalysisResult.setJobId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return startDocumentAnalysisResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class StartDocumentTextDetectionResultJsonUnmarshaller method unmarshall.
public StartDocumentTextDetectionResult unmarshall(JsonUnmarshallerContext context) throws Exception {
StartDocumentTextDetectionResult startDocumentTextDetectionResult = new StartDocumentTextDetectionResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("JobId")) {
startDocumentTextDetectionResult.setJobId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return startDocumentTextDetectionResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class WarningJsonUnmarshaller method unmarshall.
public Warning unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Warning warning = new Warning();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("ErrorCode")) {
warning.setErrorCode(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Pages")) {
warning.setPages(new ListUnmarshaller<Integer>(IntegerJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return warning;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class NormalizedValueJsonUnmarshaller method unmarshall.
public NormalizedValue unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
NormalizedValue normalizedValue = new NormalizedValue();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Value")) {
normalizedValue.setValue(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ValueType")) {
normalizedValue.setValueType(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return normalizedValue;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class NotificationChannelJsonUnmarshaller method unmarshall.
public NotificationChannel unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
NotificationChannel notificationChannel = new NotificationChannel();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("SNSTopicArn")) {
notificationChannel.setSNSTopicArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("RoleArn")) {
notificationChannel.setRoleArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return notificationChannel;
}
Aggregations