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

commonMain.aws.sdk.kotlin.services.chatbot.model.TeamsUserIdentity.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

/**
 * Identifes a user level permission for a channel configuration.
 */
public class TeamsUserIdentity private constructor(builder: Builder) {
    /**
     * The AWS user identity ARN used to associate a Microsoft Teams user Identity with an IAM Role.
     */
    public val awsUserIdentity: kotlin.String? = builder.awsUserIdentity
    /**
     * The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
     */
    public val chatConfigurationArn: kotlin.String = requireNotNull(builder.chatConfigurationArn) { "A non-null value must be provided for chatConfigurationArn" }
    /**
     * 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" }
    /**
     * The ID of the Microsoft Teams authorized with AWS Chatbot.
     *
     * To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see [Step 1: Configure a Microsoft Teams client](https://docs.aws.amazon.com/chatbot/latest/adminguide/teams-setup.html#teams-client-setup) in the * AWS Chatbot Administrator Guide*.
     */
    public val teamId: kotlin.String = requireNotNull(builder.teamId) { "A non-null value must be provided for teamId" }
    /**
     * The ID of the Microsoft Teams channel.
     */
    public val teamsChannelId: kotlin.String? = builder.teamsChannelId
    /**
     * The ID of the Microsoft Teams tenant.
     */
    public val teamsTenantId: kotlin.String? = builder.teamsTenantId
    /**
     * The Microsoft Teams user ID.
     */
    public val userId: kotlin.String? = builder.userId

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

    override fun toString(): kotlin.String = buildString {
        append("TeamsUserIdentity(")
        append("awsUserIdentity=$awsUserIdentity,")
        append("chatConfigurationArn=$chatConfigurationArn,")
        append("iamRoleArn=$iamRoleArn,")
        append("teamId=$teamId,")
        append("teamsChannelId=$teamsChannelId,")
        append("teamsTenantId=$teamsTenantId,")
        append("userId=$userId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = awsUserIdentity?.hashCode() ?: 0
        result = 31 * result + (chatConfigurationArn.hashCode())
        result = 31 * result + (iamRoleArn.hashCode())
        result = 31 * result + (teamId.hashCode())
        result = 31 * result + (teamsChannelId?.hashCode() ?: 0)
        result = 31 * result + (teamsTenantId?.hashCode() ?: 0)
        result = 31 * result + (userId?.hashCode() ?: 0)
        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 TeamsUserIdentity

        if (awsUserIdentity != other.awsUserIdentity) return false
        if (chatConfigurationArn != other.chatConfigurationArn) return false
        if (iamRoleArn != other.iamRoleArn) return false
        if (teamId != other.teamId) return false
        if (teamsChannelId != other.teamsChannelId) return false
        if (teamsTenantId != other.teamsTenantId) return false
        if (userId != other.userId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The AWS user identity ARN used to associate a Microsoft Teams user Identity with an IAM Role.
         */
        public var awsUserIdentity: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
         */
        public var chatConfigurationArn: 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
        /**
         * The ID of the Microsoft Teams authorized with AWS Chatbot.
         *
         * To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see [Step 1: Configure a Microsoft Teams client](https://docs.aws.amazon.com/chatbot/latest/adminguide/teams-setup.html#teams-client-setup) in the * AWS Chatbot Administrator Guide*.
         */
        public var teamId: kotlin.String? = null
        /**
         * The ID of the Microsoft Teams channel.
         */
        public var teamsChannelId: kotlin.String? = null
        /**
         * The ID of the Microsoft Teams tenant.
         */
        public var teamsTenantId: kotlin.String? = null
        /**
         * The Microsoft Teams user ID.
         */
        public var userId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chatbot.model.TeamsUserIdentity) : this() {
            this.awsUserIdentity = x.awsUserIdentity
            this.chatConfigurationArn = x.chatConfigurationArn
            this.iamRoleArn = x.iamRoleArn
            this.teamId = x.teamId
            this.teamsChannelId = x.teamsChannelId
            this.teamsTenantId = x.teamsTenantId
            this.userId = x.userId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy