"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.BackupVault = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Container to store and organize immutable and indelible backups.
 *
 * ## Example Usage
 *
 * ### Backup Dr Backup Vault Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const backup_vault_test = new gcp.backupdisasterrecovery.BackupVault("backup-vault-test", {
 *     location: "us-central1",
 *     backupVaultId: "backup-vault-test",
 *     description: "This is a second backup vault built by Terraform.",
 *     backupMinimumEnforcedRetentionDuration: "100000s",
 *     annotations: {
 *         annotations1: "bar1",
 *         annotations2: "baz1",
 *     },
 *     labels: {
 *         foo: "bar1",
 *         bar: "baz1",
 *     },
 *     forceUpdate: true,
 *     accessRestriction: "WITHIN_ORGANIZATION",
 *     backupRetentionInheritance: "INHERIT_VAULT_RETENTION",
 *     ignoreInactiveDatasources: true,
 *     ignoreBackupPlanReferences: true,
 *     allowMissing: true,
 * });
 * ```
 *
 * ## Import
 *
 * BackupVault can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/backupVaults/{{backup_vault_id}}`
 *
 * * `{{project}}/{{location}}/{{backup_vault_id}}`
 *
 * * `{{location}}/{{backup_vault_id}}`
 *
 * When using the `pulumi import` command, BackupVault can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:backupdisasterrecovery/backupVault:BackupVault default projects/{{project}}/locations/{{location}}/backupVaults/{{backup_vault_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:backupdisasterrecovery/backupVault:BackupVault default {{project}}/{{location}}/{{backup_vault_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:backupdisasterrecovery/backupVault:BackupVault default {{location}}/{{backup_vault_id}}
 * ```
 */
class BackupVault extends pulumi.CustomResource {
    /**
     * Get an existing BackupVault 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 BackupVault(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of BackupVault.  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'] === BackupVault.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accessRestriction"] = state?.accessRestriction;
            resourceInputs["allowMissing"] = state?.allowMissing;
            resourceInputs["annotations"] = state?.annotations;
            resourceInputs["backupCount"] = state?.backupCount;
            resourceInputs["backupMinimumEnforcedRetentionDuration"] = state?.backupMinimumEnforcedRetentionDuration;
            resourceInputs["backupRetentionInheritance"] = state?.backupRetentionInheritance;
            resourceInputs["backupVaultId"] = state?.backupVaultId;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["deletable"] = state?.deletable;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["effectiveTime"] = state?.effectiveTime;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["forceDelete"] = state?.forceDelete;
            resourceInputs["forceUpdate"] = state?.forceUpdate;
            resourceInputs["ignoreBackupPlanReferences"] = state?.ignoreBackupPlanReferences;
            resourceInputs["ignoreInactiveDatasources"] = state?.ignoreInactiveDatasources;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["serviceAccount"] = state?.serviceAccount;
            resourceInputs["state"] = state?.state;
            resourceInputs["totalStoredBytes"] = state?.totalStoredBytes;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.backupMinimumEnforcedRetentionDuration === undefined && !opts.urn) {
                throw new Error("Missing required property 'backupMinimumEnforcedRetentionDuration'");
            }
            if (args?.backupVaultId === undefined && !opts.urn) {
                throw new Error("Missing required property 'backupVaultId'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["accessRestriction"] = args?.accessRestriction;
            resourceInputs["allowMissing"] = args?.allowMissing;
            resourceInputs["annotations"] = args?.annotations;
            resourceInputs["backupMinimumEnforcedRetentionDuration"] = args?.backupMinimumEnforcedRetentionDuration;
            resourceInputs["backupRetentionInheritance"] = args?.backupRetentionInheritance;
            resourceInputs["backupVaultId"] = args?.backupVaultId;
            resourceInputs["description"] = args?.description;
            resourceInputs["effectiveTime"] = args?.effectiveTime;
            resourceInputs["forceDelete"] = args?.forceDelete;
            resourceInputs["forceUpdate"] = args?.forceUpdate;
            resourceInputs["ignoreBackupPlanReferences"] = args?.ignoreBackupPlanReferences;
            resourceInputs["ignoreInactiveDatasources"] = args?.ignoreInactiveDatasources;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["backupCount"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["deletable"] = undefined /*out*/;
            resourceInputs["effectiveAnnotations"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["serviceAccount"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["totalStoredBytes"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(BackupVault.__pulumiType, name, resourceInputs, opts);
    }
}
exports.BackupVault = BackupVault;
/** @internal */
BackupVault.__pulumiType = 'gcp:backupdisasterrecovery/backupVault:BackupVault';
//# sourceMappingURL=backupVault.js.map