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

commonMain.aws.sdk.kotlin.services.redshift.model.Endpoint.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.redshift.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes a connection endpoint.
 */
public class Endpoint private constructor(builder: Builder) {
    /**
     * The DNS address of the Cluster.
     */
    public val address: kotlin.String? = builder.address
    /**
     * The port that the database engine is listening on.
     */
    public val port: kotlin.Int? = builder.port
    /**
     * Describes a connection endpoint.
     */
    public val vpcEndpoints: List? = builder.vpcEndpoints

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

    override fun toString(): kotlin.String = buildString {
        append("Endpoint(")
        append("address=$address,")
        append("port=$port,")
        append("vpcEndpoints=$vpcEndpoints")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = address?.hashCode() ?: 0
        result = 31 * result + (port ?: 0)
        result = 31 * result + (vpcEndpoints?.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 Endpoint

        if (address != other.address) return false
        if (port != other.port) return false
        if (vpcEndpoints != other.vpcEndpoints) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The DNS address of the Cluster.
         */
        public var address: kotlin.String? = null
        /**
         * The port that the database engine is listening on.
         */
        public var port: kotlin.Int? = null
        /**
         * Describes a connection endpoint.
         */
        public var vpcEndpoints: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.Endpoint) : this() {
            this.address = x.address
            this.port = x.port
            this.vpcEndpoints = x.vpcEndpoints
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy