commonMain.aws.sdk.kotlin.services.resiliencehub.model.BatchUpdateRecommendationStatusFailedEntry.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resiliencehub-jvm Show documentation
Show all versions of resiliencehub-jvm Show documentation
The AWS SDK for Kotlin client for resiliencehub
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.resiliencehub.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* List of operational recommendations that did not get included or excluded.
*/
public class BatchUpdateRecommendationStatusFailedEntry private constructor(builder: Builder) {
/**
* An identifier of an entry in this batch that is used to communicate the result.
*
* The `entryId`s of a batch request need to be unique within a request.
*/
public val entryId: kotlin.String = requireNotNull(builder.entryId) { "A non-null value must be provided for entryId" }
/**
* Indicates the error that occurred while excluding an operational recommendation.
*/
public val errorMessage: kotlin.String = requireNotNull(builder.errorMessage) { "A non-null value must be provided for errorMessage" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resiliencehub.model.BatchUpdateRecommendationStatusFailedEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchUpdateRecommendationStatusFailedEntry(")
append("entryId=$entryId,")
append("errorMessage=$errorMessage")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = entryId.hashCode()
result = 31 * result + (errorMessage.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 BatchUpdateRecommendationStatusFailedEntry
if (entryId != other.entryId) return false
if (errorMessage != other.errorMessage) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resiliencehub.model.BatchUpdateRecommendationStatusFailedEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An identifier of an entry in this batch that is used to communicate the result.
*
* The `entryId`s of a batch request need to be unique within a request.
*/
public var entryId: kotlin.String? = null
/**
* Indicates the error that occurred while excluding an operational recommendation.
*/
public var errorMessage: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.BatchUpdateRecommendationStatusFailedEntry) : this() {
this.entryId = x.entryId
this.errorMessage = x.errorMessage
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.resiliencehub.model.BatchUpdateRecommendationStatusFailedEntry = BatchUpdateRecommendationStatusFailedEntry(this)
internal fun correctErrors(): Builder {
if (entryId == null) entryId = ""
if (errorMessage == null) errorMessage = ""
return this
}
}
}