"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.AccessLevels = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## Example Usage
 *
 * ### Access Context Manager Access Levels Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const access_policy = new gcp.accesscontextmanager.AccessPolicy("access-policy", {
 *     parent: "organizations/123456789",
 *     title: "my policy",
 * });
 * const access_levels = new gcp.accesscontextmanager.AccessLevels("access-levels", {
 *     parent: pulumi.interpolate`accessPolicies/${access_policy.name}`,
 *     accessLevels: [
 *         {
 *             name: pulumi.interpolate`accessPolicies/${access_policy.name}/accessLevels/chromeos_no_lock`,
 *             title: "chromeos_no_lock",
 *             basic: {
 *                 conditions: [{
 *                     devicePolicy: {
 *                         requireScreenLock: true,
 *                         osConstraints: [{
 *                             osType: "DESKTOP_CHROME_OS",
 *                         }],
 *                     },
 *                     regions: [
 *                         "CH",
 *                         "IT",
 *                         "US",
 *                     ],
 *                 }],
 *             },
 *         },
 *         {
 *             name: pulumi.interpolate`accessPolicies/${access_policy.name}/accessLevels/mac_no_lock`,
 *             title: "mac_no_lock",
 *             basic: {
 *                 conditions: [{
 *                     devicePolicy: {
 *                         requireScreenLock: true,
 *                         osConstraints: [{
 *                             osType: "DESKTOP_MAC",
 *                         }],
 *                     },
 *                     regions: [
 *                         "CH",
 *                         "IT",
 *                         "US",
 *                     ],
 *                 }],
 *             },
 *         },
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * AccessLevels can be imported using any of these accepted formats:
 *
 * * `{{parent}}/accessLevels`
 *
 * * `{{parent}}`
 *
 * When using the `pulumi import` command, AccessLevels can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:accesscontextmanager/accessLevels:AccessLevels default {{parent}}/accessLevels
 * ```
 *
 * ```sh
 * $ pulumi import gcp:accesscontextmanager/accessLevels:AccessLevels default {{parent}}
 * ```
 */
class AccessLevels extends pulumi.CustomResource {
    /**
     * Get an existing AccessLevels 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 AccessLevels(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AccessLevels.  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'] === AccessLevels.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accessLevels"] = state?.accessLevels;
            resourceInputs["parent"] = state?.parent;
        }
        else {
            const args = argsOrState;
            if (args?.parent === undefined && !opts.urn) {
                throw new Error("Missing required property 'parent'");
            }
            resourceInputs["accessLevels"] = args?.accessLevels;
            resourceInputs["parent"] = args?.parent;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AccessLevels.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AccessLevels = AccessLevels;
/** @internal */
AccessLevels.__pulumiType = 'gcp:accesscontextmanager/accessLevels:AccessLevels';
//# sourceMappingURL=accessLevels.js.map