All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusRequestEntry.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.resiliencehub.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Defines the operational recommendation item that is to be included or excluded.
 */
public class UpdateRecommendationStatusRequestEntry private constructor(builder: Builder) {
    /**
     * An identifier for 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 reason for excluding an operational recommendation.
     */
    public val excludeReason: aws.sdk.kotlin.services.resiliencehub.model.ExcludeRecommendationReason? = builder.excludeReason
    /**
     * Indicates if the operational recommendation needs to be excluded. If set to True, the operational recommendation will be excluded.
     */
    public val excluded: kotlin.Boolean = requireNotNull(builder.excluded) { "A non-null value must be provided for excluded" }
    /**
     * The operational recommendation item.
     */
    public val item: aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusItem? = builder.item
    /**
     * Reference identifier of the operational recommendation item.
     */
    public val referenceId: kotlin.String = requireNotNull(builder.referenceId) { "A non-null value must be provided for referenceId" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusRequestEntry = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateRecommendationStatusRequestEntry(")
        append("entryId=$entryId,")
        append("excludeReason=$excludeReason,")
        append("excluded=$excluded,")
        append("item=$item,")
        append("referenceId=$referenceId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = entryId.hashCode()
        result = 31 * result + (excludeReason?.hashCode() ?: 0)
        result = 31 * result + (excluded.hashCode())
        result = 31 * result + (item?.hashCode() ?: 0)
        result = 31 * result + (referenceId.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 UpdateRecommendationStatusRequestEntry

        if (entryId != other.entryId) return false
        if (excludeReason != other.excludeReason) return false
        if (excluded != other.excluded) return false
        if (item != other.item) return false
        if (referenceId != other.referenceId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusRequestEntry = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An identifier for 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 reason for excluding an operational recommendation.
         */
        public var excludeReason: aws.sdk.kotlin.services.resiliencehub.model.ExcludeRecommendationReason? = null
        /**
         * Indicates if the operational recommendation needs to be excluded. If set to True, the operational recommendation will be excluded.
         */
        public var excluded: kotlin.Boolean? = null
        /**
         * The operational recommendation item.
         */
        public var item: aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusItem? = null
        /**
         * Reference identifier of the operational recommendation item.
         */
        public var referenceId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusRequestEntry) : this() {
            this.entryId = x.entryId
            this.excludeReason = x.excludeReason
            this.excluded = x.excluded
            this.item = x.item
            this.referenceId = x.referenceId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusRequestEntry = UpdateRecommendationStatusRequestEntry(this)

        /**
         * construct an [aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusItem] inside the given [block]
         */
        public fun item(block: aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusItem.Builder.() -> kotlin.Unit) {
            this.item = aws.sdk.kotlin.services.resiliencehub.model.UpdateRecommendationStatusItem.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (entryId == null) entryId = ""
            if (excluded == null) excluded = false
            if (referenceId == null) referenceId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy