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

com.pulumi.googlenative.healthcare.v1.kotlin.ConsentArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.healthcare.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.healthcare.v1.ConsentArgs.builder
import com.pulumi.googlenative.healthcare.v1.kotlin.enums.ConsentState
import com.pulumi.googlenative.healthcare.v1.kotlin.inputs.GoogleCloudHealthcareV1ConsentPolicyArgs
import com.pulumi.googlenative.healthcare.v1.kotlin.inputs.GoogleCloudHealthcareV1ConsentPolicyArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a new Consent in the parent consent store.
 * @property consentArtifact The resource name of the Consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
 * @property consentStoreId
 * @property datasetId
 * @property expireTime Timestamp in UTC of when this Consent is considered expired.
 * @property location
 * @property metadata Optional. User-supplied key-value pairs used to organize Consent resources. Metadata keys must: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - begin with a letter - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes Metadata values must be: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes No more than 64 metadata entries can be associated with a given consent.
 * @property name Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.
 * @property policies Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
 * @property project
 * @property state Indicates the current state of this Consent.
 * @property ttl Input only. The time to live for this Consent from when it is created.
 * @property userId User's UUID provided by the client.
 */
public data class ConsentArgs(
    public val consentArtifact: Output? = null,
    public val consentStoreId: Output? = null,
    public val datasetId: Output? = null,
    public val expireTime: Output? = null,
    public val location: Output? = null,
    public val metadata: Output>? = null,
    public val name: Output? = null,
    public val policies: Output>? = null,
    public val project: Output? = null,
    public val state: Output? = null,
    public val ttl: Output? = null,
    public val userId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.healthcare.v1.ConsentArgs =
        com.pulumi.googlenative.healthcare.v1.ConsentArgs.builder()
            .consentArtifact(consentArtifact?.applyValue({ args0 -> args0 }))
            .consentStoreId(consentStoreId?.applyValue({ args0 -> args0 }))
            .datasetId(datasetId?.applyValue({ args0 -> args0 }))
            .expireTime(expireTime?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .policies(
                policies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .project(project?.applyValue({ args0 -> args0 }))
            .state(state?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ttl(ttl?.applyValue({ args0 -> args0 }))
            .userId(userId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConsentArgs].
 */
@PulumiTagMarker
public class ConsentArgsBuilder internal constructor() {
    private var consentArtifact: Output? = null

    private var consentStoreId: Output? = null

    private var datasetId: Output? = null

    private var expireTime: Output? = null

    private var location: Output? = null

    private var metadata: Output>? = null

    private var name: Output? = null

    private var policies: Output>? = null

    private var project: Output? = null

    private var state: Output? = null

    private var ttl: Output? = null

    private var userId: Output? = null

    /**
     * @param value The resource name of the Consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
     */
    @JvmName("kmsonexyggxmmjtf")
    public suspend fun consentArtifact(`value`: Output) {
        this.consentArtifact = value
    }

    /**
     * @param value
     */
    @JvmName("gubukqsqgsceulee")
    public suspend fun consentStoreId(`value`: Output) {
        this.consentStoreId = value
    }

    /**
     * @param value
     */
    @JvmName("vjvfwrshptdarrcl")
    public suspend fun datasetId(`value`: Output) {
        this.datasetId = value
    }

    /**
     * @param value Timestamp in UTC of when this Consent is considered expired.
     */
    @JvmName("hqmxwrdyolccdvpk")
    public suspend fun expireTime(`value`: Output) {
        this.expireTime = value
    }

    /**
     * @param value
     */
    @JvmName("aunpawlleblkrfny")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Optional. User-supplied key-value pairs used to organize Consent resources. Metadata keys must: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - begin with a letter - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes Metadata values must be: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes No more than 64 metadata entries can be associated with a given consent.
     */
    @JvmName("tyuntqjjtgeixjdp")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.
     */
    @JvmName("ieckdduraqdkymkj")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
     */
    @JvmName("jivdvgdyyypvwkgc")
    public suspend fun policies(`value`: Output>) {
        this.policies = value
    }

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

    /**
     * @param values Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
     */
    @JvmName("onjhyyjukkphkgvf")
    public suspend fun policies(values: List>) {
        this.policies = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("hbprwrvssveyffrq")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Indicates the current state of this Consent.
     */
    @JvmName("aummhlsicvlscdyq")
    public suspend fun state(`value`: Output) {
        this.state = value
    }

    /**
     * @param value Input only. The time to live for this Consent from when it is created.
     */
    @JvmName("frdmymvvwtpqwrev")
    public suspend fun ttl(`value`: Output) {
        this.ttl = value
    }

    /**
     * @param value User's UUID provided by the client.
     */
    @JvmName("halmrobsvvlwjgit")
    public suspend fun userId(`value`: Output) {
        this.userId = value
    }

    /**
     * @param value The resource name of the Consent artifact that contains proof of the end user's consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}`.
     */
    @JvmName("xipvlpijarcqqojb")
    public suspend fun consentArtifact(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.consentArtifact = mapped
    }

    /**
     * @param value
     */
    @JvmName("rgdorlgwjjpviewe")
    public suspend fun consentStoreId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.consentStoreId = mapped
    }

    /**
     * @param value
     */
    @JvmName("uvlhlfevqhmuswiq")
    public suspend fun datasetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.datasetId = mapped
    }

    /**
     * @param value Timestamp in UTC of when this Consent is considered expired.
     */
    @JvmName("akqrtxqsjxkpkfsu")
    public suspend fun expireTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expireTime = mapped
    }

    /**
     * @param value
     */
    @JvmName("qnxnogxsxhgvmniq")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Optional. User-supplied key-value pairs used to organize Consent resources. Metadata keys must: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - begin with a letter - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes Metadata values must be: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes No more than 64 metadata entries can be associated with a given consent.
     */
    @JvmName("jncynbcvwdybewln")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values Optional. User-supplied key-value pairs used to organize Consent resources. Metadata keys must: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - begin with a letter - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes Metadata values must be: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes No more than 64 metadata entries can be associated with a given consent.
     */
    @JvmName("mvkwwiupgqvxdjiv")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.
     */
    @JvmName("wlbcnfthqydernea")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
     */
    @JvmName("hlpgjaroacykoikc")
    public suspend fun policies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policies = mapped
    }

    /**
     * @param argument Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
     */
    @JvmName("wqfaasneafhcrgus")
    public suspend fun policies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GoogleCloudHealthcareV1ConsentPolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.policies = mapped
    }

    /**
     * @param argument Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
     */
    @JvmName("vkhfeqdpkrmpguov")
    public suspend fun policies(vararg argument: suspend GoogleCloudHealthcareV1ConsentPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GoogleCloudHealthcareV1ConsentPolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.policies = mapped
    }

    /**
     * @param argument Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
     */
    @JvmName("ufqodfisgfxrfneb")
    public suspend fun policies(argument: suspend GoogleCloudHealthcareV1ConsentPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GoogleCloudHealthcareV1ConsentPolicyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.policies = mapped
    }

    /**
     * @param values Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
     */
    @JvmName("xqoabiccrqbddmuy")
    public suspend fun policies(vararg values: GoogleCloudHealthcareV1ConsentPolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policies = mapped
    }

    /**
     * @param value
     */
    @JvmName("nwlbgwkhwovbsusc")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Indicates the current state of this Consent.
     */
    @JvmName("qbtalxuijqaaexeg")
    public suspend fun state(`value`: ConsentState?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value Input only. The time to live for this Consent from when it is created.
     */
    @JvmName("pxdtbjotfinwgxvn")
    public suspend fun ttl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ttl = mapped
    }

    /**
     * @param value User's UUID provided by the client.
     */
    @JvmName("bbhigtepuquxdffr")
    public suspend fun userId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userId = mapped
    }

    internal fun build(): ConsentArgs = ConsentArgs(
        consentArtifact = consentArtifact,
        consentStoreId = consentStoreId,
        datasetId = datasetId,
        expireTime = expireTime,
        location = location,
        metadata = metadata,
        name = name,
        policies = policies,
        project = project,
        state = state,
        ttl = ttl,
        userId = userId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy