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

commonMain.aws.sdk.kotlin.services.route53recoverycluster.model.RoutingControl.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, which is a simple on/off switch that you can use to route traffic to cells. When a routing control state is set to ON, traffic flows to a cell. When the state is set to OFF, traffic does not flow.
 */
public class RoutingControl private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the control panel where the routing control is located.
     */
    public val controlPanelArn: kotlin.String? = builder.controlPanelArn
    /**
     * The name of the control panel where the routing control is located. Only ASCII characters are supported for control panel names.
     */
    public val controlPanelName: kotlin.String? = builder.controlPanelName
    /**
     * The Amazon Web Services account ID of the routing control owner.
     */
    public val owner: kotlin.String? = builder.owner
    /**
     * The Amazon Resource Name (ARN) of the routing control.
     */
    public val routingControlArn: kotlin.String? = builder.routingControlArn
    /**
     * The name of the routing control.
     */
    public val routingControlName: kotlin.String? = builder.routingControlName
    /**
     * The current state of the routing control. When a routing control state is set to ON, traffic flows to a cell. When the state is set to OFF, traffic does not flow.
     */
    public val routingControlState: aws.sdk.kotlin.services.route53recoverycluster.model.RoutingControlState? = builder.routingControlState

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

    override fun toString(): kotlin.String = buildString {
        append("RoutingControl(")
        append("controlPanelArn=$controlPanelArn,")
        append("controlPanelName=$controlPanelName,")
        append("owner=$owner,")
        append("routingControlArn=$routingControlArn,")
        append("routingControlName=$routingControlName,")
        append("routingControlState=$routingControlState")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = controlPanelArn?.hashCode() ?: 0
        result = 31 * result + (controlPanelName?.hashCode() ?: 0)
        result = 31 * result + (owner?.hashCode() ?: 0)
        result = 31 * result + (routingControlArn?.hashCode() ?: 0)
        result = 31 * result + (routingControlName?.hashCode() ?: 0)
        result = 31 * result + (routingControlState?.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 RoutingControl

        if (controlPanelArn != other.controlPanelArn) return false
        if (controlPanelName != other.controlPanelName) return false
        if (owner != other.owner) return false
        if (routingControlArn != other.routingControlArn) return false
        if (routingControlName != other.routingControlName) return false
        if (routingControlState != other.routingControlState) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the control panel where the routing control is located.
         */
        public var controlPanelArn: kotlin.String? = null
        /**
         * The name of the control panel where the routing control is located. Only ASCII characters are supported for control panel names.
         */
        public var controlPanelName: kotlin.String? = null
        /**
         * The Amazon Web Services account ID of the routing control owner.
         */
        public var owner: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the routing control.
         */
        public var routingControlArn: kotlin.String? = null
        /**
         * The name of the routing control.
         */
        public var routingControlName: kotlin.String? = null
        /**
         * The current state of the routing control. When a routing control state is set to ON, traffic flows to a cell. When the state is set to OFF, traffic does not flow.
         */
        public var routingControlState: aws.sdk.kotlin.services.route53recoverycluster.model.RoutingControlState? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53recoverycluster.model.RoutingControl) : this() {
            this.controlPanelArn = x.controlPanelArn
            this.controlPanelName = x.controlPanelName
            this.owner = x.owner
            this.routingControlArn = x.routingControlArn
            this.routingControlName = x.routingControlName
            this.routingControlState = x.routingControlState
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy