"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.DnsZone = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Apigee Dns Zone.
 *
 * To get more information about DnsZone, see:
 *
 * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.dnsZones/create)
 * * How-to Guides
 *     * [Creating a DnsZone](https://cloud.google.com/apigee/docs/api-platform/get-started/create-dns)
 *
 * ## Example Usage
 *
 * ### Apigee Dns Zone Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const current = gcp.organizations.getClientConfig({});
 * const apigeeNetwork = new gcp.compute.Network("apigee_network", {name: "apigee-network"});
 * const org = new gcp.apigee.Organization("org", {
 *     description: "Terraform-provisioned basic Apigee Org without VPC Peering.",
 *     analyticsRegion: "us-central1",
 *     projectId: current.then(current => current.project),
 *     disableVpcPeering: true,
 * });
 * const apigeeDnsZone = new gcp.apigee.DnsZone("apigee_dns_zone", {
 *     orgId: apigeeOrg.id,
 *     dnsZoneId: "test1",
 *     domain: "foo.com",
 *     description: "test",
 *     peeringConfig: {
 *         targetProjectId: current.then(current => current.project),
 *         targetNetworkId: apigeeNetwork.id,
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * DnsZone can be imported using any of these accepted formats:
 *
 * * `{{org_id}}/dnsZones/{{dns_zone_id}}`
 *
 * * `{{org_id}}/{{dns_zone_id}}`
 *
 * When using the `pulumi import` command, DnsZone can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:apigee/dnsZone:DnsZone default {{org_id}}/dnsZones/{{dns_zone_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/dnsZone:DnsZone default {{org_id}}/{{dns_zone_id}}
 * ```
 */
class DnsZone extends pulumi.CustomResource {
    /**
     * Get an existing DnsZone 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 DnsZone(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of DnsZone.  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'] === DnsZone.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["dnsZoneId"] = state?.dnsZoneId;
            resourceInputs["domain"] = state?.domain;
            resourceInputs["name"] = state?.name;
            resourceInputs["orgId"] = state?.orgId;
            resourceInputs["peeringConfig"] = state?.peeringConfig;
        }
        else {
            const args = argsOrState;
            if (args?.description === undefined && !opts.urn) {
                throw new Error("Missing required property 'description'");
            }
            if (args?.dnsZoneId === undefined && !opts.urn) {
                throw new Error("Missing required property 'dnsZoneId'");
            }
            if (args?.domain === undefined && !opts.urn) {
                throw new Error("Missing required property 'domain'");
            }
            if (args?.orgId === undefined && !opts.urn) {
                throw new Error("Missing required property 'orgId'");
            }
            if (args?.peeringConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'peeringConfig'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["dnsZoneId"] = args?.dnsZoneId;
            resourceInputs["domain"] = args?.domain;
            resourceInputs["orgId"] = args?.orgId;
            resourceInputs["peeringConfig"] = args?.peeringConfig;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(DnsZone.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DnsZone = DnsZone;
/** @internal */
DnsZone.__pulumiType = 'gcp:apigee/dnsZone:DnsZone';
//# sourceMappingURL=dnsZone.js.map