"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.Account = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Cognitive Services Account.
 *
 * > **Note:** The Cognitive Services Account manages the resource type for various Azure AI resource implementations, including Azure AI Foundry, Azure OpenAI, Azure Speech, Azure Vision and others. Each service shares the same control plane but exposes a different subset of developer APIs. Azure AI Foundry (kind = `AIServices`) provides the superset of capabilities. For more information, please see [Azure AI Foundry architecture](https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/architecture).
 *
 * > **Note:** The Azure Provider will attempt to Purge the Cognitive Services Account during deletion. This feature can be disabled using the `features` block within the `provider` block, see the provider documentation on the features block for more information.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.cognitive.Account("example", {
 *     name: "example-account",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     kind: "Face",
 *     skuName: "S0",
 *     tags: {
 *         Acceptance: "Test",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.CognitiveServices` - 2025-06-01
 *
 * * `Microsoft.Network` - 2025-01-01
 *
 * ## Import
 *
 * Cognitive Service Accounts can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:cognitive/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1
 * ```
 */
class Account extends pulumi.CustomResource {
    /**
     * Get an existing Account 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 Account(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:cognitive/account:Account';
    /**
     * Returns true if the given object is an instance of Account.  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'] === Account.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["customQuestionAnsweringSearchServiceId"] = state?.customQuestionAnsweringSearchServiceId;
            resourceInputs["customQuestionAnsweringSearchServiceKey"] = state?.customQuestionAnsweringSearchServiceKey;
            resourceInputs["customSubdomainName"] = state?.customSubdomainName;
            resourceInputs["customerManagedKey"] = state?.customerManagedKey;
            resourceInputs["dynamicThrottlingEnabled"] = state?.dynamicThrottlingEnabled;
            resourceInputs["endpoint"] = state?.endpoint;
            resourceInputs["fqdns"] = state?.fqdns;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["kind"] = state?.kind;
            resourceInputs["localAuthEnabled"] = state?.localAuthEnabled;
            resourceInputs["location"] = state?.location;
            resourceInputs["metricsAdvisorAadClientId"] = state?.metricsAdvisorAadClientId;
            resourceInputs["metricsAdvisorAadTenantId"] = state?.metricsAdvisorAadTenantId;
            resourceInputs["metricsAdvisorSuperUserName"] = state?.metricsAdvisorSuperUserName;
            resourceInputs["metricsAdvisorWebsiteName"] = state?.metricsAdvisorWebsiteName;
            resourceInputs["name"] = state?.name;
            resourceInputs["networkAcls"] = state?.networkAcls;
            resourceInputs["networkInjection"] = state?.networkInjection;
            resourceInputs["outboundNetworkAccessRestricted"] = state?.outboundNetworkAccessRestricted;
            resourceInputs["primaryAccessKey"] = state?.primaryAccessKey;
            resourceInputs["projectManagementEnabled"] = state?.projectManagementEnabled;
            resourceInputs["publicNetworkAccessEnabled"] = state?.publicNetworkAccessEnabled;
            resourceInputs["qnaRuntimeEndpoint"] = state?.qnaRuntimeEndpoint;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["secondaryAccessKey"] = state?.secondaryAccessKey;
            resourceInputs["skuName"] = state?.skuName;
            resourceInputs["storages"] = state?.storages;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.kind === undefined && !opts.urn) {
                throw new Error("Missing required property 'kind'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.skuName === undefined && !opts.urn) {
                throw new Error("Missing required property 'skuName'");
            }
            resourceInputs["customQuestionAnsweringSearchServiceId"] = args?.customQuestionAnsweringSearchServiceId;
            resourceInputs["customQuestionAnsweringSearchServiceKey"] = args?.customQuestionAnsweringSearchServiceKey ? pulumi.secret(args.customQuestionAnsweringSearchServiceKey) : undefined;
            resourceInputs["customSubdomainName"] = args?.customSubdomainName;
            resourceInputs["customerManagedKey"] = args?.customerManagedKey;
            resourceInputs["dynamicThrottlingEnabled"] = args?.dynamicThrottlingEnabled;
            resourceInputs["fqdns"] = args?.fqdns;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["kind"] = args?.kind;
            resourceInputs["localAuthEnabled"] = args?.localAuthEnabled;
            resourceInputs["location"] = args?.location;
            resourceInputs["metricsAdvisorAadClientId"] = args?.metricsAdvisorAadClientId;
            resourceInputs["metricsAdvisorAadTenantId"] = args?.metricsAdvisorAadTenantId;
            resourceInputs["metricsAdvisorSuperUserName"] = args?.metricsAdvisorSuperUserName;
            resourceInputs["metricsAdvisorWebsiteName"] = args?.metricsAdvisorWebsiteName;
            resourceInputs["name"] = args?.name;
            resourceInputs["networkAcls"] = args?.networkAcls;
            resourceInputs["networkInjection"] = args?.networkInjection;
            resourceInputs["outboundNetworkAccessRestricted"] = args?.outboundNetworkAccessRestricted;
            resourceInputs["projectManagementEnabled"] = args?.projectManagementEnabled;
            resourceInputs["publicNetworkAccessEnabled"] = args?.publicNetworkAccessEnabled;
            resourceInputs["qnaRuntimeEndpoint"] = args?.qnaRuntimeEndpoint;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["skuName"] = args?.skuName;
            resourceInputs["storages"] = args?.storages;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["endpoint"] = undefined /*out*/;
            resourceInputs["primaryAccessKey"] = undefined /*out*/;
            resourceInputs["secondaryAccessKey"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["customQuestionAnsweringSearchServiceKey", "primaryAccessKey", "secondaryAccessKey"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Account.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Account = Account;
//# sourceMappingURL=account.js.map