"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MedtechServiceFhirDestination = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Healthcare Med Tech Service Fhir Destination.
 *
 * ## 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: "West Europe",
 * });
 * const current = azure.core.getClientConfig({});
 * const exampleWorkspace = new azure.healthcare.Workspace("example", {
 *     name: "exampleworkspace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("example", {
 *     name: "example-ehn",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 * });
 * const exampleEventHub = new azure.eventhub.EventHub("example", {
 *     name: "example-eh",
 *     namespaceId: exampleEventHubNamespace.id,
 *     partitionCount: 1,
 *     messageRetention: 1,
 * });
 * const exampleConsumerGroup = new azure.eventhub.ConsumerGroup("example", {
 *     name: "$default",
 *     namespaceName: exampleEventHubNamespace.name,
 *     eventhubName: exampleEventHub.name,
 *     resourceGroupName: example.name,
 * });
 * const exampleFhirService = new azure.healthcare.FhirService("example", {
 *     name: "examplefhir",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     workspaceId: exampleWorkspace.id,
 *     kind: "fhir-R4",
 *     authentication: {
 *         authority: "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 *         audience: "https://examplefhir.fhir.azurehealthcareapis.com",
 *     },
 * });
 * const exampleMedtechService = new azure.healthcare.MedtechService("example", {
 *     name: "examplemt",
 *     workspaceId: exampleWorkspace.id,
 *     location: example.location,
 *     eventhubNamespaceName: exampleEventHubNamespace.name,
 *     eventhubName: exampleEventHub.name,
 *     eventhubConsumerGroupName: exampleConsumerGroup.name,
 *     deviceMappingJson: JSON.stringify({
 *         templateType: "CollectionContent",
 *         template: [],
 *     }),
 * });
 * const exampleMedtechServiceFhirDestination = new azure.healthcare.MedtechServiceFhirDestination("example", {
 *     name: "examplemtdes",
 *     location: "east us",
 *     medtechServiceId: exampleMedtechService.id,
 *     destinationFhirServiceId: exampleFhirService.id,
 *     destinationIdentityResolutionType: "Create",
 *     destinationFhirMappingJson: JSON.stringify({
 *         templateType: "CollectionFhirTemplate",
 *         template: [{
 *             templateType: "CodeValueFhir",
 *             template: {
 *                 codes: [{
 *                     code: "8867-4",
 *                     system: "http://loinc.org",
 *                     display: "Heart rate",
 *                 }],
 *                 periodInterval: 60,
 *                 typeName: "heartrate",
 *                 value: {
 *                     defaultPeriod: 5000,
 *                     unit: "count/min",
 *                     valueName: "hr",
 *                     valueType: "SampledData",
 *                 },
 *             },
 *         }],
 *     }),
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.HealthcareApis` - 2022-12-01
 *
 * ## Import
 *
 * Healthcare Med Tech Service Fhir Destination can be imported using the resource`id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:healthcare/medtechServiceFhirDestination:MedtechServiceFhirDestination example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotConnectors/iotconnector1/fhirDestinations/destination1
 * ```
 */
class MedtechServiceFhirDestination extends pulumi.CustomResource {
    /**
     * Get an existing MedtechServiceFhirDestination resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new MedtechServiceFhirDestination(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:healthcare/medtechServiceFhirDestination:MedtechServiceFhirDestination';
    /**
     * Returns true if the given object is an instance of MedtechServiceFhirDestination.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === MedtechServiceFhirDestination.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["destinationFhirMappingJson"] = state?.destinationFhirMappingJson;
            resourceInputs["destinationFhirServiceId"] = state?.destinationFhirServiceId;
            resourceInputs["destinationIdentityResolutionType"] = state?.destinationIdentityResolutionType;
            resourceInputs["location"] = state?.location;
            resourceInputs["medtechServiceId"] = state?.medtechServiceId;
            resourceInputs["name"] = state?.name;
        }
        else {
            const args = argsOrState;
            if (args?.destinationFhirMappingJson === undefined && !opts.urn) {
                throw new Error("Missing required property 'destinationFhirMappingJson'");
            }
            if (args?.destinationFhirServiceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'destinationFhirServiceId'");
            }
            if (args?.destinationIdentityResolutionType === undefined && !opts.urn) {
                throw new Error("Missing required property 'destinationIdentityResolutionType'");
            }
            if (args?.medtechServiceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'medtechServiceId'");
            }
            resourceInputs["destinationFhirMappingJson"] = args?.destinationFhirMappingJson;
            resourceInputs["destinationFhirServiceId"] = args?.destinationFhirServiceId;
            resourceInputs["destinationIdentityResolutionType"] = args?.destinationIdentityResolutionType;
            resourceInputs["location"] = args?.location;
            resourceInputs["medtechServiceId"] = args?.medtechServiceId;
            resourceInputs["name"] = args?.name;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(MedtechServiceFhirDestination.__pulumiType, name, resourceInputs, opts);
    }
}
exports.MedtechServiceFhirDestination = MedtechServiceFhirDestination;
//# sourceMappingURL=medtechServiceFhirDestination.js.map