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

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

/**
 * A Microsoft Teams team that is authorized with AWS Chatbot.
 */
public class ConfiguredTeam private constructor(builder: Builder) {
    /**
     * Either `ENABLED` or `DISABLED`. The resource returns `DISABLED` if the organization's AWS Chatbot policy has explicitly denied that configuration. For example, if Amazon Chime is disabled.
     */
    public val state: kotlin.String? = builder.state
    /**
     * Provided if State is `DISABLED`. Provides context as to why the resource is disabled.
     */
    public val stateReason: kotlin.String? = builder.stateReason
    /**
     * 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 name of the Microsoft Teams Team.
     */
    public val teamName: kotlin.String? = builder.teamName
    /**
     * The ID of the Microsoft Teams tenant.
     */
    public val tenantId: kotlin.String = requireNotNull(builder.tenantId) { "A non-null value must be provided for tenantId" }

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

    override fun toString(): kotlin.String = buildString {
        append("ConfiguredTeam(")
        append("state=$state,")
        append("stateReason=$stateReason,")
        append("teamId=$teamId,")
        append("teamName=$teamName,")
        append("tenantId=$tenantId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = state?.hashCode() ?: 0
        result = 31 * result + (stateReason?.hashCode() ?: 0)
        result = 31 * result + (teamId.hashCode())
        result = 31 * result + (teamName?.hashCode() ?: 0)
        result = 31 * result + (tenantId.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 ConfiguredTeam

        if (state != other.state) return false
        if (stateReason != other.stateReason) return false
        if (teamId != other.teamId) return false
        if (teamName != other.teamName) return false
        if (tenantId != other.tenantId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Either `ENABLED` or `DISABLED`. The resource returns `DISABLED` if the organization's AWS Chatbot policy has explicitly denied that configuration. For example, if Amazon Chime is disabled.
         */
        public var state: kotlin.String? = null
        /**
         * Provided if State is `DISABLED`. Provides context as to why the resource is disabled.
         */
        public var stateReason: 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 name of the Microsoft Teams Team.
         */
        public var teamName: kotlin.String? = null
        /**
         * The ID of the Microsoft Teams tenant.
         */
        public var tenantId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chatbot.model.ConfiguredTeam) : this() {
            this.state = x.state
            this.stateReason = x.stateReason
            this.teamId = x.teamId
            this.teamName = x.teamName
            this.tenantId = x.tenantId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy