
commonMain.aws.sdk.kotlin.services.sns.model.BatchResultErrorEntry.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sns.model
/**
* Gives a detailed description of failed messages in the batch.
*/
public class BatchResultErrorEntry private constructor(builder: Builder) {
/**
* An error code representing why the action failed on this entry.
*/
public val code: kotlin.String = requireNotNull(builder.code) { "A non-null value must be provided for code" }
/**
* The `Id` of an entry in a batch request
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* A message explaining why the action failed on this entry.
*/
public val message: kotlin.String? = builder.message
/**
* Specifies whether the error happened due to the caller of the batch API action.
*/
public val senderFault: kotlin.Boolean = builder.senderFault
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.sns.model.BatchResultErrorEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchResultErrorEntry(")
append("code=$code,")
append("id=$id,")
append("message=$message,")
append("senderFault=$senderFault")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code.hashCode()
result = 31 * result + (id.hashCode())
result = 31 * result + (message?.hashCode() ?: 0)
result = 31 * result + (senderFault.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 BatchResultErrorEntry
if (code != other.code) return false
if (id != other.id) return false
if (message != other.message) return false
if (senderFault != other.senderFault) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.sns.model.BatchResultErrorEntry = Builder(this).apply(block).build()
public class Builder {
/**
* An error code representing why the action failed on this entry.
*/
public var code: kotlin.String? = null
/**
* The `Id` of an entry in a batch request
*/
public var id: kotlin.String? = null
/**
* A message explaining why the action failed on this entry.
*/
public var message: kotlin.String? = null
/**
* Specifies whether the error happened due to the caller of the batch API action.
*/
public var senderFault: kotlin.Boolean = false
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.sns.model.BatchResultErrorEntry) : this() {
this.code = x.code
this.id = x.id
this.message = x.message
this.senderFault = x.senderFault
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.sns.model.BatchResultErrorEntry = BatchResultErrorEntry(this)
internal fun correctErrors(): Builder {
if (code == null) code = ""
if (id == null) id = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy