"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.ManagedZone = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An Integration connectors Managed Zone.
 *
 * To get more information about ManagedZone, see:
 *
 * * [API documentation](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.global.managedZones)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/integration-connectors/docs)
 *
 * ## Example Usage
 *
 * ### Integration Connectors Managed Zone
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const targetProject = new gcp.organizations.Project("target_project", {
 *     projectId: "tf-test_16199",
 *     name: "tf-test_21563",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 *     deletionPolicy: "DELETE",
 * });
 * const testProject = gcp.organizations.getProject({});
 * const dnsPeerBinding = new gcp.projects.IAMMember("dns_peer_binding", {
 *     project: targetProject.projectId,
 *     role: "roles/dns.peer",
 *     member: testProject.then(testProject => `serviceAccount:service-${testProject.number}@gcp-sa-connectors.iam.gserviceaccount.com`),
 * });
 * const dns = new gcp.projects.Service("dns", {
 *     project: targetProject.projectId,
 *     service: "dns.googleapis.com",
 * });
 * const compute = new gcp.projects.Service("compute", {
 *     project: targetProject.projectId,
 *     service: "compute.googleapis.com",
 * });
 * const network = new gcp.compute.Network("network", {
 *     project: targetProject.projectId,
 *     name: "test",
 *     autoCreateSubnetworks: false,
 * }, {
 *     dependsOn: [compute],
 * });
 * const zone = new gcp.dns.ManagedZone("zone", {
 *     name: "tf-test-dns_25141",
 *     dnsName: "private_30827.example.com.",
 *     visibility: "private",
 *     privateVisibilityConfig: {
 *         networks: [{
 *             networkUrl: network.id,
 *         }],
 *     },
 * }, {
 *     dependsOn: [dns],
 * });
 * const testmanagedzone = new gcp.integrationconnectors.ManagedZone("testmanagedzone", {
 *     name: "test",
 *     description: "tf created description",
 *     labels: {
 *         intent: "example",
 *     },
 *     targetProject: targetProject.projectId,
 *     targetVpc: "test",
 *     dns: zone.dnsName,
 * }, {
 *     dependsOn: [
 *         dnsPeerBinding,
 *         zone,
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * ManagedZone can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/global/managedZones/{{name}}`
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, ManagedZone can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:integrationconnectors/managedZone:ManagedZone default projects/{{project}}/locations/global/managedZones/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:integrationconnectors/managedZone:ManagedZone default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:integrationconnectors/managedZone:ManagedZone default {{name}}
 * ```
 */
class ManagedZone extends pulumi.CustomResource {
    /**
     * Get an existing ManagedZone 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 ManagedZone(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of ManagedZone.  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'] === ManagedZone.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["dns"] = state?.dns;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["targetProject"] = state?.targetProject;
            resourceInputs["targetVpc"] = state?.targetVpc;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.dns === undefined && !opts.urn) {
                throw new Error("Missing required property 'dns'");
            }
            if (args?.targetProject === undefined && !opts.urn) {
                throw new Error("Missing required property 'targetProject'");
            }
            if (args?.targetVpc === undefined && !opts.urn) {
                throw new Error("Missing required property 'targetVpc'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["dns"] = args?.dns;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["targetProject"] = args?.targetProject;
            resourceInputs["targetVpc"] = args?.targetVpc;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(ManagedZone.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ManagedZone = ManagedZone;
/** @internal */
ManagedZone.__pulumiType = 'gcp:integrationconnectors/managedZone:ManagedZone';
//# sourceMappingURL=managedZone.js.map