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

commonMain.aws.sdk.kotlin.services.route53recoverycontrolconfig.model.UpdateSafetyRuleRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.route53recoverycontrolconfig.model



/**
 * A rule that you add to Application Recovery Controller to ensure that recovery actions don't accidentally impair your application's availability.
 */
public class UpdateSafetyRuleRequest private constructor(builder: Builder) {
    /**
     * The assertion rule to update.
     */
    public val assertionRuleUpdate: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.AssertionRuleUpdate? = builder.assertionRuleUpdate
    /**
     * The gating rule to update.
     */
    public val gatingRuleUpdate: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.GatingRuleUpdate? = builder.gatingRuleUpdate

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateSafetyRuleRequest(")
        append("assertionRuleUpdate=$assertionRuleUpdate,")
        append("gatingRuleUpdate=$gatingRuleUpdate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assertionRuleUpdate?.hashCode() ?: 0
        result = 31 * result + (gatingRuleUpdate?.hashCode() ?: 0)
        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 UpdateSafetyRuleRequest

        if (assertionRuleUpdate != other.assertionRuleUpdate) return false
        if (gatingRuleUpdate != other.gatingRuleUpdate) return false

        return true
    }

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

    public class Builder {
        /**
         * The assertion rule to update.
         */
        public var assertionRuleUpdate: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.AssertionRuleUpdate? = null
        /**
         * The gating rule to update.
         */
        public var gatingRuleUpdate: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.GatingRuleUpdate? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.UpdateSafetyRuleRequest) : this() {
            this.assertionRuleUpdate = x.assertionRuleUpdate
            this.gatingRuleUpdate = x.gatingRuleUpdate
        }

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

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy