"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.ThreatIntelligenceIndicator = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Sentinel Threat Intelligence Indicator.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "east us",
 * });
 * const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
 *     name: "example-law",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "PerGB2018",
 *     retentionInDays: 30,
 * });
 * const exampleLogAnalyticsWorkspaceOnboarding = new azure.sentinel.LogAnalyticsWorkspaceOnboarding("example", {workspaceId: exampleAnalyticsWorkspace.id});
 * const exampleThreatIntelligenceIndicator = new azure.sentinel.ThreatIntelligenceIndicator("example", {
 *     workspaceId: exampleLogAnalyticsWorkspaceOnboarding.workspaceId,
 *     patternType: "domain-name",
 *     pattern: "http://example.com",
 *     source: "Microsoft Sentinel",
 *     validateFromUtc: "2022-12-14T16:00:00Z",
 *     displayName: "example-indicator",
 * });
 * ```
 *
 * ## Import
 *
 * Sentinel Threat Intelligence Indicators can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:sentinel/threatIntelligenceIndicator:ThreatIntelligenceIndicator example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/indicator1
 * ```
 */
class ThreatIntelligenceIndicator extends pulumi.CustomResource {
    /**
     * Get an existing ThreatIntelligenceIndicator 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 ThreatIntelligenceIndicator(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:sentinel/threatIntelligenceIndicator:ThreatIntelligenceIndicator';
    /**
     * Returns true if the given object is an instance of ThreatIntelligenceIndicator.  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'] === ThreatIntelligenceIndicator.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["confidence"] = state?.confidence;
            resourceInputs["createdBy"] = state?.createdBy;
            resourceInputs["createdOn"] = state?.createdOn;
            resourceInputs["defanged"] = state?.defanged;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["extension"] = state?.extension;
            resourceInputs["externalId"] = state?.externalId;
            resourceInputs["externalLastUpdatedTimeUtc"] = state?.externalLastUpdatedTimeUtc;
            resourceInputs["externalReferences"] = state?.externalReferences;
            resourceInputs["granularMarkings"] = state?.granularMarkings;
            resourceInputs["guid"] = state?.guid;
            resourceInputs["indicatorTypes"] = state?.indicatorTypes;
            resourceInputs["killChainPhases"] = state?.killChainPhases;
            resourceInputs["language"] = state?.language;
            resourceInputs["lastUpdatedTimeUtc"] = state?.lastUpdatedTimeUtc;
            resourceInputs["objectMarkingRefs"] = state?.objectMarkingRefs;
            resourceInputs["parsedPatterns"] = state?.parsedPatterns;
            resourceInputs["pattern"] = state?.pattern;
            resourceInputs["patternType"] = state?.patternType;
            resourceInputs["patternVersion"] = state?.patternVersion;
            resourceInputs["revoked"] = state?.revoked;
            resourceInputs["source"] = state?.source;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["threatTypes"] = state?.threatTypes;
            resourceInputs["validateFromUtc"] = state?.validateFromUtc;
            resourceInputs["validateUntilUtc"] = state?.validateUntilUtc;
            resourceInputs["workspaceId"] = state?.workspaceId;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.pattern === undefined && !opts.urn) {
                throw new Error("Missing required property 'pattern'");
            }
            if (args?.patternType === undefined && !opts.urn) {
                throw new Error("Missing required property 'patternType'");
            }
            if (args?.source === undefined && !opts.urn) {
                throw new Error("Missing required property 'source'");
            }
            if (args?.validateFromUtc === undefined && !opts.urn) {
                throw new Error("Missing required property 'validateFromUtc'");
            }
            if (args?.workspaceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'workspaceId'");
            }
            resourceInputs["confidence"] = args?.confidence;
            resourceInputs["createdBy"] = args?.createdBy;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["extension"] = args?.extension;
            resourceInputs["externalReferences"] = args?.externalReferences;
            resourceInputs["granularMarkings"] = args?.granularMarkings;
            resourceInputs["killChainPhases"] = args?.killChainPhases;
            resourceInputs["language"] = args?.language;
            resourceInputs["objectMarkingRefs"] = args?.objectMarkingRefs;
            resourceInputs["pattern"] = args?.pattern;
            resourceInputs["patternType"] = args?.patternType;
            resourceInputs["patternVersion"] = args?.patternVersion;
            resourceInputs["revoked"] = args?.revoked;
            resourceInputs["source"] = args?.source;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["threatTypes"] = args?.threatTypes;
            resourceInputs["validateFromUtc"] = args?.validateFromUtc;
            resourceInputs["validateUntilUtc"] = args?.validateUntilUtc;
            resourceInputs["workspaceId"] = args?.workspaceId;
            resourceInputs["createdOn"] = undefined /*out*/;
            resourceInputs["defanged"] = undefined /*out*/;
            resourceInputs["externalId"] = undefined /*out*/;
            resourceInputs["externalLastUpdatedTimeUtc"] = undefined /*out*/;
            resourceInputs["guid"] = undefined /*out*/;
            resourceInputs["indicatorTypes"] = undefined /*out*/;
            resourceInputs["lastUpdatedTimeUtc"] = undefined /*out*/;
            resourceInputs["parsedPatterns"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ThreatIntelligenceIndicator.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ThreatIntelligenceIndicator = ThreatIntelligenceIndicator;
//# sourceMappingURL=threatIntelligenceIndicator.js.map