"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualInterface = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage direct connect virtual interface
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.direct_connect.VirtualInterface("foo", {
 *     description: "tf-test",
 *     directConnectConnectionId: "dcc-rtkzeotzst1cu3numzi****",
 *     directConnectGatewayId: "dcg-638x4bjvjawwn3gd5xw****",
 *     enableBfd: false,
 *     localIp: "**.**.**.**&#47;**",
 *     peerIp: "**.**.**.**&#47;**",
 *     routeType: "Static",
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 *     virtualInterfaceName: "tf-test-vi",
 *     vlanId: 2,
 * });
 * ```
 *
 * ## Import
 *
 * DirectConnectVirtualInterface can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:direct_connect/virtualInterface:VirtualInterface default resource_id
 * ```
 */
class VirtualInterface extends pulumi.CustomResource {
    /**
     * Get an existing VirtualInterface 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 VirtualInterface(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of VirtualInterface.  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'] === VirtualInterface.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["bandwidth"] = state ? state.bandwidth : undefined;
            resourceInputs["bfdDetectInterval"] = state ? state.bfdDetectInterval : undefined;
            resourceInputs["bfdDetectMultiplier"] = state ? state.bfdDetectMultiplier : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["directConnectConnectionId"] = state ? state.directConnectConnectionId : undefined;
            resourceInputs["directConnectGatewayId"] = state ? state.directConnectGatewayId : undefined;
            resourceInputs["enableBfd"] = state ? state.enableBfd : undefined;
            resourceInputs["enableNqa"] = state ? state.enableNqa : undefined;
            resourceInputs["localIp"] = state ? state.localIp : undefined;
            resourceInputs["nqaDetectInterval"] = state ? state.nqaDetectInterval : undefined;
            resourceInputs["nqaDetectMultiplier"] = state ? state.nqaDetectMultiplier : undefined;
            resourceInputs["peerIp"] = state ? state.peerIp : undefined;
            resourceInputs["routeType"] = state ? state.routeType : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["virtualInterfaceName"] = state ? state.virtualInterfaceName : undefined;
            resourceInputs["vlanId"] = state ? state.vlanId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.directConnectConnectionId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'directConnectConnectionId'");
            }
            if ((!args || args.directConnectGatewayId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'directConnectGatewayId'");
            }
            if ((!args || args.localIp === undefined) && !opts.urn) {
                throw new Error("Missing required property 'localIp'");
            }
            if ((!args || args.peerIp === undefined) && !opts.urn) {
                throw new Error("Missing required property 'peerIp'");
            }
            if ((!args || args.vlanId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'vlanId'");
            }
            resourceInputs["bandwidth"] = args ? args.bandwidth : undefined;
            resourceInputs["bfdDetectInterval"] = args ? args.bfdDetectInterval : undefined;
            resourceInputs["bfdDetectMultiplier"] = args ? args.bfdDetectMultiplier : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["directConnectConnectionId"] = args ? args.directConnectConnectionId : undefined;
            resourceInputs["directConnectGatewayId"] = args ? args.directConnectGatewayId : undefined;
            resourceInputs["enableBfd"] = args ? args.enableBfd : undefined;
            resourceInputs["enableNqa"] = args ? args.enableNqa : undefined;
            resourceInputs["localIp"] = args ? args.localIp : undefined;
            resourceInputs["nqaDetectInterval"] = args ? args.nqaDetectInterval : undefined;
            resourceInputs["nqaDetectMultiplier"] = args ? args.nqaDetectMultiplier : undefined;
            resourceInputs["peerIp"] = args ? args.peerIp : undefined;
            resourceInputs["routeType"] = args ? args.routeType : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["virtualInterfaceName"] = args ? args.virtualInterfaceName : undefined;
            resourceInputs["vlanId"] = args ? args.vlanId : undefined;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(VirtualInterface.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VirtualInterface = VirtualInterface;
/** @internal */
VirtualInterface.__pulumiType = 'volcengine:direct_connect/virtualInterface:VirtualInterface';
//# sourceMappingURL=virtualInterface.js.map