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

commonMain.aws.sdk.kotlin.services.chimesdkmessaging.model.Channel.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

/**
 * The details of a channel.
 */
public class Channel private constructor(builder: Builder) {
    /**
     * The ARN of a channel.
     */
    public val channelArn: kotlin.String? = builder.channelArn
    /**
     * The ARN of the channel flow.
     */
    public val channelFlowArn: kotlin.String? = builder.channelFlowArn
    /**
     * The `AppInstanceUser` who created the channel.
     */
    public val createdBy: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = builder.createdBy
    /**
     * The time at which the `AppInstanceUser` created the channel.
     */
    public val createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.createdTimestamp
    /**
     * The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million members.
     */
    public val elasticChannelConfiguration: aws.sdk.kotlin.services.chimesdkmessaging.model.ElasticChannelConfiguration? = builder.elasticChannelConfiguration
    /**
     * Settings that control when a channel expires.
     */
    public val expirationSettings: aws.sdk.kotlin.services.chimesdkmessaging.model.ExpirationSettings? = builder.expirationSettings
    /**
     * The time at which a member sent the last message in the channel.
     */
    public val lastMessageTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.lastMessageTimestamp
    /**
     * The time at which a channel was last updated.
     */
    public val lastUpdatedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedTimestamp
    /**
     * The channel's metadata.
     */
    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 a channel.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The channel's privacy setting.
     */
    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.Channel = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("Channel(")
        append("channelArn=$channelArn,")
        append("channelFlowArn=$channelFlowArn,")
        append("createdBy=$createdBy,")
        append("createdTimestamp=$createdTimestamp,")
        append("elasticChannelConfiguration=$elasticChannelConfiguration,")
        append("expirationSettings=$expirationSettings,")
        append("lastMessageTimestamp=$lastMessageTimestamp,")
        append("lastUpdatedTimestamp=$lastUpdatedTimestamp,")
        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 + (channelFlowArn?.hashCode() ?: 0)
        result = 31 * result + (createdBy?.hashCode() ?: 0)
        result = 31 * result + (createdTimestamp?.hashCode() ?: 0)
        result = 31 * result + (elasticChannelConfiguration?.hashCode() ?: 0)
        result = 31 * result + (expirationSettings?.hashCode() ?: 0)
        result = 31 * result + (lastMessageTimestamp?.hashCode() ?: 0)
        result = 31 * result + (lastUpdatedTimestamp?.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 Channel

        if (channelArn != other.channelArn) return false
        if (channelFlowArn != other.channelFlowArn) return false
        if (createdBy != other.createdBy) return false
        if (createdTimestamp != other.createdTimestamp) return false
        if (elasticChannelConfiguration != other.elasticChannelConfiguration) return false
        if (expirationSettings != other.expirationSettings) return false
        if (lastMessageTimestamp != other.lastMessageTimestamp) return false
        if (lastUpdatedTimestamp != other.lastUpdatedTimestamp) 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.Channel = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The ARN of a channel.
         */
        public var channelArn: kotlin.String? = null
        /**
         * The ARN of the channel flow.
         */
        public var channelFlowArn: kotlin.String? = null
        /**
         * The `AppInstanceUser` who created the channel.
         */
        public var createdBy: aws.sdk.kotlin.services.chimesdkmessaging.model.Identity? = null
        /**
         * The time at which the `AppInstanceUser` created the channel.
         */
        public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million members.
         */
        public var elasticChannelConfiguration: aws.sdk.kotlin.services.chimesdkmessaging.model.ElasticChannelConfiguration? = null
        /**
         * Settings that control when a channel expires.
         */
        public var expirationSettings: aws.sdk.kotlin.services.chimesdkmessaging.model.ExpirationSettings? = null
        /**
         * The time at which a member sent the last message in the channel.
         */
        public var lastMessageTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time at which a channel was last updated.
         */
        public var lastUpdatedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The channel's metadata.
         */
        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 a channel.
         */
        public var name: kotlin.String? = null
        /**
         * The channel's privacy setting.
         */
        public var privacy: aws.sdk.kotlin.services.chimesdkmessaging.model.ChannelPrivacy? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.Channel) : this() {
            this.channelArn = x.channelArn
            this.channelFlowArn = x.channelFlowArn
            this.createdBy = x.createdBy
            this.createdTimestamp = x.createdTimestamp
            this.elasticChannelConfiguration = x.elasticChannelConfiguration
            this.expirationSettings = x.expirationSettings
            this.lastMessageTimestamp = x.lastMessageTimestamp
            this.lastUpdatedTimestamp = x.lastUpdatedTimestamp
            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.Channel = Channel(this)

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy