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

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

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

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



public class CreateInterconnectRequest private constructor(builder: Builder) {
    /**
     * The port bandwidth, in Gbps. The possible values are 1 and 10.
     */
    public val bandwidth: kotlin.String? = builder.bandwidth
    /**
     * The name of the interconnect.
     */
    public val interconnectName: kotlin.String? = builder.interconnectName
    /**
     * The ID of the LAG.
     */
    public val lagId: kotlin.String? = builder.lagId
    /**
     * The location of the interconnect.
     */
    public val location: kotlin.String? = builder.location
    /**
     * The name of the service provider associated with the interconnect.
     */
    public val providerName: kotlin.String? = builder.providerName
    /**
     * The tags to associate with the interconnect.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateInterconnectRequest(")
        append("bandwidth=$bandwidth,")
        append("interconnectName=$interconnectName,")
        append("lagId=$lagId,")
        append("location=$location,")
        append("providerName=$providerName,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bandwidth?.hashCode() ?: 0
        result = 31 * result + (interconnectName?.hashCode() ?: 0)
        result = 31 * result + (lagId?.hashCode() ?: 0)
        result = 31 * result + (location?.hashCode() ?: 0)
        result = 31 * result + (providerName?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateInterconnectRequest

        if (bandwidth != other.bandwidth) return false
        if (interconnectName != other.interconnectName) return false
        if (lagId != other.lagId) return false
        if (location != other.location) return false
        if (providerName != other.providerName) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * The port bandwidth, in Gbps. The possible values are 1 and 10.
         */
        public var bandwidth: kotlin.String? = null
        /**
         * The name of the interconnect.
         */
        public var interconnectName: kotlin.String? = null
        /**
         * The ID of the LAG.
         */
        public var lagId: kotlin.String? = null
        /**
         * The location of the interconnect.
         */
        public var location: kotlin.String? = null
        /**
         * The name of the service provider associated with the interconnect.
         */
        public var providerName: kotlin.String? = null
        /**
         * The tags to associate with the interconnect.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.CreateInterconnectRequest) : this() {
            this.bandwidth = x.bandwidth
            this.interconnectName = x.interconnectName
            this.lagId = x.lagId
            this.location = x.location
            this.providerName = x.providerName
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            if (bandwidth == null) bandwidth = ""
            if (interconnectName == null) interconnectName = ""
            if (location == null) location = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy