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

commonMain.aws.sdk.kotlin.services.chatbot.model.ChimeWebhookConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.chatbot.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An AWS Chatbot configuration for Amazon Chime.
 */
public class ChimeWebhookConfiguration private constructor(builder: Builder) {
    /**
     * The Amazon Resource Number (ARN) of the ChimeWebhookConfiguration.
     */
    public val chatConfigurationArn: kotlin.String = requireNotNull(builder.chatConfigurationArn) { "A non-null value must be provided for chatConfigurationArn" }
    /**
     * The name of the configuration.
     */
    public val configurationName: kotlin.String? = builder.configurationName
    /**
     * A user-defined role that AWS Chatbot assumes. This is not the service-linked role.
     *
     * For more information, see [IAM policies for AWS Chatbot](https://docs.aws.amazon.com/chatbot/latest/adminguide/chatbot-iam-policies.html) in the * AWS Chatbot Administrator Guide*.
     */
    public val iamRoleArn: kotlin.String = requireNotNull(builder.iamRoleArn) { "A non-null value must be provided for iamRoleArn" }
    /**
     * Logging levels include `ERROR`, `INFO`, or `NONE`.
     */
    public val loggingLevel: kotlin.String? = builder.loggingLevel
    /**
     * The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
     */
    public val snsTopicArns: List = requireNotNull(builder.snsTopicArns) { "A non-null value must be provided for snsTopicArns" }
    /**
     * A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
     */
    public val tags: List? = builder.tags
    /**
     * A description of the webhook. We recommend using the convention `RoomName/WebhookName`.
     *
     * For more information, see [Tutorial: Get started with Amazon Chime](https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html) in the * AWS Chatbot Administrator Guide*.
     */
    public val webhookDescription: kotlin.String = requireNotNull(builder.webhookDescription) { "A non-null value must be provided for webhookDescription" }

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

    override fun toString(): kotlin.String = buildString {
        append("ChimeWebhookConfiguration(")
        append("chatConfigurationArn=$chatConfigurationArn,")
        append("configurationName=$configurationName,")
        append("iamRoleArn=$iamRoleArn,")
        append("loggingLevel=$loggingLevel,")
        append("snsTopicArns=$snsTopicArns,")
        append("tags=$tags,")
        append("webhookDescription=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = chatConfigurationArn.hashCode()
        result = 31 * result + (configurationName?.hashCode() ?: 0)
        result = 31 * result + (iamRoleArn.hashCode())
        result = 31 * result + (loggingLevel?.hashCode() ?: 0)
        result = 31 * result + (snsTopicArns.hashCode())
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (webhookDescription.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 ChimeWebhookConfiguration

        if (chatConfigurationArn != other.chatConfigurationArn) return false
        if (configurationName != other.configurationName) return false
        if (iamRoleArn != other.iamRoleArn) return false
        if (loggingLevel != other.loggingLevel) return false
        if (snsTopicArns != other.snsTopicArns) return false
        if (tags != other.tags) return false
        if (webhookDescription != other.webhookDescription) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Number (ARN) of the ChimeWebhookConfiguration.
         */
        public var chatConfigurationArn: kotlin.String? = null
        /**
         * The name of the configuration.
         */
        public var configurationName: kotlin.String? = null
        /**
         * A user-defined role that AWS Chatbot assumes. This is not the service-linked role.
         *
         * For more information, see [IAM policies for AWS Chatbot](https://docs.aws.amazon.com/chatbot/latest/adminguide/chatbot-iam-policies.html) in the * AWS Chatbot Administrator Guide*.
         */
        public var iamRoleArn: kotlin.String? = null
        /**
         * Logging levels include `ERROR`, `INFO`, or `NONE`.
         */
        public var loggingLevel: kotlin.String? = null
        /**
         * The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
         */
        public var snsTopicArns: List? = null
        /**
         * A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
         */
        public var tags: List? = null
        /**
         * A description of the webhook. We recommend using the convention `RoomName/WebhookName`.
         *
         * For more information, see [Tutorial: Get started with Amazon Chime](https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html) in the * AWS Chatbot Administrator Guide*.
         */
        public var webhookDescription: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chatbot.model.ChimeWebhookConfiguration) : this() {
            this.chatConfigurationArn = x.chatConfigurationArn
            this.configurationName = x.configurationName
            this.iamRoleArn = x.iamRoleArn
            this.loggingLevel = x.loggingLevel
            this.snsTopicArns = x.snsTopicArns
            this.tags = x.tags
            this.webhookDescription = x.webhookDescription
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy