commonMain.aws.sdk.kotlin.services.cloudtraildata.model.PutAuditEventsResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudtraildata.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutAuditEventsResponse private constructor(builder: Builder) {
/**
* Lists events in the provided event payload that could not be ingested into CloudTrail, and includes the error code and error message returned for events that could not be ingested.
*/
public val failed: List = requireNotNull(builder.failed) { "A non-null value must be provided for failed" }
/**
* Lists events in the provided event payload that were successfully ingested into CloudTrail.
*/
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.cloudtraildata.model.PutAuditEventsResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutAuditEventsResponse(")
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 PutAuditEventsResponse
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.cloudtraildata.model.PutAuditEventsResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Lists events in the provided event payload that could not be ingested into CloudTrail, and includes the error code and error message returned for events that could not be ingested.
*/
public var failed: List? = null
/**
* Lists events in the provided event payload that were successfully ingested into CloudTrail.
*/
public var successful: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudtraildata.model.PutAuditEventsResponse) : this() {
this.failed = x.failed
this.successful = x.successful
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudtraildata.model.PutAuditEventsResponse = PutAuditEventsResponse(this)
internal fun correctErrors(): Builder {
if (failed == null) failed = emptyList()
if (successful == null) successful = emptyList()
return this
}
}
}