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

com.pulumi.gcp.healthcare.kotlin.WorkspaceArgs.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.

There is a newer version: 8.13.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.healthcare.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.healthcare.WorkspaceArgs.builder
import com.pulumi.gcp.healthcare.kotlin.inputs.WorkspaceSettingsArgs
import com.pulumi.gcp.healthcare.kotlin.inputs.WorkspaceSettingsArgsBuilder
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.Map
import kotlin.jvm.JvmName

/**
 * A Data Mapper workspace is used to configure Data Mapper access, permissions and data sources for mapping clinical patient data to the FHIR standard.
 * To get more information about Workspace, see:
 * * [API documentation](https://cloud.google.com/healthcare-api/healthcare-data-engine/docs/reference/rest/v1/projects.locations.datasets.dataMapperWorkspaces)
 * * How-to Guides
 *     * [Create and manage Data Mapper workspaces ](https://cloud.google.com/healthcare-api/healthcare-data-engine/docs/manage-workspaces)
 * ## Example Usage
 * ### Healthcare Workspace Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const dataset = new gcp.healthcare.Dataset("dataset", {
 *     name: "example-dataset",
 *     location: "us-central1",
 * });
 * const _default = new gcp.healthcare.Workspace("default", {
 *     name: "example-dm-workspace",
 *     dataset: dataset.id,
 *     settings: {
 *         dataProjectIds: ["example-data-source-project-id"],
 *     },
 *     labels: {
 *         label1: "labelvalue1",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * dataset = gcp.healthcare.Dataset("dataset",
 *     name="example-dataset",
 *     location="us-central1")
 * default = gcp.healthcare.Workspace("default",
 *     name="example-dm-workspace",
 *     dataset=dataset.id,
 *     settings={
 *         "data_project_ids": ["example-data-source-project-id"],
 *     },
 *     labels={
 *         "label1": "labelvalue1",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var dataset = new Gcp.Healthcare.Dataset("dataset", new()
 *     {
 *         Name = "example-dataset",
 *         Location = "us-central1",
 *     });
 *     var @default = new Gcp.Healthcare.Workspace("default", new()
 *     {
 *         Name = "example-dm-workspace",
 *         Dataset = dataset.Id,
 *         Settings = new Gcp.Healthcare.Inputs.WorkspaceSettingsArgs
 *         {
 *             DataProjectIds = new[]
 *             {
 *                 "example-data-source-project-id",
 *             },
 *         },
 *         Labels =
 *         {
 *             { "label1", "labelvalue1" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/healthcare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		dataset, err := healthcare.NewDataset(ctx, "dataset", &healthcare.DatasetArgs{
 * 			Name:     pulumi.String("example-dataset"),
 * 			Location: pulumi.String("us-central1"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = healthcare.NewWorkspace(ctx, "default", &healthcare.WorkspaceArgs{
 * 			Name:    pulumi.String("example-dm-workspace"),
 * 			Dataset: dataset.ID(),
 * 			Settings: &healthcare.WorkspaceSettingsArgs{
 * 				DataProjectIds: pulumi.StringArray{
 * 					pulumi.String("example-data-source-project-id"),
 * 				},
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"label1": pulumi.String("labelvalue1"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.healthcare.Dataset;
 * import com.pulumi.gcp.healthcare.DatasetArgs;
 * import com.pulumi.gcp.healthcare.Workspace;
 * import com.pulumi.gcp.healthcare.WorkspaceArgs;
 * import com.pulumi.gcp.healthcare.inputs.WorkspaceSettingsArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var dataset = new Dataset("dataset", DatasetArgs.builder()
 *             .name("example-dataset")
 *             .location("us-central1")
 *             .build());
 *         var default_ = new Workspace("default", WorkspaceArgs.builder()
 *             .name("example-dm-workspace")
 *             .dataset(dataset.id())
 *             .settings(WorkspaceSettingsArgs.builder()
 *                 .dataProjectIds("example-data-source-project-id")
 *                 .build())
 *             .labels(Map.of("label1", "labelvalue1"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:healthcare:Workspace
 *     properties:
 *       name: example-dm-workspace
 *       dataset: ${dataset.id}
 *       settings:
 *         dataProjectIds:
 *           - example-data-source-project-id
 *       labels:
 *         label1: labelvalue1
 *   dataset:
 *     type: gcp:healthcare:Dataset
 *     properties:
 *       name: example-dataset
 *       location: us-central1
 * ```
 * 
 * ## Import
 * Workspace can be imported using any of these accepted formats:
 * * `{{dataset}}/dataMapperWorkspaces/{{name}}`
 * When using the `pulumi import` command, Workspace can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:healthcare/workspace:Workspace default {{dataset}}/dataMapperWorkspaces/{{name}}
 * ```
 * @property dataset Identifies the dataset addressed by this request. Must be in the format
 * 'projects/{project}/locations/{location}/datasets/{dataset}'
 * @property labels The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg",
 * "count": "3" } **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field 'effective_labels' for all of the labels present on the resource.
 * @property name The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
 * @property settings Settings associated with this workspace.
 * Structure is documented below.
 */
public data class WorkspaceArgs(
    public val dataset: Output? = null,
    public val labels: Output>? = null,
    public val name: Output? = null,
    public val settings: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.healthcare.WorkspaceArgs =
        com.pulumi.gcp.healthcare.WorkspaceArgs.builder()
            .dataset(dataset?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .name(name?.applyValue({ args0 -> args0 }))
            .settings(settings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [WorkspaceArgs].
 */
@PulumiTagMarker
public class WorkspaceArgsBuilder internal constructor() {
    private var dataset: Output? = null

    private var labels: Output>? = null

    private var name: Output? = null

    private var settings: Output? = null

    /**
     * @param value Identifies the dataset addressed by this request. Must be in the format
     * 'projects/{project}/locations/{location}/datasets/{dataset}'
     */
    @JvmName("ppaaklmkwdghhcfn")
    public suspend fun dataset(`value`: Output) {
        this.dataset = value
    }

    /**
     * @param value The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg",
     * "count": "3" } **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("cdgwcgmneqfujosa")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
     */
    @JvmName("fexeqjamjjqisxtd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Settings associated with this workspace.
     * Structure is documented below.
     */
    @JvmName("pckfoairdkkegomg")
    public suspend fun settings(`value`: Output) {
        this.settings = value
    }

    /**
     * @param value Identifies the dataset addressed by this request. Must be in the format
     * 'projects/{project}/locations/{location}/datasets/{dataset}'
     */
    @JvmName("gxwfbaviigkuvsnw")
    public suspend fun dataset(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataset = mapped
    }

    /**
     * @param value The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg",
     * "count": "3" } **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("plgdluaxvisjcdbh")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values The user labels. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg",
     * "count": "3" } **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("abadruiqriphnrae")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The name of the workspace, in the format 'projects/{projectId}/locations/{location}/datasets/{datasetId}/dataMapperWorkspaces/{workspaceId}'
     */
    @JvmName("akfdxclsacvnluqv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Settings associated with this workspace.
     * Structure is documented below.
     */
    @JvmName("pvldehiipmvakbvb")
    public suspend fun settings(`value`: WorkspaceSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.settings = mapped
    }

    /**
     * @param argument Settings associated with this workspace.
     * Structure is documented below.
     */
    @JvmName("rphkxaemqakhqqym")
    public suspend fun settings(argument: suspend WorkspaceSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = WorkspaceSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.settings = mapped
    }

    internal fun build(): WorkspaceArgs = WorkspaceArgs(
        dataset = dataset,
        labels = labels,
        name = name,
        settings = settings,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy