@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTranscriptionJobName() == null) ? 0 : getTranscriptionJobName().hashCode()); hashCode = prime * hashCode + ((getTranscriptionJobStatus() == null) ? 0 : getTranscriptionJobStatus().hashCode()); hashCode = prime * hashCode + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); hashCode = prime * hashCode + ((getMediaSampleRateHertz() == null) ? 0 : getMediaSampleRateHertz().hashCode()); hashCode = prime * hashCode + ((getMediaFormat() == null) ? 0 : getMediaFormat().hashCode()); hashCode = prime * hashCode + ((getMedia() == null) ? 0 : getMedia().hashCode()); hashCode = prime * hashCode + ((getTranscript() == null) ? 0 : getTranscript().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getCompletionTime() == null) ? 0 : getCompletionTime().hashCode()); hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode()); hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode()); return hashCode; }
public TranscriptionJob unmarshall(JsonUnmarshallerContext context) throws Exception { TranscriptionJob transcriptionJob = new TranscriptionJob(); if (context.testExpression("TranscriptionJobName", targetDepth)) { context.nextToken(); transcriptionJob.setTranscriptionJobName(context.getUnmarshaller(String.class).unmarshall(context)); transcriptionJob.setTranscriptionJobStatus(context.getUnmarshaller(String.class).unmarshall(context)); transcriptionJob.setLanguageCode(context.getUnmarshaller(String.class).unmarshall(context)); transcriptionJob.setMediaSampleRateHertz(context.getUnmarshaller(Integer.class).unmarshall(context)); transcriptionJob.setMediaFormat(context.getUnmarshaller(String.class).unmarshall(context)); transcriptionJob.setMedia(MediaJsonUnmarshaller.getInstance().unmarshall(context)); transcriptionJob.setTranscript(TranscriptJsonUnmarshaller.getInstance().unmarshall(context)); transcriptionJob.setCreationTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); transcriptionJob.setCompletionTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); transcriptionJob.setFailureReason(context.getUnmarshaller(String.class).unmarshall(context)); transcriptionJob.setSettings(SettingsJsonUnmarshaller.getInstance().unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetTranscriptionJobResult == false) return false; GetTranscriptionJobResult other = (GetTranscriptionJobResult) obj; if (other.getTranscriptionJob() == null ^ this.getTranscriptionJob() == null) return false; if (other.getTranscriptionJob() != null && other.getTranscriptionJob().equals(this.getTranscriptionJob()) == false) return false; return true; }
TranscriptionJob transcriptionJob = new TranscriptionJob(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("TranscriptionJobName")) { transcriptionJob.setTranscriptionJobName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("TranscriptionJobStatus")) { transcriptionJob.setTranscriptionJobStatus(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("LanguageCode")) { transcriptionJob.setLanguageCode(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("MediaSampleRateHertz")) { transcriptionJob.setMediaSampleRateHertz(IntegerJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("MediaFormat")) { transcriptionJob.setMediaFormat(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Media")) { transcriptionJob.setMedia(MediaJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Transcript")) { transcriptionJob.setTranscript(TranscriptJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("CreationTime")) { transcriptionJob.setCreationTime(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("CompletionTime")) {
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartTranscriptionJobResult == false) return false; StartTranscriptionJobResult other = (StartTranscriptionJobResult) obj; if (other.getTranscriptionJob() == null ^ this.getTranscriptionJob() == null) return false; if (other.getTranscriptionJob() != null && other.getTranscriptionJob().equals(this.getTranscriptionJob()) == false) return false; return true; }
return false; TranscriptionJob other = (TranscriptionJob) obj; if (other.getTranscriptionJobName() == null ^ this.getTranscriptionJobName() == null) return false; if (other.getTranscriptionJobName() != null && other.getTranscriptionJobName().equals(this.getTranscriptionJobName()) == false) return false; if (other.getTranscriptionJobStatus() == null ^ this.getTranscriptionJobStatus() == null) return false; if (other.getTranscriptionJobStatus() != null && other.getTranscriptionJobStatus().equals(this.getTranscriptionJobStatus()) == false) return false; if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) return false; if (other.getLanguageCode() != null && other.getLanguageCode().equals(this.getLanguageCode()) == false) return false; if (other.getMediaSampleRateHertz() == null ^ this.getMediaSampleRateHertz() == null) return false; if (other.getMediaSampleRateHertz() != null && other.getMediaSampleRateHertz().equals(this.getMediaSampleRateHertz()) == false) return false; if (other.getMediaFormat() == null ^ this.getMediaFormat() == null) return false; if (other.getMediaFormat() != null && other.getMediaFormat().equals(this.getMediaFormat()) == false) return false; if (other.getMedia() == null ^ this.getMedia() == null) return false; if (other.getMedia() != null && other.getMedia().equals(this.getMedia()) == false) return false; if (other.getTranscript() == null ^ this.getTranscript() == null) return false; if (other.getTranscript() != null && other.getTranscript().equals(this.getTranscript()) == false)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetTranscriptionJobResult == false) return false; GetTranscriptionJobResult other = (GetTranscriptionJobResult) obj; if (other.getTranscriptionJob() == null ^ this.getTranscriptionJob() == null) return false; if (other.getTranscriptionJob() != null && other.getTranscriptionJob().equals(this.getTranscriptionJob()) == false) return false; return true; } }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTranscriptionJobName() != null) sb.append("TranscriptionJobName: ").append(getTranscriptionJobName()).append(","); if (getTranscriptionJobStatus() != null) sb.append("TranscriptionJobStatus: ").append(getTranscriptionJobStatus()).append(","); if (getLanguageCode() != null) sb.append("LanguageCode: ").append(getLanguageCode()).append(","); if (getMediaSampleRateHertz() != null) sb.append("MediaSampleRateHertz: ").append(getMediaSampleRateHertz()).append(","); if (getMediaFormat() != null) sb.append("MediaFormat: ").append(getMediaFormat()).append(","); if (getMedia() != null) sb.append("Media: ").append(getMedia()).append(","); if (getTranscript() != null) sb.append("Transcript: ").append(getTranscript()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getCompletionTime() != null) sb.append("CompletionTime: ").append(getCompletionTime()).append(","); if (getFailureReason() != null) sb.append("FailureReason: ").append(getFailureReason()).append(","); if (getSettings() != null) sb.append("Settings: ").append(getSettings()); sb.append("}"); return sb.toString();
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartTranscriptionJobResult == false) return false; StartTranscriptionJobResult other = (StartTranscriptionJobResult) obj; if (other.getTranscriptionJob() == null ^ this.getTranscriptionJob() == null) return false; if (other.getTranscriptionJob() != null && other.getTranscriptionJob().equals(this.getTranscriptionJob()) == false) return false; return true; } }
/** * Marshall the given parameter object. */ public void marshall(TranscriptionJob transcriptionJob, ProtocolMarshaller protocolMarshaller) { if (transcriptionJob == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(transcriptionJob.getTranscriptionJobName(), TRANSCRIPTIONJOBNAME_BINDING); protocolMarshaller.marshall(transcriptionJob.getTranscriptionJobStatus(), TRANSCRIPTIONJOBSTATUS_BINDING); protocolMarshaller.marshall(transcriptionJob.getLanguageCode(), LANGUAGECODE_BINDING); protocolMarshaller.marshall(transcriptionJob.getMediaSampleRateHertz(), MEDIASAMPLERATEHERTZ_BINDING); protocolMarshaller.marshall(transcriptionJob.getMediaFormat(), MEDIAFORMAT_BINDING); protocolMarshaller.marshall(transcriptionJob.getMedia(), MEDIA_BINDING); protocolMarshaller.marshall(transcriptionJob.getTranscript(), TRANSCRIPT_BINDING); protocolMarshaller.marshall(transcriptionJob.getCreationTime(), CREATIONTIME_BINDING); protocolMarshaller.marshall(transcriptionJob.getCompletionTime(), COMPLETIONTIME_BINDING); protocolMarshaller.marshall(transcriptionJob.getFailureReason(), FAILUREREASON_BINDING); protocolMarshaller.marshall(transcriptionJob.getSettings(), SETTINGS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTranscriptionJobName() == null) ? 0 : getTranscriptionJobName().hashCode()); hashCode = prime * hashCode + ((getTranscriptionJobStatus() == null) ? 0 : getTranscriptionJobStatus() .hashCode()); hashCode = prime * hashCode + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); hashCode = prime * hashCode + ((getMediaSampleRateHertz() == null) ? 0 : getMediaSampleRateHertz().hashCode()); hashCode = prime * hashCode + ((getMediaFormat() == null) ? 0 : getMediaFormat().hashCode()); hashCode = prime * hashCode + ((getMedia() == null) ? 0 : getMedia().hashCode()); hashCode = prime * hashCode + ((getTranscript() == null) ? 0 : getTranscript().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getCompletionTime() == null) ? 0 : getCompletionTime().hashCode()); hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode()); hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode()); return hashCode; }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTranscriptionJobName() != null) sb.append("TranscriptionJobName: " + getTranscriptionJobName() + ","); if (getTranscriptionJobStatus() != null) sb.append("TranscriptionJobStatus: " + getTranscriptionJobStatus() + ","); if (getLanguageCode() != null) sb.append("LanguageCode: " + getLanguageCode() + ","); if (getMediaSampleRateHertz() != null) sb.append("MediaSampleRateHertz: " + getMediaSampleRateHertz() + ","); if (getMediaFormat() != null) sb.append("MediaFormat: " + getMediaFormat() + ","); if (getMedia() != null) sb.append("Media: " + getMedia() + ","); if (getTranscript() != null) sb.append("Transcript: " + getTranscript() + ","); if (getCreationTime() != null) sb.append("CreationTime: " + getCreationTime() + ","); if (getCompletionTime() != null) sb.append("CompletionTime: " + getCompletionTime() + ","); if (getFailureReason() != null) sb.append("FailureReason: " + getFailureReason() + ","); if (getSettings() != null) sb.append("Settings: " + getSettings()); sb.append("}"); return sb.toString();
if (other.getTranscriptionJobName() == null ^ this.getTranscriptionJobName() == null) return false; if (other.getTranscriptionJobName() != null && other.getTranscriptionJobName().equals(this.getTranscriptionJobName()) == false) return false; if (other.getTranscriptionJobStatus() == null ^ this.getTranscriptionJobStatus() == null) return false; if (other.getTranscriptionJobStatus() != null && other.getTranscriptionJobStatus().equals(this.getTranscriptionJobStatus()) == false) return false; if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) return false; if (other.getLanguageCode() != null && other.getLanguageCode().equals(this.getLanguageCode()) == false) return false; if (other.getMediaSampleRateHertz() == null ^ this.getMediaSampleRateHertz() == null) return false; if (other.getMediaSampleRateHertz() != null && other.getMediaSampleRateHertz().equals(this.getMediaSampleRateHertz()) == false) return false; if (other.getMediaFormat() == null ^ this.getMediaFormat() == null) return false; if (other.getMediaFormat() != null && other.getMediaFormat().equals(this.getMediaFormat()) == false) return false; if (other.getMedia() == null ^ this.getMedia() == null) return false; if (other.getMedia() != null && other.getMedia().equals(this.getMedia()) == false) return false;
public void marshall(TranscriptionJob transcriptionJob, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (transcriptionJob.getTranscriptionJobName() != null) { String transcriptionJobName = transcriptionJob.getTranscriptionJobName(); jsonWriter.name("TranscriptionJobName"); jsonWriter.value(transcriptionJobName); if (transcriptionJob.getTranscriptionJobStatus() != null) { String transcriptionJobStatus = transcriptionJob.getTranscriptionJobStatus(); jsonWriter.name("TranscriptionJobStatus"); jsonWriter.value(transcriptionJobStatus); if (transcriptionJob.getLanguageCode() != null) { String languageCode = transcriptionJob.getLanguageCode(); jsonWriter.name("LanguageCode"); jsonWriter.value(languageCode); if (transcriptionJob.getMediaSampleRateHertz() != null) { Integer mediaSampleRateHertz = transcriptionJob.getMediaSampleRateHertz(); jsonWriter.name("MediaSampleRateHertz"); jsonWriter.value(mediaSampleRateHertz); if (transcriptionJob.getMediaFormat() != null) { String mediaFormat = transcriptionJob.getMediaFormat(); jsonWriter.name("MediaFormat"); jsonWriter.value(mediaFormat); if (transcriptionJob.getMedia() != null) { Media media = transcriptionJob.getMedia();