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

commonMain.aws.sdk.kotlin.services.directconnect.model.VirtualGateway.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.directconnect.model



/**
 * Information about a virtual private gateway for a private virtual interface.
 */
public class VirtualGateway private constructor(builder: Builder) {
    /**
     * The ID of the virtual private gateway.
     */
    public val virtualGatewayId: kotlin.String? = builder.virtualGatewayId
    /**
     * The state of the virtual private gateway. The following are the possible values:
     * + `pending`: Initial state after creating the virtual private gateway.
     * + `available`: Ready for use by a private virtual interface.
     * + `deleting`: Initial state after deleting the virtual private gateway.
     * + `deleted`: The virtual private gateway is deleted. The private virtual interface is unable to send traffic over this gateway.
     */
    public val virtualGatewayState: kotlin.String? = builder.virtualGatewayState

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

    override fun toString(): kotlin.String = buildString {
        append("VirtualGateway(")
        append("virtualGatewayId=$virtualGatewayId,")
        append("virtualGatewayState=$virtualGatewayState")
        append(")")
    }

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

        if (virtualGatewayId != other.virtualGatewayId) return false
        if (virtualGatewayState != other.virtualGatewayState) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the virtual private gateway.
         */
        public var virtualGatewayId: kotlin.String? = null
        /**
         * The state of the virtual private gateway. The following are the possible values:
         * + `pending`: Initial state after creating the virtual private gateway.
         * + `available`: Ready for use by a private virtual interface.
         * + `deleting`: Initial state after deleting the virtual private gateway.
         * + `deleted`: The virtual private gateway is deleted. The private virtual interface is unable to send traffic over this gateway.
         */
        public var virtualGatewayState: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.VirtualGateway) : this() {
            this.virtualGatewayId = x.virtualGatewayId
            this.virtualGatewayState = x.virtualGatewayState
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy