
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" }
/**
* The name of the Slack workspace.
*/
public val slackTeamName: kotlin.String = requireNotNull(builder.slackTeamName) { "A non-null value must be provided for slackTeamName" }
/**
* 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
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("state=$state,")
append("stateReason=$stateReason")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = slackTeamId.hashCode()
result = 31 * result + (slackTeamName.hashCode())
result = 31 * result + (state?.hashCode() ?: 0)
result = 31 * result + (stateReason?.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 SlackWorkspace
if (slackTeamId != other.slackTeamId) return false
if (slackTeamName != other.slackTeamName) return false
if (state != other.state) return false
if (stateReason != other.stateReason) 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
/**
* The name of the Slack workspace.
*/
public var slackTeamName: kotlin.String? = null
/**
* 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chatbot.model.SlackWorkspace) : this() {
this.slackTeamId = x.slackTeamId
this.slackTeamName = x.slackTeamName
this.state = x.state
this.stateReason = x.stateReason
}
@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