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

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

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

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



/**
 * Information about an Direct Connect location.
 */
public class Location private constructor(builder: Builder) {
    /**
     * The available MAC Security (MACsec) port speeds for the location.
     */
    public val availableMacSecPortSpeeds: List? = builder.availableMacSecPortSpeeds
    /**
     * The available port speeds for the location.
     */
    public val availablePortSpeeds: List? = builder.availablePortSpeeds
    /**
     * The name of the service provider for the location.
     */
    public val availableProviders: List? = builder.availableProviders
    /**
     * The code for the location.
     */
    public val locationCode: kotlin.String? = builder.locationCode
    /**
     * The name of the location. This includes the name of the colocation partner and the physical site of the building.
     */
    public val locationName: kotlin.String? = builder.locationName
    /**
     * The Amazon Web Services Region for the location.
     */
    public val region: kotlin.String? = builder.region

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

    override fun toString(): kotlin.String = buildString {
        append("Location(")
        append("availableMacSecPortSpeeds=$availableMacSecPortSpeeds,")
        append("availablePortSpeeds=$availablePortSpeeds,")
        append("availableProviders=$availableProviders,")
        append("locationCode=$locationCode,")
        append("locationName=$locationName,")
        append("region=$region")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = availableMacSecPortSpeeds?.hashCode() ?: 0
        result = 31 * result + (availablePortSpeeds?.hashCode() ?: 0)
        result = 31 * result + (availableProviders?.hashCode() ?: 0)
        result = 31 * result + (locationCode?.hashCode() ?: 0)
        result = 31 * result + (locationName?.hashCode() ?: 0)
        result = 31 * result + (region?.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 Location

        if (availableMacSecPortSpeeds != other.availableMacSecPortSpeeds) return false
        if (availablePortSpeeds != other.availablePortSpeeds) return false
        if (availableProviders != other.availableProviders) return false
        if (locationCode != other.locationCode) return false
        if (locationName != other.locationName) return false
        if (region != other.region) return false

        return true
    }

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

    public class Builder {
        /**
         * The available MAC Security (MACsec) port speeds for the location.
         */
        public var availableMacSecPortSpeeds: List? = null
        /**
         * The available port speeds for the location.
         */
        public var availablePortSpeeds: List? = null
        /**
         * The name of the service provider for the location.
         */
        public var availableProviders: List? = null
        /**
         * The code for the location.
         */
        public var locationCode: kotlin.String? = null
        /**
         * The name of the location. This includes the name of the colocation partner and the physical site of the building.
         */
        public var locationName: kotlin.String? = null
        /**
         * The Amazon Web Services Region for the location.
         */
        public var region: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.Location) : this() {
            this.availableMacSecPortSpeeds = x.availableMacSecPortSpeeds
            this.availablePortSpeeds = x.availablePortSpeeds
            this.availableProviders = x.availableProviders
            this.locationCode = x.locationCode
            this.locationName = x.locationName
            this.region = x.region
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy