"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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Framework = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Frameworks allow you to monitor and enforce compliance and security requirements. Manage compliance by assigning built-in or custom frameworks to resources.
 *
 * To get more information about Framework, see:
 *
 * * [API documentation](https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.frameworks)
 *
 * ## Example Usage
 *
 * ### Cloudsecuritycompliance Framework Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.cloudsecuritycompliance.Framework("example", {
 *     organization: "123456789",
 *     location: "global",
 *     frameworkId: "example-framework",
 *     displayName: "Terraform Framework Name",
 *     description: "An Terraform description for the framework",
 *     cloudControlDetails: [
 *         {
 *             name: "organizations/123456789/locations/global/cloudControls/builtin-assess-resource-availability",
 *             majorRevisionId: "1",
 *             parameters: [{
 *                 name: "location",
 *                 parameterValue: {
 *                     stringValue: "us-central1",
 *                 },
 *             }],
 *         },
 *         {
 *             name: "organizations/123456789/locations/global/cloudControls/builtin-cmek-key-in-use-for-bigquery-table",
 *             majorRevisionId: "1",
 *             parameters: [{
 *                 name: "location",
 *                 parameterValue: {
 *                     stringListValue: {
 *                         values: [
 *                             "us-central1",
 *                             "us-west1",
 *                         ],
 *                     },
 *                 },
 *             }],
 *         },
 *         {
 *             name: "organizations/123456789/locations/global/cloudControls/builtin-enable-automatic-backups-cloud-sql",
 *             majorRevisionId: "1",
 *             parameters: [{
 *                 name: "location",
 *                 parameterValue: {
 *                     boolValue: true,
 *                 },
 *             }],
 *         },
 *         {
 *             name: "organizations/123456789/locations/global/cloudControls/builtin-require-cmek-on-bigquery-datasets",
 *             majorRevisionId: "1",
 *             parameters: [{
 *                 name: "location",
 *                 parameterValue: {
 *                     numberValue: 1,
 *                 },
 *             }],
 *         },
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * Framework can be imported using any of these accepted formats:
 *
 * * `organizations/{{organization}}/locations/{{location}}/frameworks/{{framework_id}}`
 *
 * * `{{organization}}/{{location}}/{{framework_id}}`
 *
 * When using the `pulumi import` command, Framework can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:cloudsecuritycompliance/framework:Framework default organizations/{{organization}}/locations/{{location}}/frameworks/{{framework_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:cloudsecuritycompliance/framework:Framework default {{organization}}/{{location}}/{{framework_id}}
 * ```
 */
class Framework extends pulumi.CustomResource {
    /**
     * Get an existing Framework 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 Framework(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Framework.  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'] === Framework.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["categories"] = state?.categories;
            resourceInputs["cloudControlDetails"] = state?.cloudControlDetails;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["frameworkId"] = state?.frameworkId;
            resourceInputs["location"] = state?.location;
            resourceInputs["majorRevisionId"] = state?.majorRevisionId;
            resourceInputs["name"] = state?.name;
            resourceInputs["organization"] = state?.organization;
            resourceInputs["supportedCloudProviders"] = state?.supportedCloudProviders;
            resourceInputs["supportedEnforcementModes"] = state?.supportedEnforcementModes;
            resourceInputs["supportedTargetResourceTypes"] = state?.supportedTargetResourceTypes;
            resourceInputs["type"] = state?.type;
        }
        else {
            const args = argsOrState;
            if (args?.frameworkId === undefined && !opts.urn) {
                throw new Error("Missing required property 'frameworkId'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.organization === undefined && !opts.urn) {
                throw new Error("Missing required property 'organization'");
            }
            resourceInputs["cloudControlDetails"] = args?.cloudControlDetails;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["frameworkId"] = args?.frameworkId;
            resourceInputs["location"] = args?.location;
            resourceInputs["organization"] = args?.organization;
            resourceInputs["categories"] = undefined /*out*/;
            resourceInputs["majorRevisionId"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["supportedCloudProviders"] = undefined /*out*/;
            resourceInputs["supportedEnforcementModes"] = undefined /*out*/;
            resourceInputs["supportedTargetResourceTypes"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Framework.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Framework = Framework;
/** @internal */
Framework.__pulumiType = 'gcp:cloudsecuritycompliance/framework:Framework';
//# sourceMappingURL=framework.js.map