"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.OrganizationSecurityPolicy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Organization security policies are used to control incoming/outgoing traffic.
 *
 * To get more information about OrganizationSecurityPolicy, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/organizationSecurityPolicies)
 * * How-to Guides
 *     * [Creating a firewall policy](https://cloud.google.com/vpc/docs/using-firewall-policies#create-policy)
 *
 * ## Example Usage
 *
 * ### Organization Security Policy Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const policy = new gcp.compute.OrganizationSecurityPolicy("policy", {
 *     displayName: "tf-test",
 *     parent: "organizations/123456789",
 * });
 * ```
 *
 * ## Import
 *
 * OrganizationSecurityPolicy can be imported using any of these accepted formats:
 *
 * * `locations/global/securityPolicies/{{policy_id}}`
 *
 * * `{{policy_id}}`
 *
 * When using the `pulumi import` command, OrganizationSecurityPolicy can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy default locations/global/securityPolicies/{{policy_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy default {{policy_id}}
 * ```
 */
class OrganizationSecurityPolicy extends pulumi.CustomResource {
    /**
     * Get an existing OrganizationSecurityPolicy 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 OrganizationSecurityPolicy(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of OrganizationSecurityPolicy.  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'] === OrganizationSecurityPolicy.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["fingerprint"] = state?.fingerprint;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["policyId"] = state?.policyId;
            resourceInputs["shortName"] = state?.shortName;
            resourceInputs["type"] = state?.type;
        }
        else {
            const args = argsOrState;
            if (args?.parent === undefined && !opts.urn) {
                throw new Error("Missing required property 'parent'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["shortName"] = args?.shortName;
            resourceInputs["type"] = args?.type;
            resourceInputs["fingerprint"] = undefined /*out*/;
            resourceInputs["policyId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(OrganizationSecurityPolicy.__pulumiType, name, resourceInputs, opts);
    }
}
exports.OrganizationSecurityPolicy = OrganizationSecurityPolicy;
/** @internal */
OrganizationSecurityPolicy.__pulumiType = 'gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy';
//# sourceMappingURL=organizationSecurityPolicy.js.map