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

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

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

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



public class DeleteBgpPeerRequest private constructor(builder: Builder) {
    /**
     * The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
     */
    public val asn: kotlin.Int = builder.asn
    /**
     * The ID of the BGP peer.
     */
    public val bgpPeerId: kotlin.String? = builder.bgpPeerId
    /**
     * The IP address assigned to the customer interface.
     */
    public val customerAddress: kotlin.String? = builder.customerAddress
    /**
     * The ID of the virtual interface.
     */
    public val virtualInterfaceId: kotlin.String? = builder.virtualInterfaceId

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

    override fun toString(): kotlin.String = buildString {
        append("DeleteBgpPeerRequest(")
        append("asn=$asn,")
        append("bgpPeerId=$bgpPeerId,")
        append("customerAddress=$customerAddress,")
        append("virtualInterfaceId=$virtualInterfaceId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = asn
        result = 31 * result + (bgpPeerId?.hashCode() ?: 0)
        result = 31 * result + (customerAddress?.hashCode() ?: 0)
        result = 31 * result + (virtualInterfaceId?.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 DeleteBgpPeerRequest

        if (asn != other.asn) return false
        if (bgpPeerId != other.bgpPeerId) return false
        if (customerAddress != other.customerAddress) return false
        if (virtualInterfaceId != other.virtualInterfaceId) return false

        return true
    }

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

    public class Builder {
        /**
         * The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
         */
        public var asn: kotlin.Int = 0
        /**
         * The ID of the BGP peer.
         */
        public var bgpPeerId: kotlin.String? = null
        /**
         * The IP address assigned to the customer interface.
         */
        public var customerAddress: kotlin.String? = null
        /**
         * The ID of the virtual interface.
         */
        public var virtualInterfaceId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.DeleteBgpPeerRequest) : this() {
            this.asn = x.asn
            this.bgpPeerId = x.bgpPeerId
            this.customerAddress = x.customerAddress
            this.virtualInterfaceId = x.virtualInterfaceId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy