"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.LogAnalyticsEntity = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Log Analytics Entity resource in Oracle Cloud Infrastructure Log Analytics service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/logan-api-spec/latest/LogAnalyticsEntity
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/log_analytics
 *
 * Create a new log analytics entity.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testLogAnalyticsEntity = new oci.loganalytics.LogAnalyticsEntity("test_log_analytics_entity", {
 *     compartmentId: compartmentId,
 *     entityTypeName: logAnalyticsEntityEntityTypeName,
 *     name: logAnalyticsEntityName,
 *     namespace: logAnalyticsEntityNamespace,
 *     cloudResourceId: testCloudResource.id,
 *     definedTags: {
 *         "foo-namespace.bar-key": "value",
 *     },
 *     freeformTags: {
 *         "bar-key": "value",
 *     },
 *     hostname: logAnalyticsEntityHostname,
 *     managementAgentId: testManagementAgent.id,
 *     metadata: {
 *         items: [{
 *             name: logAnalyticsEntityMetadataItemsName,
 *             type: logAnalyticsEntityMetadataItemsType,
 *             value: logAnalyticsEntityMetadataItemsValue,
 *         }],
 *     },
 *     properties: logAnalyticsEntityProperties,
 *     sourceId: testSource.id,
 *     timeLastDiscovered: logAnalyticsEntityTimeLastDiscovered,
 *     timezoneRegion: logAnalyticsEntityTimezoneRegion,
 * });
 * ```
 *
 * ## Import
 *
 * LogAnalyticsEntities can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:LogAnalytics/logAnalyticsEntity:LogAnalyticsEntity test_log_analytics_entity "namespaces/{namespaceName}/logAnalyticsEntities/{logAnalyticsEntityId}"
 * ```
 */
class LogAnalyticsEntity extends pulumi.CustomResource {
    /**
     * Get an existing LogAnalyticsEntity 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 LogAnalyticsEntity(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:LogAnalytics/logAnalyticsEntity:LogAnalyticsEntity';
    /**
     * Returns true if the given object is an instance of LogAnalyticsEntity.  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'] === LogAnalyticsEntity.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["areLogsCollected"] = state?.areLogsCollected;
            resourceInputs["associatedSourcesCount"] = state?.associatedSourcesCount;
            resourceInputs["cloudResourceId"] = state?.cloudResourceId;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["entityTypeInternalName"] = state?.entityTypeInternalName;
            resourceInputs["entityTypeName"] = state?.entityTypeName;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["hostname"] = state?.hostname;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["managementAgentCompartmentId"] = state?.managementAgentCompartmentId;
            resourceInputs["managementAgentDisplayName"] = state?.managementAgentDisplayName;
            resourceInputs["managementAgentId"] = state?.managementAgentId;
            resourceInputs["metadata"] = state?.metadata;
            resourceInputs["name"] = state?.name;
            resourceInputs["namespace"] = state?.namespace;
            resourceInputs["properties"] = state?.properties;
            resourceInputs["sourceId"] = state?.sourceId;
            resourceInputs["state"] = state?.state;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeLastDiscovered"] = state?.timeLastDiscovered;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["timezoneRegion"] = state?.timezoneRegion;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.entityTypeName === undefined && !opts.urn) {
                throw new Error("Missing required property 'entityTypeName'");
            }
            if (args?.namespace === undefined && !opts.urn) {
                throw new Error("Missing required property 'namespace'");
            }
            resourceInputs["cloudResourceId"] = args?.cloudResourceId;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["entityTypeName"] = args?.entityTypeName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["hostname"] = args?.hostname;
            resourceInputs["managementAgentId"] = args?.managementAgentId;
            resourceInputs["metadata"] = args?.metadata;
            resourceInputs["name"] = args?.name;
            resourceInputs["namespace"] = args?.namespace;
            resourceInputs["properties"] = args?.properties;
            resourceInputs["sourceId"] = args?.sourceId;
            resourceInputs["timeLastDiscovered"] = args?.timeLastDiscovered;
            resourceInputs["timezoneRegion"] = args?.timezoneRegion;
            resourceInputs["areLogsCollected"] = undefined /*out*/;
            resourceInputs["associatedSourcesCount"] = undefined /*out*/;
            resourceInputs["entityTypeInternalName"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["managementAgentCompartmentId"] = undefined /*out*/;
            resourceInputs["managementAgentDisplayName"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(LogAnalyticsEntity.__pulumiType, name, resourceInputs, opts);
    }
}
exports.LogAnalyticsEntity = LogAnalyticsEntity;
//# sourceMappingURL=logAnalyticsEntity.js.map