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

com.pulumi.googlenative.baremetalsolution.v2.kotlin.NfsShare.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.baremetalsolution.v2.kotlin

import com.pulumi.core.Output
import com.pulumi.googlenative.baremetalsolution.v2.kotlin.outputs.AllowedClientResponse
import com.pulumi.googlenative.baremetalsolution.v2.kotlin.outputs.AllowedClientResponse.Companion.toKotlin
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map

/**
 * Builder for [NfsShare].
 */
@PulumiTagMarker
public class NfsShareResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: NfsShareArgs = NfsShareArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend NfsShareArgsBuilder.() -> Unit) {
        val builder = NfsShareArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): NfsShare {
        val builtJavaResource =
            com.pulumi.googlenative.baremetalsolution.v2.NfsShare(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return NfsShare(builtJavaResource)
    }
}

/**
 * Create an NFS share.
 */
public class NfsShare internal constructor(
    override val javaResource: com.pulumi.googlenative.baremetalsolution.v2.NfsShare,
) : KotlinCustomResource(javaResource, NfsShareMapper) {
    /**
     * List of allowed access points.
     */
    public val allowedClients: Output>
        get() = javaResource.allowedClients().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> toKotlin(args0) })
            })
        })

    /**
     * Labels as key value pairs.
     */
    public val labels: Output>
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Immutable. The name of the NFS share.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * An identifier for the NFS share, generated by the backend. This field will be deprecated in the future, use `id` instead.
     */
    public val nfsShareId: Output
        get() = javaResource.nfsShareId().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * The requested size, in GiB.
     */
    public val requestedSizeGib: Output
        get() = javaResource.requestedSizeGib().applyValue({ args0 -> args0 })

    /**
     * The state of the NFS share.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0 })

    /**
     * Immutable. The storage type of the underlying volume.
     */
    public val storageType: Output
        get() = javaResource.storageType().applyValue({ args0 -> args0 })

    /**
     * The underlying volume of the share. Created automatically during provisioning.
     */
    public val volume: Output
        get() = javaResource.volume().applyValue({ args0 -> args0 })
}

public object NfsShareMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.baremetalsolution.v2.NfsShare::class == javaResource::class

    override fun map(javaResource: Resource): NfsShare = NfsShare(
        javaResource as
            com.pulumi.googlenative.baremetalsolution.v2.NfsShare,
    )
}

/**
 * @see [NfsShare].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [NfsShare].
 */
public suspend fun nfsShare(name: String, block: suspend NfsShareResourceBuilder.() -> Unit): NfsShare {
    val builder = NfsShareResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [NfsShare].
 * @param name The _unique_ name of the resulting resource.
 */
public fun nfsShare(name: String): NfsShare {
    val builder = NfsShareResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy