"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.RouterInterface = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Manages a Cloud Router interface. For more information see
 * [the official documentation](https://cloud.google.com/compute/docs/cloudrouter)
 * and
 * [API](https://cloud.google.com/compute/docs/reference/latest/routers).
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const foobar = new gcp.compute.RouterInterface("foobar", {
 *     name: "interface-1",
 *     router: "router-1",
 *     region: "us-central1",
 *     ipRange: "169.254.1.1/30",
 *     vpnTunnel: "tunnel-1",
 * });
 * ```
 *
 * ## Import
 *
 * Router interfaces can be imported using the `project` (optional), `region`, `router`, and `name`, e.g.
 *
 * * `{{project_id}}/{{region}}/{{router}}/{{name}}`
 *
 * * `{{region}}/{{router}}/{{name}}`
 *
 * When using the `pulumi import` command, router interfaces can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/routerInterface:RouterInterface default {{project_id}}/{{region}}/{{router}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/routerInterface:RouterInterface default {{region}}/{{router}}/{{name}}
 * ```
 */
class RouterInterface extends pulumi.CustomResource {
    /**
     * Get an existing RouterInterface 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 RouterInterface(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of RouterInterface.  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'] === RouterInterface.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["interconnectAttachment"] = state?.interconnectAttachment;
            resourceInputs["ipRange"] = state?.ipRange;
            resourceInputs["ipVersion"] = state?.ipVersion;
            resourceInputs["name"] = state?.name;
            resourceInputs["privateIpAddress"] = state?.privateIpAddress;
            resourceInputs["project"] = state?.project;
            resourceInputs["redundantInterface"] = state?.redundantInterface;
            resourceInputs["region"] = state?.region;
            resourceInputs["router"] = state?.router;
            resourceInputs["subnetwork"] = state?.subnetwork;
            resourceInputs["vpnTunnel"] = state?.vpnTunnel;
        }
        else {
            const args = argsOrState;
            if (args?.router === undefined && !opts.urn) {
                throw new Error("Missing required property 'router'");
            }
            resourceInputs["interconnectAttachment"] = args?.interconnectAttachment;
            resourceInputs["ipRange"] = args?.ipRange;
            resourceInputs["ipVersion"] = args?.ipVersion;
            resourceInputs["name"] = args?.name;
            resourceInputs["privateIpAddress"] = args?.privateIpAddress;
            resourceInputs["project"] = args?.project;
            resourceInputs["redundantInterface"] = args?.redundantInterface;
            resourceInputs["region"] = args?.region;
            resourceInputs["router"] = args?.router;
            resourceInputs["subnetwork"] = args?.subnetwork;
            resourceInputs["vpnTunnel"] = args?.vpnTunnel;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RouterInterface.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RouterInterface = RouterInterface;
/** @internal */
RouterInterface.__pulumiType = 'gcp:compute/routerInterface:RouterInterface';
//# sourceMappingURL=routerInterface.js.map