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

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

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

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



public class PutChannelExpirationSettingsRequest private constructor(builder: Builder) {
    /**
     * The ARN of the channel.
     */
    public val channelArn: kotlin.String? = builder.channelArn
    /**
     * The ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call.
     */
    public val chimeBearer: kotlin.String? = builder.chimeBearer
    /**
     * Settings that control the interval after which a channel is deleted.
     */
    public val expirationSettings: aws.sdk.kotlin.services.chimesdkmessaging.model.ExpirationSettings? = builder.expirationSettings

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

    override fun toString(): kotlin.String = buildString {
        append("PutChannelExpirationSettingsRequest(")
        append("channelArn=$channelArn,")
        append("chimeBearer=$chimeBearer,")
        append("expirationSettings=$expirationSettings")
        append(")")
    }

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

        if (channelArn != other.channelArn) return false
        if (chimeBearer != other.chimeBearer) return false
        if (expirationSettings != other.expirationSettings) return false

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the channel.
         */
        public var channelArn: kotlin.String? = null
        /**
         * The ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call.
         */
        public var chimeBearer: kotlin.String? = null
        /**
         * Settings that control the interval after which a channel is deleted.
         */
        public var expirationSettings: aws.sdk.kotlin.services.chimesdkmessaging.model.ExpirationSettings? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmessaging.model.PutChannelExpirationSettingsRequest) : this() {
            this.channelArn = x.channelArn
            this.chimeBearer = x.chimeBearer
            this.expirationSettings = x.expirationSettings
        }

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

        /**
         * 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