use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class RuleJsonUnmarshaller method unmarshall.
public Rule unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Rule rule = new Rule();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("NonTalkTimeFilter")) {
rule.setNonTalkTimeFilter(NonTalkTimeFilterJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("InterruptionFilter")) {
rule.setInterruptionFilter(InterruptionFilterJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("TranscriptFilter")) {
rule.setTranscriptFilter(TranscriptFilterJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("SentimentFilter")) {
rule.setSentimentFilter(SentimentFilterJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return rule;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class SentimentFilterJsonUnmarshaller method unmarshall.
public SentimentFilter unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
SentimentFilter sentimentFilter = new SentimentFilter();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Sentiments")) {
sentimentFilter.setSentiments(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("AbsoluteTimeRange")) {
sentimentFilter.setAbsoluteTimeRange(AbsoluteTimeRangeJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("RelativeTimeRange")) {
sentimentFilter.setRelativeTimeRange(RelativeTimeRangeJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ParticipantRole")) {
sentimentFilter.setParticipantRole(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Negate")) {
sentimentFilter.setNegate(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return sentimentFilter;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class SettingsJsonUnmarshaller method unmarshall.
public Settings unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Settings settings = new Settings();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("VocabularyName")) {
settings.setVocabularyName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ShowSpeakerLabels")) {
settings.setShowSpeakerLabels(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MaxSpeakerLabels")) {
settings.setMaxSpeakerLabels(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ChannelIdentification")) {
settings.setChannelIdentification(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ShowAlternatives")) {
settings.setShowAlternatives(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MaxAlternatives")) {
settings.setMaxAlternatives(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("VocabularyFilterName")) {
settings.setVocabularyFilterName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("VocabularyFilterMethod")) {
settings.setVocabularyFilterMethod(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return settings;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class JobExecutionSettingsJsonUnmarshaller method unmarshall.
public JobExecutionSettings unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
JobExecutionSettings jobExecutionSettings = new JobExecutionSettings();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("AllowDeferredExecution")) {
jobExecutionSettings.setAllowDeferredExecution(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("DataAccessRoleArn")) {
jobExecutionSettings.setDataAccessRoleArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return jobExecutionSettings;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class LanguageIdSettingsJsonUnmarshaller method unmarshall.
public LanguageIdSettings unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
LanguageIdSettings languageIdSettings = new LanguageIdSettings();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("VocabularyName")) {
languageIdSettings.setVocabularyName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("VocabularyFilterName")) {
languageIdSettings.setVocabularyFilterName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("LanguageModelName")) {
languageIdSettings.setLanguageModelName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return languageIdSettings;
}
Aggregations