use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class ListMedicalTranscriptionJobsResultJsonUnmarshaller method unmarshall.
public ListMedicalTranscriptionJobsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
ListMedicalTranscriptionJobsResult listMedicalTranscriptionJobsResult = new ListMedicalTranscriptionJobsResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Status")) {
listMedicalTranscriptionJobsResult.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("NextToken")) {
listMedicalTranscriptionJobsResult.setNextToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MedicalTranscriptionJobSummaries")) {
listMedicalTranscriptionJobsResult.setMedicalTranscriptionJobSummaries(new ListUnmarshaller<MedicalTranscriptionJobSummary>(MedicalTranscriptionJobSummaryJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return listMedicalTranscriptionJobsResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class BlockJsonUnmarshaller method unmarshall.
public Block unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Block block = new Block();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("BlockType")) {
block.setBlockType(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Confidence")) {
block.setConfidence(FloatJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Text")) {
block.setText(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("TextType")) {
block.setTextType(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("RowIndex")) {
block.setRowIndex(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ColumnIndex")) {
block.setColumnIndex(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("RowSpan")) {
block.setRowSpan(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ColumnSpan")) {
block.setColumnSpan(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Geometry")) {
block.setGeometry(GeometryJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Id")) {
block.setId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Relationships")) {
block.setRelationships(new ListUnmarshaller<Relationship>(RelationshipJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("EntityTypes")) {
block.setEntityTypes(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("SelectionStatus")) {
block.setSelectionStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Page")) {
block.setPage(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Query")) {
block.setQuery(QueryJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return block;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class DetectDocumentTextResultJsonUnmarshaller method unmarshall.
public DetectDocumentTextResult unmarshall(JsonUnmarshallerContext context) throws Exception {
DetectDocumentTextResult detectDocumentTextResult = new DetectDocumentTextResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("DocumentMetadata")) {
detectDocumentTextResult.setDocumentMetadata(DocumentMetadataJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Blocks")) {
detectDocumentTextResult.setBlocks(new ListUnmarshaller<Block>(BlockJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("DetectDocumentTextModelVersion")) {
detectDocumentTextResult.setDetectDocumentTextModelVersion(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return detectDocumentTextResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class IdentityDocumentJsonUnmarshaller method unmarshall.
public IdentityDocument unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
IdentityDocument identityDocument = new IdentityDocument();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("DocumentIndex")) {
identityDocument.setDocumentIndex(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("IdentityDocumentFields")) {
identityDocument.setIdentityDocumentFields(new ListUnmarshaller<IdentityDocumentField>(IdentityDocumentFieldJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return identityDocument;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class LineItemFieldsJsonUnmarshaller method unmarshall.
public LineItemFields unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
LineItemFields lineItemFields = new LineItemFields();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("LineItemExpenseFields")) {
lineItemFields.setLineItemExpenseFields(new ListUnmarshaller<ExpenseField>(ExpenseFieldJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return lineItemFields;
}
Aggregations