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

commonMain.aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelSummary.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 details of a `Channel`.
 */
public class ChannelSummary private constructor(builder: Builder) {
    /**
     * The ARN of the channel.
     */
    public val channelArn: kotlin.String? = builder.channelArn
    /**
     * The time at which the last persistent message visible to the caller in a channel was sent.
     */
    public val lastMessageTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.lastMessageTimestamp
    /**
     * The metadata of the channel.
     */
    public val metadata: kotlin.String? = builder.metadata
    /**
     * The mode of the channel.
     */
    public val mode: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelMode? = builder.mode
    /**
     * The name of the channel.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The privacy setting of the channel.
     */
    public val privacy: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelPrivacy? = builder.privacy

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

    override fun toString(): kotlin.String = buildString {
        append("ChannelSummary(")
        append("channelArn=$channelArn,")
        append("lastMessageTimestamp=$lastMessageTimestamp,")
        append("metadata=*** Sensitive Data Redacted ***,")
        append("mode=$mode,")
        append("name=*** Sensitive Data Redacted ***,")
        append("privacy=$privacy")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = channelArn?.hashCode() ?: 0
        result = 31 * result + (lastMessageTimestamp?.hashCode() ?: 0)
        result = 31 * result + (metadata?.hashCode() ?: 0)
        result = 31 * result + (mode?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (privacy?.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 ChannelSummary

        if (channelArn != other.channelArn) return false
        if (lastMessageTimestamp != other.lastMessageTimestamp) return false
        if (metadata != other.metadata) return false
        if (mode != other.mode) return false
        if (name != other.name) return false
        if (privacy != other.privacy) return false

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the channel.
         */
        public var channelArn: kotlin.String? = null
        /**
         * The time at which the last persistent message visible to the caller in a channel was sent.
         */
        public var lastMessageTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The metadata of the channel.
         */
        public var metadata: kotlin.String? = null
        /**
         * The mode of the channel.
         */
        public var mode: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelMode? = null
        /**
         * The name of the channel.
         */
        public var name: kotlin.String? = null
        /**
         * The privacy setting of the channel.
         */
        public var privacy: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelPrivacy? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelSummary) : this() {
            this.channelArn = x.channelArn
            this.lastMessageTimestamp = x.lastMessageTimestamp
            this.metadata = x.metadata
            this.mode = x.mode
            this.name = x.name
            this.privacy = x.privacy
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy