// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.healthcare;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.healthcare.FhirServiceArgs;
import com.pulumi.azure.healthcare.inputs.FhirServiceState;
import com.pulumi.azure.healthcare.outputs.FhirServiceAuthentication;
import com.pulumi.azure.healthcare.outputs.FhirServiceCors;
import com.pulumi.azure.healthcare.outputs.FhirServiceIdentity;
import com.pulumi.azure.healthcare.outputs.FhirServiceOciArtifact;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Healthcare FHIR (Fast Healthcare Interoperability Resources) Service
 * 
 * ## Example Usage
 * ```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.core.CoreFunctions;
 * import com.pulumi.azure.healthcare.Workspace;
 * import com.pulumi.azure.healthcare.WorkspaceArgs;
 * import com.pulumi.azure.healthcare.FhirService;
 * import com.pulumi.azure.healthcare.FhirServiceArgs;
 * import com.pulumi.azure.healthcare.inputs.FhirServiceAuthenticationArgs;
 * import com.pulumi.azure.healthcare.inputs.FhirServiceIdentityArgs;
 * import com.pulumi.azure.healthcare.inputs.FhirServiceCorsArgs;
 * 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 exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         final var current = CoreFunctions.getClientConfig();
 * 
 *         var exampleWorkspace = new Workspace(&#34;exampleWorkspace&#34;, WorkspaceArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 * 
 *         var exampleFhirService = new FhirService(&#34;exampleFhirService&#34;, FhirServiceArgs.builder()        
 *             .location(&#34;east us&#34;)
 *             .resourceGroupName(&#34;tfex-resource_group&#34;)
 *             .workspaceId(exampleWorkspace.id())
 *             .kind(&#34;fhir-R4&#34;)
 *             .authentication(FhirServiceAuthenticationArgs.builder()
 *                 .authority(&#34;https://login.microsoftonline.com/tenantId&#34;)
 *                 .audience(&#34;https://tfexfhir.fhir.azurehealthcareapis.com&#34;)
 *                 .build())
 *             .accessPolicyObjectIds(current.applyValue(getClientConfigResult -&gt; getClientConfigResult.objectId()))
 *             .identity(FhirServiceIdentityArgs.builder()
 *                 .type(&#34;SystemAssigned&#34;)
 *                 .build())
 *             .containerRegistryLoginServerUrls(&#34;tfex-container_registry_login_server&#34;)
 *             .cors(FhirServiceCorsArgs.builder()
 *                 .allowedOrigins(                
 *                     &#34;https://tfex.com:123&#34;,
 *                     &#34;https://tfex1.com:3389&#34;)
 *                 .allowedHeaders(&#34;*&#34;)
 *                 .allowedMethods(                
 *                     &#34;GET&#34;,
 *                     &#34;DELETE&#34;,
 *                     &#34;PUT&#34;)
 *                 .maxAgeInSeconds(3600)
 *                 .credentialsAllowed(true)
 *                 .build())
 *             .configurationExportStorageAccountName(&#34;storage_account_name&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Healthcare FHIR Service can be imported using the resource`id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:healthcare/fhirService:FhirService example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.HealthcareApis/workspaces/workspace1/fhirServices/service1
 * ```
 * 
 */
@ResourceType(type="azure:healthcare/fhirService:FhirService")
public class FhirService extends com.pulumi.resources.CustomResource {
    /**
     * A list of the access policies of the service instance.
     * 
     */
    @Export(name="accessPolicyObjectIds", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> accessPolicyObjectIds;

    /**
     * @return A list of the access policies of the service instance.
     * 
     */
    public Output<Optional<List<String>>> accessPolicyObjectIds() {
        return Codegen.optional(this.accessPolicyObjectIds);
    }
    /**
     * An `authentication` block as defined below.
     * 
     */
    @Export(name="authentication", refs={FhirServiceAuthentication.class}, tree="[0]")
    private Output<FhirServiceAuthentication> authentication;

    /**
     * @return An `authentication` block as defined below.
     * 
     */
    public Output<FhirServiceAuthentication> authentication() {
        return this.authentication;
    }
    /**
     * Specifies the name of the storage account which the operation configuration information is exported to.
     * 
     */
    @Export(name="configurationExportStorageAccountName", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> configurationExportStorageAccountName;

    /**
     * @return Specifies the name of the storage account which the operation configuration information is exported to.
     * 
     */
    public Output<Optional<String>> configurationExportStorageAccountName() {
        return Codegen.optional(this.configurationExportStorageAccountName);
    }
    /**
     * A list of azure container registry settings used for convert data operation of the service instance.
     * 
     */
    @Export(name="containerRegistryLoginServerUrls", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> containerRegistryLoginServerUrls;

    /**
     * @return A list of azure container registry settings used for convert data operation of the service instance.
     * 
     */
    public Output<Optional<List<String>>> containerRegistryLoginServerUrls() {
        return Codegen.optional(this.containerRegistryLoginServerUrls);
    }
    /**
     * A `cors` block as defined below.
     * 
     */
    @Export(name="cors", refs={FhirServiceCors.class}, tree="[0]")
    private Output</* @Nullable */ FhirServiceCors> cors;

    /**
     * @return A `cors` block as defined below.
     * 
     */
    public Output<Optional<FhirServiceCors>> cors() {
        return Codegen.optional(this.cors);
    }
    /**
     * An `identity` block as defined below.
     * 
     */
    @Export(name="identity", refs={FhirServiceIdentity.class}, tree="[0]")
    private Output</* @Nullable */ FhirServiceIdentity> identity;

    /**
     * @return An `identity` block as defined below.
     * 
     */
    public Output<Optional<FhirServiceIdentity>> identity() {
        return Codegen.optional(this.identity);
    }
    /**
     * Specifies the kind of the Healthcare FHIR Service. Possible values are: `fhir-Stu3` and `fhir-R4`. Defaults to `fhir-R4`. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    @Export(name="kind", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> kind;

    /**
     * @return Specifies the kind of the Healthcare FHIR Service. Possible values are: `fhir-Stu3` and `fhir-R4`. Defaults to `fhir-R4`. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    public Output<Optional<String>> kind() {
        return Codegen.optional(this.kind);
    }
    /**
     * Specifies the Azure Region where the Healthcare FHIR Service should be created. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return Specifies the Azure Region where the Healthcare FHIR Service should be created. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * Specifies the name of the Healthcare FHIR Service. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return Specifies the name of the Healthcare FHIR Service. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * [A list](https://www.terraform.io/docs/configuration/attr-as-blocks.html) of objects describing [OCI artifacts for export](https://learn.microsoft.com/en-gb/azure/healthcare-apis/fhir/de-identified-export) as defined below.
     * 
     */
    @Export(name="ociArtifacts", refs={List.class,FhirServiceOciArtifact.class}, tree="[0,1]")
    private Output</* @Nullable */ List<FhirServiceOciArtifact>> ociArtifacts;

    /**
     * @return [A list](https://www.terraform.io/docs/configuration/attr-as-blocks.html) of objects describing [OCI artifacts for export](https://learn.microsoft.com/en-gb/azure/healthcare-apis/fhir/de-identified-export) as defined below.
     * 
     */
    public Output<Optional<List<FhirServiceOciArtifact>>> ociArtifacts() {
        return Codegen.optional(this.ociArtifacts);
    }
    /**
     * Whether public networks access is enabled.
     * 
     */
    @Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]")
    private Output<Boolean> publicNetworkAccessEnabled;

    /**
     * @return Whether public networks access is enabled.
     * 
     */
    public Output<Boolean> publicNetworkAccessEnabled() {
        return this.publicNetworkAccessEnabled;
    }
    /**
     * Specifies the name of the Resource Group in which to create the Healthcare FHIR Service. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return Specifies the name of the Resource Group in which to create the Healthcare FHIR Service. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * A mapping of tags to assign to the Healthcare FHIR Service.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the Healthcare FHIR Service.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * Specifies the id of the Healthcare Workspace where the Healthcare FHIR Service should exist. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    @Export(name="workspaceId", refs={String.class}, tree="[0]")
    private Output<String> workspaceId;

    /**
     * @return Specifies the id of the Healthcare Workspace where the Healthcare FHIR Service should exist. Changing this forces a new Healthcare FHIR Service to be created.
     * 
     */
    public Output<String> workspaceId() {
        return this.workspaceId;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public FhirService(String name) {
        this(name, FhirServiceArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public FhirService(String name, FhirServiceArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public FhirService(String name, FhirServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:healthcare/fhirService:FhirService", name, args == null ? FhirServiceArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private FhirService(String name, Output<String> id, @Nullable FhirServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:healthcare/fhirService:FhirService", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host 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
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static FhirService get(String name, Output<String> id, @Nullable FhirServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new FhirService(name, id, state, options);
    }
}
