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

commonMain.aws.sdk.kotlin.services.sqs.model.DeleteMessageBatchResponse.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 ` DeleteMessageBatchResultEntry ` tag if the message is deleted or a ` BatchResultErrorEntry ` tag if the message can't be deleted.
 */
public class DeleteMessageBatchResponse 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 ` DeleteMessageBatchResultEntry ` 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.DeleteMessageBatchResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DeleteMessageBatchResponse(")
        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 DeleteMessageBatchResponse

        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.DeleteMessageBatchResponse = Builder(this).apply(block).build()

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy