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

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

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

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



public class CreateDirectConnectGatewayRequest private constructor(builder: Builder) {
    /**
     * The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default is 64512.
     */
    public val amazonSideAsn: kotlin.Long? = builder.amazonSideAsn
    /**
     * The name of the Direct Connect gateway.
     */
    public val directConnectGatewayName: kotlin.String? = builder.directConnectGatewayName

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDirectConnectGatewayRequest(")
        append("amazonSideAsn=$amazonSideAsn,")
        append("directConnectGatewayName=$directConnectGatewayName")
        append(")")
    }

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

        if (amazonSideAsn != other.amazonSideAsn) return false
        if (directConnectGatewayName != other.directConnectGatewayName) return false

        return true
    }

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

    public class Builder {
        /**
         * The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default is 64512.
         */
        public var amazonSideAsn: kotlin.Long? = null
        /**
         * The name of the Direct Connect gateway.
         */
        public var directConnectGatewayName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.CreateDirectConnectGatewayRequest) : this() {
            this.amazonSideAsn = x.amazonSideAsn
            this.directConnectGatewayName = x.directConnectGatewayName
        }

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

        internal fun correctErrors(): Builder {
            if (directConnectGatewayName == null) directConnectGatewayName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy