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

commonMain.aws.sdk.kotlin.services.route53recoverycontrolconfig.model.AssertionRuleUpdate.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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An update to an assertion rule. You can update the name or the evaluation period (wait period). If you don't specify one of the items to update, the item is unchanged.
 */
public class AssertionRuleUpdate private constructor(builder: Builder) {
    /**
     * The name of the assertion rule. You can use any non-white space character in the name.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The Amazon Resource Name (ARN) of the assertion rule.
     */
    public val safetyRuleArn: kotlin.String? = builder.safetyRuleArn
    /**
     * An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent "flapping" of state. The wait period is 5000 ms by default, but you can choose a custom value.
     */
    public val waitPeriodMs: kotlin.Int? = builder.waitPeriodMs

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

    override fun toString(): kotlin.String = buildString {
        append("AssertionRuleUpdate(")
        append("name=$name,")
        append("safetyRuleArn=$safetyRuleArn,")
        append("waitPeriodMs=$waitPeriodMs")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.hashCode() ?: 0
        result = 31 * result + (safetyRuleArn?.hashCode() ?: 0)
        result = 31 * result + (waitPeriodMs ?: 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 AssertionRuleUpdate

        if (name != other.name) return false
        if (safetyRuleArn != other.safetyRuleArn) return false
        if (waitPeriodMs != other.waitPeriodMs) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the assertion rule. You can use any non-white space character in the name.
         */
        public var name: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the assertion rule.
         */
        public var safetyRuleArn: kotlin.String? = null
        /**
         * An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent "flapping" of state. The wait period is 5000 ms by default, but you can choose a custom value.
         */
        public var waitPeriodMs: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.AssertionRuleUpdate) : this() {
            this.name = x.name
            this.safetyRuleArn = x.safetyRuleArn
            this.waitPeriodMs = x.waitPeriodMs
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy