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

commonMain.aws.sdk.kotlin.services.route53recoverycluster.model.UpdateRoutingControlStateEntry.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.route53recoverycluster.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A routing control state entry.
 */
public class UpdateRoutingControlStateEntry private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) for a routing control state entry.
     */
    public val routingControlArn: kotlin.String = requireNotNull(builder.routingControlArn) { "A non-null value must be provided for routingControlArn" }
    /**
     * The routing control state in a set of routing control state entries.
     */
    public val routingControlState: aws.sdk.kotlin.services.route53recoverycluster.model.RoutingControlState = requireNotNull(builder.routingControlState) { "A non-null value must be provided for routingControlState" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateRoutingControlStateEntry(")
        append("routingControlArn=$routingControlArn,")
        append("routingControlState=$routingControlState")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = routingControlArn.hashCode()
        result = 31 * result + (routingControlState.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 UpdateRoutingControlStateEntry

        if (routingControlArn != other.routingControlArn) return false
        if (routingControlState != other.routingControlState) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) for a routing control state entry.
         */
        public var routingControlArn: kotlin.String? = null
        /**
         * The routing control state in a set of routing control state entries.
         */
        public var routingControlState: aws.sdk.kotlin.services.route53recoverycluster.model.RoutingControlState? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53recoverycluster.model.UpdateRoutingControlStateEntry) : this() {
            this.routingControlArn = x.routingControlArn
            this.routingControlState = x.routingControlState
        }

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

        internal fun correctErrors(): Builder {
            if (routingControlArn == null) routingControlArn = ""
            if (routingControlState == null) routingControlState = RoutingControlState.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy