All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.transcribe.model.TranscriptionJob Maven / Gradle / Ivy

Go to download

The AWS Android SDK for Amazon Transcribe module holds the client classes that are used for communicating with Amazon Transcribe Service

There is a newer version: 2.77.0
Show newest version
/*
 * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *  http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package com.amazonaws.services.transcribe.model;

import java.io.Serializable;

/**
 * 

* Describes an asynchronous transcription job that was created with the * StartTranscriptionJob operation. Note that en-AU, en-UK, and * fr-CA languages are in preview and are only available to whitelisted * customers. *

*/ public class TranscriptionJob implements Serializable { /** *

* The name of the transcription job. *

*

* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
*/ private String transcriptionJobName; /** *

* The status of the transcription job. *

*

* Constraints:
* Allowed Values: IN_PROGRESS, FAILED, COMPLETED */ private String transcriptionJobStatus; /** *

* The language code for the input speech. *

*

* Constraints:
* Allowed Values: en-US, es-US, en-AU, fr-CA, en-GB, de-DE, pt-BR, * fr-FR */ private String languageCode; /** *

* The sample rate, in Hertz, of the audio track in the input media file. *

*

* Constraints:
* Range: 8000 - 48000
*/ private Integer mediaSampleRateHertz; /** *

* The format of the input media file. *

*

* Constraints:
* Allowed Values: mp3, mp4, wav, flac */ private String mediaFormat; /** *

* An object that describes the input media for the transcription job. *

*/ private Media media; /** *

* An object that describes the output of the transcription job. *

*/ private Transcript transcript; /** *

* A timestamp that shows when the job was created. *

*/ private java.util.Date creationTime; /** *

* A timestamp that shows when the job was completed. *

*/ private java.util.Date completionTime; /** *

* If the TranscriptionJobStatus field is FAILED, * this field contains information about why the job failed. *

*/ private String failureReason; /** *

* Optional settings for the transcription job. Use these settings to turn * on speaker recognition, to set the maximum number of speakers that should * be identified and to specify a custom vocabulary to use when processing * the transcription job. *

*/ private Settings settings; /** *

* The name of the transcription job. *

*

* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
* * @return

* The name of the transcription job. *

*/ public String getTranscriptionJobName() { return transcriptionJobName; } /** *

* The name of the transcription job. *

*

* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
* * @param transcriptionJobName

* The name of the transcription job. *

*/ public void setTranscriptionJobName(String transcriptionJobName) { this.transcriptionJobName = transcriptionJobName; } /** *

* The name of the transcription job. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
* * @param transcriptionJobName

* The name of the transcription job. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withTranscriptionJobName(String transcriptionJobName) { this.transcriptionJobName = transcriptionJobName; return this; } /** *

* The status of the transcription job. *

*

* Constraints:
* Allowed Values: IN_PROGRESS, FAILED, COMPLETED * * @return

* The status of the transcription job. *

* @see TranscriptionJobStatus */ public String getTranscriptionJobStatus() { return transcriptionJobStatus; } /** *

* The status of the transcription job. *

*

* Constraints:
* Allowed Values: IN_PROGRESS, FAILED, COMPLETED * * @param transcriptionJobStatus

* The status of the transcription job. *

* @see TranscriptionJobStatus */ public void setTranscriptionJobStatus(String transcriptionJobStatus) { this.transcriptionJobStatus = transcriptionJobStatus; } /** *

* The status of the transcription job. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: IN_PROGRESS, FAILED, COMPLETED * * @param transcriptionJobStatus

* The status of the transcription job. *

* @return A reference to this updated object so that method calls can be * chained together. * @see TranscriptionJobStatus */ public TranscriptionJob withTranscriptionJobStatus(String transcriptionJobStatus) { this.transcriptionJobStatus = transcriptionJobStatus; return this; } /** *

* The status of the transcription job. *

*

* Constraints:
* Allowed Values: IN_PROGRESS, FAILED, COMPLETED * * @param transcriptionJobStatus

* The status of the transcription job. *

* @see TranscriptionJobStatus */ public void setTranscriptionJobStatus(TranscriptionJobStatus transcriptionJobStatus) { this.transcriptionJobStatus = transcriptionJobStatus.toString(); } /** *

* The status of the transcription job. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: IN_PROGRESS, FAILED, COMPLETED * * @param transcriptionJobStatus

* The status of the transcription job. *

* @return A reference to this updated object so that method calls can be * chained together. * @see TranscriptionJobStatus */ public TranscriptionJob withTranscriptionJobStatus(TranscriptionJobStatus transcriptionJobStatus) { this.transcriptionJobStatus = transcriptionJobStatus.toString(); return this; } /** *

* The language code for the input speech. *

*

* Constraints:
* Allowed Values: en-US, es-US, en-AU, fr-CA, en-GB, de-DE, pt-BR, * fr-FR * * @return

* The language code for the input speech. *

* @see LanguageCode */ public String getLanguageCode() { return languageCode; } /** *

* The language code for the input speech. *

*

* Constraints:
* Allowed Values: en-US, es-US, en-AU, fr-CA, en-GB, de-DE, pt-BR, * fr-FR * * @param languageCode

* The language code for the input speech. *

* @see LanguageCode */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** *

* The language code for the input speech. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: en-US, es-US, en-AU, fr-CA, en-GB, de-DE, pt-BR, * fr-FR * * @param languageCode

* The language code for the input speech. *

* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public TranscriptionJob withLanguageCode(String languageCode) { this.languageCode = languageCode; return this; } /** *

* The language code for the input speech. *

*

* Constraints:
* Allowed Values: en-US, es-US, en-AU, fr-CA, en-GB, de-DE, pt-BR, * fr-FR * * @param languageCode

* The language code for the input speech. *

* @see LanguageCode */ public void setLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); } /** *

* The language code for the input speech. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: en-US, es-US, en-AU, fr-CA, en-GB, de-DE, pt-BR, * fr-FR * * @param languageCode

* The language code for the input speech. *

* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public TranscriptionJob withLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); return this; } /** *

* The sample rate, in Hertz, of the audio track in the input media file. *

*

* Constraints:
* Range: 8000 - 48000
* * @return

* The sample rate, in Hertz, of the audio track in the input media * file. *

*/ public Integer getMediaSampleRateHertz() { return mediaSampleRateHertz; } /** *

* The sample rate, in Hertz, of the audio track in the input media file. *

*

* Constraints:
* Range: 8000 - 48000
* * @param mediaSampleRateHertz

* The sample rate, in Hertz, of the audio track in the input * media file. *

*/ public void setMediaSampleRateHertz(Integer mediaSampleRateHertz) { this.mediaSampleRateHertz = mediaSampleRateHertz; } /** *

* The sample rate, in Hertz, of the audio track in the input media file. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 8000 - 48000
* * @param mediaSampleRateHertz

* The sample rate, in Hertz, of the audio track in the input * media file. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withMediaSampleRateHertz(Integer mediaSampleRateHertz) { this.mediaSampleRateHertz = mediaSampleRateHertz; return this; } /** *

* The format of the input media file. *

*

* Constraints:
* Allowed Values: mp3, mp4, wav, flac * * @return

* The format of the input media file. *

* @see MediaFormat */ public String getMediaFormat() { return mediaFormat; } /** *

* The format of the input media file. *

*

* Constraints:
* Allowed Values: mp3, mp4, wav, flac * * @param mediaFormat

* The format of the input media file. *

* @see MediaFormat */ public void setMediaFormat(String mediaFormat) { this.mediaFormat = mediaFormat; } /** *

* The format of the input media file. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: mp3, mp4, wav, flac * * @param mediaFormat

* The format of the input media file. *

* @return A reference to this updated object so that method calls can be * chained together. * @see MediaFormat */ public TranscriptionJob withMediaFormat(String mediaFormat) { this.mediaFormat = mediaFormat; return this; } /** *

* The format of the input media file. *

*

* Constraints:
* Allowed Values: mp3, mp4, wav, flac * * @param mediaFormat

* The format of the input media file. *

* @see MediaFormat */ public void setMediaFormat(MediaFormat mediaFormat) { this.mediaFormat = mediaFormat.toString(); } /** *

* The format of the input media file. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: mp3, mp4, wav, flac * * @param mediaFormat

* The format of the input media file. *

* @return A reference to this updated object so that method calls can be * chained together. * @see MediaFormat */ public TranscriptionJob withMediaFormat(MediaFormat mediaFormat) { this.mediaFormat = mediaFormat.toString(); return this; } /** *

* An object that describes the input media for the transcription job. *

* * @return

* An object that describes the input media for the transcription * job. *

*/ public Media getMedia() { return media; } /** *

* An object that describes the input media for the transcription job. *

* * @param media

* An object that describes the input media for the transcription * job. *

*/ public void setMedia(Media media) { this.media = media; } /** *

* An object that describes the input media for the transcription job. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param media

* An object that describes the input media for the transcription * job. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withMedia(Media media) { this.media = media; return this; } /** *

* An object that describes the output of the transcription job. *

* * @return

* An object that describes the output of the transcription job. *

*/ public Transcript getTranscript() { return transcript; } /** *

* An object that describes the output of the transcription job. *

* * @param transcript

* An object that describes the output of the transcription job. *

*/ public void setTranscript(Transcript transcript) { this.transcript = transcript; } /** *

* An object that describes the output of the transcription job. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param transcript

* An object that describes the output of the transcription job. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withTranscript(Transcript transcript) { this.transcript = transcript; return this; } /** *

* A timestamp that shows when the job was created. *

* * @return

* A timestamp that shows when the job was created. *

*/ public java.util.Date getCreationTime() { return creationTime; } /** *

* A timestamp that shows when the job was created. *

* * @param creationTime

* A timestamp that shows when the job was created. *

*/ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* A timestamp that shows when the job was created. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param creationTime

* A timestamp that shows when the job was created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; return this; } /** *

* A timestamp that shows when the job was completed. *

* * @return

* A timestamp that shows when the job was completed. *

*/ public java.util.Date getCompletionTime() { return completionTime; } /** *

* A timestamp that shows when the job was completed. *

* * @param completionTime

* A timestamp that shows when the job was completed. *

*/ public void setCompletionTime(java.util.Date completionTime) { this.completionTime = completionTime; } /** *

* A timestamp that shows when the job was completed. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param completionTime

* A timestamp that shows when the job was completed. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withCompletionTime(java.util.Date completionTime) { this.completionTime = completionTime; return this; } /** *

* If the TranscriptionJobStatus field is FAILED, * this field contains information about why the job failed. *

* * @return

* If the TranscriptionJobStatus field is * FAILED, this field contains information about why * the job failed. *

*/ public String getFailureReason() { return failureReason; } /** *

* If the TranscriptionJobStatus field is FAILED, * this field contains information about why the job failed. *

* * @param failureReason

* If the TranscriptionJobStatus field is * FAILED, this field contains information about why * the job failed. *

*/ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } /** *

* If the TranscriptionJobStatus field is FAILED, * this field contains information about why the job failed. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param failureReason

* If the TranscriptionJobStatus field is * FAILED, this field contains information about why * the job failed. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withFailureReason(String failureReason) { this.failureReason = failureReason; return this; } /** *

* Optional settings for the transcription job. Use these settings to turn * on speaker recognition, to set the maximum number of speakers that should * be identified and to specify a custom vocabulary to use when processing * the transcription job. *

* * @return

* Optional settings for the transcription job. Use these settings * to turn on speaker recognition, to set the maximum number of * speakers that should be identified and to specify a custom * vocabulary to use when processing the transcription job. *

*/ public Settings getSettings() { return settings; } /** *

* Optional settings for the transcription job. Use these settings to turn * on speaker recognition, to set the maximum number of speakers that should * be identified and to specify a custom vocabulary to use when processing * the transcription job. *

* * @param settings

* Optional settings for the transcription job. Use these * settings to turn on speaker recognition, to set the maximum * number of speakers that should be identified and to specify a * custom vocabulary to use when processing the transcription * job. *

*/ public void setSettings(Settings settings) { this.settings = settings; } /** *

* Optional settings for the transcription job. Use these settings to turn * on speaker recognition, to set the maximum number of speakers that should * be identified and to specify a custom vocabulary to use when processing * the transcription job. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param settings

* Optional settings for the transcription job. Use these * settings to turn on speaker recognition, to set the maximum * number of speakers that should be identified and to specify a * custom vocabulary to use when processing the transcription * job. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TranscriptionJob withSettings(Settings settings) { this.settings = settings; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { 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(); } @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; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TranscriptionJob == false) 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) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getCompletionTime() == null ^ this.getCompletionTime() == null) return false; if (other.getCompletionTime() != null && other.getCompletionTime().equals(this.getCompletionTime()) == false) return false; if (other.getFailureReason() == null ^ this.getFailureReason() == null) return false; if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false) return false; if (other.getSettings() == null ^ this.getSettings() == null) return false; if (other.getSettings() != null && other.getSettings().equals(this.getSettings()) == false) return false; return true; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy