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

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

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

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



public class CreateChannelModeratorRequest private constructor(builder: Builder) {
    /**
     * The ARN of the channel.
     */
    public val channelArn: kotlin.String? = builder.channelArn
    /**
     * The `AppInstanceUserArn` of the moderator.
     */
    public val channelModeratorArn: kotlin.String? = builder.channelModeratorArn
    /**
     * The ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call.
     */
    public val chimeBearer: kotlin.String? = builder.chimeBearer

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the channel.
         */
        public var channelArn: kotlin.String? = null
        /**
         * The `AppInstanceUserArn` of the moderator.
         */
        public var channelModeratorArn: kotlin.String? = null
        /**
         * The ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call.
         */
        public var chimeBearer: kotlin.String? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy