
commonMain.aws.sdk.kotlin.services.chimesdkmessaging.model.BatchCreateChannelMembershipRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chimesdkmessaging.model
public class BatchCreateChannelMembershipRequest private constructor(builder: Builder) {
/**
* The ARN of the channel to which you're adding users or bots.
*/
public val channelArn: kotlin.String? = builder.channelArn
/**
* The ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call.
*/
public val chimeBearer: kotlin.String? = builder.chimeBearer
/**
* The ARNs of the members you want to add to the channel. Only `AppInstanceUsers` and `AppInstanceBots` can be added as a channel member.
*/
public val memberArns: List? = builder.memberArns
/**
* The ID of the SubChannel in the request.
*
* Only required when creating membership in a SubChannel for a moderator in an elastic channel.
*/
public val subChannelId: kotlin.String? = builder.subChannelId
/**
* The membership type of a user, `DEFAULT` or `HIDDEN`. Default members are always returned as part of `ListChannelMemberships`. Hidden members are only returned if the type filter in `ListChannelMemberships` equals `HIDDEN`. Otherwise hidden members are not returned. This is only supported by moderators.
*/
public val type: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelMembershipType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmessaging.model.BatchCreateChannelMembershipRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchCreateChannelMembershipRequest(")
append("channelArn=$channelArn,")
append("chimeBearer=$chimeBearer,")
append("memberArns=$memberArns,")
append("subChannelId=$subChannelId,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = channelArn?.hashCode() ?: 0
result = 31 * result + (chimeBearer?.hashCode() ?: 0)
result = 31 * result + (memberArns?.hashCode() ?: 0)
result = 31 * result + (subChannelId?.hashCode() ?: 0)
result = 31 * result + (type?.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 BatchCreateChannelMembershipRequest
if (channelArn != other.channelArn) return false
if (chimeBearer != other.chimeBearer) return false
if (memberArns != other.memberArns) return false
if (subChannelId != other.subChannelId) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmessaging.model.BatchCreateChannelMembershipRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The ARN of the channel to which you're adding users or bots.
*/
public var channelArn: kotlin.String? = null
/**
* The ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call.
*/
public var chimeBearer: kotlin.String? = null
/**
* The ARNs of the members you want to add to the channel. Only `AppInstanceUsers` and `AppInstanceBots` can be added as a channel member.
*/
public var memberArns: List? = null
/**
* The ID of the SubChannel in the request.
*
* Only required when creating membership in a SubChannel for a moderator in an elastic channel.
*/
public var subChannelId: kotlin.String? = null
/**
* The membership type of a user, `DEFAULT` or `HIDDEN`. Default members are always returned as part of `ListChannelMemberships`. Hidden members are only returned if the type filter in `ListChannelMemberships` equals `HIDDEN`. Otherwise hidden members are not returned. This is only supported by moderators.
*/
public var type: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelMembershipType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.BatchCreateChannelMembershipRequest) : this() {
this.channelArn = x.channelArn
this.chimeBearer = x.chimeBearer
this.memberArns = x.memberArns
this.subChannelId = x.subChannelId
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chimesdkmessaging.model.BatchCreateChannelMembershipRequest = BatchCreateChannelMembershipRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy