"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.SynapseSpark = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages the linked service to link an Azure Machine learning workspace to an Azure Synapse workspace.
 *
 * ## 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-rg",
 *     location: "west europe",
 *     tags: {
 *         stage: "example",
 *     },
 * });
 * const exampleInsights = new azure.appinsights.Insights("example", {
 *     name: "example-ai",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     applicationType: "web",
 * });
 * const exampleKeyVault = new azure.keyvault.KeyVault("example", {
 *     name: "example-kv",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     tenantId: current.then(current => current.tenantId),
 *     skuName: "standard",
 *     purgeProtectionEnabled: true,
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplesa",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleWorkspace = new azure.machinelearning.Workspace("example", {
 *     name: "example-mlw",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     applicationInsightsId: exampleInsights.id,
 *     keyVaultId: exampleKeyVault.id,
 *     storageAccountId: exampleAccount.id,
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 * });
 * const exampleDataLakeGen2Filesystem = new azure.storage.DataLakeGen2Filesystem("example", {
 *     name: "example",
 *     storageAccountId: exampleAccount.id,
 * });
 * const exampleWorkspace2 = new azure.synapse.Workspace("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     storageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.id,
 *     sqlAdministratorLogin: "sqladminuser",
 *     sqlAdministratorLoginPassword: "H@Sh1CoR3!",
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 * });
 * const exampleSparkPool = new azure.synapse.SparkPool("example", {
 *     name: "example",
 *     synapseWorkspaceId: exampleWorkspace2.id,
 *     nodeSizeFamily: "MemoryOptimized",
 *     nodeSize: "Small",
 *     nodeCount: 3,
 * });
 * const exampleSynapseSpark = new azure.machinelearning.SynapseSpark("example", {
 *     name: "example",
 *     machineLearningWorkspaceId: exampleWorkspace.id,
 *     location: example.location,
 *     synapseSparkPoolId: exampleSparkPool.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
 *
 * Machine Learning Synapse Sparks can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:machinelearning/synapseSpark:SynapseSpark example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/compute1
 * ```
 */
class SynapseSpark extends pulumi.CustomResource {
    /**
     * Get an existing SynapseSpark 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 SynapseSpark(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:machinelearning/synapseSpark:SynapseSpark';
    /**
     * Returns true if the given object is an instance of SynapseSpark.  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'] === SynapseSpark.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["localAuthEnabled"] = state?.localAuthEnabled;
            resourceInputs["location"] = state?.location;
            resourceInputs["machineLearningWorkspaceId"] = state?.machineLearningWorkspaceId;
            resourceInputs["name"] = state?.name;
            resourceInputs["synapseSparkPoolId"] = state?.synapseSparkPoolId;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.machineLearningWorkspaceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'machineLearningWorkspaceId'");
            }
            if (args?.synapseSparkPoolId === undefined && !opts.urn) {
                throw new Error("Missing required property 'synapseSparkPoolId'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["localAuthEnabled"] = args?.localAuthEnabled;
            resourceInputs["location"] = args?.location;
            resourceInputs["machineLearningWorkspaceId"] = args?.machineLearningWorkspaceId;
            resourceInputs["name"] = args?.name;
            resourceInputs["synapseSparkPoolId"] = args?.synapseSparkPoolId;
            resourceInputs["tags"] = args?.tags;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(SynapseSpark.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SynapseSpark = SynapseSpark;
//# sourceMappingURL=synapseSpark.js.map