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

There is a newer version: 1.3.102
Show newest version
// 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 ARN of the MicrosoftTeamsChannelConfiguration associated with the user identity.
     */
    public val chatConfigurationArn: kotlin.String = requireNotNull(builder.chatConfigurationArn) { "A non-null value must be provided for chatConfigurationArn" }
    /**
     * The ARN of the IAM role that defines the permissions for AWS Chatbot. This is a user-defined role that AWS Chatbot will assume. This is not the service-linked role. For more information, see IAM Policies for AWS Chatbot.
     */
    public val iamRoleArn: kotlin.String = requireNotNull(builder.iamRoleArn) { "A non-null value must be provided for iamRoleArn" }
    /**
     * The ID of the Microsoft Team 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 details, see steps 1-4 in Get started with Microsoft Teams 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
    /**
     * Id from Microsoft Teams for user.
     */
    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 ARN of the MicrosoftTeamsChannelConfiguration associated with the user identity.
         */
        public var chatConfigurationArn: kotlin.String? = null
        /**
         * The ARN of the IAM role that defines the permissions for AWS Chatbot. This is a user-defined role that AWS Chatbot will assume. This is not the service-linked role. For more information, see IAM Policies for AWS Chatbot.
         */
        public var iamRoleArn: kotlin.String? = null
        /**
         * The ID of the Microsoft Team 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 details, see steps 1-4 in Get started with Microsoft Teams 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
        /**
         * Id from Microsoft Teams for user.
         */
        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