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

com.pulumi.digitalocean.kotlin.inputs.GetVolumeSnapshotPlainArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.digitalocean.inputs.GetVolumeSnapshotPlainArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * A collection of arguments for invoking getVolumeSnapshot.
 * @property mostRecent If more than one result is returned, use the most recent volume snapshot.
 * > **NOTE:** If more or less than a single match is returned by the search,
 * the provider will fail. Ensure that your search is specific enough to return
 * a single volume snapshot ID only, or use `most_recent` to choose the most recent one.
 * @property name The name of the volume snapshot.
 * @property nameRegex A regex string to apply to the volume snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
 * @property region A "slug" representing a DigitalOcean region (e.g. `nyc1`). If set, only volume snapshots available in the region will be returned.
 */
public data class GetVolumeSnapshotPlainArgs(
    public val mostRecent: Boolean? = null,
    public val name: String? = null,
    public val nameRegex: String? = null,
    public val region: String? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.GetVolumeSnapshotPlainArgs =
        com.pulumi.digitalocean.inputs.GetVolumeSnapshotPlainArgs.builder()
            .mostRecent(mostRecent?.let({ args0 -> args0 }))
            .name(name?.let({ args0 -> args0 }))
            .nameRegex(nameRegex?.let({ args0 -> args0 }))
            .region(region?.let({ args0 -> args0 })).build()
}

/**
 * Builder for [GetVolumeSnapshotPlainArgs].
 */
@PulumiTagMarker
public class GetVolumeSnapshotPlainArgsBuilder internal constructor() {
    private var mostRecent: Boolean? = null

    private var name: String? = null

    private var nameRegex: String? = null

    private var region: String? = null

    /**
     * @param value If more than one result is returned, use the most recent volume snapshot.
     * > **NOTE:** If more or less than a single match is returned by the search,
     * the provider will fail. Ensure that your search is specific enough to return
     * a single volume snapshot ID only, or use `most_recent` to choose the most recent one.
     */
    @JvmName("uftxtwobwqriugux")
    public suspend fun mostRecent(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.mostRecent = mapped
    }

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

    /**
     * @param value A regex string to apply to the volume snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
     */
    @JvmName("mbydbvqlcsqijcii")
    public suspend fun nameRegex(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.nameRegex = mapped
    }

    /**
     * @param value A "slug" representing a DigitalOcean region (e.g. `nyc1`). If set, only volume snapshots available in the region will be returned.
     */
    @JvmName("hymhkfcrprnbixxd")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.region = mapped
    }

    internal fun build(): GetVolumeSnapshotPlainArgs = GetVolumeSnapshotPlainArgs(
        mostRecent = mostRecent,
        name = name,
        nameRegex = nameRegex,
        region = region,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy