"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.ManagementSavedSearch = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Management Saved Search resource in Oracle Cloud Infrastructure Management Dashboard service.
 *
 * Creates a new saved search.
 * Here's an example of how you can use CLI to create a saved search. For information on the details that must be passed to CREATE, you can use the GET API to obtain the Create.json file:
 * `oci management-dashboard saved-search get --management-saved-search-id ocid1.managementsavedsearch.oc1..savedsearchId1 --query data > Create.json`.
 * You can then modify the Create.json file by removing the `id` attribute and making other required changes, and use the `oci management-dashboard saved-search create` command.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testManagementSavedSearch = new oci.managementdashboard.ManagementSavedSearch("test_management_saved_search", {
 *     compartmentId: compartmentId,
 *     dataConfig: managementSavedSearchDataConfig,
 *     description: managementSavedSearchDescription,
 *     displayName: managementSavedSearchDisplayName,
 *     isOobSavedSearch: managementSavedSearchIsOobSavedSearch === "true",
 *     metadataVersion: managementSavedSearchMetadataVersion,
 *     nls: managementSavedSearchNls,
 *     providerId: testProvider.id,
 *     providerName: managementSavedSearchProviderName,
 *     providerVersion: managementSavedSearchProviderVersion,
 *     screenImage: managementSavedSearchScreenImage,
 *     type: managementSavedSearchType,
 *     uiConfig: managementSavedSearchUiConfig,
 *     widgetTemplate: managementSavedSearchWidgetTemplate,
 *     widgetVm: managementSavedSearchWidgetVm,
 *     drilldownConfig: managementSavedSearchDrilldownConfig,
 *     parametersConfig: managementSavedSearchParametersConfig,
 *     definedTags: {
 *         "foo-namespace.bar-key": "value",
 *     },
 *     freeformTags: {
 *         "bar-key": "value",
 *     },
 *     managementDashboardManagementSavedSearchId: managementSavedSearchId,
 * });
 * ```
 *
 * ## Import
 *
 * ManagementSavedSearches can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:ManagementDashboard/managementSavedSearch:ManagementSavedSearch test_management_saved_search "id"
 * ```
 */
class ManagementSavedSearch extends pulumi.CustomResource {
    /**
     * Get an existing ManagementSavedSearch 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 ManagementSavedSearch(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:ManagementDashboard/managementSavedSearch:ManagementSavedSearch';
    /**
     * Returns true if the given object is an instance of ManagementSavedSearch.  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'] === ManagementSavedSearch.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["createdBy"] = state?.createdBy;
            resourceInputs["dataConfig"] = state?.dataConfig;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["drilldownConfig"] = state?.drilldownConfig;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["isOobSavedSearch"] = state?.isOobSavedSearch;
            resourceInputs["managementDashboardManagementSavedSearchId"] = state?.managementDashboardManagementSavedSearchId;
            resourceInputs["metadataVersion"] = state?.metadataVersion;
            resourceInputs["nls"] = state?.nls;
            resourceInputs["parametersConfig"] = state?.parametersConfig;
            resourceInputs["providerId"] = state?.providerId;
            resourceInputs["providerName"] = state?.providerName;
            resourceInputs["providerVersion"] = state?.providerVersion;
            resourceInputs["screenImage"] = state?.screenImage;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["type"] = state?.type;
            resourceInputs["uiConfig"] = state?.uiConfig;
            resourceInputs["updatedBy"] = state?.updatedBy;
            resourceInputs["widgetTemplate"] = state?.widgetTemplate;
            resourceInputs["widgetVm"] = state?.widgetVm;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.dataConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataConfig'");
            }
            if (args?.description === undefined && !opts.urn) {
                throw new Error("Missing required property 'description'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.drilldownConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'drilldownConfig'");
            }
            if (args?.isOobSavedSearch === undefined && !opts.urn) {
                throw new Error("Missing required property 'isOobSavedSearch'");
            }
            if (args?.metadataVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'metadataVersion'");
            }
            if (args?.nls === undefined && !opts.urn) {
                throw new Error("Missing required property 'nls'");
            }
            if (args?.parametersConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'parametersConfig'");
            }
            if (args?.providerId === undefined && !opts.urn) {
                throw new Error("Missing required property 'providerId'");
            }
            if (args?.providerName === undefined && !opts.urn) {
                throw new Error("Missing required property 'providerName'");
            }
            if (args?.providerVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'providerVersion'");
            }
            if (args?.screenImage === undefined && !opts.urn) {
                throw new Error("Missing required property 'screenImage'");
            }
            if (args?.type === undefined && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            if (args?.uiConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'uiConfig'");
            }
            if (args?.widgetTemplate === undefined && !opts.urn) {
                throw new Error("Missing required property 'widgetTemplate'");
            }
            if (args?.widgetVm === undefined && !opts.urn) {
                throw new Error("Missing required property 'widgetVm'");
            }
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["dataConfig"] = args?.dataConfig;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["drilldownConfig"] = args?.drilldownConfig;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["isOobSavedSearch"] = args?.isOobSavedSearch;
            resourceInputs["managementDashboardManagementSavedSearchId"] = args?.managementDashboardManagementSavedSearchId;
            resourceInputs["metadataVersion"] = args?.metadataVersion;
            resourceInputs["nls"] = args?.nls;
            resourceInputs["parametersConfig"] = args?.parametersConfig;
            resourceInputs["providerId"] = args?.providerId;
            resourceInputs["providerName"] = args?.providerName;
            resourceInputs["providerVersion"] = args?.providerVersion;
            resourceInputs["screenImage"] = args?.screenImage;
            resourceInputs["type"] = args?.type;
            resourceInputs["uiConfig"] = args?.uiConfig;
            resourceInputs["widgetTemplate"] = args?.widgetTemplate;
            resourceInputs["widgetVm"] = args?.widgetVm;
            resourceInputs["createdBy"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
            resourceInputs["updatedBy"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ManagementSavedSearch.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ManagementSavedSearch = ManagementSavedSearch;
//# sourceMappingURL=managementSavedSearch.js.map