use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class LanguageModelJsonUnmarshaller method unmarshall.
public LanguageModel unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
LanguageModel languageModel = new LanguageModel();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("ModelName")) {
languageModel.setModelName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CreateTime")) {
languageModel.setCreateTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("LastModifiedTime")) {
languageModel.setLastModifiedTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("LanguageCode")) {
languageModel.setLanguageCode(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("BaseModelName")) {
languageModel.setBaseModelName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ModelStatus")) {
languageModel.setModelStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("UpgradeAvailability")) {
languageModel.setUpgradeAvailability(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("FailureReason")) {
languageModel.setFailureReason(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("InputDataConfig")) {
languageModel.setInputDataConfig(InputDataConfigJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return languageModel;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class MedicalTranscriptionJobJsonUnmarshaller method unmarshall.
public MedicalTranscriptionJob unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
MedicalTranscriptionJob medicalTranscriptionJob = new MedicalTranscriptionJob();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("MedicalTranscriptionJobName")) {
medicalTranscriptionJob.setMedicalTranscriptionJobName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("TranscriptionJobStatus")) {
medicalTranscriptionJob.setTranscriptionJobStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("LanguageCode")) {
medicalTranscriptionJob.setLanguageCode(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MediaSampleRateHertz")) {
medicalTranscriptionJob.setMediaSampleRateHertz(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MediaFormat")) {
medicalTranscriptionJob.setMediaFormat(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Media")) {
medicalTranscriptionJob.setMedia(MediaJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Transcript")) {
medicalTranscriptionJob.setTranscript(MedicalTranscriptJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("StartTime")) {
medicalTranscriptionJob.setStartTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CreationTime")) {
medicalTranscriptionJob.setCreationTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CompletionTime")) {
medicalTranscriptionJob.setCompletionTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("FailureReason")) {
medicalTranscriptionJob.setFailureReason(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Settings")) {
medicalTranscriptionJob.setSettings(MedicalTranscriptionSettingJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ContentIdentificationType")) {
medicalTranscriptionJob.setContentIdentificationType(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Specialty")) {
medicalTranscriptionJob.setSpecialty(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Type")) {
medicalTranscriptionJob.setType(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Tags")) {
medicalTranscriptionJob.setTags(new ListUnmarshaller<Tag>(TagJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return medicalTranscriptionJob;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class MedicalTranscriptionSettingJsonUnmarshaller method unmarshall.
public MedicalTranscriptionSetting unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
MedicalTranscriptionSetting medicalTranscriptionSetting = new MedicalTranscriptionSetting();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("ShowSpeakerLabels")) {
medicalTranscriptionSetting.setShowSpeakerLabels(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MaxSpeakerLabels")) {
medicalTranscriptionSetting.setMaxSpeakerLabels(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ChannelIdentification")) {
medicalTranscriptionSetting.setChannelIdentification(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ShowAlternatives")) {
medicalTranscriptionSetting.setShowAlternatives(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MaxAlternatives")) {
medicalTranscriptionSetting.setMaxAlternatives(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("VocabularyName")) {
medicalTranscriptionSetting.setVocabularyName(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return medicalTranscriptionSetting;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class NonTalkTimeFilterJsonUnmarshaller method unmarshall.
public NonTalkTimeFilter unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
NonTalkTimeFilter nonTalkTimeFilter = new NonTalkTimeFilter();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Threshold")) {
nonTalkTimeFilter.setThreshold(LongJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("AbsoluteTimeRange")) {
nonTalkTimeFilter.setAbsoluteTimeRange(AbsoluteTimeRangeJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("RelativeTimeRange")) {
nonTalkTimeFilter.setRelativeTimeRange(RelativeTimeRangeJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Negate")) {
nonTalkTimeFilter.setNegate(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return nonTalkTimeFilter;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class TranslateTextResultJsonUnmarshaller method unmarshall.
public TranslateTextResult unmarshall(JsonUnmarshallerContext context) throws Exception {
TranslateTextResult translateTextResult = new TranslateTextResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("TranslatedText")) {
translateTextResult.setTranslatedText(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("SourceLanguageCode")) {
translateTextResult.setSourceLanguageCode(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("TargetLanguageCode")) {
translateTextResult.setTargetLanguageCode(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("AppliedTerminologies")) {
translateTextResult.setAppliedTerminologies(new ListUnmarshaller<AppliedTerminology>(AppliedTerminologyJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("AppliedSettings")) {
translateTextResult.setAppliedSettings(TranslationSettingsJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return translateTextResult;
}
Aggregations