"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.GdcServiceInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A service instance is an instance of the Dataproc operator running on a GDC cluster.
 *
 * To get more information about ServiceInstance, see:
 *
 * * [API documentation](https://cloud.google.com/dataproc-gdc/docs/reference/rest/v1/projects.locations.serviceInstances)
 * * How-to Guides
 *     * [Dataproc Intro](https://cloud.google.com/dataproc/)
 *
 * ## Example Usage
 *
 * ### Dataprocgdc Serviceinstance
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const service_instance = new gcp.dataproc.GdcServiceInstance("service-instance", {
 *     serviceInstanceId: "tf-e2e-service-instance",
 *     project: "my-project",
 *     location: "us-west2",
 *     gdceCluster: {
 *         gdceCluster: "projects/gdce-cluster-monitoring/locations/us-west2/clusters/gdce-prism-prober-ord106",
 *     },
 *     displayName: "A service instance",
 *     labels: {
 *         "test-label": "label-value",
 *     },
 *     serviceAccount: "dataprocgdc-cep-workflows@gdce-cluster-monitoring.iam.gserviceaccount.com",
 * });
 * ```
 *
 * ## Import
 *
 * ServiceInstance can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}}`
 *
 * * `{{project}}/{{location}}/{{service_instance_id}}`
 *
 * * `{{location}}/{{service_instance_id}}`
 *
 * When using the `pulumi import` command, ServiceInstance can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:dataproc/gdcServiceInstance:GdcServiceInstance default projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataproc/gdcServiceInstance:GdcServiceInstance default {{project}}/{{location}}/{{service_instance_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:dataproc/gdcServiceInstance:GdcServiceInstance default {{location}}/{{service_instance_id}}
 * ```
 */
class GdcServiceInstance extends pulumi.CustomResource {
    /**
     * Get an existing GdcServiceInstance 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 GdcServiceInstance(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of GdcServiceInstance.  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'] === GdcServiceInstance.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["effectiveServiceAccount"] = state?.effectiveServiceAccount;
            resourceInputs["gdceCluster"] = state?.gdceCluster;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["requestedState"] = state?.requestedState;
            resourceInputs["serviceAccount"] = state?.serviceAccount;
            resourceInputs["serviceInstanceId"] = state?.serviceInstanceId;
            resourceInputs["sparkServiceInstanceConfig"] = state?.sparkServiceInstanceConfig;
            resourceInputs["state"] = state?.state;
            resourceInputs["stateMessage"] = state?.stateMessage;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.serviceInstanceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceInstanceId'");
            }
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["gdceCluster"] = args?.gdceCluster;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["serviceAccount"] = args?.serviceAccount;
            resourceInputs["serviceInstanceId"] = args?.serviceInstanceId;
            resourceInputs["sparkServiceInstanceConfig"] = args?.sparkServiceInstanceConfig;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["effectiveServiceAccount"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["reconciling"] = undefined /*out*/;
            resourceInputs["requestedState"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["stateMessage"] = 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(GdcServiceInstance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.GdcServiceInstance = GdcServiceInstance;
/** @internal */
GdcServiceInstance.__pulumiType = 'gcp:dataproc/gdcServiceInstance:GdcServiceInstance';
//# sourceMappingURL=gdcServiceInstance.js.map