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

com.pulumi.googlenative.dataplex.v1.kotlin.DataAttributeBinding.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.GoogleCloudDataplexV1DataAttributeBindingPathResponse
import com.pulumi.googlenative.dataplex.v1.kotlin.outputs.GoogleCloudDataplexV1DataAttributeBindingPathResponse.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 [DataAttributeBinding].
 */
@PulumiTagMarker
public class DataAttributeBindingResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: DataAttributeBindingArgs = DataAttributeBindingArgs()

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

/**
 * Create a DataAttributeBinding resource.
 * Auto-naming is currently not supported for this resource.
 */
public class DataAttributeBinding internal constructor(
    override val javaResource: com.pulumi.googlenative.dataplex.v1.DataAttributeBinding,
) : KotlinCustomResource(javaResource, DataAttributeBindingMapper) {
    /**
     * Optional. List of attributes to be associated with the resource, provided in the form: projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
     */
    public val attributes: Output>
        get() = javaResource.attributes().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

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

    /**
     * Required. DataAttributeBinding identifier. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the Location.
     */
    public val dataAttributeBindingId: Output
        get() = javaResource.dataAttributeBindingId().applyValue({ args0 -> args0 })

    /**
     * Optional. Description of the DataAttributeBinding.
     */
    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 })

    /**
     * This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. Etags must be used when calling the DeleteDataAttributeBinding and the UpdateDataAttributeBinding method.
     */
    public val etag: Output
        get() = javaResource.etag().applyValue({ args0 -> args0 })

    /**
     * Optional. User-defined labels for the DataAttributeBinding.
     */
    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 })

    /**
     * The relative resource name of the Data Attribute Binding, of the form: projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Optional. The list of paths for items within the associated resource (eg. columns and partitions within a table) along with attribute bindings.
     */
    public val paths: Output>
        get() = javaResource.paths().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    toKotlin(args0)
                })
            })
        })

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

    /**
     * Optional. Immutable. The resource name of the resource that is associated to attributes. Presently, only entity resource is supported in the form: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} Must belong in the same project and region as the attribute binding, and there can only exist one active binding for a resource.
     */
    public val resource: Output
        get() = javaResource.resource().applyValue({ args0 -> args0 })

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy