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

software.amazon.awssdk.services.transcribestreaming.model.PostCallAnalyticsSettings 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.transcribestreaming.model;

import java.io.Serializable;
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.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;

/**
 * 

* Allows you to specify additional settings for your streaming Call Analytics post-call request, including output * locations for your redacted and unredacted transcript, which IAM role to use, and, optionally, which encryption key * to use. *

*

* ContentRedactionOutput, DataAccessRoleArn, and OutputLocation are required * fields. *

*/ @Generated("software.amazon.awssdk:codegen") public final class PostCallAnalyticsSettings implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField OUTPUT_LOCATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("OutputLocation").getter(getter(PostCallAnalyticsSettings::outputLocation)) .setter(setter(Builder::outputLocation)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputLocation").build()).build(); private static final SdkField DATA_ACCESS_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DataAccessRoleArn").getter(getter(PostCallAnalyticsSettings::dataAccessRoleArn)) .setter(setter(Builder::dataAccessRoleArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DataAccessRoleArn").build()).build(); private static final SdkField CONTENT_REDACTION_OUTPUT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ContentRedactionOutput").getter(getter(PostCallAnalyticsSettings::contentRedactionOutputAsString)) .setter(setter(Builder::contentRedactionOutput)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ContentRedactionOutput").build()) .build(); private static final SdkField OUTPUT_ENCRYPTION_KMS_KEY_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("OutputEncryptionKMSKeyId").getter(getter(PostCallAnalyticsSettings::outputEncryptionKMSKeyId)) .setter(setter(Builder::outputEncryptionKMSKeyId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OutputEncryptionKMSKeyId").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(OUTPUT_LOCATION_FIELD, DATA_ACCESS_ROLE_ARN_FIELD, CONTENT_REDACTION_OUTPUT_FIELD, OUTPUT_ENCRYPTION_KMS_KEY_ID_FIELD)); private static final long serialVersionUID = 1L; private final String outputLocation; private final String dataAccessRoleArn; private final String contentRedactionOutput; private final String outputEncryptionKMSKeyId; private PostCallAnalyticsSettings(BuilderImpl builder) { this.outputLocation = builder.outputLocation; this.dataAccessRoleArn = builder.dataAccessRoleArn; this.contentRedactionOutput = builder.contentRedactionOutput; this.outputEncryptionKMSKeyId = builder.outputEncryptionKMSKeyId; } /** *

* The Amazon S3 location where you want your Call Analytics post-call transcription output stored. You can use any * of the following formats to specify the output location: *

*
    *
  1. *

    * s3://DOC-EXAMPLE-BUCKET *

    *
  2. *
  3. *

    * s3://DOC-EXAMPLE-BUCKET/my-output-folder/ *

    *
  4. *
  5. *

    * s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json *

    *
  6. *
* * @return The Amazon S3 location where you want your Call Analytics post-call transcription output stored. You can * use any of the following formats to specify the output location:

*
    *
  1. *

    * s3://DOC-EXAMPLE-BUCKET *

    *
  2. *
  3. *

    * s3://DOC-EXAMPLE-BUCKET/my-output-folder/ *

    *
  4. *
  5. *

    * s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json *

    *
  6. */ public final String outputLocation() { return outputLocation; } /** *

    * The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains * your input files. If the role that you specify doesn’t have the appropriate permissions to access the specified * Amazon S3 location, 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. If the role that you specify doesn’t have the appropriate permissions to * access the specified Amazon S3 location, 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; } /** *

    * Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. If you * choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output location you * specify. *

    *

    * Note that to include ContentRedactionOutput in your request, you must enable content redaction ( * ContentRedactionType). *

    *

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

    * * @return Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. If * you choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output * location you specify.

    *

    * Note that to include ContentRedactionOutput in your request, you must enable content * redaction (ContentRedactionType). * @see ContentRedactionOutput */ public final ContentRedactionOutput contentRedactionOutput() { return ContentRedactionOutput.fromValue(contentRedactionOutput); } /** *

    * Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. If you * choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output location you * specify. *

    *

    * Note that to include ContentRedactionOutput in your request, you must enable content redaction ( * ContentRedactionType). *

    *

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

    * * @return Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. If * you choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output * location you specify.

    *

    * Note that to include ContentRedactionOutput in your request, you must enable content * redaction (ContentRedactionType). * @see ContentRedactionOutput */ public final String contentRedactionOutputAsString() { return contentRedactionOutput; } /** *

    * The KMS key you want to use to encrypt your Call Analytics post-call 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. *
    *

    * Note that the user making the request must have permission to use the specified KMS key. *

    * * @return The KMS key you want to use to encrypt your Call Analytics post-call 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. *
    *

    * Note that the user making the request must have permission to use the specified KMS key. */ public final String outputEncryptionKMSKeyId() { return outputEncryptionKMSKeyId; } @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 + Objects.hashCode(outputLocation()); hashCode = 31 * hashCode + Objects.hashCode(dataAccessRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(contentRedactionOutputAsString()); hashCode = 31 * hashCode + Objects.hashCode(outputEncryptionKMSKeyId()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof PostCallAnalyticsSettings)) { return false; } PostCallAnalyticsSettings other = (PostCallAnalyticsSettings) obj; return Objects.equals(outputLocation(), other.outputLocation()) && Objects.equals(dataAccessRoleArn(), other.dataAccessRoleArn()) && Objects.equals(contentRedactionOutputAsString(), other.contentRedactionOutputAsString()) && Objects.equals(outputEncryptionKMSKeyId(), other.outputEncryptionKMSKeyId()); } /** * 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("PostCallAnalyticsSettings").add("OutputLocation", outputLocation()) .add("DataAccessRoleArn", dataAccessRoleArn()).add("ContentRedactionOutput", contentRedactionOutputAsString()) .add("OutputEncryptionKMSKeyId", outputEncryptionKMSKeyId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "OutputLocation": return Optional.ofNullable(clazz.cast(outputLocation())); case "DataAccessRoleArn": return Optional.ofNullable(clazz.cast(dataAccessRoleArn())); case "ContentRedactionOutput": return Optional.ofNullable(clazz.cast(contentRedactionOutputAsString())); case "OutputEncryptionKMSKeyId": return Optional.ofNullable(clazz.cast(outputEncryptionKMSKeyId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((PostCallAnalyticsSettings) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The Amazon S3 location where you want your Call Analytics post-call transcription output stored. You can use * any of the following formats to specify the output location: *

    *
      *
    1. *

      * s3://DOC-EXAMPLE-BUCKET *

      *
    2. *
    3. *

      * s3://DOC-EXAMPLE-BUCKET/my-output-folder/ *

      *
    4. *
    5. *

      * s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json *

      *
    6. *
    * * @param outputLocation * The Amazon S3 location where you want your Call Analytics post-call transcription output stored. You * can use any of the following formats to specify the output location:

    *
      *
    1. *

      * s3://DOC-EXAMPLE-BUCKET *

      *
    2. *
    3. *

      * s3://DOC-EXAMPLE-BUCKET/my-output-folder/ *

      *
    4. *
    5. *

      * s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json *

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

      * The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that * contains your input files. If the role that you specify doesn’t have the appropriate permissions to access * the specified Amazon S3 location, 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. If the role that you specify doesn’t have the appropriate permissions to * access the specified Amazon S3 location, 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); /** *

      * Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. If you * choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output location you * specify. *

      *

      * Note that to include ContentRedactionOutput in your request, you must enable content redaction ( * ContentRedactionType). *

      * * @param contentRedactionOutput * Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. * If you choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output * location you specify.

      *

      * Note that to include ContentRedactionOutput in your request, you must enable content * redaction (ContentRedactionType). * @see ContentRedactionOutput * @return Returns a reference to this object so that method calls can be chained together. * @see ContentRedactionOutput */ Builder contentRedactionOutput(String contentRedactionOutput); /** *

      * Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. If you * choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output location you * specify. *

      *

      * Note that to include ContentRedactionOutput in your request, you must enable content redaction ( * ContentRedactionType). *

      * * @param contentRedactionOutput * Specify whether you want only a redacted transcript or both a redacted and an unredacted transcript. * If you choose redacted and unredacted, two JSON files are generated and stored in the Amazon S3 output * location you specify.

      *

      * Note that to include ContentRedactionOutput in your request, you must enable content * redaction (ContentRedactionType). * @see ContentRedactionOutput * @return Returns a reference to this object so that method calls can be chained together. * @see ContentRedactionOutput */ Builder contentRedactionOutput(ContentRedactionOutput contentRedactionOutput); /** *

      * The KMS key you want to use to encrypt your Call Analytics post-call 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. *
      *

      * Note that the user making the request must have permission to use the specified KMS key. *

      * * @param outputEncryptionKMSKeyId * The KMS key you want to use to encrypt your Call Analytics post-call 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. *
      *

      * Note that the user making the request 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); } static final class BuilderImpl implements Builder { private String outputLocation; private String dataAccessRoleArn; private String contentRedactionOutput; private String outputEncryptionKMSKeyId; private BuilderImpl() { } private BuilderImpl(PostCallAnalyticsSettings model) { outputLocation(model.outputLocation); dataAccessRoleArn(model.dataAccessRoleArn); contentRedactionOutput(model.contentRedactionOutput); outputEncryptionKMSKeyId(model.outputEncryptionKMSKeyId); } public final String getOutputLocation() { return outputLocation; } public final void setOutputLocation(String outputLocation) { this.outputLocation = outputLocation; } @Override public final Builder outputLocation(String outputLocation) { this.outputLocation = outputLocation; 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 String getContentRedactionOutput() { return contentRedactionOutput; } public final void setContentRedactionOutput(String contentRedactionOutput) { this.contentRedactionOutput = contentRedactionOutput; } @Override public final Builder contentRedactionOutput(String contentRedactionOutput) { this.contentRedactionOutput = contentRedactionOutput; return this; } @Override public final Builder contentRedactionOutput(ContentRedactionOutput contentRedactionOutput) { this.contentRedactionOutput(contentRedactionOutput == null ? null : contentRedactionOutput.toString()); 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; } @Override public PostCallAnalyticsSettings build() { return new PostCallAnalyticsSettings(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy