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

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

/*
 * 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.beans.Transient;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class StartMedicalScribeJobRequest extends TranscribeRequest implements
        ToCopyableBuilder {
    private static final SdkField MEDICAL_SCRIBE_JOB_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("MedicalScribeJobName").getter(getter(StartMedicalScribeJobRequest::medicalScribeJobName))
            .setter(setter(Builder::medicalScribeJobName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MedicalScribeJobName").build())
            .build();

    private static final SdkField MEDIA_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("Media")
            .getter(getter(StartMedicalScribeJobRequest::media)).setter(setter(Builder::media)).constructor(Media::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Media").build()).build();

    private static final SdkField OUTPUT_BUCKET_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("OutputBucketName").getter(getter(StartMedicalScribeJobRequest::outputBucketName))
            .setter(setter(Builder::outputBucketName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputBucketName").build()).build();

    private static final SdkField OUTPUT_ENCRYPTION_KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("OutputEncryptionKMSKeyId").getter(getter(StartMedicalScribeJobRequest::outputEncryptionKMSKeyId))
            .setter(setter(Builder::outputEncryptionKMSKeyId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputEncryptionKMSKeyId").build())
            .build();

    private static final SdkField> KMS_ENCRYPTION_CONTEXT_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("KMSEncryptionContext")
            .getter(getter(StartMedicalScribeJobRequest::kmsEncryptionContext))
            .setter(setter(Builder::kmsEncryptionContext))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("KMSEncryptionContext").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField DATA_ACCESS_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("DataAccessRoleArn").getter(getter(StartMedicalScribeJobRequest::dataAccessRoleArn))
            .setter(setter(Builder::dataAccessRoleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataAccessRoleArn").build()).build();

    private static final SdkField SETTINGS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("Settings")
            .getter(getter(StartMedicalScribeJobRequest::settings)).setter(setter(Builder::settings))
            .constructor(MedicalScribeSettings::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Settings").build()).build();

    private static final SdkField> CHANNEL_DEFINITIONS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("ChannelDefinitions")
            .getter(getter(StartMedicalScribeJobRequest::channelDefinitions))
            .setter(setter(Builder::channelDefinitions))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ChannelDefinitions").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(MedicalScribeChannelDefinition::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Tags")
            .getter(getter(StartMedicalScribeJobRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(Tag::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(MEDICAL_SCRIBE_JOB_NAME_FIELD,
            MEDIA_FIELD, OUTPUT_BUCKET_NAME_FIELD, OUTPUT_ENCRYPTION_KMS_KEY_ID_FIELD, KMS_ENCRYPTION_CONTEXT_FIELD,
            DATA_ACCESS_ROLE_ARN_FIELD, SETTINGS_FIELD, CHANNEL_DEFINITIONS_FIELD, TAGS_FIELD));

    private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();

    private final String medicalScribeJobName;

    private final Media media;

    private final String outputBucketName;

    private final String outputEncryptionKMSKeyId;

    private final Map kmsEncryptionContext;

    private final String dataAccessRoleArn;

    private final MedicalScribeSettings settings;

    private final List channelDefinitions;

    private final List tags;

    private StartMedicalScribeJobRequest(BuilderImpl builder) {
        super(builder);
        this.medicalScribeJobName = builder.medicalScribeJobName;
        this.media = builder.media;
        this.outputBucketName = builder.outputBucketName;
        this.outputEncryptionKMSKeyId = builder.outputEncryptionKMSKeyId;
        this.kmsEncryptionContext = builder.kmsEncryptionContext;
        this.dataAccessRoleArn = builder.dataAccessRoleArn;
        this.settings = builder.settings;
        this.channelDefinitions = builder.channelDefinitions;
        this.tags = builder.tags;
    }

    /**
     * 

* A unique name, chosen by you, for your Medical Scribe job. *

*

* This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. If * you try to create a new job with the same name as an existing job, you get a ConflictException * error. *

* * @return A unique name, chosen by you, for your Medical Scribe job.

*

* This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services * account. If you try to create a new job with the same name as an existing job, you get a * ConflictException error. */ public final String medicalScribeJobName() { return medicalScribeJobName; } /** * Returns the value of the Media property for this object. * * @return The value of the Media property for this object. */ public final Media media() { return media; } /** *

* The name of the Amazon S3 bucket where you want your Medical Scribe output stored. Do not include the * S3:// prefix of the specified bucket. *

*

* Note that the role specified in the DataAccessRoleArn request parameter must have permission to use * the specified location. You can change Amazon S3 permissions using the Amazon Web Services Management Console. See also Permissions Required for IAM User Roles. *

* * @return The name of the Amazon S3 bucket where you want your Medical Scribe output stored. Do not include the * S3:// prefix of the specified bucket.

*

* Note that the role specified in the DataAccessRoleArn request parameter must have permission * to use the specified location. You can change Amazon S3 permissions using the Amazon Web Services Management Console. See also Permissions Required for IAM User Roles. */ public final String outputBucketName() { return outputBucketName; } /** *

* The KMS key you want to use to encrypt your Medical Scribe output. *

*

* If using a key located in the current Amazon Web Services account, you can specify your KMS key in one of * four ways: *

*
    *
  1. *

    * Use the KMS key ID itself. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use an alias for the KMS key ID. For example, alias/ExampleAlias. *

    *
  4. *
  5. *

    * Use the Amazon Resource Name (ARN) for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  6. *
  7. *

    * Use the ARN for the KMS key alias. For example, arn:aws:kms:region:account-ID:alias/ExampleAlias. *

    *
  8. *
*

* If using a key located in a different Amazon Web Services account than the current Amazon Web Services * account, you can specify your KMS key in one of two ways: *

*
    *
  1. *

    * Use the ARN for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use the ARN for the KMS key alias. For example, arn:aws:kms:region:account-ID:alias/ExampleAlias. *

    *
  4. *
*

* If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3). *

*

* Note that the role specified in the DataAccessRoleArn request parameter must have permission to use * the specified KMS key. *

* * @return The KMS key you want to use to encrypt your Medical Scribe output.

*

* If using a key located in the current Amazon Web Services account, you can specify your KMS key in * one of four ways: *

*
    *
  1. *

    * Use the KMS key ID itself. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use an alias for the KMS key ID. For example, alias/ExampleAlias. *

    *
  4. *
  5. *

    * Use the Amazon Resource Name (ARN) for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  6. *
  7. *

    * Use the ARN for the KMS key alias. For example, * arn:aws:kms:region:account-ID:alias/ExampleAlias. *

    *
  8. *
*

* If using a key located in a different Amazon Web Services account than the current Amazon Web * Services account, you can specify your KMS key in one of two ways: *

*
    *
  1. *

    * Use the ARN for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use the ARN for the KMS key alias. For example, * arn:aws:kms:region:account-ID:alias/ExampleAlias. *

    *
  4. *
*

* If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key * (SSE-S3). *

*

* Note that the role specified in the DataAccessRoleArn request parameter must have permission * to use the specified KMS key. */ public final String outputEncryptionKMSKeyId() { return outputEncryptionKMSKeyId; } /** * For responses, this returns true if the service returned a value for the KMSEncryptionContext property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasKmsEncryptionContext() { return kmsEncryptionContext != null && !(kmsEncryptionContext instanceof SdkAutoConstructMap); } /** *

* A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an added layer * of security for your data. For more information, see KMS encryption * context and Asymmetric * keys in KMS. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasKmsEncryptionContext} method. *

* * @return A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an added * layer of security for your data. For more information, see KMS encryption * context and Asymmetric keys in * KMS. */ public final Map kmsEncryptionContext() { return kmsEncryptionContext; } /** *

* The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains * your input files, write to the output bucket, and use your KMS key if supplied. If the role that you specify * doesn’t have the appropriate permissions your request fails. *

*

* IAM role ARNs have the format arn:partition:iam::account:role/role-name-with-path. For example: * arn:aws:iam::111122223333:role/Admin. *

*

* For more information, see IAM ARNs. *

* * @return The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that * contains your input files, write to the output bucket, and use your KMS key if supplied. If the role that * you specify doesn’t have the appropriate permissions your request fails.

*

* IAM role ARNs have the format arn:partition:iam::account:role/role-name-with-path. For * example: arn:aws:iam::111122223333:role/Admin. *

*

* For more information, see IAM * ARNs. */ public final String dataAccessRoleArn() { return dataAccessRoleArn; } /** *

* Makes it possible to control how your Medical Scribe job is processed using a MedicalScribeSettings * object. Specify ChannelIdentification if ChannelDefinitions are set. Enabled * ShowSpeakerLabels if ChannelIdentification and ChannelDefinitions are not * set. One and only one of ChannelIdentification and ShowSpeakerLabels must be set. If * ShowSpeakerLabels is set, MaxSpeakerLabels must also be set. Use Settings * to specify a vocabulary or vocabulary filter or both using VocabularyName, * VocabularyFilterName. VocabularyFilterMethod must be specified if * VocabularyFilterName is set. *

* * @return Makes it possible to control how your Medical Scribe job is processed using a * MedicalScribeSettings object. Specify ChannelIdentification if * ChannelDefinitions are set. Enabled ShowSpeakerLabels if * ChannelIdentification and ChannelDefinitions are not set. One and only one of * ChannelIdentification and ShowSpeakerLabels must be set. If * ShowSpeakerLabels is set, MaxSpeakerLabels must also be set. Use * Settings to specify a vocabulary or vocabulary filter or both using * VocabularyName, VocabularyFilterName. VocabularyFilterMethod must * be specified if VocabularyFilterName is set. */ public final MedicalScribeSettings settings() { return settings; } /** * For responses, this returns true if the service returned a value for the ChannelDefinitions property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasChannelDefinitions() { return channelDefinitions != null && !(channelDefinitions instanceof SdkAutoConstructList); } /** *

* Makes it possible to specify which speaker is on which channel. For example, if the clinician is the first * participant to speak, you would set ChannelId of the first ChannelDefinition in the * list to 0 (to indicate the first channel) and ParticipantRole to CLINICIAN * (to indicate that it's the clinician speaking). Then you would set the ChannelId of the second * ChannelDefinition in the list to 1 (to indicate the second channel) and * ParticipantRole to PATIENT (to indicate that it's the patient speaking). *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasChannelDefinitions} method. *

* * @return Makes it possible to specify which speaker is on which channel. For example, if the clinician is the * first participant to speak, you would set ChannelId of the first * ChannelDefinition in the list to 0 (to indicate the first channel) and * ParticipantRole to CLINICIAN (to indicate that it's the clinician speaking). * Then you would set the ChannelId of the second ChannelDefinition in the list to * 1 (to indicate the second channel) and ParticipantRole to PATIENT * (to indicate that it's the patient speaking). */ public final List channelDefinitions() { return channelDefinitions; } /** * For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* Adds one or more custom tags, each in the form of a key:value pair, to the Medica Scribe job. *

*

* To learn more about using tags with Amazon Transcribe, refer to Tagging resources. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasTags} method. *

* * @return Adds one or more custom tags, each in the form of a key:value pair, to the Medica Scribe job.

*

* To learn more about using tags with Amazon Transcribe, refer to Tagging resources. */ public final List tags() { return tags; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(medicalScribeJobName()); hashCode = 31 * hashCode + Objects.hashCode(media()); hashCode = 31 * hashCode + Objects.hashCode(outputBucketName()); hashCode = 31 * hashCode + Objects.hashCode(outputEncryptionKMSKeyId()); hashCode = 31 * hashCode + Objects.hashCode(hasKmsEncryptionContext() ? kmsEncryptionContext() : null); hashCode = 31 * hashCode + Objects.hashCode(dataAccessRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(settings()); hashCode = 31 * hashCode + Objects.hashCode(hasChannelDefinitions() ? channelDefinitions() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StartMedicalScribeJobRequest)) { return false; } StartMedicalScribeJobRequest other = (StartMedicalScribeJobRequest) obj; return Objects.equals(medicalScribeJobName(), other.medicalScribeJobName()) && Objects.equals(media(), other.media()) && Objects.equals(outputBucketName(), other.outputBucketName()) && Objects.equals(outputEncryptionKMSKeyId(), other.outputEncryptionKMSKeyId()) && hasKmsEncryptionContext() == other.hasKmsEncryptionContext() && Objects.equals(kmsEncryptionContext(), other.kmsEncryptionContext()) && Objects.equals(dataAccessRoleArn(), other.dataAccessRoleArn()) && Objects.equals(settings(), other.settings()) && hasChannelDefinitions() == other.hasChannelDefinitions() && Objects.equals(channelDefinitions(), other.channelDefinitions()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()); } /** * 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 final String toString() { return ToString.builder("StartMedicalScribeJobRequest").add("MedicalScribeJobName", medicalScribeJobName()) .add("Media", media()).add("OutputBucketName", outputBucketName()) .add("OutputEncryptionKMSKeyId", outputEncryptionKMSKeyId()) .add("KMSEncryptionContext", hasKmsEncryptionContext() ? kmsEncryptionContext() : null) .add("DataAccessRoleArn", dataAccessRoleArn()).add("Settings", settings()) .add("ChannelDefinitions", hasChannelDefinitions() ? channelDefinitions() : null) .add("Tags", hasTags() ? tags() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "MedicalScribeJobName": return Optional.ofNullable(clazz.cast(medicalScribeJobName())); case "Media": return Optional.ofNullable(clazz.cast(media())); case "OutputBucketName": return Optional.ofNullable(clazz.cast(outputBucketName())); case "OutputEncryptionKMSKeyId": return Optional.ofNullable(clazz.cast(outputEncryptionKMSKeyId())); case "KMSEncryptionContext": return Optional.ofNullable(clazz.cast(kmsEncryptionContext())); case "DataAccessRoleArn": return Optional.ofNullable(clazz.cast(dataAccessRoleArn())); case "Settings": return Optional.ofNullable(clazz.cast(settings())); case "ChannelDefinitions": return Optional.ofNullable(clazz.cast(channelDefinitions())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("MedicalScribeJobName", MEDICAL_SCRIBE_JOB_NAME_FIELD); map.put("Media", MEDIA_FIELD); map.put("OutputBucketName", OUTPUT_BUCKET_NAME_FIELD); map.put("OutputEncryptionKMSKeyId", OUTPUT_ENCRYPTION_KMS_KEY_ID_FIELD); map.put("KMSEncryptionContext", KMS_ENCRYPTION_CONTEXT_FIELD); map.put("DataAccessRoleArn", DATA_ACCESS_ROLE_ARN_FIELD); map.put("Settings", SETTINGS_FIELD); map.put("ChannelDefinitions", CHANNEL_DEFINITIONS_FIELD); map.put("Tags", TAGS_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((StartMedicalScribeJobRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends TranscribeRequest.Builder, SdkPojo, CopyableBuilder { /** *

* A unique name, chosen by you, for your Medical Scribe job. *

*

* This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. * If you try to create a new job with the same name as an existing job, you get a * ConflictException error. *

* * @param medicalScribeJobName * A unique name, chosen by you, for your Medical Scribe job.

*

* This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services * account. If you try to create a new job with the same name as an existing job, you get a * ConflictException error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder medicalScribeJobName(String medicalScribeJobName); /** * 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 method 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()); } /** *

* The name of the Amazon S3 bucket where you want your Medical Scribe output stored. Do not include the * S3:// prefix of the specified bucket. *

*

* Note that the role specified in the DataAccessRoleArn request parameter must have permission to * use the specified location. You can change Amazon S3 permissions using the Amazon Web Services Management Console. See also Permissions Required for IAM User Roles. *

* * @param outputBucketName * The name of the Amazon S3 bucket where you want your Medical Scribe output stored. Do not include the * S3:// prefix of the specified bucket.

*

* Note that the role specified in the DataAccessRoleArn request parameter must have * permission to use the specified location. You can change Amazon S3 permissions using the Amazon Web Services Management Console. See also Permissions Required for IAM User Roles. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outputBucketName(String outputBucketName); /** *

* The KMS key you want to use to encrypt your Medical Scribe output. *

*

* If using a key located in the current Amazon Web Services account, you can specify your KMS key in one * of four ways: *

*
    *
  1. *

    * Use the KMS key ID itself. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use an alias for the KMS key ID. For example, alias/ExampleAlias. *

    *
  4. *
  5. *

    * Use the Amazon Resource Name (ARN) for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  6. *
  7. *

    * Use the ARN for the KMS key alias. For example, arn:aws:kms:region:account-ID:alias/ExampleAlias * . *

    *
  8. *
*

* If using a key located in a different Amazon Web Services account than the current Amazon Web Services * account, you can specify your KMS key in one of two ways: *

*
    *
  1. *

    * Use the ARN for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use the ARN for the KMS key alias. For example, arn:aws:kms:region:account-ID:alias/ExampleAlias * . *

    *
  4. *
*

* If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3). *

*

* Note that the role specified in the DataAccessRoleArn request parameter must have permission to * use the specified KMS key. *

* * @param outputEncryptionKMSKeyId * The KMS key you want to use to encrypt your Medical Scribe output.

*

* If using a key located in the current Amazon Web Services account, you can specify your KMS key * in one of four ways: *

*
    *
  1. *

    * Use the KMS key ID itself. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use an alias for the KMS key ID. For example, alias/ExampleAlias. *

    *
  4. *
  5. *

    * Use the Amazon Resource Name (ARN) for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  6. *
  7. *

    * Use the ARN for the KMS key alias. For example, * arn:aws:kms:region:account-ID:alias/ExampleAlias. *

    *
  8. *
*

* If using a key located in a different Amazon Web Services account than the current Amazon Web * Services account, you can specify your KMS key in one of two ways: *

*
    *
  1. *

    * Use the ARN for the KMS key ID. For example, * arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

    *
  2. *
  3. *

    * Use the ARN for the KMS key alias. For example, * arn:aws:kms:region:account-ID:alias/ExampleAlias. *

    *
  4. *
*

* If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key * (SSE-S3). *

*

* Note that the role specified in the DataAccessRoleArn request parameter must have * permission to use the specified KMS key. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outputEncryptionKMSKeyId(String outputEncryptionKMSKeyId); /** *

* A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an added * layer of security for your data. For more information, see KMS encryption * context and Asymmetric keys in KMS. *

* * @param kmsEncryptionContext * A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an * added layer of security for your data. For more information, see KMS encryption * context and Asymmetric keys in * KMS. * @return Returns a reference to this object so that method calls can be chained together. */ Builder kmsEncryptionContext(Map kmsEncryptionContext); /** *

* The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that * contains your input files, write to the output bucket, and use your KMS key if supplied. If the role that you * specify doesn’t have the appropriate permissions your request fails. *

*

* IAM role ARNs have the format arn:partition:iam::account:role/role-name-with-path. For example: * arn:aws:iam::111122223333:role/Admin. *

*

* For more information, see IAM * ARNs. *

* * @param dataAccessRoleArn * The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that * contains your input files, write to the output bucket, and use your KMS key if supplied. If the role * that you specify doesn’t have the appropriate permissions your request fails.

*

* IAM role ARNs have the format arn:partition:iam::account:role/role-name-with-path. For * example: arn:aws:iam::111122223333:role/Admin. *

*

* For more information, see IAM ARNs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dataAccessRoleArn(String dataAccessRoleArn); /** *

* Makes it possible to control how your Medical Scribe job is processed using a * MedicalScribeSettings object. Specify ChannelIdentification if * ChannelDefinitions are set. Enabled ShowSpeakerLabels if * ChannelIdentification and ChannelDefinitions are not set. One and only one of * ChannelIdentification and ShowSpeakerLabels must be set. If * ShowSpeakerLabels is set, MaxSpeakerLabels must also be set. Use * Settings to specify a vocabulary or vocabulary filter or both using VocabularyName, * VocabularyFilterName. VocabularyFilterMethod must be specified if * VocabularyFilterName is set. *

* * @param settings * Makes it possible to control how your Medical Scribe job is processed using a * MedicalScribeSettings object. Specify ChannelIdentification if * ChannelDefinitions are set. Enabled ShowSpeakerLabels if * ChannelIdentification and ChannelDefinitions are not set. One and only one * of ChannelIdentification and ShowSpeakerLabels must be set. If * ShowSpeakerLabels is set, MaxSpeakerLabels must also be set. Use * Settings to specify a vocabulary or vocabulary filter or both using * VocabularyName, VocabularyFilterName. VocabularyFilterMethod * must be specified if VocabularyFilterName is set. * @return Returns a reference to this object so that method calls can be chained together. */ Builder settings(MedicalScribeSettings settings); /** *

* Makes it possible to control how your Medical Scribe job is processed using a * MedicalScribeSettings object. Specify ChannelIdentification if * ChannelDefinitions are set. Enabled ShowSpeakerLabels if * ChannelIdentification and ChannelDefinitions are not set. One and only one of * ChannelIdentification and ShowSpeakerLabels must be set. If * ShowSpeakerLabels is set, MaxSpeakerLabels must also be set. Use * Settings to specify a vocabulary or vocabulary filter or both using VocabularyName, * VocabularyFilterName. VocabularyFilterMethod must be specified if * VocabularyFilterName is set. *

* This is a convenience method that creates an instance of the {@link MedicalScribeSettings.Builder} avoiding * the need to create one manually via {@link MedicalScribeSettings#builder()}. * *

* When the {@link Consumer} completes, {@link MedicalScribeSettings.Builder#build()} is called immediately and * its result is passed to {@link #settings(MedicalScribeSettings)}. * * @param settings * a consumer that will call methods on {@link MedicalScribeSettings.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #settings(MedicalScribeSettings) */ default Builder settings(Consumer settings) { return settings(MedicalScribeSettings.builder().applyMutation(settings).build()); } /** *

* Makes it possible to specify which speaker is on which channel. For example, if the clinician is the first * participant to speak, you would set ChannelId of the first ChannelDefinition in the * list to 0 (to indicate the first channel) and ParticipantRole to * CLINICIAN (to indicate that it's the clinician speaking). Then you would set the * ChannelId of the second ChannelDefinition in the list to 1 (to * indicate the second channel) and ParticipantRole to PATIENT (to indicate that it's * the patient speaking). *

* * @param channelDefinitions * Makes it possible to specify which speaker is on which channel. For example, if the clinician is the * first participant to speak, you would set ChannelId of the first * ChannelDefinition in the list to 0 (to indicate the first channel) and * ParticipantRole to CLINICIAN (to indicate that it's the clinician speaking). * Then you would set the ChannelId of the second ChannelDefinition in the list * to 1 (to indicate the second channel) and ParticipantRole to * PATIENT (to indicate that it's the patient speaking). * @return Returns a reference to this object so that method calls can be chained together. */ Builder channelDefinitions(Collection channelDefinitions); /** *

* Makes it possible to specify which speaker is on which channel. For example, if the clinician is the first * participant to speak, you would set ChannelId of the first ChannelDefinition in the * list to 0 (to indicate the first channel) and ParticipantRole to * CLINICIAN (to indicate that it's the clinician speaking). Then you would set the * ChannelId of the second ChannelDefinition in the list to 1 (to * indicate the second channel) and ParticipantRole to PATIENT (to indicate that it's * the patient speaking). *

* * @param channelDefinitions * Makes it possible to specify which speaker is on which channel. For example, if the clinician is the * first participant to speak, you would set ChannelId of the first * ChannelDefinition in the list to 0 (to indicate the first channel) and * ParticipantRole to CLINICIAN (to indicate that it's the clinician speaking). * Then you would set the ChannelId of the second ChannelDefinition in the list * to 1 (to indicate the second channel) and ParticipantRole to * PATIENT (to indicate that it's the patient speaking). * @return Returns a reference to this object so that method calls can be chained together. */ Builder channelDefinitions(MedicalScribeChannelDefinition... channelDefinitions); /** *

* Makes it possible to specify which speaker is on which channel. For example, if the clinician is the first * participant to speak, you would set ChannelId of the first ChannelDefinition in the * list to 0 (to indicate the first channel) and ParticipantRole to * CLINICIAN (to indicate that it's the clinician speaking). Then you would set the * ChannelId of the second ChannelDefinition in the list to 1 (to * indicate the second channel) and ParticipantRole to PATIENT (to indicate that it's * the patient speaking). *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.transcribe.model.MedicalScribeChannelDefinition.Builder} avoiding the * need to create one manually via * {@link software.amazon.awssdk.services.transcribe.model.MedicalScribeChannelDefinition#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.transcribe.model.MedicalScribeChannelDefinition.Builder#build()} is * called immediately and its result is passed to {@link * #channelDefinitions(List)}. * * @param channelDefinitions * a consumer that will call methods on * {@link software.amazon.awssdk.services.transcribe.model.MedicalScribeChannelDefinition.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #channelDefinitions(java.util.Collection) */ Builder channelDefinitions(Consumer... channelDefinitions); /** *

* Adds one or more custom tags, each in the form of a key:value pair, to the Medica Scribe job. *

*

* To learn more about using tags with Amazon Transcribe, refer to Tagging resources. *

* * @param tags * Adds one or more custom tags, each in the form of a key:value pair, to the Medica Scribe job.

*

* To learn more about using tags with Amazon Transcribe, refer to Tagging resources. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* Adds one or more custom tags, each in the form of a key:value pair, to the Medica Scribe job. *

*

* To learn more about using tags with Amazon Transcribe, refer to Tagging resources. *

* * @param tags * Adds one or more custom tags, each in the form of a key:value pair, to the Medica Scribe job.

*

* To learn more about using tags with Amazon Transcribe, refer to Tagging resources. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Tag... tags); /** *

* Adds one or more custom tags, each in the form of a key:value pair, to the Medica Scribe job. *

*

* To learn more about using tags with Amazon Transcribe, refer to Tagging resources. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.transcribe.model.Tag.Builder} avoiding the need to create one manually * via {@link software.amazon.awssdk.services.transcribe.model.Tag#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.transcribe.model.Tag.Builder#build()} is called immediately and its * result is passed to {@link #tags(List)}. * * @param tags * a consumer that will call methods on * {@link software.amazon.awssdk.services.transcribe.model.Tag.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tags(java.util.Collection) */ Builder tags(Consumer... tags); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends TranscribeRequest.BuilderImpl implements Builder { private String medicalScribeJobName; private Media media; private String outputBucketName; private String outputEncryptionKMSKeyId; private Map kmsEncryptionContext = DefaultSdkAutoConstructMap.getInstance(); private String dataAccessRoleArn; private MedicalScribeSettings settings; private List channelDefinitions = DefaultSdkAutoConstructList.getInstance(); private List tags = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(StartMedicalScribeJobRequest model) { super(model); medicalScribeJobName(model.medicalScribeJobName); media(model.media); outputBucketName(model.outputBucketName); outputEncryptionKMSKeyId(model.outputEncryptionKMSKeyId); kmsEncryptionContext(model.kmsEncryptionContext); dataAccessRoleArn(model.dataAccessRoleArn); settings(model.settings); channelDefinitions(model.channelDefinitions); tags(model.tags); } public final String getMedicalScribeJobName() { return medicalScribeJobName; } public final void setMedicalScribeJobName(String medicalScribeJobName) { this.medicalScribeJobName = medicalScribeJobName; } @Override public final Builder medicalScribeJobName(String medicalScribeJobName) { this.medicalScribeJobName = medicalScribeJobName; return this; } public final Media.Builder getMedia() { return media != null ? media.toBuilder() : null; } public final void setMedia(Media.BuilderImpl media) { this.media = media != null ? media.build() : null; } @Override public final Builder media(Media media) { this.media = media; return this; } public final String getOutputBucketName() { return outputBucketName; } public final void setOutputBucketName(String outputBucketName) { this.outputBucketName = outputBucketName; } @Override public final Builder outputBucketName(String outputBucketName) { this.outputBucketName = outputBucketName; return this; } public final String getOutputEncryptionKMSKeyId() { return outputEncryptionKMSKeyId; } public final void setOutputEncryptionKMSKeyId(String outputEncryptionKMSKeyId) { this.outputEncryptionKMSKeyId = outputEncryptionKMSKeyId; } @Override public final Builder outputEncryptionKMSKeyId(String outputEncryptionKMSKeyId) { this.outputEncryptionKMSKeyId = outputEncryptionKMSKeyId; return this; } public final Map getKmsEncryptionContext() { if (kmsEncryptionContext instanceof SdkAutoConstructMap) { return null; } return kmsEncryptionContext; } public final void setKmsEncryptionContext(Map kmsEncryptionContext) { this.kmsEncryptionContext = KMSEncryptionContextMapCopier.copy(kmsEncryptionContext); } @Override public final Builder kmsEncryptionContext(Map kmsEncryptionContext) { this.kmsEncryptionContext = KMSEncryptionContextMapCopier.copy(kmsEncryptionContext); return this; } public final String getDataAccessRoleArn() { return dataAccessRoleArn; } public final void setDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; } @Override public final Builder dataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; return this; } public final MedicalScribeSettings.Builder getSettings() { return settings != null ? settings.toBuilder() : null; } public final void setSettings(MedicalScribeSettings.BuilderImpl settings) { this.settings = settings != null ? settings.build() : null; } @Override @Transient public final Builder settings(MedicalScribeSettings settings) { this.settings = settings; return this; } public final List getChannelDefinitions() { List result = MedicalScribeChannelDefinitionsCopier .copyToBuilder(this.channelDefinitions); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setChannelDefinitions(Collection channelDefinitions) { this.channelDefinitions = MedicalScribeChannelDefinitionsCopier.copyFromBuilder(channelDefinitions); } @Override public final Builder channelDefinitions(Collection channelDefinitions) { this.channelDefinitions = MedicalScribeChannelDefinitionsCopier.copy(channelDefinitions); return this; } @Override @SafeVarargs public final Builder channelDefinitions(MedicalScribeChannelDefinition... channelDefinitions) { channelDefinitions(Arrays.asList(channelDefinitions)); return this; } @Override @SafeVarargs public final Builder channelDefinitions(Consumer... channelDefinitions) { channelDefinitions(Stream.of(channelDefinitions) .map(c -> MedicalScribeChannelDefinition.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final List getTags() { List result = TagListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(Tag... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> Tag.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public StartMedicalScribeJobRequest build() { return new StartMedicalScribeJobRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy