use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class PointJsonUnmarshaller method unmarshall.
public Point unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Point point = new Point();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("X")) {
point.setX(FloatJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Y")) {
point.setY(FloatJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return point;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class CreateGrantResultJsonUnmarshaller method unmarshall.
public CreateGrantResult unmarshall(JsonUnmarshallerContext context) throws Exception {
CreateGrantResult createGrantResult = new CreateGrantResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("GrantToken")) {
createGrantResult.setGrantToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("GrantId")) {
createGrantResult.setGrantId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return createGrantResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class CreateKeyResultJsonUnmarshaller method unmarshall.
public CreateKeyResult unmarshall(JsonUnmarshallerContext context) throws Exception {
CreateKeyResult createKeyResult = new CreateKeyResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("KeyMetadata")) {
createKeyResult.setKeyMetadata(KeyMetadataJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return createKeyResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class NotificationConfigurationJsonUnmarshaller method unmarshall.
public NotificationConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
NotificationConfiguration notificationConfiguration = new NotificationConfiguration();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Status")) {
notificationConfiguration.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("DestinationConfig")) {
notificationConfiguration.setDestinationConfig(NotificationDestinationConfigJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return notificationConfiguration;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class NotificationDestinationConfigJsonUnmarshaller method unmarshall.
public NotificationDestinationConfig unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
NotificationDestinationConfig notificationDestinationConfig = new NotificationDestinationConfig();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Uri")) {
notificationDestinationConfig.setUri(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return notificationDestinationConfig;
}
Aggregations