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

commonMain.aws.sdk.kotlin.services.datasync.model.FsxProtocolSmb.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

/**
 * Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your Amazon FSx for NetApp ONTAP file system. For more information, see [Accessing FSx for ONTAP file systems](https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-access).
 */
public class FsxProtocolSmb private constructor(builder: Builder) {
    /**
     * Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.
     *
     * If you have multiple domains in your environment, configuring this setting makes sure that DataSync connects to the right SVM.
     */
    public val domain: kotlin.String? = builder.domain
    /**
     * Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
     */
    public val mountOptions: aws.sdk.kotlin.services.datasync.model.SmbMountOptions? = builder.mountOptions
    /**
     * Specifies the password of a user who has permission to access your SVM.
     */
    public val password: kotlin.String = requireNotNull(builder.password) { "A non-null value must be provided for password" }
    /**
     * Specifies a user that can mount and access the files, folders, and metadata in your SVM.
     *
     * For information about choosing a user with the right level of access for your transfer, see [Using the SMB protocol](https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-smb).
     */
    public val user: kotlin.String = requireNotNull(builder.user) { "A non-null value must be provided for user" }

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

    override fun toString(): kotlin.String = buildString {
        append("FsxProtocolSmb(")
        append("domain=$domain,")
        append("mountOptions=$mountOptions,")
        append("password=*** Sensitive Data Redacted ***,")
        append("user=$user")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = domain?.hashCode() ?: 0
        result = 31 * result + (mountOptions?.hashCode() ?: 0)
        result = 31 * result + (password.hashCode())
        result = 31 * result + (user.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 FsxProtocolSmb

        if (domain != other.domain) return false
        if (mountOptions != other.mountOptions) return false
        if (password != other.password) return false
        if (user != other.user) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.
         *
         * If you have multiple domains in your environment, configuring this setting makes sure that DataSync connects to the right SVM.
         */
        public var domain: kotlin.String? = null
        /**
         * Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
         */
        public var mountOptions: aws.sdk.kotlin.services.datasync.model.SmbMountOptions? = null
        /**
         * Specifies the password of a user who has permission to access your SVM.
         */
        public var password: kotlin.String? = null
        /**
         * Specifies a user that can mount and access the files, folders, and metadata in your SVM.
         *
         * For information about choosing a user with the right level of access for your transfer, see [Using the SMB protocol](https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-smb).
         */
        public var user: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datasync.model.FsxProtocolSmb) : this() {
            this.domain = x.domain
            this.mountOptions = x.mountOptions
            this.password = x.password
            this.user = x.user
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.datasync.model.SmbMountOptions] inside the given [block]
         */
        public fun mountOptions(block: aws.sdk.kotlin.services.datasync.model.SmbMountOptions.Builder.() -> kotlin.Unit) {
            this.mountOptions = aws.sdk.kotlin.services.datasync.model.SmbMountOptions.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy