"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.BatchOperationsJob = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Storage Batch Operations (SBO) is a Cloud Storage management feature that offers a
 * seamless experience to perform single batch operations on millions of GCS objects in a
 * serverless manner.
 *
 * ## Example Usage
 *
 * ### Storage Batch Operations
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bucket = new gcp.storage.Bucket("bucket", {
 *     name: "tf-sample-bucket",
 *     location: "us-central1",
 *     forceDestroy: true,
 * });
 * const tf_job = new gcp.storage.BatchOperationsJob("tf-job", {
 *     jobId: "tf-job",
 *     bucketList: {
 *         buckets: {
 *             bucket: bucket.name,
 *             prefixList: {
 *                 includedObjectPrefixes: ["bkt"],
 *             },
 *         },
 *     },
 *     putMetadata: {
 *         customMetadata: {
 *             key: "value",
 *         },
 *     },
 *     deleteProtection: false,
 * });
 * ```
 *
 * ## Import
 *
 * Job can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/global/jobs/{{job_id}}`
 *
 * * `{{project}}/{{job_id}}`
 *
 * * `{{job_id}}`
 *
 * When using the `pulumi import` command, Job can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:storage/batchOperationsJob:BatchOperationsJob default projects/{{project}}/locations/global/jobs/{{job_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:storage/batchOperationsJob:BatchOperationsJob default {{project}}/{{job_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:storage/batchOperationsJob:BatchOperationsJob default {{job_id}}
 * ```
 */
class BatchOperationsJob extends pulumi.CustomResource {
    /**
     * Get an existing BatchOperationsJob 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 BatchOperationsJob(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of BatchOperationsJob.  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'] === BatchOperationsJob.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["bucketList"] = state?.bucketList;
            resourceInputs["completeTime"] = state?.completeTime;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["deleteObject"] = state?.deleteObject;
            resourceInputs["deleteProtection"] = state?.deleteProtection;
            resourceInputs["jobId"] = state?.jobId;
            resourceInputs["project"] = state?.project;
            resourceInputs["putMetadata"] = state?.putMetadata;
            resourceInputs["putObjectHold"] = state?.putObjectHold;
            resourceInputs["rewriteObject"] = state?.rewriteObject;
            resourceInputs["scheduleTime"] = state?.scheduleTime;
            resourceInputs["state"] = state?.state;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            resourceInputs["bucketList"] = args?.bucketList;
            resourceInputs["deleteObject"] = args?.deleteObject;
            resourceInputs["deleteProtection"] = args?.deleteProtection;
            resourceInputs["jobId"] = args?.jobId;
            resourceInputs["project"] = args?.project;
            resourceInputs["putMetadata"] = args?.putMetadata;
            resourceInputs["putObjectHold"] = args?.putObjectHold;
            resourceInputs["rewriteObject"] = args?.rewriteObject;
            resourceInputs["completeTime"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["scheduleTime"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(BatchOperationsJob.__pulumiType, name, resourceInputs, opts);
    }
}
exports.BatchOperationsJob = BatchOperationsJob;
/** @internal */
BatchOperationsJob.__pulumiType = 'gcp:storage/batchOperationsJob:BatchOperationsJob';
//# sourceMappingURL=batchOperationsJob.js.map