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

commonMain.aws.sdk.kotlin.services.chatbot.model.SlackWorkspace.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 Slack Workspace.
 */
public class SlackWorkspace private constructor(builder: Builder) {
    /**
     * The ID of the Slack workspace authorized with AWS Chatbot.
     */
    public val slackTeamId: kotlin.String = requireNotNull(builder.slackTeamId) { "A non-null value must be provided for slackTeamId" }
    /**
     * Name of the Slack Workspace.
     */
    public val slackTeamName: kotlin.String = requireNotNull(builder.slackTeamName) { "A non-null value must be provided for slackTeamName" }

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

    override fun toString(): kotlin.String = buildString {
        append("SlackWorkspace(")
        append("slackTeamId=$slackTeamId,")
        append("slackTeamName=$slackTeamName")
        append(")")
    }

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

        if (slackTeamId != other.slackTeamId) return false
        if (slackTeamName != other.slackTeamName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the Slack workspace authorized with AWS Chatbot.
         */
        public var slackTeamId: kotlin.String? = null
        /**
         * Name of the Slack Workspace.
         */
        public var slackTeamName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chatbot.model.SlackWorkspace) : this() {
            this.slackTeamId = x.slackTeamId
            this.slackTeamName = x.slackTeamName
        }

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

        internal fun correctErrors(): Builder {
            if (slackTeamId == null) slackTeamId = ""
            if (slackTeamName == null) slackTeamName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy