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

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

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

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



public class CreateDirectConnectGatewayAssociationProposalRequest private constructor(builder: Builder) {
    /**
     * The Amazon VPC prefixes to advertise to the Direct Connect gateway.
     */
    public val addAllowedPrefixesToDirectConnectGateway: List? = builder.addAllowedPrefixesToDirectConnectGateway
    /**
     * The ID of the Direct Connect gateway.
     */
    public val directConnectGatewayId: kotlin.String? = builder.directConnectGatewayId
    /**
     * The ID of the Amazon Web Services account that owns the Direct Connect gateway.
     */
    public val directConnectGatewayOwnerAccount: kotlin.String? = builder.directConnectGatewayOwnerAccount
    /**
     * The ID of the virtual private gateway or transit gateway.
     */
    public val gatewayId: kotlin.String? = builder.gatewayId
    /**
     * The Amazon VPC prefixes to no longer advertise to the Direct Connect gateway.
     */
    public val removeAllowedPrefixesToDirectConnectGateway: List? = builder.removeAllowedPrefixesToDirectConnectGateway

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDirectConnectGatewayAssociationProposalRequest(")
        append("addAllowedPrefixesToDirectConnectGateway=$addAllowedPrefixesToDirectConnectGateway,")
        append("directConnectGatewayId=$directConnectGatewayId,")
        append("directConnectGatewayOwnerAccount=$directConnectGatewayOwnerAccount,")
        append("gatewayId=$gatewayId,")
        append("removeAllowedPrefixesToDirectConnectGateway=$removeAllowedPrefixesToDirectConnectGateway")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = addAllowedPrefixesToDirectConnectGateway?.hashCode() ?: 0
        result = 31 * result + (directConnectGatewayId?.hashCode() ?: 0)
        result = 31 * result + (directConnectGatewayOwnerAccount?.hashCode() ?: 0)
        result = 31 * result + (gatewayId?.hashCode() ?: 0)
        result = 31 * result + (removeAllowedPrefixesToDirectConnectGateway?.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 CreateDirectConnectGatewayAssociationProposalRequest

        if (addAllowedPrefixesToDirectConnectGateway != other.addAllowedPrefixesToDirectConnectGateway) return false
        if (directConnectGatewayId != other.directConnectGatewayId) return false
        if (directConnectGatewayOwnerAccount != other.directConnectGatewayOwnerAccount) return false
        if (gatewayId != other.gatewayId) return false
        if (removeAllowedPrefixesToDirectConnectGateway != other.removeAllowedPrefixesToDirectConnectGateway) return false

        return true
    }

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

    public class Builder {
        /**
         * The Amazon VPC prefixes to advertise to the Direct Connect gateway.
         */
        public var addAllowedPrefixesToDirectConnectGateway: List? = null
        /**
         * The ID of the Direct Connect gateway.
         */
        public var directConnectGatewayId: kotlin.String? = null
        /**
         * The ID of the Amazon Web Services account that owns the Direct Connect gateway.
         */
        public var directConnectGatewayOwnerAccount: kotlin.String? = null
        /**
         * The ID of the virtual private gateway or transit gateway.
         */
        public var gatewayId: kotlin.String? = null
        /**
         * The Amazon VPC prefixes to no longer advertise to the Direct Connect gateway.
         */
        public var removeAllowedPrefixesToDirectConnectGateway: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.CreateDirectConnectGatewayAssociationProposalRequest) : this() {
            this.addAllowedPrefixesToDirectConnectGateway = x.addAllowedPrefixesToDirectConnectGateway
            this.directConnectGatewayId = x.directConnectGatewayId
            this.directConnectGatewayOwnerAccount = x.directConnectGatewayOwnerAccount
            this.gatewayId = x.gatewayId
            this.removeAllowedPrefixesToDirectConnectGateway = x.removeAllowedPrefixesToDirectConnectGateway
        }

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

        internal fun correctErrors(): Builder {
            if (directConnectGatewayId == null) directConnectGatewayId = ""
            if (directConnectGatewayOwnerAccount == null) directConnectGatewayOwnerAccount = ""
            if (gatewayId == null) gatewayId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy