"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.Namespace = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a ServiceBus Namespace.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "my-servicebus",
 *     location: "West Europe",
 * });
 * const exampleNamespace = new azure.servicebus.Namespace("example", {
 *     name: "tfex-servicebus-namespace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 *     tags: {
 *         source: "example",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.ServiceBus` - 2024-01-01
 *
 * ## Import
 *
 * Service Bus Namespace can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:eventhub/namespace:Namespace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1
 * ```
 *
 * @deprecated azure.eventhub.Namespace has been deprecated in favor of azure.servicebus.Namespace
 */
class Namespace extends pulumi.CustomResource {
    /**
     * Get an existing Namespace 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) {
        pulumi.log.warn("Namespace is deprecated: azure.eventhub.Namespace has been deprecated in favor of azure.servicebus.Namespace");
        return new Namespace(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:eventhub/namespace:Namespace';
    /**
     * Returns true if the given object is an instance of Namespace.  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'] === Namespace.__pulumiType;
    }
    /** @deprecated azure.eventhub.Namespace has been deprecated in favor of azure.servicebus.Namespace */
    constructor(name, argsOrState, opts) {
        pulumi.log.warn("Namespace is deprecated: azure.eventhub.Namespace has been deprecated in favor of azure.servicebus.Namespace");
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["capacity"] = state?.capacity;
            resourceInputs["customerManagedKey"] = state?.customerManagedKey;
            resourceInputs["defaultPrimaryConnectionString"] = state?.defaultPrimaryConnectionString;
            resourceInputs["defaultPrimaryKey"] = state?.defaultPrimaryKey;
            resourceInputs["defaultSecondaryConnectionString"] = state?.defaultSecondaryConnectionString;
            resourceInputs["defaultSecondaryKey"] = state?.defaultSecondaryKey;
            resourceInputs["endpoint"] = state?.endpoint;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["localAuthEnabled"] = state?.localAuthEnabled;
            resourceInputs["location"] = state?.location;
            resourceInputs["minimumTlsVersion"] = state?.minimumTlsVersion;
            resourceInputs["name"] = state?.name;
            resourceInputs["networkRuleSet"] = state?.networkRuleSet;
            resourceInputs["premiumMessagingPartitions"] = state?.premiumMessagingPartitions;
            resourceInputs["publicNetworkAccessEnabled"] = state?.publicNetworkAccessEnabled;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["sku"] = state?.sku;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.sku === undefined && !opts.urn) {
                throw new Error("Missing required property 'sku'");
            }
            resourceInputs["capacity"] = args?.capacity;
            resourceInputs["customerManagedKey"] = args?.customerManagedKey;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["localAuthEnabled"] = args?.localAuthEnabled;
            resourceInputs["location"] = args?.location;
            resourceInputs["minimumTlsVersion"] = args?.minimumTlsVersion;
            resourceInputs["name"] = args?.name;
            resourceInputs["networkRuleSet"] = args?.networkRuleSet;
            resourceInputs["premiumMessagingPartitions"] = args?.premiumMessagingPartitions;
            resourceInputs["publicNetworkAccessEnabled"] = args?.publicNetworkAccessEnabled;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["sku"] = args?.sku;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["defaultPrimaryConnectionString"] = undefined /*out*/;
            resourceInputs["defaultPrimaryKey"] = undefined /*out*/;
            resourceInputs["defaultSecondaryConnectionString"] = undefined /*out*/;
            resourceInputs["defaultSecondaryKey"] = undefined /*out*/;
            resourceInputs["endpoint"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["defaultPrimaryConnectionString", "defaultPrimaryKey", "defaultSecondaryConnectionString", "defaultSecondaryKey"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Namespace.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Namespace = Namespace;
//# sourceMappingURL=namespace.js.map