commonMain.aws.sdk.kotlin.services.ssmincidents.model.BatchGetIncidentFindingsError.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssmincidents-jvm Show documentation
Show all versions of ssmincidents-jvm Show documentation
The AWS SDK for Kotlin client for SSM Incidents
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmincidents.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Details about an error returned for a BatchGetIncidentFindings operation.
*/
public class BatchGetIncidentFindingsError private constructor(builder: Builder) {
/**
* The code associated with an error that was returned for a `BatchGetIncidentFindings` operation.
*/
public val code: kotlin.String = requireNotNull(builder.code) { "A non-null value must be provided for code" }
/**
* The ID of a specified finding for which an error was returned for a `BatchGetIncidentFindings` operation.
*/
public val findingId: kotlin.String = requireNotNull(builder.findingId) { "A non-null value must be provided for findingId" }
/**
* The description for an error that was returned for a `BatchGetIncidentFindings` operation.
*/
public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.BatchGetIncidentFindingsError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchGetIncidentFindingsError(")
append("code=$code,")
append("findingId=$findingId,")
append("message=$message")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code.hashCode()
result = 31 * result + (findingId.hashCode())
result = 31 * result + (message.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 BatchGetIncidentFindingsError
if (code != other.code) return false
if (findingId != other.findingId) return false
if (message != other.message) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.BatchGetIncidentFindingsError = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The code associated with an error that was returned for a `BatchGetIncidentFindings` operation.
*/
public var code: kotlin.String? = null
/**
* The ID of a specified finding for which an error was returned for a `BatchGetIncidentFindings` operation.
*/
public var findingId: kotlin.String? = null
/**
* The description for an error that was returned for a `BatchGetIncidentFindings` operation.
*/
public var message: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.BatchGetIncidentFindingsError) : this() {
this.code = x.code
this.findingId = x.findingId
this.message = x.message
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.BatchGetIncidentFindingsError = BatchGetIncidentFindingsError(this)
internal fun correctErrors(): Builder {
if (code == null) code = ""
if (findingId == null) findingId = ""
if (message == null) message = ""
return this
}
}
}