use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class ExpenseFieldJsonUnmarshaller method unmarshall.
public ExpenseField unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
ExpenseField expenseField = new ExpenseField();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Type")) {
expenseField.setType(ExpenseTypeJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("LabelDetection")) {
expenseField.setLabelDetection(ExpenseDetectionJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ValueDetection")) {
expenseField.setValueDetection(ExpenseDetectionJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("PageNumber")) {
expenseField.setPageNumber(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return expenseField;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class GeometryJsonUnmarshaller method unmarshall.
public Geometry unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Geometry geometry = new Geometry();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("BoundingBox")) {
geometry.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Polygon")) {
geometry.setPolygon(new ListUnmarshaller<Point>(PointJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return geometry;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class GetDocumentAnalysisResultJsonUnmarshaller method unmarshall.
public GetDocumentAnalysisResult unmarshall(JsonUnmarshallerContext context) throws Exception {
GetDocumentAnalysisResult getDocumentAnalysisResult = new GetDocumentAnalysisResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("DocumentMetadata")) {
getDocumentAnalysisResult.setDocumentMetadata(DocumentMetadataJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("JobStatus")) {
getDocumentAnalysisResult.setJobStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("NextToken")) {
getDocumentAnalysisResult.setNextToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Blocks")) {
getDocumentAnalysisResult.setBlocks(new ListUnmarshaller<Block>(BlockJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("Warnings")) {
getDocumentAnalysisResult.setWarnings(new ListUnmarshaller<Warning>(WarningJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("StatusMessage")) {
getDocumentAnalysisResult.setStatusMessage(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("AnalyzeDocumentModelVersion")) {
getDocumentAnalysisResult.setAnalyzeDocumentModelVersion(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return getDocumentAnalysisResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class GetExpenseAnalysisResultJsonUnmarshaller method unmarshall.
public GetExpenseAnalysisResult unmarshall(JsonUnmarshallerContext context) throws Exception {
GetExpenseAnalysisResult getExpenseAnalysisResult = new GetExpenseAnalysisResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("DocumentMetadata")) {
getExpenseAnalysisResult.setDocumentMetadata(DocumentMetadataJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("JobStatus")) {
getExpenseAnalysisResult.setJobStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("NextToken")) {
getExpenseAnalysisResult.setNextToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ExpenseDocuments")) {
getExpenseAnalysisResult.setExpenseDocuments(new ListUnmarshaller<ExpenseDocument>(ExpenseDocumentJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("Warnings")) {
getExpenseAnalysisResult.setWarnings(new ListUnmarshaller<Warning>(WarningJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("StatusMessage")) {
getExpenseAnalysisResult.setStatusMessage(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("AnalyzeExpenseModelVersion")) {
getExpenseAnalysisResult.setAnalyzeExpenseModelVersion(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return getExpenseAnalysisResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class HumanLoopActivationOutputJsonUnmarshaller method unmarshall.
public HumanLoopActivationOutput unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
HumanLoopActivationOutput humanLoopActivationOutput = new HumanLoopActivationOutput();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("HumanLoopArn")) {
humanLoopActivationOutput.setHumanLoopArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("HumanLoopActivationReasons")) {
humanLoopActivationOutput.setHumanLoopActivationReasons(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("HumanLoopActivationConditionsEvaluationResults")) {
humanLoopActivationOutput.setHumanLoopActivationConditionsEvaluationResults(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return humanLoopActivationOutput;
}
Aggregations