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

commonMain.aws.sdk.kotlin.services.datasync.model.DiscoveryServerConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.datasync.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The network settings that DataSync Discovery uses to connect with your on-premises storage system's management interface.
 */
public class DiscoveryServerConfiguration private constructor(builder: Builder) {
    /**
     * The domain name or IP address of your storage system's management interface.
     */
    public val serverHostname: kotlin.String = requireNotNull(builder.serverHostname) { "A non-null value must be provided for serverHostname" }
    /**
     * The network port for accessing the storage system's management interface.
     */
    public val serverPort: kotlin.Int? = builder.serverPort

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

    override fun toString(): kotlin.String = buildString {
        append("DiscoveryServerConfiguration(")
        append("serverHostname=$serverHostname,")
        append("serverPort=$serverPort")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = serverHostname.hashCode()
        result = 31 * result + (serverPort ?: 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 DiscoveryServerConfiguration

        if (serverHostname != other.serverHostname) return false
        if (serverPort != other.serverPort) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The domain name or IP address of your storage system's management interface.
         */
        public var serverHostname: kotlin.String? = null
        /**
         * The network port for accessing the storage system's management interface.
         */
        public var serverPort: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datasync.model.DiscoveryServerConfiguration) : this() {
            this.serverHostname = x.serverHostname
            this.serverPort = x.serverPort
        }

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

        internal fun correctErrors(): Builder {
            if (serverHostname == null) serverHostname = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy