use of com.amazonaws.util.json.AwsJsonReader in project amazon-cognito-android by aws.
the class UpdateRecordsResultJsonUnmarshaller method unmarshall.
public UpdateRecordsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
UpdateRecordsResult updateRecordsResult = new UpdateRecordsResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Records")) {
updateRecordsResult.setRecords(new ListUnmarshaller<Record>(RecordJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return updateRecordsResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project amazon-cognito-android by aws.
the class DeleteDatasetResultJsonUnmarshaller method unmarshall.
public DeleteDatasetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
DeleteDatasetResult deleteDatasetResult = new DeleteDatasetResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Dataset")) {
deleteDatasetResult.setDataset(DatasetJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return deleteDatasetResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project amazon-cognito-android by aws.
the class ListRecordsResultJsonUnmarshaller method unmarshall.
public ListRecordsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
ListRecordsResult listRecordsResult = new ListRecordsResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Records")) {
listRecordsResult.setRecords(new ListUnmarshaller<Record>(RecordJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("NextToken")) {
listRecordsResult.setNextToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Count")) {
listRecordsResult.setCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("DatasetSyncCount")) {
listRecordsResult.setDatasetSyncCount(LongJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("LastModifiedBy")) {
listRecordsResult.setLastModifiedBy(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MergedDatasetNames")) {
listRecordsResult.setMergedDatasetNames(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("DatasetExists")) {
listRecordsResult.setDatasetExists(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("DatasetDeletedAfterRequestedSyncCount")) {
listRecordsResult.setDatasetDeletedAfterRequestedSyncCount(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("SyncSessionToken")) {
listRecordsResult.setSyncSessionToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return listRecordsResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project amazon-cognito-android by aws.
the class RegisterDeviceResultJsonUnmarshaller method unmarshall.
public RegisterDeviceResult unmarshall(JsonUnmarshallerContext context) throws Exception {
RegisterDeviceResult registerDeviceResult = new RegisterDeviceResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("DeviceId")) {
registerDeviceResult.setDeviceId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return registerDeviceResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class AnalyzeIDDetectionsJsonUnmarshaller method unmarshall.
public AnalyzeIDDetections unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
AnalyzeIDDetections analyzeIDDetections = new AnalyzeIDDetections();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Text")) {
analyzeIDDetections.setText(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("NormalizedValue")) {
analyzeIDDetections.setNormalizedValue(NormalizedValueJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Confidence")) {
analyzeIDDetections.setConfidence(FloatJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return analyzeIDDetections;
}
Aggregations