
commonMain.aws.sdk.kotlin.services.sqs.model.SendMessageBatchResponse.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 ` SendMessageBatchResultEntry ` tag if the message succeeds or a ` BatchResultErrorEntry ` tag if the message fails.
*/
public class SendMessageBatchResponse private constructor(builder: Builder) {
/**
* A list of ` BatchResultErrorEntry ` items with error details about each message that can't be enqueued.
*/
public val failed: List = requireNotNull(builder.failed) { "A non-null value must be provided for failed" }
/**
* A list of ` SendMessageBatchResultEntry ` 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.SendMessageBatchResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SendMessageBatchResponse(")
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 SendMessageBatchResponse
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.SendMessageBatchResponse = Builder(this).apply(block).build()
public class Builder {
/**
* A list of ` BatchResultErrorEntry ` items with error details about each message that can't be enqueued.
*/
public var failed: List? = null
/**
* A list of ` SendMessageBatchResultEntry ` items.
*/
public var successful: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.sqs.model.SendMessageBatchResponse) : this() {
this.failed = x.failed
this.successful = x.successful
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.sqs.model.SendMessageBatchResponse = SendMessageBatchResponse(this)
internal fun correctErrors(): Builder {
if (failed == null) failed = emptyList()
if (successful == null) successful = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy