use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class DialogActionJsonUnmarshaller method unmarshall.
public DialogAction unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
DialogAction dialogAction = new DialogAction();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("type")) {
dialogAction.setType(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("intentName")) {
dialogAction.setIntentName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("slots")) {
dialogAction.setSlots(new MapUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("slotToElicit")) {
dialogAction.setSlotToElicit(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("fulfillmentState")) {
dialogAction.setFulfillmentState(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("message")) {
dialogAction.setMessage(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("messageFormat")) {
dialogAction.setMessageFormat(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return dialogAction;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class GetSessionResultJsonUnmarshaller method unmarshall.
public GetSessionResult unmarshall(JsonUnmarshallerContext context) throws Exception {
GetSessionResult getSessionResult = new GetSessionResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("recentIntentSummaryView")) {
getSessionResult.setRecentIntentSummaryView(new ListUnmarshaller<IntentSummary>(IntentSummaryJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("sessionAttributes")) {
getSessionResult.setSessionAttributes(new MapUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("sessionId")) {
getSessionResult.setSessionId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("dialogAction")) {
getSessionResult.setDialogAction(DialogActionJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("activeContexts")) {
getSessionResult.setActiveContexts(new ListUnmarshaller<ActiveContext>(ActiveContextJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return getSessionResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class ActiveContextTimeToLiveJsonUnmarshaller method unmarshall.
public ActiveContextTimeToLive unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
ActiveContextTimeToLive activeContextTimeToLive = new ActiveContextTimeToLive();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("timeToLiveInSeconds")) {
activeContextTimeToLive.setTimeToLiveInSeconds(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("turnsToLive")) {
activeContextTimeToLive.setTurnsToLive(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return activeContextTimeToLive;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class CreateGeofenceCollectionResultJsonUnmarshaller method unmarshall.
public CreateGeofenceCollectionResult unmarshall(JsonUnmarshallerContext context) throws Exception {
CreateGeofenceCollectionResult createGeofenceCollectionResult = new CreateGeofenceCollectionResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("CollectionArn")) {
createGeofenceCollectionResult.setCollectionArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CollectionName")) {
createGeofenceCollectionResult.setCollectionName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CreateTime")) {
createGeofenceCollectionResult.setCreateTime(DateJsonUnmarshaller.getInstance(TimestampFormat.ISO_8601).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return createGeofenceCollectionResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class CreateMapResultJsonUnmarshaller method unmarshall.
public CreateMapResult unmarshall(JsonUnmarshallerContext context) throws Exception {
CreateMapResult createMapResult = new CreateMapResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("CreateTime")) {
createMapResult.setCreateTime(DateJsonUnmarshaller.getInstance(TimestampFormat.ISO_8601).unmarshall(context));
} else if (name.equals("MapArn")) {
createMapResult.setMapArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MapName")) {
createMapResult.setMapName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return createMapResult;
}
Aggregations