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

com.pulumi.googlenative.dataplex.v1.kotlin.Lake.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.dataplex.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.googlenative.dataplex.v1.kotlin.outputs.GoogleCloudDataplexV1AssetStatusResponse
import com.pulumi.googlenative.dataplex.v1.kotlin.outputs.GoogleCloudDataplexV1LakeMetastoreResponse
import com.pulumi.googlenative.dataplex.v1.kotlin.outputs.GoogleCloudDataplexV1LakeMetastoreStatusResponse
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.Map
import com.pulumi.googlenative.dataplex.v1.kotlin.outputs.GoogleCloudDataplexV1AssetStatusResponse.Companion.toKotlin as googleCloudDataplexV1AssetStatusResponseToKotlin
import com.pulumi.googlenative.dataplex.v1.kotlin.outputs.GoogleCloudDataplexV1LakeMetastoreResponse.Companion.toKotlin as googleCloudDataplexV1LakeMetastoreResponseToKotlin
import com.pulumi.googlenative.dataplex.v1.kotlin.outputs.GoogleCloudDataplexV1LakeMetastoreStatusResponse.Companion.toKotlin as googleCloudDataplexV1LakeMetastoreStatusResponseToKotlin

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

    public var args: LakeArgs = LakeArgs()

    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 LakeArgsBuilder.() -> Unit) {
        val builder = LakeArgsBuilder()
        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(): Lake {
        val builtJavaResource = com.pulumi.googlenative.dataplex.v1.Lake(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Lake(builtJavaResource)
    }
}

/**
 * Creates a lake resource.
 * Auto-naming is currently not supported for this resource.
 */
public class Lake internal constructor(
    override val javaResource: com.pulumi.googlenative.dataplex.v1.Lake,
) : KotlinCustomResource(javaResource, LakeMapper) {
    /**
     * Aggregated status of the underlying assets of the lake.
     */
    public val assetStatus: Output
        get() = javaResource.assetStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                googleCloudDataplexV1AssetStatusResponseToKotlin(args0)
            })
        })

    /**
     * The time when the lake was created.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * Optional. Description of the lake.
     */
    public val description: Output
        get() = javaResource.description().applyValue({ args0 -> args0 })

    /**
     * Optional. User friendly display name.
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * Optional. User-defined labels for the lake.
     */
    public val labels: Output>
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * Required. Lake identifier. This ID will be used to generate names such as database and dataset names when publishing metadata to Hive Metastore and BigQuery. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must end with a number or a letter. * Must be between 1-63 characters. * Must be unique within the customer project / location.
     */
    public val lakeId: Output
        get() = javaResource.lakeId().applyValue({ args0 -> args0 })

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

    /**
     * Optional. Settings to manage lake and Dataproc Metastore service instance association.
     */
    public val metastore: Output
        get() = javaResource.metastore().applyValue({ args0 ->
            args0.let({ args0 ->
                googleCloudDataplexV1LakeMetastoreResponseToKotlin(args0)
            })
        })

    /**
     * Metastore status of the lake.
     */
    public val metastoreStatus: Output
        get() = javaResource.metastoreStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                googleCloudDataplexV1LakeMetastoreStatusResponseToKotlin(args0)
            })
        })

    /**
     * The relative resource name of the lake, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

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

    /**
     * Service account associated with this lake. This service account must be authorized to access or operate on resources managed by the lake.
     */
    public val serviceAccount: Output
        get() = javaResource.serviceAccount().applyValue({ args0 -> args0 })

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

    /**
     * System generated globally unique ID for the lake. This ID will be different if the lake is deleted and re-created with the same name.
     */
    public val uid: Output
        get() = javaResource.uid().applyValue({ args0 -> args0 })

    /**
     * The time when the lake was last updated.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object LakeMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.dataplex.v1.Lake::class == javaResource::class

    override fun map(javaResource: Resource): Lake = Lake(
        javaResource as
            com.pulumi.googlenative.dataplex.v1.Lake,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy