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

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

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

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

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Summary of the membership details of an `AppInstanceUser`.
 */
public class AppInstanceUserMembershipSummary private constructor(builder: Builder) {
    /**
     * The time at which an `AppInstanceUser` last marked a channel as read.
     */
    public val readMarkerTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.readMarkerTimestamp
    /**
     * The ID of the SubChannel that the `AppInstanceUser` is a member of.
     */
    public val subChannelId: kotlin.String? = builder.subChannelId
    /**
     * The type of `ChannelMembership`.
     */
    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.AppInstanceUserMembershipSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AppInstanceUserMembershipSummary(")
        append("readMarkerTimestamp=$readMarkerTimestamp,")
        append("subChannelId=$subChannelId,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = readMarkerTimestamp?.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 AppInstanceUserMembershipSummary

        if (readMarkerTimestamp != other.readMarkerTimestamp) 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.AppInstanceUserMembershipSummary = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The time at which an `AppInstanceUser` last marked a channel as read.
         */
        public var readMarkerTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the SubChannel that the `AppInstanceUser` is a member of.
         */
        public var subChannelId: kotlin.String? = null
        /**
         * The type of `ChannelMembership`.
         */
        public var type: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelMembershipType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.AppInstanceUserMembershipSummary) : this() {
            this.readMarkerTimestamp = x.readMarkerTimestamp
            this.subChannelId = x.subChannelId
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy