// *** 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.iot;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.iot.IotHubDpsArgs;
import com.pulumi.azure.iot.inputs.IotHubDpsState;
import com.pulumi.azure.iot.outputs.IotHubDpsIpFilterRule;
import com.pulumi.azure.iot.outputs.IotHubDpsLinkedHub;
import com.pulumi.azure.iot.outputs.IotHubDpsSku;
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 an IotHub Device Provisioning 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.iot.IotHubDps;
 * import com.pulumi.azure.iot.IotHubDpsArgs;
 * import com.pulumi.azure.iot.inputs.IotHubDpsSkuArgs;
 * 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());
 * 
 *         var exampleIotHubDps = new IotHubDps(&#34;exampleIotHubDps&#34;, IotHubDpsArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .allocationPolicy(&#34;Hashed&#34;)
 *             .sku(IotHubDpsSkuArgs.builder()
 *                 .name(&#34;S1&#34;)
 *                 .capacity(&#34;1&#34;)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * IoT Device Provisioning Service can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:iot/iotHubDps:IotHubDps example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/provisioningServices/example
 * ```
 * 
 */
@ResourceType(type="azure:iot/iotHubDps:IotHubDps")
public class IotHubDps extends com.pulumi.resources.CustomResource {
    /**
     * The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
     * 
     */
    @Export(name="allocationPolicy", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> allocationPolicy;

    /**
     * @return The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
     * 
     */
    public Output<Optional<String>> allocationPolicy() {
        return Codegen.optional(this.allocationPolicy);
    }
    /**
     * Specifies if the IoT Device Provisioning Service has data residency and disaster recovery enabled. Defaults to `false`. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="dataResidencyEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> dataResidencyEnabled;

    /**
     * @return Specifies if the IoT Device Provisioning Service has data residency and disaster recovery enabled. Defaults to `false`. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<Boolean>> dataResidencyEnabled() {
        return Codegen.optional(this.dataResidencyEnabled);
    }
    /**
     * The device endpoint of the IoT Device Provisioning Service.
     * 
     */
    @Export(name="deviceProvisioningHostName", refs={String.class}, tree="[0]")
    private Output<String> deviceProvisioningHostName;

    /**
     * @return The device endpoint of the IoT Device Provisioning Service.
     * 
     */
    public Output<String> deviceProvisioningHostName() {
        return this.deviceProvisioningHostName;
    }
    /**
     * The unique identifier of the IoT Device Provisioning Service.
     * 
     */
    @Export(name="idScope", refs={String.class}, tree="[0]")
    private Output<String> idScope;

    /**
     * @return The unique identifier of the IoT Device Provisioning Service.
     * 
     */
    public Output<String> idScope() {
        return this.idScope;
    }
    /**
     * An `ip_filter_rule` block as defined below.
     * 
     */
    @Export(name="ipFilterRules", refs={List.class,IotHubDpsIpFilterRule.class}, tree="[0,1]")
    private Output</* @Nullable */ List<IotHubDpsIpFilterRule>> ipFilterRules;

    /**
     * @return An `ip_filter_rule` block as defined below.
     * 
     */
    public Output<Optional<List<IotHubDpsIpFilterRule>>> ipFilterRules() {
        return Codegen.optional(this.ipFilterRules);
    }
    /**
     * A `linked_hub` block as defined below.
     * 
     */
    @Export(name="linkedHubs", refs={List.class,IotHubDpsLinkedHub.class}, tree="[0,1]")
    private Output</* @Nullable */ List<IotHubDpsLinkedHub>> linkedHubs;

    /**
     * @return A `linked_hub` block as defined below.
     * 
     */
    public Output<Optional<List<IotHubDpsLinkedHub>>> linkedHubs() {
        return Codegen.optional(this.linkedHubs);
    }
    /**
     * Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

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

    /**
     * @return Specifies the name of the Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * Whether requests from Public Network are allowed. Defaults to `true`.
     * 
     */
    @Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> publicNetworkAccessEnabled;

    /**
     * @return Whether requests from Public Network are allowed. Defaults to `true`.
     * 
     */
    public Output<Optional<Boolean>> publicNetworkAccessEnabled() {
        return Codegen.optional(this.publicNetworkAccessEnabled);
    }
    /**
     * The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * The service endpoint of the IoT Device Provisioning Service.
     * 
     */
    @Export(name="serviceOperationsHostName", refs={String.class}, tree="[0]")
    private Output<String> serviceOperationsHostName;

    /**
     * @return The service endpoint of the IoT Device Provisioning Service.
     * 
     */
    public Output<String> serviceOperationsHostName() {
        return this.serviceOperationsHostName;
    }
    /**
     * A `sku` block as defined below.
     * 
     */
    @Export(name="sku", refs={IotHubDpsSku.class}, tree="[0]")
    private Output<IotHubDpsSku> sku;

    /**
     * @return A `sku` block as defined below.
     * 
     */
    public Output<IotHubDpsSku> sku() {
        return this.sku;
    }
    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @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 resource.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public IotHubDps(String name) {
        this(name, IotHubDpsArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public IotHubDps(String name, IotHubDpsArgs 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 IotHubDps(String name, IotHubDpsArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:iot/iotHubDps:IotHubDps", name, args == null ? IotHubDpsArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private IotHubDps(String name, Output<String> id, @Nullable IotHubDpsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:iot/iotHubDps:IotHubDps", 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 IotHubDps get(String name, Output<String> id, @Nullable IotHubDpsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new IotHubDps(name, id, state, options);
    }
}
