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

commonMain.aws.sdk.kotlin.services.ivschat.model.MessageReviewHandler.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ivschat.model



/**
 * Configuration information for optional message review.
 */
public class MessageReviewHandler private constructor(builder: Builder) {
    /**
     * Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see [ Service Quotas](https://docs.aws.amazon.com/ivs/latest/userguide/service-quotas.html).) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: `ALLOW`.
     */
    public val fallbackResult: aws.sdk.kotlin.services.ivschat.model.FallbackResult? = builder.fallbackResult
    /**
     * Identifier of the message review handler. Currently this must be an ARN of a lambda function.
     */
    public val uri: kotlin.String? = builder.uri

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

    override fun toString(): kotlin.String = buildString {
        append("MessageReviewHandler(")
        append("fallbackResult=$fallbackResult,")
        append("uri=$uri")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = fallbackResult?.hashCode() ?: 0
        result = 31 * result + (uri?.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 MessageReviewHandler

        if (fallbackResult != other.fallbackResult) return false
        if (uri != other.uri) return false

        return true
    }

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

    public class Builder {
        /**
         * Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see [ Service Quotas](https://docs.aws.amazon.com/ivs/latest/userguide/service-quotas.html).) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: `ALLOW`.
         */
        public var fallbackResult: aws.sdk.kotlin.services.ivschat.model.FallbackResult? = null
        /**
         * Identifier of the message review handler. Currently this must be an ARN of a lambda function.
         */
        public var uri: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ivschat.model.MessageReviewHandler) : this() {
            this.fallbackResult = x.fallbackResult
            this.uri = x.uri
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy