"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.Curation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Description
 *
 * ## Example Usage
 *
 * ### Apihub Curation Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const apihubCurationBasic = new gcp.apihub.Curation("apihub_curation_basic", {
 *     location: "us-central1",
 *     curationId: "test",
 *     project: "apihub-terraform",
 *     displayName: "Test Curation",
 *     description: "This is a sample curation resource managed by Terraform.",
 *     endpoint: {
 *         applicationIntegrationEndpointDetails: {
 *             triggerId: "api_trigger/curation_API_1",
 *             uri: "https://integrations.googleapis.com/v1/projects/1082615593856/locations/us-central1/integrations/curation:execute",
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Curation can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/curations/{{curation_id}}`
 *
 * * `{{project}}/{{location}}/{{curation_id}}`
 *
 * * `{{location}}/{{curation_id}}`
 *
 * When using the `pulumi import` command, Curation can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:apihub/curation:Curation default projects/{{project}}/locations/{{location}}/curations/{{curation_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apihub/curation:Curation default {{project}}/{{location}}/{{curation_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apihub/curation:Curation default {{location}}/{{curation_id}}
 * ```
 */
class Curation extends pulumi.CustomResource {
    /**
     * Get an existing Curation 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 Curation(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Curation.  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'] === Curation.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["curationId"] = state?.curationId;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["endpoint"] = state?.endpoint;
            resourceInputs["lastExecutionErrorCode"] = state?.lastExecutionErrorCode;
            resourceInputs["lastExecutionErrorMessage"] = state?.lastExecutionErrorMessage;
            resourceInputs["lastExecutionState"] = state?.lastExecutionState;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["pluginInstanceActions"] = state?.pluginInstanceActions;
            resourceInputs["project"] = state?.project;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.curationId === undefined && !opts.urn) {
                throw new Error("Missing required property 'curationId'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.endpoint === undefined && !opts.urn) {
                throw new Error("Missing required property 'endpoint'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["curationId"] = args?.curationId;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["endpoint"] = args?.endpoint;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["lastExecutionErrorCode"] = undefined /*out*/;
            resourceInputs["lastExecutionErrorMessage"] = undefined /*out*/;
            resourceInputs["lastExecutionState"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pluginInstanceActions"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Curation.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Curation = Curation;
/** @internal */
Curation.__pulumiType = 'gcp:apihub/curation:Curation';
//# sourceMappingURL=curation.js.map