commonMain.aws.sdk.kotlin.services.chatbot.model.TeamsChannelConfiguration.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
/**
* An AWS Chatbot configuration for Microsoft Teams.
*/
public class TeamsChannelConfiguration private constructor(builder: Builder) {
/**
* The ID of the Microsoft Teams channel.
*/
public val channelId: kotlin.String = requireNotNull(builder.channelId) { "A non-null value must be provided for channelId" }
/**
* The name of the Microsoft Teams channel.
*/
public val channelName: kotlin.String? = builder.channelName
/**
* 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" }
/**
* The name of the configuration.
*/
public val configurationName: kotlin.String? = builder.configurationName
/**
* The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed `AdministratorAccess` policy is applied by default if this is not set.
*/
public val guardrailPolicyArns: List? = builder.guardrailPolicyArns
/**
* 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" }
/**
* Logging levels include `ERROR`, `INFO`, or `NONE`.
*/
public val loggingLevel: kotlin.String? = builder.loggingLevel
/**
* The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
*/
public val snsTopicArns: List = requireNotNull(builder.snsTopicArns) { "A non-null value must be provided for snsTopicArns" }
/**
* A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
*/
public val tags: List? = builder.tags
/**
* 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" }
/**
* Enables use of a user role requirement in your chat configuration.
*/
public val userAuthorizationRequired: kotlin.Boolean? = builder.userAuthorizationRequired
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chatbot.model.TeamsChannelConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TeamsChannelConfiguration(")
append("channelId=$channelId,")
append("channelName=*** Sensitive Data Redacted ***,")
append("chatConfigurationArn=$chatConfigurationArn,")
append("configurationName=$configurationName,")
append("guardrailPolicyArns=$guardrailPolicyArns,")
append("iamRoleArn=$iamRoleArn,")
append("loggingLevel=$loggingLevel,")
append("snsTopicArns=$snsTopicArns,")
append("tags=$tags,")
append("teamId=$teamId,")
append("teamName=*** Sensitive Data Redacted ***,")
append("tenantId=$tenantId,")
append("userAuthorizationRequired=$userAuthorizationRequired")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = channelId.hashCode()
result = 31 * result + (channelName?.hashCode() ?: 0)
result = 31 * result + (chatConfigurationArn.hashCode())
result = 31 * result + (configurationName?.hashCode() ?: 0)
result = 31 * result + (guardrailPolicyArns?.hashCode() ?: 0)
result = 31 * result + (iamRoleArn.hashCode())
result = 31 * result + (loggingLevel?.hashCode() ?: 0)
result = 31 * result + (snsTopicArns.hashCode())
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (teamId.hashCode())
result = 31 * result + (teamName?.hashCode() ?: 0)
result = 31 * result + (tenantId.hashCode())
result = 31 * result + (userAuthorizationRequired?.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 TeamsChannelConfiguration
if (channelId != other.channelId) return false
if (channelName != other.channelName) return false
if (chatConfigurationArn != other.chatConfigurationArn) return false
if (configurationName != other.configurationName) return false
if (guardrailPolicyArns != other.guardrailPolicyArns) return false
if (iamRoleArn != other.iamRoleArn) return false
if (loggingLevel != other.loggingLevel) return false
if (snsTopicArns != other.snsTopicArns) return false
if (tags != other.tags) return false
if (teamId != other.teamId) return false
if (teamName != other.teamName) return false
if (tenantId != other.tenantId) return false
if (userAuthorizationRequired != other.userAuthorizationRequired) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chatbot.model.TeamsChannelConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the Microsoft Teams channel.
*/
public var channelId: kotlin.String? = null
/**
* The name of the Microsoft Teams channel.
*/
public var channelName: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
*/
public var chatConfigurationArn: kotlin.String? = null
/**
* The name of the configuration.
*/
public var configurationName: kotlin.String? = null
/**
* The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed `AdministratorAccess` policy is applied by default if this is not set.
*/
public var guardrailPolicyArns: List? = 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
/**
* Logging levels include `ERROR`, `INFO`, or `NONE`.
*/
public var loggingLevel: kotlin.String? = null
/**
* The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
*/
public var snsTopicArns: List? = null
/**
* A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
*/
public var tags: List? = 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
/**
* Enables use of a user role requirement in your chat configuration.
*/
public var userAuthorizationRequired: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chatbot.model.TeamsChannelConfiguration) : this() {
this.channelId = x.channelId
this.channelName = x.channelName
this.chatConfigurationArn = x.chatConfigurationArn
this.configurationName = x.configurationName
this.guardrailPolicyArns = x.guardrailPolicyArns
this.iamRoleArn = x.iamRoleArn
this.loggingLevel = x.loggingLevel
this.snsTopicArns = x.snsTopicArns
this.tags = x.tags
this.teamId = x.teamId
this.teamName = x.teamName
this.tenantId = x.tenantId
this.userAuthorizationRequired = x.userAuthorizationRequired
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chatbot.model.TeamsChannelConfiguration = TeamsChannelConfiguration(this)
internal fun correctErrors(): Builder {
if (channelId == null) channelId = ""
if (chatConfigurationArn == null) chatConfigurationArn = ""
if (iamRoleArn == null) iamRoleArn = ""
if (snsTopicArns == null) snsTopicArns = emptyList()
if (teamId == null) teamId = ""
if (tenantId == null) tenantId = ""
return this
}
}
}