"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.Hub = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Microsoft Foundry Hub (classic) resource.
 *
 * > **Note:** Hub‑based projects are considered legacy and are not compatible with the new Foundry experience. Microsoft recommends using the new Microsoft Foundry resource, which should be provisioned using
 * `azure.cognitive.Account`.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const current = azure.core.getClientConfig({});
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example",
 *     location: "westeurope",
 * });
 * const exampleKeyVault = new azure.keyvault.KeyVault("example", {
 *     name: "examplekv",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     tenantId: current.then(current => current.tenantId),
 *     skuName: "standard",
 *     purgeProtectionEnabled: true,
 * });
 * const test = new azure.keyvault.AccessPolicy("test", {
 *     keyVaultId: exampleKeyVault.id,
 *     tenantId: current.then(current => current.tenantId),
 *     objectId: current.then(current => current.objectId),
 *     keyPermissions: [
 *         "Create",
 *         "Get",
 *         "Delete",
 *         "Purge",
 *         "GetRotationPolicy",
 *     ],
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplesa",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleAIServices = new azure.cognitive.AIServices("example", {
 *     name: "exampleaiservices",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "S0",
 * });
 * const exampleHub = new azure.aifoundry.Hub("example", {
 *     name: "exampleaihub",
 *     location: exampleAIServices.location,
 *     resourceGroupName: example.name,
 *     storageAccountId: exampleAccount.id,
 *     keyVaultId: exampleKeyVault.id,
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.MachineLearningServices` - 2025-06-01
 *
 * ## Import
 *
 * AI Foundry Hubs can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:aifoundry/hub:Hub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/hub1
 * ```
 */
class Hub extends pulumi.CustomResource {
    /**
     * Get an existing Hub 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 Hub(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:aifoundry/hub:Hub';
    /**
     * Returns true if the given object is an instance of Hub.  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'] === Hub.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["applicationInsightsId"] = state?.applicationInsightsId;
            resourceInputs["containerRegistryId"] = state?.containerRegistryId;
            resourceInputs["description"] = state?.description;
            resourceInputs["discoveryUrl"] = state?.discoveryUrl;
            resourceInputs["encryption"] = state?.encryption;
            resourceInputs["friendlyName"] = state?.friendlyName;
            resourceInputs["highBusinessImpactEnabled"] = state?.highBusinessImpactEnabled;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["keyVaultId"] = state?.keyVaultId;
            resourceInputs["location"] = state?.location;
            resourceInputs["managedNetwork"] = state?.managedNetwork;
            resourceInputs["name"] = state?.name;
            resourceInputs["primaryUserAssignedIdentity"] = state?.primaryUserAssignedIdentity;
            resourceInputs["publicNetworkAccess"] = state?.publicNetworkAccess;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["storageAccountId"] = state?.storageAccountId;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["workspaceId"] = state?.workspaceId;
        }
        else {
            const args = argsOrState;
            if (args?.identity === undefined && !opts.urn) {
                throw new Error("Missing required property 'identity'");
            }
            if (args?.keyVaultId === undefined && !opts.urn) {
                throw new Error("Missing required property 'keyVaultId'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.storageAccountId === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageAccountId'");
            }
            resourceInputs["applicationInsightsId"] = args?.applicationInsightsId;
            resourceInputs["containerRegistryId"] = args?.containerRegistryId;
            resourceInputs["description"] = args?.description;
            resourceInputs["encryption"] = args?.encryption;
            resourceInputs["friendlyName"] = args?.friendlyName;
            resourceInputs["highBusinessImpactEnabled"] = args?.highBusinessImpactEnabled;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["keyVaultId"] = args?.keyVaultId;
            resourceInputs["location"] = args?.location;
            resourceInputs["managedNetwork"] = args?.managedNetwork;
            resourceInputs["name"] = args?.name;
            resourceInputs["primaryUserAssignedIdentity"] = args?.primaryUserAssignedIdentity;
            resourceInputs["publicNetworkAccess"] = args?.publicNetworkAccess;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["storageAccountId"] = args?.storageAccountId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["discoveryUrl"] = undefined /*out*/;
            resourceInputs["workspaceId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Hub.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Hub = Hub;
//# sourceMappingURL=hub.js.map