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

commonMain.aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseEndpoint.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model



/**
 * Describes an endpoint for a database.
 */
public class RelationalDatabaseEndpoint private constructor(builder: Builder) {
    /**
     * Specifies the DNS address of the database.
     */
    public val address: kotlin.String? = builder.address
    /**
     * Specifies the port that the database is listening on.
     */
    public val port: kotlin.Int? = builder.port

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * Specifies the DNS address of the database.
         */
        public var address: kotlin.String? = null
        /**
         * Specifies the port that the database is listening on.
         */
        public var port: kotlin.Int? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseEndpoint = RelationalDatabaseEndpoint(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy