"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.SnapshotSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Updates your project's snapshot settings and sets a new default storage location for snapshots.
 *
 * To get more information about SnapshotSettings, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/snapshotSettings)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/compute/docs/disks/snapshot-settings#snapshot_settings_how_to_update)
 *
 * ## Example Usage
 *
 * ### Snapshot Settings Specific Locations
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const tf_test_snapshot_settings = new gcp.compute.SnapshotSettings("tf-test-snapshot-settings", {storageLocation: {
 *     policy: "SPECIFIC_LOCATIONS",
 *     locations: [{
 *         name: "us-central1",
 *         location: "us-central1",
 *     }],
 * }});
 * ```
 *
 * ## Import
 *
 * SnapshotSettings can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/global/snapshotSettings/`
 *
 * * `{{project}}`
 *
 * When using the `pulumi import` command, SnapshotSettings can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/snapshotSettings:SnapshotSettings default projects/{{project}}/global/snapshotSettings/
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/snapshotSettings:SnapshotSettings default {{project}}
 * ```
 */
class SnapshotSettings extends pulumi.CustomResource {
    /**
     * Get an existing SnapshotSettings 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 SnapshotSettings(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of SnapshotSettings.  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'] === SnapshotSettings.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["project"] = state?.project;
            resourceInputs["storageLocation"] = state?.storageLocation;
        }
        else {
            const args = argsOrState;
            if (args?.storageLocation === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageLocation'");
            }
            resourceInputs["project"] = args?.project;
            resourceInputs["storageLocation"] = args?.storageLocation;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(SnapshotSettings.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SnapshotSettings = SnapshotSettings;
/** @internal */
SnapshotSettings.__pulumiType = 'gcp:compute/snapshotSettings:SnapshotSettings';
//# sourceMappingURL=snapshotSettings.js.map