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

commonMain.aws.sdk.kotlin.services.transcribestreaming.model.PostCallAnalyticsSettings.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.transcribestreaming.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Allows you to specify additional settings for your Call Analytics post-call request, including output locations for your redacted transcript, which IAM role to use, and which encryption key to use.
 *
 * `DataAccessRoleArn` and `OutputLocation` are required fields.
 *
 * `PostCallAnalyticsSettings` provides you with the same insights as a Call Analytics post-call transcription. Refer to [Post-call analytics](https://docs.aws.amazon.com/transcribe/latest/dg/tca-post-call.html) for more information on this feature.
 */
public class PostCallAnalyticsSettings private constructor(builder: Builder) {
    /**
     * 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`).
     */
    public val contentRedactionOutput: aws.sdk.kotlin.services.transcribestreaming.model.ContentRedactionOutput? = builder.contentRedactionOutput
    /**
     * 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](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns).
     */
    public val dataAccessRoleArn: kotlin.String = requireNotNull(builder.dataAccessRoleArn) { "A non-null value must be provided for dataAccessRoleArn" }
    /**
     * 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:
     * + Use the KMS key ID itself. For example, `1234abcd-12ab-34cd-56ef-1234567890ab`.
     * + Use an alias for the KMS key ID. For example, `alias/ExampleAlias`.
     * + 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`.
     * + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
     *
     * 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:
     * + Use the ARN for the KMS key ID. For example, `arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab`.
     * + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
     *
     * Note that the role making the request must have permission to use the specified KMS key.
     */
    public val outputEncryptionKmsKeyId: kotlin.String? = 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:
     * + s3://DOC-EXAMPLE-BUCKET
     * + s3://DOC-EXAMPLE-BUCKET/my-output-folder/
     * + s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json
     */
    public val outputLocation: kotlin.String = requireNotNull(builder.outputLocation) { "A non-null value must be provided for outputLocation" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transcribestreaming.model.PostCallAnalyticsSettings = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PostCallAnalyticsSettings(")
        append("contentRedactionOutput=$contentRedactionOutput,")
        append("dataAccessRoleArn=$dataAccessRoleArn,")
        append("outputEncryptionKmsKeyId=$outputEncryptionKmsKeyId,")
        append("outputLocation=$outputLocation")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contentRedactionOutput?.hashCode() ?: 0
        result = 31 * result + (dataAccessRoleArn.hashCode())
        result = 31 * result + (outputEncryptionKmsKeyId?.hashCode() ?: 0)
        result = 31 * result + (outputLocation.hashCode())
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as PostCallAnalyticsSettings

        if (contentRedactionOutput != other.contentRedactionOutput) return false
        if (dataAccessRoleArn != other.dataAccessRoleArn) return false
        if (outputEncryptionKmsKeyId != other.outputEncryptionKmsKeyId) return false
        if (outputLocation != other.outputLocation) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transcribestreaming.model.PostCallAnalyticsSettings = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * 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`).
         */
        public var contentRedactionOutput: aws.sdk.kotlin.services.transcribestreaming.model.ContentRedactionOutput? = null
        /**
         * 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](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns).
         */
        public var dataAccessRoleArn: kotlin.String? = null
        /**
         * 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:
         * + Use the KMS key ID itself. For example, `1234abcd-12ab-34cd-56ef-1234567890ab`.
         * + Use an alias for the KMS key ID. For example, `alias/ExampleAlias`.
         * + 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`.
         * + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
         *
         * 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:
         * + Use the ARN for the KMS key ID. For example, `arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab`.
         * + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
         *
         * Note that the role making the request must have permission to use the specified KMS key.
         */
        public var outputEncryptionKmsKeyId: kotlin.String? = null
        /**
         * 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:
         * + s3://DOC-EXAMPLE-BUCKET
         * + s3://DOC-EXAMPLE-BUCKET/my-output-folder/
         * + s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json
         */
        public var outputLocation: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transcribestreaming.model.PostCallAnalyticsSettings) : this() {
            this.contentRedactionOutput = x.contentRedactionOutput
            this.dataAccessRoleArn = x.dataAccessRoleArn
            this.outputEncryptionKmsKeyId = x.outputEncryptionKmsKeyId
            this.outputLocation = x.outputLocation
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.transcribestreaming.model.PostCallAnalyticsSettings = PostCallAnalyticsSettings(this)

        internal fun correctErrors(): Builder {
            if (dataAccessRoleArn == null) dataAccessRoleArn = ""
            if (outputLocation == null) outputLocation = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy