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

com.pulumi.gcp.healthcare.kotlin.Hl7Store.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.healthcare.kotlin

import com.pulumi.core.Output
import com.pulumi.gcp.healthcare.kotlin.outputs.Hl7StoreNotificationConfig
import com.pulumi.gcp.healthcare.kotlin.outputs.Hl7StoreNotificationConfigs
import com.pulumi.gcp.healthcare.kotlin.outputs.Hl7StoreParserConfig
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.healthcare.kotlin.outputs.Hl7StoreNotificationConfig.Companion.toKotlin as hl7StoreNotificationConfigToKotlin
import com.pulumi.gcp.healthcare.kotlin.outputs.Hl7StoreNotificationConfigs.Companion.toKotlin as hl7StoreNotificationConfigsToKotlin
import com.pulumi.gcp.healthcare.kotlin.outputs.Hl7StoreParserConfig.Companion.toKotlin as hl7StoreParserConfigToKotlin

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

    public var args: Hl7StoreArgs = Hl7StoreArgs()

    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 Hl7StoreArgsBuilder.() -> Unit) {
        val builder = Hl7StoreArgsBuilder()
        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(): Hl7Store {
        val builtJavaResource = com.pulumi.gcp.healthcare.Hl7Store(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Hl7Store(builtJavaResource)
    }
}

/**
 * A Hl7V2Store is a datastore inside a Healthcare dataset that conforms to the FHIR (https://www.hl7.org/hl7V2/STU3/)
 * standard for Healthcare information exchange
 * To get more information about Hl7V2Store, see:
 * * [API documentation](https://cloud.google.com/healthcare/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores)
 * * How-to Guides
 *     * [Creating a HL7v2 Store](https://cloud.google.com/healthcare/docs/how-tos/hl7v2)
 * ## Example Usage
 * ### Healthcare Hl7 V2 Store Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const topic = new gcp.pubsub.Topic("topic", {name: "hl7-v2-notifications"});
 * const dataset = new gcp.healthcare.Dataset("dataset", {
 *     name: "example-dataset",
 *     location: "us-central1",
 * });
 * const store = new gcp.healthcare.Hl7Store("store", {
 *     name: "example-hl7-v2-store",
 *     dataset: dataset.id,
 *     rejectDuplicateMessage: true,
 *     notificationConfigs: [{
 *         pubsubTopic: topic.id,
 *     }],
 *     labels: {
 *         label1: "labelvalue1",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * topic = gcp.pubsub.Topic("topic", name="hl7-v2-notifications")
 * dataset = gcp.healthcare.Dataset("dataset",
 *     name="example-dataset",
 *     location="us-central1")
 * store = gcp.healthcare.Hl7Store("store",
 *     name="example-hl7-v2-store",
 *     dataset=dataset.id,
 *     reject_duplicate_message=True,
 *     notification_configs=[gcp.healthcare.Hl7StoreNotificationConfigsArgs(
 *         pubsub_topic=topic.id,
 *     )],
 *     labels={
 *         "label1": "labelvalue1",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var topic = new Gcp.PubSub.Topic("topic", new()
 *     {
 *         Name = "hl7-v2-notifications",
 *     });
 *     var dataset = new Gcp.Healthcare.Dataset("dataset", new()
 *     {
 *         Name = "example-dataset",
 *         Location = "us-central1",
 *     });
 *     var store = new Gcp.Healthcare.Hl7Store("store", new()
 *     {
 *         Name = "example-hl7-v2-store",
 *         Dataset = dataset.Id,
 *         RejectDuplicateMessage = true,
 *         NotificationConfigs = new[]
 *         {
 *             new Gcp.Healthcare.Inputs.Hl7StoreNotificationConfigsArgs
 *             {
 *                 PubsubTopic = topic.Id,
 *             },
 *         },
 *         Labels =
 *         {
 *             { "label1", "labelvalue1" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/healthcare"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/pubsub"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		topic, err := pubsub.NewTopic(ctx, "topic", &pubsub.TopicArgs{
 * 			Name: pulumi.String("hl7-v2-notifications"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		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.NewHl7Store(ctx, "store", &healthcare.Hl7StoreArgs{
 * 			Name:                   pulumi.String("example-hl7-v2-store"),
 * 			Dataset:                dataset.ID(),
 * 			RejectDuplicateMessage: pulumi.Bool(true),
 * 			NotificationConfigs: healthcare.Hl7StoreNotificationConfigsArray{
 * 				&healthcare.Hl7StoreNotificationConfigsArgs{
 * 					PubsubTopic: topic.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.pubsub.Topic;
 * import com.pulumi.gcp.pubsub.TopicArgs;
 * import com.pulumi.gcp.healthcare.Dataset;
 * import com.pulumi.gcp.healthcare.DatasetArgs;
 * import com.pulumi.gcp.healthcare.Hl7Store;
 * import com.pulumi.gcp.healthcare.Hl7StoreArgs;
 * import com.pulumi.gcp.healthcare.inputs.Hl7StoreNotificationConfigsArgs;
 * 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 topic = new Topic("topic", TopicArgs.builder()
 *             .name("hl7-v2-notifications")
 *             .build());
 *         var dataset = new Dataset("dataset", DatasetArgs.builder()
 *             .name("example-dataset")
 *             .location("us-central1")
 *             .build());
 *         var store = new Hl7Store("store", Hl7StoreArgs.builder()
 *             .name("example-hl7-v2-store")
 *             .dataset(dataset.id())
 *             .rejectDuplicateMessage(true)
 *             .notificationConfigs(Hl7StoreNotificationConfigsArgs.builder()
 *                 .pubsubTopic(topic.id())
 *                 .build())
 *             .labels(Map.of("label1", "labelvalue1"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   store:
 *     type: gcp:healthcare:Hl7Store
 *     properties:
 *       name: example-hl7-v2-store
 *       dataset: ${dataset.id}
 *       rejectDuplicateMessage: true
 *       notificationConfigs:
 *         - pubsubTopic: ${topic.id}
 *       labels:
 *         label1: labelvalue1
 *   topic:
 *     type: gcp:pubsub:Topic
 *     properties:
 *       name: hl7-v2-notifications
 *   dataset:
 *     type: gcp:healthcare:Dataset
 *     properties:
 *       name: example-dataset
 *       location: us-central1
 * ```
 * 
 * ### Healthcare Hl7 V2 Store Parser Config
 * 
 * ```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 store = new gcp.healthcare.Hl7Store("store", {
 *     name: "example-hl7-v2-store",
 *     dataset: dataset.id,
 *     parserConfig: {
 *         allowNullHeader: false,
 *         segmentTerminator: "Jw==",
 *         schema: `{
 *   "schemas": [{
 *     "messageSchemaConfigs": {
 *       "ADT_A01": {
 *         "name": "ADT_A01",
 *         "minOccurs": 1,
 *         "maxOccurs": 1,
 *         "members": [{
 *             "segment": {
 *               "type": "MSH",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "EVN",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PID",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "ZPD",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "OBX"
 *             }
 *           },
 *           {
 *             "group": {
 *               "name": "PROCEDURE",
 *               "members": [{
 *                   "segment": {
 *                     "type": "PR1",
 *                     "minOccurs": 1,
 *                     "maxOccurs": 1
 *                   }
 *                 },
 *                 {
 *                   "segment": {
 *                     "type": "ROL"
 *                   }
 *                 }
 *               ]
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PDA",
 *               "maxOccurs": 1
 *             }
 *           }
 *         ]
 *       }
 *     }
 *   }],
 *   "types": [{
 *     "type": [{
 *         "name": "ZPD",
 *         "primitive": "VARIES"
 *       }
 *     ]
 *   }],
 *   "ignoreMinOccurs": true
 * }
 * `,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * dataset = gcp.healthcare.Dataset("dataset",
 *     name="example-dataset",
 *     location="us-central1")
 * store = gcp.healthcare.Hl7Store("store",
 *     name="example-hl7-v2-store",
 *     dataset=dataset.id,
 *     parser_config=gcp.healthcare.Hl7StoreParserConfigArgs(
 *         allow_null_header=False,
 *         segment_terminator="Jw==",
 *         schema="""{
 *   "schemas": [{
 *     "messageSchemaConfigs": {
 *       "ADT_A01": {
 *         "name": "ADT_A01",
 *         "minOccurs": 1,
 *         "maxOccurs": 1,
 *         "members": [{
 *             "segment": {
 *               "type": "MSH",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "EVN",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PID",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "ZPD",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "OBX"
 *             }
 *           },
 *           {
 *             "group": {
 *               "name": "PROCEDURE",
 *               "members": [{
 *                   "segment": {
 *                     "type": "PR1",
 *                     "minOccurs": 1,
 *                     "maxOccurs": 1
 *                   }
 *                 },
 *                 {
 *                   "segment": {
 *                     "type": "ROL"
 *                   }
 *                 }
 *               ]
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PDA",
 *               "maxOccurs": 1
 *             }
 *           }
 *         ]
 *       }
 *     }
 *   }],
 *   "types": [{
 *     "type": [{
 *         "name": "ZPD",
 *         "primitive": "VARIES"
 *       }
 *     ]
 *   }],
 *   "ignoreMinOccurs": true
 * }
 * """,
 *     ))
 * ```
 * ```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 store = new Gcp.Healthcare.Hl7Store("store", new()
 *     {
 *         Name = "example-hl7-v2-store",
 *         Dataset = dataset.Id,
 *         ParserConfig = new Gcp.Healthcare.Inputs.Hl7StoreParserConfigArgs
 *         {
 *             AllowNullHeader = false,
 *             SegmentTerminator = "Jw==",
 *             Schema = @"{
 *   ""schemas"": [{
 *     ""messageSchemaConfigs"": {
 *       ""ADT_A01"": {
 *         ""name"": ""ADT_A01"",
 *         ""minOccurs"": 1,
 *         ""maxOccurs"": 1,
 *         ""members"": [{
 *             ""segment"": {
 *               ""type"": ""MSH"",
 *               ""minOccurs"": 1,
 *               ""maxOccurs"": 1
 *             }
 *           },
 *           {
 *             ""segment"": {
 *               ""type"": ""EVN"",
 *               ""minOccurs"": 1,
 *               ""maxOccurs"": 1
 *             }
 *           },
 *           {
 *             ""segment"": {
 *               ""type"": ""PID"",
 *               ""minOccurs"": 1,
 *               ""maxOccurs"": 1
 *             }
 *           },
 *           {
 *             ""segment"": {
 *               ""type"": ""ZPD"",
 *               ""minOccurs"": 1,
 *               ""maxOccurs"": 1
 *             }
 *           },
 *           {
 *             ""segment"": {
 *               ""type"": ""OBX""
 *             }
 *           },
 *           {
 *             ""group"": {
 *               ""name"": ""PROCEDURE"",
 *               ""members"": [{
 *                   ""segment"": {
 *                     ""type"": ""PR1"",
 *                     ""minOccurs"": 1,
 *                     ""maxOccurs"": 1
 *                   }
 *                 },
 *                 {
 *                   ""segment"": {
 *                     ""type"": ""ROL""
 *                   }
 *                 }
 *               ]
 *             }
 *           },
 *           {
 *             ""segment"": {
 *               ""type"": ""PDA"",
 *               ""maxOccurs"": 1
 *             }
 *           }
 *         ]
 *       }
 *     }
 *   }],
 *   ""types"": [{
 *     ""type"": [{
 *         ""name"": ""ZPD"",
 *         ""primitive"": ""VARIES""
 *       }
 *     ]
 *   }],
 *   ""ignoreMinOccurs"": true
 * }
 * ",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/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.NewHl7Store(ctx, "store", &healthcare.Hl7StoreArgs{
 * 			Name:    pulumi.String("example-hl7-v2-store"),
 * 			Dataset: dataset.ID(),
 * 			ParserConfig: &healthcare.Hl7StoreParserConfigArgs{
 * 				AllowNullHeader:   pulumi.Bool(false),
 * 				SegmentTerminator: pulumi.String("Jw=="),
 * 				Schema: pulumi.String(`{
 *   "schemas": [{
 *     "messageSchemaConfigs": {
 *       "ADT_A01": {
 *         "name": "ADT_A01",
 *         "minOccurs": 1,
 *         "maxOccurs": 1,
 *         "members": [{
 *             "segment": {
 *               "type": "MSH",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "EVN",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PID",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "ZPD",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "OBX"
 *             }
 *           },
 *           {
 *             "group": {
 *               "name": "PROCEDURE",
 *               "members": [{
 *                   "segment": {
 *                     "type": "PR1",
 *                     "minOccurs": 1,
 *                     "maxOccurs": 1
 *                   }
 *                 },
 *                 {
 *                   "segment": {
 *                     "type": "ROL"
 *                   }
 *                 }
 *               ]
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PDA",
 *               "maxOccurs": 1
 *             }
 *           }
 *         ]
 *       }
 *     }
 *   }],
 *   "types": [{
 *     "type": [{
 *         "name": "ZPD",
 *         "primitive": "VARIES"
 *       }
 *     ]
 *   }],
 *   "ignoreMinOccurs": true
 * }
 * `),
 * 			},
 * 		})
 * 		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.Hl7Store;
 * import com.pulumi.gcp.healthcare.Hl7StoreArgs;
 * import com.pulumi.gcp.healthcare.inputs.Hl7StoreParserConfigArgs;
 * 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 store = new Hl7Store("store", Hl7StoreArgs.builder()
 *             .name("example-hl7-v2-store")
 *             .dataset(dataset.id())
 *             .parserConfig(Hl7StoreParserConfigArgs.builder()
 *                 .allowNullHeader(false)
 *                 .segmentTerminator("Jw==")
 *                 .schema("""
 * {
 *   "schemas": [{
 *     "messageSchemaConfigs": {
 *       "ADT_A01": {
 *         "name": "ADT_A01",
 *         "minOccurs": 1,
 *         "maxOccurs": 1,
 *         "members": [{
 *             "segment": {
 *               "type": "MSH",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "EVN",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PID",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "ZPD",
 *               "minOccurs": 1,
 *               "maxOccurs": 1
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "OBX"
 *             }
 *           },
 *           {
 *             "group": {
 *               "name": "PROCEDURE",
 *               "members": [{
 *                   "segment": {
 *                     "type": "PR1",
 *                     "minOccurs": 1,
 *                     "maxOccurs": 1
 *                   }
 *                 },
 *                 {
 *                   "segment": {
 *                     "type": "ROL"
 *                   }
 *                 }
 *               ]
 *             }
 *           },
 *           {
 *             "segment": {
 *               "type": "PDA",
 *               "maxOccurs": 1
 *             }
 *           }
 *         ]
 *       }
 *     }
 *   }],
 *   "types": [{
 *     "type": [{
 *         "name": "ZPD",
 *         "primitive": "VARIES"
 *       }
 *     ]
 *   }],
 *   "ignoreMinOccurs": true
 * }
 *                 """)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   store:
 *     type: gcp:healthcare:Hl7Store
 *     properties:
 *       name: example-hl7-v2-store
 *       dataset: ${dataset.id}
 *       parserConfig:
 *         allowNullHeader: false
 *         segmentTerminator: Jw==
 *         schema: |
 *           {
 *             "schemas": [{
 *               "messageSchemaConfigs": {
 *                 "ADT_A01": {
 *                   "name": "ADT_A01",
 *                   "minOccurs": 1,
 *                   "maxOccurs": 1,
 *                   "members": [{
 *                       "segment": {
 *                         "type": "MSH",
 *                         "minOccurs": 1,
 *                         "maxOccurs": 1
 *                       }
 *                     },
 *                     {
 *                       "segment": {
 *                         "type": "EVN",
 *                         "minOccurs": 1,
 *                         "maxOccurs": 1
 *                       }
 *                     },
 *                     {
 *                       "segment": {
 *                         "type": "PID",
 *                         "minOccurs": 1,
 *                         "maxOccurs": 1
 *                       }
 *                     },
 *                     {
 *                       "segment": {
 *                         "type": "ZPD",
 *                         "minOccurs": 1,
 *                         "maxOccurs": 1
 *                       }
 *                     },
 *                     {
 *                       "segment": {
 *                         "type": "OBX"
 *                       }
 *                     },
 *                     {
 *                       "group": {
 *                         "name": "PROCEDURE",
 *                         "members": [{
 *                             "segment": {
 *                               "type": "PR1",
 *                               "minOccurs": 1,
 *                               "maxOccurs": 1
 *                             }
 *                           },
 *                           {
 *                             "segment": {
 *                               "type": "ROL"
 *                             }
 *                           }
 *                         ]
 *                       }
 *                     },
 *                     {
 *                       "segment": {
 *                         "type": "PDA",
 *                         "maxOccurs": 1
 *                       }
 *                     }
 *                   ]
 *                 }
 *               }
 *             }],
 *             "types": [{
 *               "type": [{
 *                   "name": "ZPD",
 *                   "primitive": "VARIES"
 *                 }
 *               ]
 *             }],
 *             "ignoreMinOccurs": true
 *           }
 *   dataset:
 *     type: gcp:healthcare:Dataset
 *     properties:
 *       name: example-dataset
 *       location: us-central1
 * ```
 * 
 * ### Healthcare Hl7 V2 Store Unschematized
 * 
 * ```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 store = new gcp.healthcare.Hl7Store("store", {
 *     name: "example-hl7-v2-store",
 *     dataset: dataset.id,
 *     parserConfig: {
 *         allowNullHeader: false,
 *         segmentTerminator: "Jw==",
 *         version: "V2",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * dataset = gcp.healthcare.Dataset("dataset",
 *     name="example-dataset",
 *     location="us-central1")
 * store = gcp.healthcare.Hl7Store("store",
 *     name="example-hl7-v2-store",
 *     dataset=dataset.id,
 *     parser_config=gcp.healthcare.Hl7StoreParserConfigArgs(
 *         allow_null_header=False,
 *         segment_terminator="Jw==",
 *         version="V2",
 *     ))
 * ```
 * ```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 store = new Gcp.Healthcare.Hl7Store("store", new()
 *     {
 *         Name = "example-hl7-v2-store",
 *         Dataset = dataset.Id,
 *         ParserConfig = new Gcp.Healthcare.Inputs.Hl7StoreParserConfigArgs
 *         {
 *             AllowNullHeader = false,
 *             SegmentTerminator = "Jw==",
 *             Version = "V2",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/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.NewHl7Store(ctx, "store", &healthcare.Hl7StoreArgs{
 * 			Name:    pulumi.String("example-hl7-v2-store"),
 * 			Dataset: dataset.ID(),
 * 			ParserConfig: &healthcare.Hl7StoreParserConfigArgs{
 * 				AllowNullHeader:   pulumi.Bool(false),
 * 				SegmentTerminator: pulumi.String("Jw=="),
 * 				Version:           pulumi.String("V2"),
 * 			},
 * 		})
 * 		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.Hl7Store;
 * import com.pulumi.gcp.healthcare.Hl7StoreArgs;
 * import com.pulumi.gcp.healthcare.inputs.Hl7StoreParserConfigArgs;
 * 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 store = new Hl7Store("store", Hl7StoreArgs.builder()
 *             .name("example-hl7-v2-store")
 *             .dataset(dataset.id())
 *             .parserConfig(Hl7StoreParserConfigArgs.builder()
 *                 .allowNullHeader(false)
 *                 .segmentTerminator("Jw==")
 *                 .version("V2")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   store:
 *     type: gcp:healthcare:Hl7Store
 *     properties:
 *       name: example-hl7-v2-store
 *       dataset: ${dataset.id}
 *       parserConfig:
 *         allowNullHeader: false
 *         segmentTerminator: Jw==
 *         version: V2
 *   dataset:
 *     type: gcp:healthcare:Dataset
 *     properties:
 *       name: example-dataset
 *       location: us-central1
 * ```
 * 
 * ## Import
 * Hl7V2Store can be imported using any of these accepted formats:
 * * `{{dataset}}/hl7V2Stores/{{name}}`
 * * `{{dataset}}/{{name}}`
 * When using the `pulumi import` command, Hl7V2Store can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:healthcare/hl7Store:Hl7Store default {{dataset}}/hl7V2Stores/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:healthcare/hl7Store:Hl7Store default {{dataset}}/{{name}}
 * ```
 */
public class Hl7Store internal constructor(
    override val javaResource: com.pulumi.gcp.healthcare.Hl7Store,
) : KotlinCustomResource(javaResource, Hl7StoreMapper) {
    /**
     * Identifies the dataset addressed by this request. Must be in the format
     * 'projects/{project}/locations/{location}/datasets/{dataset}'
     * - - -
     */
    public val dataset: Output
        get() = javaResource.dataset().applyValue({ args0 -> args0 })

    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    public val effectiveLabels: Output>
        get() = javaResource.effectiveLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * User-supplied key-value pairs used to organize HL7v2 stores.
     * Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must
     * conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
     * Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128
     * bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
     * No more than 64 labels can be associated with a given store.
     * 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.
     */
    public val labels: Output>?
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The resource name for the Hl7V2Store.
     * ** Changing this property may recreate the Hl7v2 store (removing all data) **
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * (Optional, Deprecated)
     * A nested object resource
     * Structure is documented below.
     * > **Warning:** `notification_config` is deprecated and will be removed in a future major release. Use `notification_configs` instead.
     */
    @Deprecated(
        message = """
  `notification_config` is deprecated and will be removed in a future major release. Use
      `notification_configs` instead.
  """,
    )
    public val notificationConfig: Output?
        get() = javaResource.notificationConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> hl7StoreNotificationConfigToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * A list of notification configs. Each configuration uses a filter to determine whether to publish a
     * message (both Ingest & Create) on the corresponding notification destination. Only the message name
     * is sent as part of the notification. Supplied by the client.
     * Structure is documented below.
     */
    public val notificationConfigs: Output>?
        get() = javaResource.notificationConfigs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        hl7StoreNotificationConfigsToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * A nested object resource
     * Structure is documented below.
     */
    public val parserConfig: Output
        get() = javaResource.parserConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                hl7StoreParserConfigToKotlin(args0)
            })
        })

    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    public val pulumiLabels: Output>
        get() = javaResource.pulumiLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * Determines whether duplicate messages are allowed.
     */
    public val rejectDuplicateMessage: Output?
        get() = javaResource.rejectDuplicateMessage().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The fully qualified name of this dataset
     */
    public val selfLink: Output
        get() = javaResource.selfLink().applyValue({ args0 -> args0 })
}

public object Hl7StoreMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.healthcare.Hl7Store::class == javaResource::class

    override fun map(javaResource: Resource): Hl7Store = Hl7Store(
        javaResource as
            com.pulumi.gcp.healthcare.Hl7Store,
    )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy