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

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

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

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



/**
 * Information about the associated gateway.
 */
public class AssociatedGateway private constructor(builder: Builder) {
    /**
     * The ID of the associated gateway.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The ID of the Amazon Web Services account that owns the associated virtual private gateway or transit gateway.
     */
    public val ownerAccount: kotlin.String? = builder.ownerAccount
    /**
     * The Region where the associated gateway is located.
     */
    public val region: kotlin.String? = builder.region
    /**
     * The type of associated gateway.
     */
    public val type: aws.sdk.kotlin.services.directconnect.model.GatewayType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("AssociatedGateway(")
        append("id=$id,")
        append("ownerAccount=$ownerAccount,")
        append("region=$region,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = id?.hashCode() ?: 0
        result = 31 * result + (ownerAccount?.hashCode() ?: 0)
        result = 31 * result + (region?.hashCode() ?: 0)
        result = 31 * result + (type?.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 AssociatedGateway

        if (id != other.id) return false
        if (ownerAccount != other.ownerAccount) return false
        if (region != other.region) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the associated gateway.
         */
        public var id: kotlin.String? = null
        /**
         * The ID of the Amazon Web Services account that owns the associated virtual private gateway or transit gateway.
         */
        public var ownerAccount: kotlin.String? = null
        /**
         * The Region where the associated gateway is located.
         */
        public var region: kotlin.String? = null
        /**
         * The type of associated gateway.
         */
        public var type: aws.sdk.kotlin.services.directconnect.model.GatewayType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.AssociatedGateway) : this() {
            this.id = x.id
            this.ownerAccount = x.ownerAccount
            this.region = x.region
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy