"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.Project = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Microsoft Foundry Hub (classic) Project resource.
 *
 * > **Note:** Hub‑based projects are considered legacy and are not compatible with the new Foundry experience. Microsoft recommends using the new Microsoft Foundry project resource, which should be provisioned using
 * `azure.cognitive.Account` and `azure.cognitive.AccountProject`.
 *
 * ## 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 exampleAccessPolicy = new azure.keyvault.AccessPolicy("example", {
 *     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",
 *     },
 * });
 * const exampleProject = new azure.aifoundry.Project("example", {
 *     name: "example",
 *     location: exampleHub.location,
 *     aiServicesHubId: exampleHub.id,
 * });
 * ```
 *
 * ## 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 Projects can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:aifoundry/project:Project example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/project1
 * ```
 */
class Project extends pulumi.CustomResource {
    /**
     * Get an existing Project 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 Project(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:aifoundry/project:Project';
    /**
     * Returns true if the given object is an instance of Project.  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'] === Project.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["aiServicesHubId"] = state?.aiServicesHubId;
            resourceInputs["description"] = state?.description;
            resourceInputs["friendlyName"] = state?.friendlyName;
            resourceInputs["highBusinessImpactEnabled"] = state?.highBusinessImpactEnabled;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["primaryUserAssignedIdentity"] = state?.primaryUserAssignedIdentity;
            resourceInputs["projectId"] = state?.projectId;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.aiServicesHubId === undefined && !opts.urn) {
                throw new Error("Missing required property 'aiServicesHubId'");
            }
            resourceInputs["aiServicesHubId"] = args?.aiServicesHubId;
            resourceInputs["description"] = args?.description;
            resourceInputs["friendlyName"] = args?.friendlyName;
            resourceInputs["highBusinessImpactEnabled"] = args?.highBusinessImpactEnabled;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["primaryUserAssignedIdentity"] = args?.primaryUserAssignedIdentity;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["projectId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Project.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Project = Project;
//# sourceMappingURL=project.js.map