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

commonMain.aws.sdk.kotlin.services.sqs.model.ChangeMessageVisibilityBatchResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sqs.model



/**
 * For each message in the batch, the response contains a ` ChangeMessageVisibilityBatchResultEntry ` tag if the message succeeds or a ` BatchResultErrorEntry ` tag if the message fails.
 */
public class ChangeMessageVisibilityBatchResponse private constructor(builder: Builder) {
    /**
     * A list of ` BatchResultErrorEntry ` items.
     */
    public val failed: List = requireNotNull(builder.failed) { "A non-null value must be provided for failed" }
    /**
     * A list of ` ChangeMessageVisibilityBatchResultEntry ` items.
     */
    public val successful: List = requireNotNull(builder.successful) { "A non-null value must be provided for successful" }

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

    override fun toString(): kotlin.String = buildString {
        append("ChangeMessageVisibilityBatchResponse(")
        append("failed=$failed,")
        append("successful=$successful")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = failed.hashCode()
        result = 31 * result + (successful.hashCode())
        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 ChangeMessageVisibilityBatchResponse

        if (failed != other.failed) return false
        if (successful != other.successful) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of ` BatchResultErrorEntry ` items.
         */
        public var failed: List? = null
        /**
         * A list of ` ChangeMessageVisibilityBatchResultEntry ` items.
         */
        public var successful: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sqs.model.ChangeMessageVisibilityBatchResponse) : this() {
            this.failed = x.failed
            this.successful = x.successful
        }

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

        internal fun correctErrors(): Builder {
            if (failed == null) failed = emptyList()
            if (successful == null) successful = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy