"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.Metadata = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Sentinel Metadata.
 *
 * ## 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 exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
 *     name: "example-workspace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "pergb2018",
 * });
 * const exampleAnalyticsSolution = new azure.operationalinsights.AnalyticsSolution("example", {
 *     solutionName: "SecurityInsights",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     workspaceResourceId: exampleAnalyticsWorkspace.id,
 *     workspaceName: exampleAnalyticsWorkspace.name,
 *     plan: {
 *         publisher: "Microsoft",
 *         product: "OMSGallery/SecurityInsights",
 *     },
 * });
 * const exampleAlertRuleNrt = new azure.sentinel.AlertRuleNrt("example", {
 *     name: "example",
 *     logAnalyticsWorkspaceId: exampleAnalyticsSolution.workspaceResourceId,
 *     displayName: "example",
 *     severity: "High",
 *     query: `AzureActivity |
 *   where OperationName == \\"Create or Update Virtual Machine\\" or OperationName ==\\"Create Deployment\\" |
 *   where ActivityStatus == \\"Succeeded\\" |
 *   make-series dcount(ResourceId) default=0 on EventSubmissionTimestamp in range(ago(7d), now(), 1d) by Caller
 * `,
 * });
 * const exampleMetadata = new azure.sentinel.Metadata("example", {
 *     name: "exampl",
 *     workspaceId: exampleAnalyticsSolution.workspaceResourceId,
 *     contentId: exampleAlertRuleNrt.name,
 *     kind: "AnalyticsRule",
 *     parentId: exampleAlertRuleNrt.id,
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.OperationalInsights` - 2022-10-01-preview
 *
 * ## Import
 *
 * Sentinel Metadata can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:sentinel/metadata:Metadata example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/metadata/metadata1
 * ```
 */
class Metadata extends pulumi.CustomResource {
    /**
     * Get an existing Metadata 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 Metadata(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:sentinel/metadata:Metadata';
    /**
     * Returns true if the given object is an instance of Metadata.  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'] === Metadata.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["author"] = state?.author;
            resourceInputs["category"] = state?.category;
            resourceInputs["contentId"] = state?.contentId;
            resourceInputs["contentSchemaVersion"] = state?.contentSchemaVersion;
            resourceInputs["customVersion"] = state?.customVersion;
            resourceInputs["dependency"] = state?.dependency;
            resourceInputs["firstPublishDate"] = state?.firstPublishDate;
            resourceInputs["iconId"] = state?.iconId;
            resourceInputs["kind"] = state?.kind;
            resourceInputs["lastPublishDate"] = state?.lastPublishDate;
            resourceInputs["name"] = state?.name;
            resourceInputs["parentId"] = state?.parentId;
            resourceInputs["previewImages"] = state?.previewImages;
            resourceInputs["previewImagesDarks"] = state?.previewImagesDarks;
            resourceInputs["providers"] = state?.providers;
            resourceInputs["source"] = state?.source;
            resourceInputs["support"] = state?.support;
            resourceInputs["threatAnalysisTactics"] = state?.threatAnalysisTactics;
            resourceInputs["threatAnalysisTechniques"] = state?.threatAnalysisTechniques;
            resourceInputs["version"] = state?.version;
            resourceInputs["workspaceId"] = state?.workspaceId;
        }
        else {
            const args = argsOrState;
            if (args?.contentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'contentId'");
            }
            if (args?.kind === undefined && !opts.urn) {
                throw new Error("Missing required property 'kind'");
            }
            if (args?.parentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'parentId'");
            }
            if (args?.workspaceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'workspaceId'");
            }
            resourceInputs["author"] = args?.author;
            resourceInputs["category"] = args?.category;
            resourceInputs["contentId"] = args?.contentId;
            resourceInputs["contentSchemaVersion"] = args?.contentSchemaVersion;
            resourceInputs["customVersion"] = args?.customVersion;
            resourceInputs["dependency"] = args?.dependency;
            resourceInputs["firstPublishDate"] = args?.firstPublishDate;
            resourceInputs["iconId"] = args?.iconId;
            resourceInputs["kind"] = args?.kind;
            resourceInputs["lastPublishDate"] = args?.lastPublishDate;
            resourceInputs["name"] = args?.name;
            resourceInputs["parentId"] = args?.parentId;
            resourceInputs["previewImages"] = args?.previewImages;
            resourceInputs["previewImagesDarks"] = args?.previewImagesDarks;
            resourceInputs["providers"] = args?.providers;
            resourceInputs["source"] = args?.source;
            resourceInputs["support"] = args?.support;
            resourceInputs["threatAnalysisTactics"] = args?.threatAnalysisTactics;
            resourceInputs["threatAnalysisTechniques"] = args?.threatAnalysisTechniques;
            resourceInputs["version"] = args?.version;
            resourceInputs["workspaceId"] = args?.workspaceId;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Metadata.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Metadata = Metadata;
//# sourceMappingURL=metadata.js.map