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

commonMain.aws.sdk.kotlin.services.fsx.model.CreateVolumeFromBackupRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.fsx.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateVolumeFromBackupRequest private constructor(builder: Builder) {
    /**
     * The ID of the source backup. Specifies the backup that you are copying.
     */
    public val backupId: kotlin.String? = builder.backupId
    /**
     * (Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
     */
    public val clientRequestToken: kotlin.String? = builder.clientRequestToken
    /**
     * The name of the new volume you're creating.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Specifies the configuration of the ONTAP volume that you are creating.
     */
    public val ontapConfiguration: aws.sdk.kotlin.services.fsx.model.CreateOntapVolumeConfiguration? = builder.ontapConfiguration
    /**
     * A list of `Tag` values, with a maximum of 50 elements.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateVolumeFromBackupRequest(")
        append("backupId=$backupId,")
        append("clientRequestToken=$clientRequestToken,")
        append("name=$name,")
        append("ontapConfiguration=$ontapConfiguration,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = backupId?.hashCode() ?: 0
        result = 31 * result + (clientRequestToken?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (ontapConfiguration?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateVolumeFromBackupRequest

        if (backupId != other.backupId) return false
        if (clientRequestToken != other.clientRequestToken) return false
        if (name != other.name) return false
        if (ontapConfiguration != other.ontapConfiguration) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the source backup. Specifies the backup that you are copying.
         */
        public var backupId: kotlin.String? = null
        /**
         * (Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
         */
        public var clientRequestToken: kotlin.String? = null
        /**
         * The name of the new volume you're creating.
         */
        public var name: kotlin.String? = null
        /**
         * Specifies the configuration of the ONTAP volume that you are creating.
         */
        public var ontapConfiguration: aws.sdk.kotlin.services.fsx.model.CreateOntapVolumeConfiguration? = null
        /**
         * A list of `Tag` values, with a maximum of 50 elements.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fsx.model.CreateVolumeFromBackupRequest) : this() {
            this.backupId = x.backupId
            this.clientRequestToken = x.clientRequestToken
            this.name = x.name
            this.ontapConfiguration = x.ontapConfiguration
            this.tags = x.tags
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy