"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.Registration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## Example Usage
 *
 * ### Clouddomains Registration Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const myRegistration = new gcp.clouddomains.Registration("my_registration", {
 *     domainName: "example-domain.com",
 *     location: "global",
 *     labels: {
 *         labelkey: "labelvalue",
 *     },
 *     yearlyPrice: {
 *         currencyCode: "USD",
 *         units: "12",
 *     },
 *     dnsSettings: {
 *         customDns: {
 *             nameServers: [
 *                 "ns-cloud-a1.googledomains.com.",
 *                 "ns-cloud-a2.googledomains.com.",
 *                 "ns-cloud-a3.googledomains.com.",
 *                 "ns-cloud-a4.googledomains.com.",
 *             ],
 *         },
 *     },
 *     contactSettings: {
 *         privacy: "REDACTED_CONTACT_DATA",
 *         registrantContact: {
 *             phoneNumber: "+12345000000",
 *             email: "user@example.com",
 *             postalAddress: {
 *                 regionCode: "US",
 *                 postalCode: "95050",
 *                 administrativeArea: "CA",
 *                 locality: "Example City",
 *                 addressLines: ["1234 Example street"],
 *                 recipients: ["example recipient"],
 *             },
 *         },
 *         adminContact: {
 *             phoneNumber: "+12345000000",
 *             email: "user@example.com",
 *             postalAddress: {
 *                 regionCode: "US",
 *                 postalCode: "95050",
 *                 administrativeArea: "CA",
 *                 locality: "Example City",
 *                 addressLines: ["1234 Example street"],
 *                 recipients: ["example recipient"],
 *             },
 *         },
 *         technicalContact: {
 *             phoneNumber: "+12345000000",
 *             email: "user@example.com",
 *             postalAddress: {
 *                 regionCode: "US",
 *                 postalCode: "95050",
 *                 administrativeArea: "CA",
 *                 locality: "Example City",
 *                 addressLines: ["1234 Example street"],
 *                 recipients: ["example recipient"],
 *             },
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Registration can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}`
 *
 * * `{{project}}/{{location}}/{{domain_name}}`
 *
 * * `{{location}}/{{domain_name}}`
 *
 * When using the `pulumi import` command, Registration can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:clouddomains/registration:Registration default projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:clouddomains/registration:Registration default {{project}}/{{location}}/{{domain_name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:clouddomains/registration:Registration default {{location}}/{{domain_name}}
 * ```
 */
class Registration extends pulumi.CustomResource {
    /**
     * Get an existing Registration 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 Registration(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Registration.  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'] === Registration.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["contactNotices"] = state?.contactNotices;
            resourceInputs["contactSettings"] = state?.contactSettings;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["dnsSettings"] = state?.dnsSettings;
            resourceInputs["domainName"] = state?.domainName;
            resourceInputs["domainNotices"] = state?.domainNotices;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["expireTime"] = state?.expireTime;
            resourceInputs["issues"] = state?.issues;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["managementSettings"] = state?.managementSettings;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["registerFailureReason"] = state?.registerFailureReason;
            resourceInputs["state"] = state?.state;
            resourceInputs["supportedPrivacies"] = state?.supportedPrivacies;
            resourceInputs["yearlyPrice"] = state?.yearlyPrice;
        }
        else {
            const args = argsOrState;
            if (args?.contactSettings === undefined && !opts.urn) {
                throw new Error("Missing required property 'contactSettings'");
            }
            if (args?.domainName === undefined && !opts.urn) {
                throw new Error("Missing required property 'domainName'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.yearlyPrice === undefined && !opts.urn) {
                throw new Error("Missing required property 'yearlyPrice'");
            }
            resourceInputs["contactNotices"] = args?.contactNotices;
            resourceInputs["contactSettings"] = args?.contactSettings;
            resourceInputs["dnsSettings"] = args?.dnsSettings;
            resourceInputs["domainName"] = args?.domainName;
            resourceInputs["domainNotices"] = args?.domainNotices;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["managementSettings"] = args?.managementSettings;
            resourceInputs["project"] = args?.project;
            resourceInputs["yearlyPrice"] = args?.yearlyPrice;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["expireTime"] = undefined /*out*/;
            resourceInputs["issues"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["registerFailureReason"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["supportedPrivacies"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Registration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Registration = Registration;
/** @internal */
Registration.__pulumiType = 'gcp:clouddomains/registration:Registration';
//# sourceMappingURL=registration.js.map