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

com.pulumi.gcp.filestore.kotlin.inputs.InstanceFileSharesArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.filestore.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.filestore.inputs.InstanceFileSharesArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property capacityGb File share capacity in GiB. This must be at least 1024 GiB
 * for the standard tier, or 2560 GiB for the premium tier.
 * @property name The name of the fileshare (16 characters or less)
 * @property nfsExportOptions Nfs Export Options. There is a limit of 10 export options per file share.
 * Structure is documented below.
 * @property sourceBackup The resource name of the backup, in the format
 * projects/{projectId}/locations/{locationId}/backups/{backupId},
 * that this file share has been restored from.
 */
public data class InstanceFileSharesArgs(
    public val capacityGb: Output,
    public val name: Output,
    public val nfsExportOptions: Output>? = null,
    public val sourceBackup: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.filestore.inputs.InstanceFileSharesArgs =
        com.pulumi.gcp.filestore.inputs.InstanceFileSharesArgs.builder()
            .capacityGb(capacityGb.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .nfsExportOptions(
                nfsExportOptions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .sourceBackup(sourceBackup?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceFileSharesArgs].
 */
@PulumiTagMarker
public class InstanceFileSharesArgsBuilder internal constructor() {
    private var capacityGb: Output? = null

    private var name: Output? = null

    private var nfsExportOptions: Output>? = null

    private var sourceBackup: Output? = null

    /**
     * @param value File share capacity in GiB. This must be at least 1024 GiB
     * for the standard tier, or 2560 GiB for the premium tier.
     */
    @JvmName("iorjtwdijavkjqci")
    public suspend fun capacityGb(`value`: Output) {
        this.capacityGb = value
    }

    /**
     * @param value The name of the fileshare (16 characters or less)
     */
    @JvmName("bsimwuursopikgex")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Nfs Export Options. There is a limit of 10 export options per file share.
     * Structure is documented below.
     */
    @JvmName("irqunlpxfcpxxlxm")
    public suspend fun nfsExportOptions(`value`: Output>) {
        this.nfsExportOptions = value
    }

    @JvmName("ljrwecikrctyvnqb")
    public suspend fun nfsExportOptions(vararg values: Output) {
        this.nfsExportOptions = Output.all(values.asList())
    }

    /**
     * @param values Nfs Export Options. There is a limit of 10 export options per file share.
     * Structure is documented below.
     */
    @JvmName("xijnidcgreodheap")
    public suspend fun nfsExportOptions(values: List>) {
        this.nfsExportOptions = Output.all(values)
    }

    /**
     * @param value The resource name of the backup, in the format
     * projects/{projectId}/locations/{locationId}/backups/{backupId},
     * that this file share has been restored from.
     */
    @JvmName("dyrtfjhtvnxxcdhq")
    public suspend fun sourceBackup(`value`: Output) {
        this.sourceBackup = value
    }

    /**
     * @param value File share capacity in GiB. This must be at least 1024 GiB
     * for the standard tier, or 2560 GiB for the premium tier.
     */
    @JvmName("yfuvfjocxvsmjvjy")
    public suspend fun capacityGb(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.capacityGb = mapped
    }

    /**
     * @param value The name of the fileshare (16 characters or less)
     */
    @JvmName("ysgvqaloefskctkl")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Nfs Export Options. There is a limit of 10 export options per file share.
     * Structure is documented below.
     */
    @JvmName("jlbsyigpsaikmexl")
    public suspend fun nfsExportOptions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nfsExportOptions = mapped
    }

    /**
     * @param argument Nfs Export Options. There is a limit of 10 export options per file share.
     * Structure is documented below.
     */
    @JvmName("hwxxihxvmiywnjnt")
    public suspend fun nfsExportOptions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceFileSharesNfsExportOptionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.nfsExportOptions = mapped
    }

    /**
     * @param argument Nfs Export Options. There is a limit of 10 export options per file share.
     * Structure is documented below.
     */
    @JvmName("esfeuxltlfsmkrij")
    public suspend fun nfsExportOptions(vararg argument: suspend InstanceFileSharesNfsExportOptionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceFileSharesNfsExportOptionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.nfsExportOptions = mapped
    }

    /**
     * @param argument Nfs Export Options. There is a limit of 10 export options per file share.
     * Structure is documented below.
     */
    @JvmName("bufoyifbjyymnrhr")
    public suspend fun nfsExportOptions(argument: suspend InstanceFileSharesNfsExportOptionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstanceFileSharesNfsExportOptionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.nfsExportOptions = mapped
    }

    /**
     * @param values Nfs Export Options. There is a limit of 10 export options per file share.
     * Structure is documented below.
     */
    @JvmName("ebdfynhqajddkdbl")
    public suspend fun nfsExportOptions(vararg values: InstanceFileSharesNfsExportOptionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nfsExportOptions = mapped
    }

    /**
     * @param value The resource name of the backup, in the format
     * projects/{projectId}/locations/{locationId}/backups/{backupId},
     * that this file share has been restored from.
     */
    @JvmName("bjfuvpjjiwvjyqgq")
    public suspend fun sourceBackup(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceBackup = mapped
    }

    internal fun build(): InstanceFileSharesArgs = InstanceFileSharesArgs(
        capacityGb = capacityGb ?: throw PulumiNullFieldException("capacityGb"),
        name = name ?: throw PulumiNullFieldException("name"),
        nfsExportOptions = nfsExportOptions,
        sourceBackup = sourceBackup,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy