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

commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.ConversationLogsRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lexmodelbuildingservice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Provides the settings needed for conversation logs.
 */
public class ConversationLogsRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of an IAM role with permission to write to your CloudWatch Logs for text logs and your S3 bucket for audio logs. If audio encryption is enabled, this role also provides access permission for the AWS KMS key used for encrypting audio logs. For more information, see [Creating an IAM Role and Policy for Conversation Logs](https://docs.aws.amazon.com/lex/latest/dg/conversation-logs-role-and-policy.html).
     */
    public val iamRoleArn: kotlin.String = requireNotNull(builder.iamRoleArn) { "A non-null value must be provided for iamRoleArn" }
    /**
     * The settings for your conversation logs. You can log the conversation text, conversation audio, or both.
     */
    public val logSettings: List = requireNotNull(builder.logSettings) { "A non-null value must be provided for logSettings" }

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

    override fun toString(): kotlin.String = buildString {
        append("ConversationLogsRequest(")
        append("iamRoleArn=$iamRoleArn,")
        append("logSettings=$logSettings")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = iamRoleArn.hashCode()
        result = 31 * result + (logSettings.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 ConversationLogsRequest

        if (iamRoleArn != other.iamRoleArn) return false
        if (logSettings != other.logSettings) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of an IAM role with permission to write to your CloudWatch Logs for text logs and your S3 bucket for audio logs. If audio encryption is enabled, this role also provides access permission for the AWS KMS key used for encrypting audio logs. For more information, see [Creating an IAM Role and Policy for Conversation Logs](https://docs.aws.amazon.com/lex/latest/dg/conversation-logs-role-and-policy.html).
         */
        public var iamRoleArn: kotlin.String? = null
        /**
         * The settings for your conversation logs. You can log the conversation text, conversation audio, or both.
         */
        public var logSettings: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.ConversationLogsRequest) : this() {
            this.iamRoleArn = x.iamRoleArn
            this.logSettings = x.logSettings
        }

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

        internal fun correctErrors(): Builder {
            if (iamRoleArn == null) iamRoleArn = ""
            if (logSettings == null) logSettings = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy