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

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



/**
 * The rule configuration for an assertion rule. That is, the criteria that you set for specific assertion controls (routing controls) that specify how many control states must be ON after a transaction completes.
 */
public class RuleConfig private constructor(builder: Builder) {
    /**
     * Logical negation of the rule. If the rule would usually evaluate true, it's evaluated as false, and vice versa.
     */
    public val inverted: kotlin.Boolean? = builder.inverted
    /**
     * The value of N, when you specify an ATLEAST rule type. That is, Threshold is the number of controls that must be set when you specify an ATLEAST type.
     */
    public val threshold: kotlin.Int? = builder.threshold
    /**
     * A rule can be one of the following: ATLEAST, AND, or OR.
     */
    public val type: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.RuleType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("RuleConfig(")
        append("inverted=$inverted,")
        append("threshold=$threshold,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = inverted?.hashCode() ?: 0
        result = 31 * result + (threshold ?: 0)
        result = 31 * result + (type?.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 RuleConfig

        if (inverted != other.inverted) return false
        if (threshold != other.threshold) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * Logical negation of the rule. If the rule would usually evaluate true, it's evaluated as false, and vice versa.
         */
        public var inverted: kotlin.Boolean? = null
        /**
         * The value of N, when you specify an ATLEAST rule type. That is, Threshold is the number of controls that must be set when you specify an ATLEAST type.
         */
        public var threshold: kotlin.Int? = null
        /**
         * A rule can be one of the following: ATLEAST, AND, or OR.
         */
        public var type: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.RuleType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.RuleConfig) : this() {
            this.inverted = x.inverted
            this.threshold = x.threshold
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy