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

software.amazon.awssdk.services.transcribe.model.MedicalTranscriptionJob Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Transcribe module holds the client classes that are used for communicating with Transcribe.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.transcribe.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* The data structure that contains the information for a medical transcription job. *

*/ @Generated("software.amazon.awssdk:codegen") public final class MedicalTranscriptionJob implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField MEDICAL_TRANSCRIPTION_JOB_NAME_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("MedicalTranscriptionJobName") .getter(getter(MedicalTranscriptionJob::medicalTranscriptionJobName)) .setter(setter(Builder::medicalTranscriptionJobName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MedicalTranscriptionJobName") .build()).build(); private static final SdkField TRANSCRIPTION_JOB_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("TranscriptionJobStatus").getter(getter(MedicalTranscriptionJob::transcriptionJobStatusAsString)) .setter(setter(Builder::transcriptionJobStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TranscriptionJobStatus").build()) .build(); private static final SdkField LANGUAGE_CODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LanguageCode").getter(getter(MedicalTranscriptionJob::languageCodeAsString)) .setter(setter(Builder::languageCode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LanguageCode").build()).build(); private static final SdkField MEDIA_SAMPLE_RATE_HERTZ_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("MediaSampleRateHertz").getter(getter(MedicalTranscriptionJob::mediaSampleRateHertz)) .setter(setter(Builder::mediaSampleRateHertz)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MediaSampleRateHertz").build()) .build(); private static final SdkField MEDIA_FORMAT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("MediaFormat").getter(getter(MedicalTranscriptionJob::mediaFormatAsString)) .setter(setter(Builder::mediaFormat)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MediaFormat").build()).build(); private static final SdkField MEDIA_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("Media") .getter(getter(MedicalTranscriptionJob::media)).setter(setter(Builder::media)).constructor(Media::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Media").build()).build(); private static final SdkField TRANSCRIPT_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("Transcript") .getter(getter(MedicalTranscriptionJob::transcript)).setter(setter(Builder::transcript)) .constructor(MedicalTranscript::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Transcript").build()).build(); private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("StartTime").getter(getter(MedicalTranscriptionJob::startTime)).setter(setter(Builder::startTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StartTime").build()).build(); private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreationTime").getter(getter(MedicalTranscriptionJob::creationTime)) .setter(setter(Builder::creationTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build(); private static final SdkField COMPLETION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CompletionTime").getter(getter(MedicalTranscriptionJob::completionTime)) .setter(setter(Builder::completionTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CompletionTime").build()).build(); private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FailureReason").getter(getter(MedicalTranscriptionJob::failureReason)) .setter(setter(Builder::failureReason)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureReason").build()).build(); private static final SdkField SETTINGS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("Settings") .getter(getter(MedicalTranscriptionJob::settings)).setter(setter(Builder::settings)) .constructor(MedicalTranscriptionSetting::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Settings").build()).build(); private static final SdkField SPECIALTY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Specialty").getter(getter(MedicalTranscriptionJob::specialtyAsString)) .setter(setter(Builder::specialty)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Specialty").build()).build(); private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Type") .getter(getter(MedicalTranscriptionJob::typeAsString)).setter(setter(Builder::type)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Type").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList( MEDICAL_TRANSCRIPTION_JOB_NAME_FIELD, TRANSCRIPTION_JOB_STATUS_FIELD, LANGUAGE_CODE_FIELD, MEDIA_SAMPLE_RATE_HERTZ_FIELD, MEDIA_FORMAT_FIELD, MEDIA_FIELD, TRANSCRIPT_FIELD, START_TIME_FIELD, CREATION_TIME_FIELD, COMPLETION_TIME_FIELD, FAILURE_REASON_FIELD, SETTINGS_FIELD, SPECIALTY_FIELD, TYPE_FIELD)); private static final long serialVersionUID = 1L; private final String medicalTranscriptionJobName; private final String transcriptionJobStatus; private final String languageCode; private final Integer mediaSampleRateHertz; private final String mediaFormat; private final Media media; private final MedicalTranscript transcript; private final Instant startTime; private final Instant creationTime; private final Instant completionTime; private final String failureReason; private final MedicalTranscriptionSetting settings; private final String specialty; private final String type; private MedicalTranscriptionJob(BuilderImpl builder) { this.medicalTranscriptionJobName = builder.medicalTranscriptionJobName; this.transcriptionJobStatus = builder.transcriptionJobStatus; this.languageCode = builder.languageCode; this.mediaSampleRateHertz = builder.mediaSampleRateHertz; this.mediaFormat = builder.mediaFormat; this.media = builder.media; this.transcript = builder.transcript; this.startTime = builder.startTime; this.creationTime = builder.creationTime; this.completionTime = builder.completionTime; this.failureReason = builder.failureReason; this.settings = builder.settings; this.specialty = builder.specialty; this.type = builder.type; } /** *

* The name for a given medical transcription job. *

* * @return The name for a given medical transcription job. */ public String medicalTranscriptionJobName() { return medicalTranscriptionJobName; } /** *

* The completion status of a medical transcription job. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #transcriptionJobStatus} will return {@link TranscriptionJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #transcriptionJobStatusAsString}. *

* * @return The completion status of a medical transcription job. * @see TranscriptionJobStatus */ public TranscriptionJobStatus transcriptionJobStatus() { return TranscriptionJobStatus.fromValue(transcriptionJobStatus); } /** *

* The completion status of a medical transcription job. *

*

* If the service returns an enum value that is not available in the current SDK version, * {@link #transcriptionJobStatus} will return {@link TranscriptionJobStatus#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #transcriptionJobStatusAsString}. *

* * @return The completion status of a medical transcription job. * @see TranscriptionJobStatus */ public String transcriptionJobStatusAsString() { return transcriptionJobStatus; } /** *

* The language code for the language spoken in the source audio file. US English (en-US) is the only supported * language for medical transcriptions. Any other value you enter for language code results in a * BadRequestException error. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will * return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #languageCodeAsString}. *

* * @return The language code for the language spoken in the source audio file. US English (en-US) is the only * supported language for medical transcriptions. Any other value you enter for language code results in a * BadRequestException error. * @see LanguageCode */ public LanguageCode languageCode() { return LanguageCode.fromValue(languageCode); } /** *

* The language code for the language spoken in the source audio file. US English (en-US) is the only supported * language for medical transcriptions. Any other value you enter for language code results in a * BadRequestException error. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #languageCode} will * return {@link LanguageCode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #languageCodeAsString}. *

* * @return The language code for the language spoken in the source audio file. US English (en-US) is the only * supported language for medical transcriptions. Any other value you enter for language code results in a * BadRequestException error. * @see LanguageCode */ public String languageCodeAsString() { return languageCode; } /** *

* The sample rate, in Hertz, of the source audio containing medical information. *

*

* If you don't specify the sample rate, Amazon Transcribe Medical determines it for you. If you choose to specify * the sample rate, it must match the rate detected by Amazon Transcribe Medical. In most cases, you should leave * the MediaSampleHertz blank and let Amazon Transcribe Medical determine the sample rate. *

* * @return The sample rate, in Hertz, of the source audio containing medical information.

*

* If you don't specify the sample rate, Amazon Transcribe Medical determines it for you. If you choose to * specify the sample rate, it must match the rate detected by Amazon Transcribe Medical. In most cases, you * should leave the MediaSampleHertz blank and let Amazon Transcribe Medical determine the * sample rate. */ public Integer mediaSampleRateHertz() { return mediaSampleRateHertz; } /** *

* The format of the input media file. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #mediaFormat} will * return {@link MediaFormat#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #mediaFormatAsString}. *

* * @return The format of the input media file. * @see MediaFormat */ public MediaFormat mediaFormat() { return MediaFormat.fromValue(mediaFormat); } /** *

* The format of the input media file. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #mediaFormat} will * return {@link MediaFormat#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #mediaFormatAsString}. *

* * @return The format of the input media file. * @see MediaFormat */ public String mediaFormatAsString() { return mediaFormat; } /** * Returns the value of the Media property for this object. * * @return The value of the Media property for this object. */ public Media media() { return media; } /** *

* An object that contains the MedicalTranscript. The MedicalTranscript contains the * TranscriptFileUri. *

* * @return An object that contains the MedicalTranscript. The MedicalTranscript contains * the TranscriptFileUri. */ public MedicalTranscript transcript() { return transcript; } /** *

* A timestamp that shows when the job started processing. *

* * @return A timestamp that shows when the job started processing. */ public Instant startTime() { return startTime; } /** *

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

* * @return A timestamp that shows when the job was created. */ public Instant creationTime() { return creationTime; } /** *

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

* * @return A timestamp that shows when the job was completed. */ public Instant completionTime() { return completionTime; } /** *

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

*

* The FailureReason field contains one of the following values: *

*
    *
  • *

    * Unsupported media format- The media format specified in the MediaFormat field of the * request isn't valid. See the description of the MediaFormat field for a list of valid values. *

    *
  • *
  • *

    * The media format provided does not match the detected media format- The media format of the audio * file doesn't match the format specified in the MediaFormat field in the request. Check the media * format of your media file and make sure the two values match. *

    *
  • *
  • *

    * Invalid sample rate for audio file- The sample rate specified in the * MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and 48000 * Hertz. *

    *
  • *
  • *

    * The sample rate provided does not match the detected sample rate- The sample rate in the audio file * doesn't match the sample rate specified in the MediaSampleRateHertz field in the request. Check the * sample rate of your media file and make sure that the two values match. *

    *
  • *
  • *

    * Invalid file size: file size too large- The size of your audio file is larger than what Amazon * Transcribe Medical can process. For more information, see Guidelines and Quotas * in the Amazon Transcribe Medical Guide *

    *
  • *
  • *

    * Invalid number of channels: number of channels too large- Your audio contains more channels than * Amazon Transcribe Medical is configured to process. To request additional channels, see Amazon Transcribe Medical Endpoints * and Quotas in the Amazon Web Services General Reference *

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

*

* The FailureReason field contains one of the following values: *

*
    *
  • *

    * Unsupported media format- The media format specified in the MediaFormat field * of the request isn't valid. See the description of the MediaFormat field for a list of valid * values. *

    *
  • *
  • *

    * The media format provided does not match the detected media format- The media format of the * audio file doesn't match the format specified in the MediaFormat field in the request. Check * the media format of your media file and make sure the two values match. *

    *
  • *
  • *

    * Invalid sample rate for audio file- The sample rate specified in the * MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and * 48000 Hertz. *

    *
  • *
  • *

    * The sample rate provided does not match the detected sample rate- The sample rate in the * audio file doesn't match the sample rate specified in the MediaSampleRateHertz field in the * request. Check the sample rate of your media file and make sure that the two values match. *

    *
  • *
  • *

    * Invalid file size: file size too large- The size of your audio file is larger than what * Amazon Transcribe Medical can process. For more information, see Guidelines and * Quotas in the Amazon Transcribe Medical Guide *

    *
  • *
  • *

    * Invalid number of channels: number of channels too large- Your audio contains more channels * than Amazon Transcribe Medical is configured to process. To request additional channels, see Amazon Transcribe Medical * Endpoints and Quotas in the Amazon Web Services General Reference *

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

    * Object that contains object. *

    * * @return Object that contains object. */ public MedicalTranscriptionSetting settings() { return settings; } /** *

    * The medical specialty of any clinicians providing a dictation or having a conversation. PRIMARYCARE * is the only available setting for this object. This specialty enables you to generate transcriptions for the * following medical fields: *

    *
      *
    • *

      * Family Medicine *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #specialty} will * return {@link Specialty#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #specialtyAsString}. *

    * * @return The medical specialty of any clinicians providing a dictation or having a conversation. * PRIMARYCARE is the only available setting for this object. This specialty enables you to * generate transcriptions for the following medical fields:

    *
      *
    • *

      * Family Medicine *

      *
    • * @see Specialty */ public Specialty specialty() { return Specialty.fromValue(specialty); } /** *

      * The medical specialty of any clinicians providing a dictation or having a conversation. PRIMARYCARE * is the only available setting for this object. This specialty enables you to generate transcriptions for the * following medical fields: *

      *
        *
      • *

        * Family Medicine *

        *
      • *
      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #specialty} will * return {@link Specialty#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #specialtyAsString}. *

      * * @return The medical specialty of any clinicians providing a dictation or having a conversation. * PRIMARYCARE is the only available setting for this object. This specialty enables you to * generate transcriptions for the following medical fields:

      *
        *
      • *

        * Family Medicine *

        *
      • * @see Specialty */ public String specialtyAsString() { return specialty; } /** *

        * The type of speech in the transcription job. CONVERSATION is generally used for patient-physician * dialogues. DICTATION is the setting for physicians speaking their notes after seeing a patient. For * more information, see how-it-works-med *

        *

        * If the service returns an enum value that is not available in the current SDK version, {@link #type} will return * {@link Type#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #typeAsString}. *

        * * @return The type of speech in the transcription job. CONVERSATION is generally used for * patient-physician dialogues. DICTATION is the setting for physicians speaking their notes * after seeing a patient. For more information, see how-it-works-med * @see Type */ public Type type() { return Type.fromValue(type); } /** *

        * The type of speech in the transcription job. CONVERSATION is generally used for patient-physician * dialogues. DICTATION is the setting for physicians speaking their notes after seeing a patient. For * more information, see how-it-works-med *

        *

        * If the service returns an enum value that is not available in the current SDK version, {@link #type} will return * {@link Type#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #typeAsString}. *

        * * @return The type of speech in the transcription job. CONVERSATION is generally used for * patient-physician dialogues. DICTATION is the setting for physicians speaking their notes * after seeing a patient. For more information, see how-it-works-med * @see Type */ public String typeAsString() { return type; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(medicalTranscriptionJobName()); hashCode = 31 * hashCode + Objects.hashCode(transcriptionJobStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(languageCodeAsString()); hashCode = 31 * hashCode + Objects.hashCode(mediaSampleRateHertz()); hashCode = 31 * hashCode + Objects.hashCode(mediaFormatAsString()); hashCode = 31 * hashCode + Objects.hashCode(media()); hashCode = 31 * hashCode + Objects.hashCode(transcript()); hashCode = 31 * hashCode + Objects.hashCode(startTime()); hashCode = 31 * hashCode + Objects.hashCode(creationTime()); hashCode = 31 * hashCode + Objects.hashCode(completionTime()); hashCode = 31 * hashCode + Objects.hashCode(failureReason()); hashCode = 31 * hashCode + Objects.hashCode(settings()); hashCode = 31 * hashCode + Objects.hashCode(specialtyAsString()); hashCode = 31 * hashCode + Objects.hashCode(typeAsString()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof MedicalTranscriptionJob)) { return false; } MedicalTranscriptionJob other = (MedicalTranscriptionJob) obj; return Objects.equals(medicalTranscriptionJobName(), other.medicalTranscriptionJobName()) && Objects.equals(transcriptionJobStatusAsString(), other.transcriptionJobStatusAsString()) && Objects.equals(languageCodeAsString(), other.languageCodeAsString()) && Objects.equals(mediaSampleRateHertz(), other.mediaSampleRateHertz()) && Objects.equals(mediaFormatAsString(), other.mediaFormatAsString()) && Objects.equals(media(), other.media()) && Objects.equals(transcript(), other.transcript()) && Objects.equals(startTime(), other.startTime()) && Objects.equals(creationTime(), other.creationTime()) && Objects.equals(completionTime(), other.completionTime()) && Objects.equals(failureReason(), other.failureReason()) && Objects.equals(settings(), other.settings()) && Objects.equals(specialtyAsString(), other.specialtyAsString()) && Objects.equals(typeAsString(), other.typeAsString()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("MedicalTranscriptionJob").add("MedicalTranscriptionJobName", medicalTranscriptionJobName()) .add("TranscriptionJobStatus", transcriptionJobStatusAsString()).add("LanguageCode", languageCodeAsString()) .add("MediaSampleRateHertz", mediaSampleRateHertz()).add("MediaFormat", mediaFormatAsString()) .add("Media", media()).add("Transcript", transcript()).add("StartTime", startTime()) .add("CreationTime", creationTime()).add("CompletionTime", completionTime()) .add("FailureReason", failureReason()).add("Settings", settings()).add("Specialty", specialtyAsString()) .add("Type", typeAsString()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "MedicalTranscriptionJobName": return Optional.ofNullable(clazz.cast(medicalTranscriptionJobName())); case "TranscriptionJobStatus": return Optional.ofNullable(clazz.cast(transcriptionJobStatusAsString())); case "LanguageCode": return Optional.ofNullable(clazz.cast(languageCodeAsString())); case "MediaSampleRateHertz": return Optional.ofNullable(clazz.cast(mediaSampleRateHertz())); case "MediaFormat": return Optional.ofNullable(clazz.cast(mediaFormatAsString())); case "Media": return Optional.ofNullable(clazz.cast(media())); case "Transcript": return Optional.ofNullable(clazz.cast(transcript())); case "StartTime": return Optional.ofNullable(clazz.cast(startTime())); case "CreationTime": return Optional.ofNullable(clazz.cast(creationTime())); case "CompletionTime": return Optional.ofNullable(clazz.cast(completionTime())); case "FailureReason": return Optional.ofNullable(clazz.cast(failureReason())); case "Settings": return Optional.ofNullable(clazz.cast(settings())); case "Specialty": return Optional.ofNullable(clazz.cast(specialtyAsString())); case "Type": return Optional.ofNullable(clazz.cast(typeAsString())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((MedicalTranscriptionJob) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

        * The name for a given medical transcription job. *

        * * @param medicalTranscriptionJobName * The name for a given medical transcription job. * @return Returns a reference to this object so that method calls can be chained together. */ Builder medicalTranscriptionJobName(String medicalTranscriptionJobName); /** *

        * The completion status of a medical transcription job. *

        * * @param transcriptionJobStatus * The completion status of a medical transcription job. * @see TranscriptionJobStatus * @return Returns a reference to this object so that method calls can be chained together. * @see TranscriptionJobStatus */ Builder transcriptionJobStatus(String transcriptionJobStatus); /** *

        * The completion status of a medical transcription job. *

        * * @param transcriptionJobStatus * The completion status of a medical transcription job. * @see TranscriptionJobStatus * @return Returns a reference to this object so that method calls can be chained together. * @see TranscriptionJobStatus */ Builder transcriptionJobStatus(TranscriptionJobStatus transcriptionJobStatus); /** *

        * The language code for the language spoken in the source audio file. US English (en-US) is the only supported * language for medical transcriptions. Any other value you enter for language code results in a * BadRequestException error. *

        * * @param languageCode * The language code for the language spoken in the source audio file. US English (en-US) is the only * supported language for medical transcriptions. Any other value you enter for language code results in * a BadRequestException error. * @see LanguageCode * @return Returns a reference to this object so that method calls can be chained together. * @see LanguageCode */ Builder languageCode(String languageCode); /** *

        * The language code for the language spoken in the source audio file. US English (en-US) is the only supported * language for medical transcriptions. Any other value you enter for language code results in a * BadRequestException error. *

        * * @param languageCode * The language code for the language spoken in the source audio file. US English (en-US) is the only * supported language for medical transcriptions. Any other value you enter for language code results in * a BadRequestException error. * @see LanguageCode * @return Returns a reference to this object so that method calls can be chained together. * @see LanguageCode */ Builder languageCode(LanguageCode languageCode); /** *

        * The sample rate, in Hertz, of the source audio containing medical information. *

        *

        * If you don't specify the sample rate, Amazon Transcribe Medical determines it for you. If you choose to * specify the sample rate, it must match the rate detected by Amazon Transcribe Medical. In most cases, you * should leave the MediaSampleHertz blank and let Amazon Transcribe Medical determine the sample * rate. *

        * * @param mediaSampleRateHertz * The sample rate, in Hertz, of the source audio containing medical information.

        *

        * If you don't specify the sample rate, Amazon Transcribe Medical determines it for you. If you choose * to specify the sample rate, it must match the rate detected by Amazon Transcribe Medical. In most * cases, you should leave the MediaSampleHertz blank and let Amazon Transcribe Medical * determine the sample rate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mediaSampleRateHertz(Integer mediaSampleRateHertz); /** *

        * The format of the input media file. *

        * * @param mediaFormat * The format of the input media file. * @see MediaFormat * @return Returns a reference to this object so that method calls can be chained together. * @see MediaFormat */ Builder mediaFormat(String mediaFormat); /** *

        * The format of the input media file. *

        * * @param mediaFormat * The format of the input media file. * @see MediaFormat * @return Returns a reference to this object so that method calls can be chained together. * @see MediaFormat */ Builder mediaFormat(MediaFormat mediaFormat); /** * Sets the value of the Media property for this object. * * @param media * The new value for the Media property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder media(Media media); /** * Sets the value of the Media property for this object. * * This is a convenience that creates an instance of the {@link Media.Builder} avoiding the need to create one * manually via {@link Media#builder()}. * * When the {@link Consumer} completes, {@link Media.Builder#build()} is called immediately and its result is * passed to {@link #media(Media)}. * * @param media * a consumer that will call methods on {@link Media.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #media(Media) */ default Builder media(Consumer media) { return media(Media.builder().applyMutation(media).build()); } /** *

        * An object that contains the MedicalTranscript. The MedicalTranscript contains the * TranscriptFileUri. *

        * * @param transcript * An object that contains the MedicalTranscript. The MedicalTranscript * contains the TranscriptFileUri. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transcript(MedicalTranscript transcript); /** *

        * An object that contains the MedicalTranscript. The MedicalTranscript contains the * TranscriptFileUri. *

        * This is a convenience that creates an instance of the {@link MedicalTranscript.Builder} avoiding the need to * create one manually via {@link MedicalTranscript#builder()}. * * When the {@link Consumer} completes, {@link MedicalTranscript.Builder#build()} is called immediately and its * result is passed to {@link #transcript(MedicalTranscript)}. * * @param transcript * a consumer that will call methods on {@link MedicalTranscript.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #transcript(MedicalTranscript) */ default Builder transcript(Consumer transcript) { return transcript(MedicalTranscript.builder().applyMutation(transcript).build()); } /** *

        * A timestamp that shows when the job started processing. *

        * * @param startTime * A timestamp that shows when the job started processing. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startTime(Instant startTime); /** *

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

        * * @param creationTime * A timestamp that shows when the job was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationTime(Instant creationTime); /** *

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

        * * @param completionTime * A timestamp that shows when the job was completed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder completionTime(Instant completionTime); /** *

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

        *

        * The FailureReason field contains one of the following values: *

        *
          *
        • *

          * Unsupported media format- The media format specified in the MediaFormat field of * the request isn't valid. See the description of the MediaFormat field for a list of valid * values. *

          *
        • *
        • *

          * The media format provided does not match the detected media format- The media format of the * audio file doesn't match the format specified in the MediaFormat field in the request. Check the * media format of your media file and make sure the two values match. *

          *
        • *
        • *

          * Invalid sample rate for audio file- The sample rate specified in the * MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and 48000 * Hertz. *

          *
        • *
        • *

          * The sample rate provided does not match the detected sample rate- The sample rate in the audio * file doesn't match the sample rate specified in the MediaSampleRateHertz field in the request. * Check the sample rate of your media file and make sure that the two values match. *

          *
        • *
        • *

          * Invalid file size: file size too large- The size of your audio file is larger than what Amazon * Transcribe Medical can process. For more information, see Guidelines and * Quotas in the Amazon Transcribe Medical Guide *

          *
        • *
        • *

          * Invalid number of channels: number of channels too large- Your audio contains more channels than * Amazon Transcribe Medical is configured to process. To request additional channels, see Amazon Transcribe Medical * Endpoints and Quotas in the Amazon Web Services General Reference *

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

        *

        * The FailureReason field contains one of the following values: *

        *
          *
        • *

          * Unsupported media format- The media format specified in the MediaFormat * field of the request isn't valid. See the description of the MediaFormat field for a list * of valid values. *

          *
        • *
        • *

          * The media format provided does not match the detected media format- The media format of * the audio file doesn't match the format specified in the MediaFormat field in the * request. Check the media format of your media file and make sure the two values match. *

          *
        • *
        • *

          * Invalid sample rate for audio file- The sample rate specified in the * MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and * 48000 Hertz. *

          *
        • *
        • *

          * The sample rate provided does not match the detected sample rate- The sample rate in the * audio file doesn't match the sample rate specified in the MediaSampleRateHertz field in * the request. Check the sample rate of your media file and make sure that the two values match. *

          *
        • *
        • *

          * Invalid file size: file size too large- The size of your audio file is larger than what * Amazon Transcribe Medical can process. For more information, see Guidelines and * Quotas in the Amazon Transcribe Medical Guide *

          *
        • *
        • *

          * Invalid number of channels: number of channels too large- Your audio contains more * channels than Amazon Transcribe Medical is configured to process. To request additional channels, see * Amazon Transcribe * Medical Endpoints and Quotas in the Amazon Web Services General Reference *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ Builder failureReason(String failureReason); /** *

          * Object that contains object. *

          * * @param settings * Object that contains object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder settings(MedicalTranscriptionSetting settings); /** *

          * Object that contains object. *

          * This is a convenience that creates an instance of the {@link MedicalTranscriptionSetting.Builder} avoiding * the need to create one manually via {@link MedicalTranscriptionSetting#builder()}. * * When the {@link Consumer} completes, {@link MedicalTranscriptionSetting.Builder#build()} is called * immediately and its result is passed to {@link #settings(MedicalTranscriptionSetting)}. * * @param settings * a consumer that will call methods on {@link MedicalTranscriptionSetting.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #settings(MedicalTranscriptionSetting) */ default Builder settings(Consumer settings) { return settings(MedicalTranscriptionSetting.builder().applyMutation(settings).build()); } /** *

          * The medical specialty of any clinicians providing a dictation or having a conversation. * PRIMARYCARE is the only available setting for this object. This specialty enables you to * generate transcriptions for the following medical fields: *

          *
            *
          • *

            * Family Medicine *

            *
          • *
          * * @param specialty * The medical specialty of any clinicians providing a dictation or having a conversation. * PRIMARYCARE is the only available setting for this object. This specialty enables you to * generate transcriptions for the following medical fields:

          *
            *
          • *

            * Family Medicine *

            *
          • * @see Specialty * @return Returns a reference to this object so that method calls can be chained together. * @see Specialty */ Builder specialty(String specialty); /** *

            * The medical specialty of any clinicians providing a dictation or having a conversation. * PRIMARYCARE is the only available setting for this object. This specialty enables you to * generate transcriptions for the following medical fields: *

            *
              *
            • *

              * Family Medicine *

              *
            • *
            * * @param specialty * The medical specialty of any clinicians providing a dictation or having a conversation. * PRIMARYCARE is the only available setting for this object. This specialty enables you to * generate transcriptions for the following medical fields:

            *
              *
            • *

              * Family Medicine *

              *
            • * @see Specialty * @return Returns a reference to this object so that method calls can be chained together. * @see Specialty */ Builder specialty(Specialty specialty); /** *

              * The type of speech in the transcription job. CONVERSATION is generally used for * patient-physician dialogues. DICTATION is the setting for physicians speaking their notes after * seeing a patient. For more information, see how-it-works-med *

              * * @param type * The type of speech in the transcription job. CONVERSATION is generally used for * patient-physician dialogues. DICTATION is the setting for physicians speaking their notes * after seeing a patient. For more information, see how-it-works-med * @see Type * @return Returns a reference to this object so that method calls can be chained together. * @see Type */ Builder type(String type); /** *

              * The type of speech in the transcription job. CONVERSATION is generally used for * patient-physician dialogues. DICTATION is the setting for physicians speaking their notes after * seeing a patient. For more information, see how-it-works-med *

              * * @param type * The type of speech in the transcription job. CONVERSATION is generally used for * patient-physician dialogues. DICTATION is the setting for physicians speaking their notes * after seeing a patient. For more information, see how-it-works-med * @see Type * @return Returns a reference to this object so that method calls can be chained together. * @see Type */ Builder type(Type type); } static final class BuilderImpl implements Builder { private String medicalTranscriptionJobName; private String transcriptionJobStatus; private String languageCode; private Integer mediaSampleRateHertz; private String mediaFormat; private Media media; private MedicalTranscript transcript; private Instant startTime; private Instant creationTime; private Instant completionTime; private String failureReason; private MedicalTranscriptionSetting settings; private String specialty; private String type; private BuilderImpl() { } private BuilderImpl(MedicalTranscriptionJob model) { medicalTranscriptionJobName(model.medicalTranscriptionJobName); transcriptionJobStatus(model.transcriptionJobStatus); languageCode(model.languageCode); mediaSampleRateHertz(model.mediaSampleRateHertz); mediaFormat(model.mediaFormat); media(model.media); transcript(model.transcript); startTime(model.startTime); creationTime(model.creationTime); completionTime(model.completionTime); failureReason(model.failureReason); settings(model.settings); specialty(model.specialty); type(model.type); } public final String getMedicalTranscriptionJobName() { return medicalTranscriptionJobName; } @Override public final Builder medicalTranscriptionJobName(String medicalTranscriptionJobName) { this.medicalTranscriptionJobName = medicalTranscriptionJobName; return this; } public final void setMedicalTranscriptionJobName(String medicalTranscriptionJobName) { this.medicalTranscriptionJobName = medicalTranscriptionJobName; } public final String getTranscriptionJobStatus() { return transcriptionJobStatus; } @Override public final Builder transcriptionJobStatus(String transcriptionJobStatus) { this.transcriptionJobStatus = transcriptionJobStatus; return this; } @Override public final Builder transcriptionJobStatus(TranscriptionJobStatus transcriptionJobStatus) { this.transcriptionJobStatus(transcriptionJobStatus == null ? null : transcriptionJobStatus.toString()); return this; } public final void setTranscriptionJobStatus(String transcriptionJobStatus) { this.transcriptionJobStatus = transcriptionJobStatus; } public final String getLanguageCode() { return languageCode; } @Override public final Builder languageCode(String languageCode) { this.languageCode = languageCode; return this; } @Override public final Builder languageCode(LanguageCode languageCode) { this.languageCode(languageCode == null ? null : languageCode.toString()); return this; } public final void setLanguageCode(String languageCode) { this.languageCode = languageCode; } public final Integer getMediaSampleRateHertz() { return mediaSampleRateHertz; } @Override public final Builder mediaSampleRateHertz(Integer mediaSampleRateHertz) { this.mediaSampleRateHertz = mediaSampleRateHertz; return this; } public final void setMediaSampleRateHertz(Integer mediaSampleRateHertz) { this.mediaSampleRateHertz = mediaSampleRateHertz; } public final String getMediaFormat() { return mediaFormat; } @Override public final Builder mediaFormat(String mediaFormat) { this.mediaFormat = mediaFormat; return this; } @Override public final Builder mediaFormat(MediaFormat mediaFormat) { this.mediaFormat(mediaFormat == null ? null : mediaFormat.toString()); return this; } public final void setMediaFormat(String mediaFormat) { this.mediaFormat = mediaFormat; } public final Media.Builder getMedia() { return media != null ? media.toBuilder() : null; } @Override public final Builder media(Media media) { this.media = media; return this; } public final void setMedia(Media.BuilderImpl media) { this.media = media != null ? media.build() : null; } public final MedicalTranscript.Builder getTranscript() { return transcript != null ? transcript.toBuilder() : null; } @Override public final Builder transcript(MedicalTranscript transcript) { this.transcript = transcript; return this; } public final void setTranscript(MedicalTranscript.BuilderImpl transcript) { this.transcript = transcript != null ? transcript.build() : null; } public final Instant getStartTime() { return startTime; } @Override public final Builder startTime(Instant startTime) { this.startTime = startTime; return this; } public final void setStartTime(Instant startTime) { this.startTime = startTime; } public final Instant getCreationTime() { return creationTime; } @Override public final Builder creationTime(Instant creationTime) { this.creationTime = creationTime; return this; } public final void setCreationTime(Instant creationTime) { this.creationTime = creationTime; } public final Instant getCompletionTime() { return completionTime; } @Override public final Builder completionTime(Instant completionTime) { this.completionTime = completionTime; return this; } public final void setCompletionTime(Instant completionTime) { this.completionTime = completionTime; } public final String getFailureReason() { return failureReason; } @Override public final Builder failureReason(String failureReason) { this.failureReason = failureReason; return this; } public final void setFailureReason(String failureReason) { this.failureReason = failureReason; } public final MedicalTranscriptionSetting.Builder getSettings() { return settings != null ? settings.toBuilder() : null; } @Override public final Builder settings(MedicalTranscriptionSetting settings) { this.settings = settings; return this; } public final void setSettings(MedicalTranscriptionSetting.BuilderImpl settings) { this.settings = settings != null ? settings.build() : null; } public final String getSpecialty() { return specialty; } @Override public final Builder specialty(String specialty) { this.specialty = specialty; return this; } @Override public final Builder specialty(Specialty specialty) { this.specialty(specialty == null ? null : specialty.toString()); return this; } public final void setSpecialty(String specialty) { this.specialty = specialty; } public final String getType() { return type; } @Override public final Builder type(String type) { this.type = type; return this; } @Override public final Builder type(Type type) { this.type(type == null ? null : type.toString()); return this; } public final void setType(String type) { this.type = type; } @Override public MedicalTranscriptionJob build() { return new MedicalTranscriptionJob(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy