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

com.pulumi.nomad.kotlin.ExternalVolumeArgs.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: 2.4.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.nomad.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.nomad.ExternalVolumeArgs.builder
import com.pulumi.nomad.kotlin.inputs.ExternalVolumeCapabilityArgs
import com.pulumi.nomad.kotlin.inputs.ExternalVolumeCapabilityArgsBuilder
import com.pulumi.nomad.kotlin.inputs.ExternalVolumeMountOptionsArgs
import com.pulumi.nomad.kotlin.inputs.ExternalVolumeMountOptionsArgsBuilder
import com.pulumi.nomad.kotlin.inputs.ExternalVolumeTopologyRequestArgs
import com.pulumi.nomad.kotlin.inputs.ExternalVolumeTopologyRequestArgsBuilder
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * Creating a volume:
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as nomad from "@pulumi/nomad";
 * // It can sometimes be helpful to wait for a particular plugin to be available
 * const ebs = nomad.getPlugin({
 *     pluginId: "aws-ebs0",
 *     waitForHealthy: true,
 * });
 * const mysqlVolume = new nomad.ExternalVolume("mysql_volume", {
 *     type: "csi",
 *     pluginId: "aws-ebs0",
 *     volumeId: "mysql_volume",
 *     name: "mysql_volume",
 *     capacityMin: "10GiB",
 *     capacityMax: "20GiB",
 *     capabilities: [{
 *         accessMode: "single-node-writer",
 *         attachmentMode: "file-system",
 *     }],
 *     mountOptions: {
 *         fsType: "ext4",
 *     },
 *     topologyRequest: {
 *         required: {
 *             topologies: [
 *                 {
 *                     segments: {
 *                         rack: "R1",
 *                         zone: "us-east-1a",
 *                     },
 *                 },
 *                 {
 *                     segments: {
 *                         rack: "R2",
 *                     },
 *                 },
 *             ],
 *         },
 *     },
 * }, {
 *     dependsOn: [ebs],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_nomad as nomad
 * # It can sometimes be helpful to wait for a particular plugin to be available
 * ebs = nomad.get_plugin(plugin_id="aws-ebs0",
 *     wait_for_healthy=True)
 * mysql_volume = nomad.ExternalVolume("mysql_volume",
 *     type="csi",
 *     plugin_id="aws-ebs0",
 *     volume_id="mysql_volume",
 *     name="mysql_volume",
 *     capacity_min="10GiB",
 *     capacity_max="20GiB",
 *     capabilities=[{
 *         "access_mode": "single-node-writer",
 *         "attachment_mode": "file-system",
 *     }],
 *     mount_options={
 *         "fs_type": "ext4",
 *     },
 *     topology_request={
 *         "required": {
 *             "topologies": [
 *                 {
 *                     "segments": {
 *                         "rack": "R1",
 *                         "zone": "us-east-1a",
 *                     },
 *                 },
 *                 {
 *                     "segments": {
 *                         "rack": "R2",
 *                     },
 *                 },
 *             ],
 *         },
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[ebs]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Nomad = Pulumi.Nomad;
 * return await Deployment.RunAsync(() =>
 * {
 *     // It can sometimes be helpful to wait for a particular plugin to be available
 *     var ebs = Nomad.GetPlugin.Invoke(new()
 *     {
 *         PluginId = "aws-ebs0",
 *         WaitForHealthy = true,
 *     });
 *     var mysqlVolume = new Nomad.ExternalVolume("mysql_volume", new()
 *     {
 *         Type = "csi",
 *         PluginId = "aws-ebs0",
 *         VolumeId = "mysql_volume",
 *         Name = "mysql_volume",
 *         CapacityMin = "10GiB",
 *         CapacityMax = "20GiB",
 *         Capabilities = new[]
 *         {
 *             new Nomad.Inputs.ExternalVolumeCapabilityArgs
 *             {
 *                 AccessMode = "single-node-writer",
 *                 AttachmentMode = "file-system",
 *             },
 *         },
 *         MountOptions = new Nomad.Inputs.ExternalVolumeMountOptionsArgs
 *         {
 *             FsType = "ext4",
 *         },
 *         TopologyRequest = new Nomad.Inputs.ExternalVolumeTopologyRequestArgs
 *         {
 *             Required = new Nomad.Inputs.ExternalVolumeTopologyRequestRequiredArgs
 *             {
 *                 Topologies = new[]
 *                 {
 *                     new Nomad.Inputs.ExternalVolumeTopologyRequestRequiredTopologyArgs
 *                     {
 *                         Segments =
 *                         {
 *                             { "rack", "R1" },
 *                             { "zone", "us-east-1a" },
 *                         },
 *                     },
 *                     new Nomad.Inputs.ExternalVolumeTopologyRequestRequiredTopologyArgs
 *                     {
 *                         Segments =
 *                         {
 *                             { "rack", "R2" },
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             ebs,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		// It can sometimes be helpful to wait for a particular plugin to be available
 * 		ebs, err := nomad.GetPlugin(ctx, &nomad.GetPluginArgs{
 * 			PluginId:       "aws-ebs0",
 * 			WaitForHealthy: pulumi.BoolRef(true),
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = nomad.NewExternalVolume(ctx, "mysql_volume", &nomad.ExternalVolumeArgs{
 * 			Type:        pulumi.String("csi"),
 * 			PluginId:    pulumi.String("aws-ebs0"),
 * 			VolumeId:    pulumi.String("mysql_volume"),
 * 			Name:        pulumi.String("mysql_volume"),
 * 			CapacityMin: pulumi.String("10GiB"),
 * 			CapacityMax: pulumi.String("20GiB"),
 * 			Capabilities: nomad.ExternalVolumeCapabilityArray{
 * 				&nomad.ExternalVolumeCapabilityArgs{
 * 					AccessMode:     pulumi.String("single-node-writer"),
 * 					AttachmentMode: pulumi.String("file-system"),
 * 				},
 * 			},
 * 			MountOptions: &nomad.ExternalVolumeMountOptionsArgs{
 * 				FsType: pulumi.String("ext4"),
 * 			},
 * 			TopologyRequest: &nomad.ExternalVolumeTopologyRequestArgs{
 * 				Required: &nomad.ExternalVolumeTopologyRequestRequiredArgs{
 * 					Topologies: nomad.ExternalVolumeTopologyRequestRequiredTopologyArray{
 * 						&nomad.ExternalVolumeTopologyRequestRequiredTopologyArgs{
 * 							Segments: pulumi.StringMap{
 * 								"rack": pulumi.String("R1"),
 * 								"zone": pulumi.String("us-east-1a"),
 * 							},
 * 						},
 * 						&nomad.ExternalVolumeTopologyRequestRequiredTopologyArgs{
 * 							Segments: pulumi.StringMap{
 * 								"rack": pulumi.String("R2"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			ebs,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.nomad.NomadFunctions;
 * import com.pulumi.nomad.inputs.GetPluginArgs;
 * import com.pulumi.nomad.ExternalVolume;
 * import com.pulumi.nomad.ExternalVolumeArgs;
 * import com.pulumi.nomad.inputs.ExternalVolumeCapabilityArgs;
 * import com.pulumi.nomad.inputs.ExternalVolumeMountOptionsArgs;
 * import com.pulumi.nomad.inputs.ExternalVolumeTopologyRequestArgs;
 * import com.pulumi.nomad.inputs.ExternalVolumeTopologyRequestRequiredArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         // It can sometimes be helpful to wait for a particular plugin to be available
 *         final var ebs = NomadFunctions.getPlugin(GetPluginArgs.builder()
 *             .pluginId("aws-ebs0")
 *             .waitForHealthy(true)
 *             .build());
 *         var mysqlVolume = new ExternalVolume("mysqlVolume", ExternalVolumeArgs.builder()
 *             .type("csi")
 *             .pluginId("aws-ebs0")
 *             .volumeId("mysql_volume")
 *             .name("mysql_volume")
 *             .capacityMin("10GiB")
 *             .capacityMax("20GiB")
 *             .capabilities(ExternalVolumeCapabilityArgs.builder()
 *                 .accessMode("single-node-writer")
 *                 .attachmentMode("file-system")
 *                 .build())
 *             .mountOptions(ExternalVolumeMountOptionsArgs.builder()
 *                 .fsType("ext4")
 *                 .build())
 *             .topologyRequest(ExternalVolumeTopologyRequestArgs.builder()
 *                 .required(ExternalVolumeTopologyRequestRequiredArgs.builder()
 *                     .topologies(
 *                         ExternalVolumeTopologyRequestRequiredTopologyArgs.builder()
 *                             .segments(Map.ofEntries(
 *                                 Map.entry("rack", "R1"),
 *                                 Map.entry("zone", "us-east-1a")
 *                             ))
 *                             .build(),
 *                         ExternalVolumeTopologyRequestRequiredTopologyArgs.builder()
 *                             .segments(Map.of("rack", "R2"))
 *                             .build())
 *                     .build())
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(ebs.applyValue(getPluginResult -> getPluginResult))
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   mysqlVolume:
 *     type: nomad:ExternalVolume
 *     name: mysql_volume
 *     properties:
 *       type: csi
 *       pluginId: aws-ebs0
 *       volumeId: mysql_volume
 *       name: mysql_volume
 *       capacityMin: 10GiB
 *       capacityMax: 20GiB
 *       capabilities:
 *         - accessMode: single-node-writer
 *           attachmentMode: file-system
 *       mountOptions:
 *         fsType: ext4
 *       topologyRequest:
 *         required:
 *           topologies:
 *             - segments:
 *                 rack: R1
 *                 zone: us-east-1a
 *             - segments:
 *                 rack: R2
 *     options:
 *       dependson:
 *         - ${ebs}
 * variables:
 *   # It can sometimes be helpful to wait for a particular plugin to be available
 *   ebs:
 *     fn::invoke:
 *       Function: nomad:getPlugin
 *       Arguments:
 *         pluginId: aws-ebs0
 *         waitForHealthy: true
 * ```
 * 
 * @property capabilities `(``Capability``: )` - Options for validating the capability of a volume.
 * @property capacityMax `(string: )` - Option to signal a maximum volume size. This may not be supported by all storage providers.
 * @property capacityMin `(string: )` - Option to signal a minimum volume size. This may not be supported by all storage providers.
 * @property cloneId `(string: )` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshot_id`.
 * @property mountOptions `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
 * @property name `(string: )` - The display name for the volume.
 * @property namespace `(string: "default")` - The namespace in which to register the volume.
 * @property parameters `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
 * @property pluginId `(string: )` - The ID of the Nomad plugin for registering this volume.
 * @property secrets `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
 * @property snapshotId `(string: )` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `clone_id`.
 * @property topologyRequest `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
 * @property type `(string: )` - The type of the volume. Currently, only `csi` is supported.
 * @property volumeId `(string: )` - The unique ID of the volume.
 */
public data class ExternalVolumeArgs(
    public val capabilities: Output>? = null,
    public val capacityMax: Output? = null,
    public val capacityMin: Output? = null,
    public val cloneId: Output? = null,
    public val mountOptions: Output? = null,
    public val name: Output? = null,
    public val namespace: Output? = null,
    public val parameters: Output>? = null,
    public val pluginId: Output? = null,
    public val secrets: Output>? = null,
    public val snapshotId: Output? = null,
    public val topologyRequest: Output? = null,
    public val type: Output? = null,
    public val volumeId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.nomad.ExternalVolumeArgs =
        com.pulumi.nomad.ExternalVolumeArgs.builder()
            .capabilities(
                capabilities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .capacityMax(capacityMax?.applyValue({ args0 -> args0 }))
            .capacityMin(capacityMin?.applyValue({ args0 -> args0 }))
            .cloneId(cloneId?.applyValue({ args0 -> args0 }))
            .mountOptions(mountOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .pluginId(pluginId?.applyValue({ args0 -> args0 }))
            .secrets(secrets?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .snapshotId(snapshotId?.applyValue({ args0 -> args0 }))
            .topologyRequest(topologyRequest?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type?.applyValue({ args0 -> args0 }))
            .volumeId(volumeId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ExternalVolumeArgs].
 */
@PulumiTagMarker
public class ExternalVolumeArgsBuilder internal constructor() {
    private var capabilities: Output>? = null

    private var capacityMax: Output? = null

    private var capacityMin: Output? = null

    private var cloneId: Output? = null

    private var mountOptions: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    private var parameters: Output>? = null

    private var pluginId: Output? = null

    private var secrets: Output>? = null

    private var snapshotId: Output? = null

    private var topologyRequest: Output? = null

    private var type: Output? = null

    private var volumeId: Output? = null

    /**
     * @param value `(``Capability``: )` - Options for validating the capability of a volume.
     */
    @JvmName("tlcjwggsrepklokj")
    public suspend fun capabilities(`value`: Output>) {
        this.capabilities = value
    }

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

    /**
     * @param values `(``Capability``: )` - Options for validating the capability of a volume.
     */
    @JvmName("qsjarepcthornilq")
    public suspend fun capabilities(values: List>) {
        this.capabilities = Output.all(values)
    }

    /**
     * @param value `(string: )` - Option to signal a maximum volume size. This may not be supported by all storage providers.
     */
    @JvmName("hgvmlcqxnvayigxm")
    public suspend fun capacityMax(`value`: Output) {
        this.capacityMax = value
    }

    /**
     * @param value `(string: )` - Option to signal a minimum volume size. This may not be supported by all storage providers.
     */
    @JvmName("yqscwedylnethqeq")
    public suspend fun capacityMin(`value`: Output) {
        this.capacityMin = value
    }

    /**
     * @param value `(string: )` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshot_id`.
     */
    @JvmName("bpxpxistfofkkuma")
    public suspend fun cloneId(`value`: Output) {
        this.cloneId = value
    }

    /**
     * @param value `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
     */
    @JvmName("xfxigqklsmheuobb")
    public suspend fun mountOptions(`value`: Output) {
        this.mountOptions = value
    }

    /**
     * @param value `(string: )` - The display name for the volume.
     */
    @JvmName("xcpjdpwqplllrvhm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value `(string: "default")` - The namespace in which to register the volume.
     */
    @JvmName("awncjfouiwwwukyq")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
     */
    @JvmName("wrjxtufwnkggavyd")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value `(string: )` - The ID of the Nomad plugin for registering this volume.
     */
    @JvmName("nadglairsjpvjxmh")
    public suspend fun pluginId(`value`: Output) {
        this.pluginId = value
    }

    /**
     * @param value `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
     */
    @JvmName("tgcxswfbrfemwuci")
    public suspend fun secrets(`value`: Output>) {
        this.secrets = value
    }

    /**
     * @param value `(string: )` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `clone_id`.
     */
    @JvmName("whvyoufgklccpdvy")
    public suspend fun snapshotId(`value`: Output) {
        this.snapshotId = value
    }

    /**
     * @param value `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
     */
    @JvmName("pxroseicjrjnbtcy")
    public suspend fun topologyRequest(`value`: Output) {
        this.topologyRequest = value
    }

    /**
     * @param value `(string: )` - The type of the volume. Currently, only `csi` is supported.
     */
    @JvmName("dfxvxbhxplynxigp")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value `(string: )` - The unique ID of the volume.
     */
    @JvmName("asrnbvfgwaaunhog")
    public suspend fun volumeId(`value`: Output) {
        this.volumeId = value
    }

    /**
     * @param value `(``Capability``: )` - Options for validating the capability of a volume.
     */
    @JvmName("funhvaumiuesjkrb")
    public suspend fun capabilities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capabilities = mapped
    }

    /**
     * @param argument `(``Capability``: )` - Options for validating the capability of a volume.
     */
    @JvmName("qvulcmchyhdhdpak")
    public suspend fun capabilities(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ExternalVolumeCapabilityArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.capabilities = mapped
    }

    /**
     * @param argument `(``Capability``: )` - Options for validating the capability of a volume.
     */
    @JvmName("bhqwyunfnveafebp")
    public suspend fun capabilities(vararg argument: suspend ExternalVolumeCapabilityArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ExternalVolumeCapabilityArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.capabilities = mapped
    }

    /**
     * @param argument `(``Capability``: )` - Options for validating the capability of a volume.
     */
    @JvmName("dkwcoiknnalercxp")
    public suspend fun capabilities(argument: suspend ExternalVolumeCapabilityArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ExternalVolumeCapabilityArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.capabilities = mapped
    }

    /**
     * @param values `(``Capability``: )` - Options for validating the capability of a volume.
     */
    @JvmName("fguevkusryqygulj")
    public suspend fun capabilities(vararg values: ExternalVolumeCapabilityArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.capabilities = mapped
    }

    /**
     * @param value `(string: )` - Option to signal a maximum volume size. This may not be supported by all storage providers.
     */
    @JvmName("aycewfuwexpxbcqh")
    public suspend fun capacityMax(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityMax = mapped
    }

    /**
     * @param value `(string: )` - Option to signal a minimum volume size. This may not be supported by all storage providers.
     */
    @JvmName("ngtiyewtvvrrxpnr")
    public suspend fun capacityMin(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityMin = mapped
    }

    /**
     * @param value `(string: )` - The external ID of an existing volume to restore. If ommited, the volume will be created from scratch. Conflicts with `snapshot_id`.
     */
    @JvmName("prdlxgulhcyhxcmj")
    public suspend fun cloneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloneId = mapped
    }

    /**
     * @param value `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
     */
    @JvmName("vvlmhieymnnnwpxn")
    public suspend fun mountOptions(`value`: ExternalVolumeMountOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mountOptions = mapped
    }

    /**
     * @param argument `(block: optional)` Options for mounting `block-device` volumes without a pre-formatted file system.
     */
    @JvmName("lfhxjgsimhdttmxc")
    public suspend fun mountOptions(argument: suspend ExternalVolumeMountOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = ExternalVolumeMountOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.mountOptions = mapped
    }

    /**
     * @param value `(string: )` - The display name for the volume.
     */
    @JvmName("wrpvvcewjodmdwcf")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value `(string: "default")` - The namespace in which to register the volume.
     */
    @JvmName("skrvjqbxgnbljvrc")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
     */
    @JvmName("ycpqunotsqbgjelo")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values `(map[string]string: optional)` An optional key-value map of strings passed directly to the CSI plugin to configure the volume.
     */
    @JvmName("rmensbvimhyxsjqp")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value `(string: )` - The ID of the Nomad plugin for registering this volume.
     */
    @JvmName("yxpcckonaupudavm")
    public suspend fun pluginId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pluginId = mapped
    }

    /**
     * @param value `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
     */
    @JvmName("xxylmlfcgkobhdbb")
    public suspend fun secrets(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param values `(map[string]string: optional)` An optional key-value map of strings used as credentials for publishing and unpublishing volumes.
     */
    @JvmName("awrmhbjespxipwic")
    public fun secrets(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param value `(string: )` - The external ID of a snapshot to restore. If ommited, the volume will be created from scratch. Conflicts with `clone_id`.
     */
    @JvmName("pdaoqeiyqrjuduiv")
    public suspend fun snapshotId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshotId = mapped
    }

    /**
     * @param value `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
     */
    @JvmName("sjgqsofdfekdkkcb")
    public suspend fun topologyRequest(`value`: ExternalVolumeTopologyRequestArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topologyRequest = mapped
    }

    /**
     * @param argument `(``TopologyRequest``: )` - Specify locations (region, zone, rack, etc.) where the provisioned volume is accessible from.
     */
    @JvmName("eulimvhqsjnqgdup")
    public suspend fun topologyRequest(argument: suspend ExternalVolumeTopologyRequestArgsBuilder.() -> Unit) {
        val toBeMapped = ExternalVolumeTopologyRequestArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.topologyRequest = mapped
    }

    /**
     * @param value `(string: )` - The type of the volume. Currently, only `csi` is supported.
     */
    @JvmName("krxbsorvsommnfpv")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value `(string: )` - The unique ID of the volume.
     */
    @JvmName("bynycerylagkeihm")
    public suspend fun volumeId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeId = mapped
    }

    internal fun build(): ExternalVolumeArgs = ExternalVolumeArgs(
        capabilities = capabilities,
        capacityMax = capacityMax,
        capacityMin = capacityMin,
        cloneId = cloneId,
        mountOptions = mountOptions,
        name = name,
        namespace = namespace,
        parameters = parameters,
        pluginId = pluginId,
        secrets = secrets,
        snapshotId = snapshotId,
        topologyRequest = topologyRequest,
        type = type,
        volumeId = volumeId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy