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

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

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

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



/**
 * Encloses a receipt handle and an identifier for it.
 */
public class DeleteMessageBatchRequestEntry private constructor(builder: Builder) {
    /**
     * The identifier for this particular receipt handle. This is used to communicate the result.
     *
     * The `Id`s of a batch request need to be unique within a request.
     *
     * This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * A receipt handle.
     */
    public val receiptHandle: kotlin.String = requireNotNull(builder.receiptHandle) { "A non-null value must be provided for receiptHandle" }

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

    override fun toString(): kotlin.String = buildString {
        append("DeleteMessageBatchRequestEntry(")
        append("id=$id,")
        append("receiptHandle=$receiptHandle")
        append(")")
    }

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

        if (id != other.id) return false
        if (receiptHandle != other.receiptHandle) return false

        return true
    }

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

    public class Builder {
        /**
         * The identifier for this particular receipt handle. This is used to communicate the result.
         *
         * The `Id`s of a batch request need to be unique within a request.
         *
         * This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).
         */
        public var id: kotlin.String? = null
        /**
         * A receipt handle.
         */
        public var receiptHandle: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sqs.model.DeleteMessageBatchRequestEntry) : this() {
            this.id = x.id
            this.receiptHandle = x.receiptHandle
        }

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

        internal fun correctErrors(): Builder {
            if (id == null) id = ""
            if (receiptHandle == null) receiptHandle = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy