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

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

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

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



/**
 * Summary of the channel membership details of an `AppInstanceUser`.
 */
public class ChannelMembershipForAppInstanceUserSummary private constructor(builder: Builder) {
    /**
     * Returns the channel membership data for an `AppInstance`.
     */
    public val appInstanceUserMembershipSummary: aws.sdk.kotlin.services.chimesdkmessaging.model.AppInstanceUserMembershipSummary? = builder.appInstanceUserMembershipSummary
    /**
     * Returns the channel data for an `AppInstance`.
     */
    public val channelSummary: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelSummary? = builder.channelSummary

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

    override fun toString(): kotlin.String = buildString {
        append("ChannelMembershipForAppInstanceUserSummary(")
        append("appInstanceUserMembershipSummary=$appInstanceUserMembershipSummary,")
        append("channelSummary=$channelSummary")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appInstanceUserMembershipSummary?.hashCode() ?: 0
        result = 31 * result + (channelSummary?.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 ChannelMembershipForAppInstanceUserSummary

        if (appInstanceUserMembershipSummary != other.appInstanceUserMembershipSummary) return false
        if (channelSummary != other.channelSummary) return false

        return true
    }

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

    public class Builder {
        /**
         * Returns the channel membership data for an `AppInstance`.
         */
        public var appInstanceUserMembershipSummary: aws.sdk.kotlin.services.chimesdkmessaging.model.AppInstanceUserMembershipSummary? = null
        /**
         * Returns the channel data for an `AppInstance`.
         */
        public var channelSummary: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelSummary? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelMembershipForAppInstanceUserSummary) : this() {
            this.appInstanceUserMembershipSummary = x.appInstanceUserMembershipSummary
            this.channelSummary = x.channelSummary
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy