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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The DataSync agents that can connect to your Network File System (NFS) file server.
 */
public class OnPremConfig private constructor(builder: Builder) {
    /**
     * The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your NFS file server.
     *
     * You can specify more than one agent. For more information, see [Using multiple DataSync agents](https://docs.aws.amazon.com/datasync/latest/userguide/do-i-need-datasync-agent.html#multiple-agents).
     */
    public val agentArns: List = requireNotNull(builder.agentArns) { "A non-null value must be provided for agentArns" }

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

    override fun toString(): kotlin.String = buildString {
        append("OnPremConfig(")
        append("agentArns=$agentArns")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = agentArns.hashCode()
        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 OnPremConfig

        if (agentArns != other.agentArns) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your NFS file server.
         *
         * You can specify more than one agent. For more information, see [Using multiple DataSync agents](https://docs.aws.amazon.com/datasync/latest/userguide/do-i-need-datasync-agent.html#multiple-agents).
         */
        public var agentArns: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datasync.model.OnPremConfig) : this() {
            this.agentArns = x.agentArns
        }

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

        internal fun correctErrors(): Builder {
            if (agentArns == null) agentArns = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy