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

com.pulumi.azure.healthcare.kotlin.MedtechServiceArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.healthcare.kotlin

import com.pulumi.azure.healthcare.MedtechServiceArgs.builder
import com.pulumi.azure.healthcare.kotlin.inputs.MedtechServiceIdentityArgs
import com.pulumi.azure.healthcare.kotlin.inputs.MedtechServiceIdentityArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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

/**
 * Manages a Healthcare Med Tech Service.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "east us",
 * });
 * const exampleWorkspace = new azure.healthcare.Workspace("example", {
 *     name: "examplewkspace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleMedtechService = new azure.healthcare.MedtechService("example", {
 *     name: "examplemed",
 *     workspaceId: exampleWorkspace.id,
 *     location: "east us",
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 *     eventhubNamespaceName: "example-eventhub-namespace",
 *     eventhubName: "example-eventhub",
 *     eventhubConsumerGroupName: "$Default",
 *     deviceMappingJson: JSON.stringify({
 *         templateType: "CollectionContent",
 *         template: [{
 *             templateType: "JsonPathContent",
 *             template: {
 *                 typeName: "heartrate",
 *                 typeMatchExpression: "$..[?(@heartrate)]",
 *                 deviceIdExpression: "$.deviceid",
 *                 timestampExpression: "$.measurementdatetime",
 *                 values: [{
 *                     required: "true",
 *                     valueExpression: "$.heartrate",
 *                     valueName: "hr",
 *                 }],
 *             },
 *         }],
 *     }),
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-rg",
 *     location="east us")
 * example_workspace = azure.healthcare.Workspace("example",
 *     name="examplewkspace",
 *     location=example.location,
 *     resource_group_name=example.name)
 * example_medtech_service = azure.healthcare.MedtechService("example",
 *     name="examplemed",
 *     workspace_id=example_workspace.id,
 *     location="east us",
 *     identity={
 *         "type": "SystemAssigned",
 *     },
 *     eventhub_namespace_name="example-eventhub-namespace",
 *     eventhub_name="example-eventhub",
 *     eventhub_consumer_group_name="$Default",
 *     device_mapping_json=json.dumps({
 *         "templateType": "CollectionContent",
 *         "template": [{
 *             "templateType": "JsonPathContent",
 *             "template": {
 *                 "typeName": "heartrate",
 *                 "typeMatchExpression": "$..[?(@heartrate)]",
 *                 "deviceIdExpression": "$.deviceid",
 *                 "timestampExpression": "$.measurementdatetime",
 *                 "values": [{
 *                     "required": "true",
 *                     "valueExpression": "$.heartrate",
 *                     "valueName": "hr",
 *                 }],
 *             },
 *         }],
 *     }))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-rg",
 *         Location = "east us",
 *     });
 *     var exampleWorkspace = new Azure.Healthcare.Workspace("example", new()
 *     {
 *         Name = "examplewkspace",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleMedtechService = new Azure.Healthcare.MedtechService("example", new()
 *     {
 *         Name = "examplemed",
 *         WorkspaceId = exampleWorkspace.Id,
 *         Location = "east us",
 *         Identity = new Azure.Healthcare.Inputs.MedtechServiceIdentityArgs
 *         {
 *             Type = "SystemAssigned",
 *         },
 *         EventhubNamespaceName = "example-eventhub-namespace",
 *         EventhubName = "example-eventhub",
 *         EventhubConsumerGroupName = "$Default",
 *         DeviceMappingJson = JsonSerializer.Serialize(new Dictionary
 *         {
 *             ["templateType"] = "CollectionContent",
 *             ["template"] = new[]
 *             {
 *                 new Dictionary
 *                 {
 *                     ["templateType"] = "JsonPathContent",
 *                     ["template"] = new Dictionary
 *                     {
 *                         ["typeName"] = "heartrate",
 *                         ["typeMatchExpression"] = "$..[?(@heartrate)]",
 *                         ["deviceIdExpression"] = "$.deviceid",
 *                         ["timestampExpression"] = "$.measurementdatetime",
 *                         ["values"] = new[]
 *                         {
 *                             new Dictionary
 *                             {
 *                                 ["required"] = "true",
 *                                 ["valueExpression"] = "$.heartrate",
 *                                 ["valueName"] = "hr",
 *                             },
 *                         },
 *                     },
 *                 },
 *             },
 *         }),
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/healthcare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-rg"),
 * 			Location: pulumi.String("east us"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleWorkspace, err := healthcare.NewWorkspace(ctx, "example", &healthcare.WorkspaceArgs{
 * 			Name:              pulumi.String("examplewkspace"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		tmpJSON0, err := json.Marshal(map[string]interface{}{
 * 			"templateType": "CollectionContent",
 * 			"template": []map[string]interface{}{
 * 				map[string]interface{}{
 * 					"templateType": "JsonPathContent",
 * 					"template": map[string]interface{}{
 * 						"typeName":            "heartrate",
 * 						"typeMatchExpression": "$..[?(@heartrate)]",
 * 						"deviceIdExpression":  "$.deviceid",
 * 						"timestampExpression": "$.measurementdatetime",
 * 						"values": []map[string]interface{}{
 * 							map[string]interface{}{
 * 								"required":        "true",
 * 								"valueExpression": "$.heartrate",
 * 								"valueName":       "hr",
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		_, err = healthcare.NewMedtechService(ctx, "example", &healthcare.MedtechServiceArgs{
 * 			Name:        pulumi.String("examplemed"),
 * 			WorkspaceId: exampleWorkspace.ID(),
 * 			Location:    pulumi.String("east us"),
 * 			Identity: &healthcare.MedtechServiceIdentityArgs{
 * 				Type: pulumi.String("SystemAssigned"),
 * 			},
 * 			EventhubNamespaceName:     pulumi.String("example-eventhub-namespace"),
 * 			EventhubName:              pulumi.String("example-eventhub"),
 * 			EventhubConsumerGroupName: pulumi.String("$Default"),
 * 			DeviceMappingJson:         pulumi.String(json0),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.healthcare.Workspace;
 * import com.pulumi.azure.healthcare.WorkspaceArgs;
 * import com.pulumi.azure.healthcare.MedtechService;
 * import com.pulumi.azure.healthcare.MedtechServiceArgs;
 * import com.pulumi.azure.healthcare.inputs.MedtechServiceIdentityArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-rg")
 *             .location("east us")
 *             .build());
 *         var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
 *             .name("examplewkspace")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleMedtechService = new MedtechService("exampleMedtechService", MedtechServiceArgs.builder()
 *             .name("examplemed")
 *             .workspaceId(exampleWorkspace.id())
 *             .location("east us")
 *             .identity(MedtechServiceIdentityArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .eventhubNamespaceName("example-eventhub-namespace")
 *             .eventhubName("example-eventhub")
 *             .eventhubConsumerGroupName("$Default")
 *             .deviceMappingJson(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("templateType", "CollectionContent"),
 *                     jsonProperty("template", jsonArray(jsonObject(
 *                         jsonProperty("templateType", "JsonPathContent"),
 *                         jsonProperty("template", jsonObject(
 *                             jsonProperty("typeName", "heartrate"),
 *                             jsonProperty("typeMatchExpression", "$..[?(@heartrate)]"),
 *                             jsonProperty("deviceIdExpression", "$.deviceid"),
 *                             jsonProperty("timestampExpression", "$.measurementdatetime"),
 *                             jsonProperty("values", jsonArray(jsonObject(
 *                                 jsonProperty("required", "true"),
 *                                 jsonProperty("valueExpression", "$.heartrate"),
 *                                 jsonProperty("valueName", "hr")
 *                             )))
 *                         ))
 *                     )))
 *                 )))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-rg
 *       location: east us
 *   exampleWorkspace:
 *     type: azure:healthcare:Workspace
 *     name: example
 *     properties:
 *       name: examplewkspace
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   exampleMedtechService:
 *     type: azure:healthcare:MedtechService
 *     name: example
 *     properties:
 *       name: examplemed
 *       workspaceId: ${exampleWorkspace.id}
 *       location: east us
 *       identity:
 *         type: SystemAssigned
 *       eventhubNamespaceName: example-eventhub-namespace
 *       eventhubName: example-eventhub
 *       eventhubConsumerGroupName: $Default
 *       deviceMappingJson:
 *         fn::toJSON:
 *           templateType: CollectionContent
 *           template:
 *             - templateType: JsonPathContent
 *               template:
 *                 typeName: heartrate
 *                 typeMatchExpression: $..[?(@heartrate)]
 *                 deviceIdExpression: $.deviceid
 *                 timestampExpression: $.measurementdatetime
 *                 values:
 *                   - required: 'true'
 *                     valueExpression: $.heartrate
 *                     valueName: hr
 * ```
 * 
 * ## Import
 * Healthcare Med Tech Service can be imported using the resource`id`, e.g.
 * ```sh
 * $ pulumi import azure:healthcare/medtechService:MedtechService example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotConnectors/iotconnector1
 * ```
 * @property deviceMappingJson Specifies the Device Mappings of the Med Tech Service.
 * @property eventhubConsumerGroupName Specifies the Consumer Group of the Event Hub to connect to.
 * @property eventhubName Specifies the name of the Event Hub to connect to.
 * @property eventhubNamespaceName Specifies the namespace name of the Event Hub to connect to.
 * @property identity An `identity` block as defined below.
 * @property location Specifies the Azure Region where the Healthcare Med Tech Service should be created. Changing this forces a new Healthcare Med Tech Service to be created.
 * @property name Specifies the name of the Healthcare Med Tech Service. Changing this forces a new Healthcare Med Tech Service to be created.
 * @property tags A mapping of tags to assign to the Healthcare Med Tech Service.
 * @property workspaceId Specifies the id of the Healthcare Workspace where the Healthcare Med Tech Service should exist. Changing this forces a new Healthcare Med Tech Service to be created.
 */
public data class MedtechServiceArgs(
    public val deviceMappingJson: Output? = null,
    public val eventhubConsumerGroupName: Output? = null,
    public val eventhubName: Output? = null,
    public val eventhubNamespaceName: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
    public val workspaceId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.healthcare.MedtechServiceArgs =
        com.pulumi.azure.healthcare.MedtechServiceArgs.builder()
            .deviceMappingJson(deviceMappingJson?.applyValue({ args0 -> args0 }))
            .eventhubConsumerGroupName(eventhubConsumerGroupName?.applyValue({ args0 -> args0 }))
            .eventhubName(eventhubName?.applyValue({ args0 -> args0 }))
            .eventhubNamespaceName(eventhubNamespaceName?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .workspaceId(workspaceId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [MedtechServiceArgs].
 */
@PulumiTagMarker
public class MedtechServiceArgsBuilder internal constructor() {
    private var deviceMappingJson: Output? = null

    private var eventhubConsumerGroupName: Output? = null

    private var eventhubName: Output? = null

    private var eventhubNamespaceName: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    private var workspaceId: Output? = null

    /**
     * @param value Specifies the Device Mappings of the Med Tech Service.
     */
    @JvmName("ddmoktywghoujdbt")
    public suspend fun deviceMappingJson(`value`: Output) {
        this.deviceMappingJson = value
    }

    /**
     * @param value Specifies the Consumer Group of the Event Hub to connect to.
     */
    @JvmName("rpgvmndgstxvbohg")
    public suspend fun eventhubConsumerGroupName(`value`: Output) {
        this.eventhubConsumerGroupName = value
    }

    /**
     * @param value Specifies the name of the Event Hub to connect to.
     */
    @JvmName("ncgrrqrrfsuvpofi")
    public suspend fun eventhubName(`value`: Output) {
        this.eventhubName = value
    }

    /**
     * @param value Specifies the namespace name of the Event Hub to connect to.
     */
    @JvmName("sthrnpheeqolpatt")
    public suspend fun eventhubNamespaceName(`value`: Output) {
        this.eventhubNamespaceName = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("rcvvufytmfigbmtg")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Specifies the Azure Region where the Healthcare Med Tech Service should be created. Changing this forces a new Healthcare Med Tech Service to be created.
     */
    @JvmName("rtrmnrsjvewyppef")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name of the Healthcare Med Tech Service. Changing this forces a new Healthcare Med Tech Service to be created.
     */
    @JvmName("iqatheloooyqugek")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A mapping of tags to assign to the Healthcare Med Tech Service.
     */
    @JvmName("armgrntrereugpgd")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Specifies the id of the Healthcare Workspace where the Healthcare Med Tech Service should exist. Changing this forces a new Healthcare Med Tech Service to be created.
     */
    @JvmName("bxfpfnfjeloitvub")
    public suspend fun workspaceId(`value`: Output) {
        this.workspaceId = value
    }

    /**
     * @param value Specifies the Device Mappings of the Med Tech Service.
     */
    @JvmName("cuvvvemcbxeuyhse")
    public suspend fun deviceMappingJson(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceMappingJson = mapped
    }

    /**
     * @param value Specifies the Consumer Group of the Event Hub to connect to.
     */
    @JvmName("kmacldmvjsncxxfr")
    public suspend fun eventhubConsumerGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventhubConsumerGroupName = mapped
    }

    /**
     * @param value Specifies the name of the Event Hub to connect to.
     */
    @JvmName("bnmiwuqxiyofbimc")
    public suspend fun eventhubName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventhubName = mapped
    }

    /**
     * @param value Specifies the namespace name of the Event Hub to connect to.
     */
    @JvmName("lsptufroirrbuxfi")
    public suspend fun eventhubNamespaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventhubNamespaceName = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("xhsdkogfrtdwnbdq")
    public suspend fun identity(`value`: MedtechServiceIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("xektklbaiydchlxi")
    public suspend fun identity(argument: suspend MedtechServiceIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = MedtechServiceIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Specifies the Azure Region where the Healthcare Med Tech Service should be created. Changing this forces a new Healthcare Med Tech Service to be created.
     */
    @JvmName("qwgjwsbyrmgbrgqb")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the name of the Healthcare Med Tech Service. Changing this forces a new Healthcare Med Tech Service to be created.
     */
    @JvmName("uqyquldcwgimeeup")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A mapping of tags to assign to the Healthcare Med Tech Service.
     */
    @JvmName("unbbwfqaxkvexchu")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the Healthcare Med Tech Service.
     */
    @JvmName("qrpukhcodnnbiyqo")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies the id of the Healthcare Workspace where the Healthcare Med Tech Service should exist. Changing this forces a new Healthcare Med Tech Service to be created.
     */
    @JvmName("qsyivjhchnxixbls")
    public suspend fun workspaceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceId = mapped
    }

    internal fun build(): MedtechServiceArgs = MedtechServiceArgs(
        deviceMappingJson = deviceMappingJson,
        eventhubConsumerGroupName = eventhubConsumerGroupName,
        eventhubName = eventhubName,
        eventhubNamespaceName = eventhubNamespaceName,
        identity = identity,
        location = location,
        name = name,
        tags = tags,
        workspaceId = workspaceId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy