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

commonMain.aws.sdk.kotlin.services.chimesdkmessaging.model.BatchChannelMemberships.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.chimesdkmessaging.model



/**
 * The membership information, including member ARNs, the channel ARN, and membership types.
 */
public class BatchChannelMemberships private constructor(builder: Builder) {
    /**
     * The ARN of the channel to which you're adding members.
     */
    public val channelArn: kotlin.String? = builder.channelArn
    /**
     * The identifier of the member who invited another member.
     */
    public val invitedBy: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = builder.invitedBy
    /**
     * The users successfully added to the request.
     */
    public val members: List? = builder.members
    /**
     * The ID of the SubChannel.
     */
    public val subChannelId: kotlin.String? = builder.subChannelId
    /**
     * The membership types set for the channel members.
     */
    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.BatchChannelMemberships = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("BatchChannelMemberships(")
        append("channelArn=$channelArn,")
        append("invitedBy=$invitedBy,")
        append("members=$members,")
        append("subChannelId=$subChannelId,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = channelArn?.hashCode() ?: 0
        result = 31 * result + (invitedBy?.hashCode() ?: 0)
        result = 31 * result + (members?.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 BatchChannelMemberships

        if (channelArn != other.channelArn) return false
        if (invitedBy != other.invitedBy) return false
        if (members != other.members) 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.BatchChannelMemberships = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The ARN of the channel to which you're adding members.
         */
        public var channelArn: kotlin.String? = null
        /**
         * The identifier of the member who invited another member.
         */
        public var invitedBy: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = null
        /**
         * The users successfully added to the request.
         */
        public var members: List? = null
        /**
         * The ID of the SubChannel.
         */
        public var subChannelId: kotlin.String? = null
        /**
         * The membership types set for the channel members.
         */
        public var type: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelMembershipType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.BatchChannelMemberships) : this() {
            this.channelArn = x.channelArn
            this.invitedBy = x.invitedBy
            this.members = x.members
            this.subChannelId = x.subChannelId
            this.type = x.type
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.chimesdkmessaging.model.Identity] inside the given [block]
         */
        public fun invitedBy(block: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity.Builder.() -> kotlin.Unit) {
            this.invitedBy = aws.sdk.kotlin.services.chimesdkmessaging.model.Identity.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy