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

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

public class CreateSafetyRuleResponse private constructor(builder: Builder) {
    /**
     * The assertion rule created.
     */
    public val assertionRule: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.AssertionRule? = builder.assertionRule
    /**
     * The gating rule created.
     */
    public val gatingRule: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.GatingRule? = builder.gatingRule

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

    override fun toString(): kotlin.String = buildString {
        append("CreateSafetyRuleResponse(")
        append("assertionRule=$assertionRule,")
        append("gatingRule=$gatingRule")
        append(")")
    }

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

        if (assertionRule != other.assertionRule) return false
        if (gatingRule != other.gatingRule) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The assertion rule created.
         */
        public var assertionRule: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.AssertionRule? = null
        /**
         * The gating rule created.
         */
        public var gatingRule: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.GatingRule? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53recoverycontrolconfig.model.CreateSafetyRuleResponse) : this() {
            this.assertionRule = x.assertionRule
            this.gatingRule = x.gatingRule
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy