"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualCircuit = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Virtual Circuit resource in Oracle Cloud Infrastructure Core service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/iaas/latest/VirtualCircuit
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/
 *
 * Creates a new virtual circuit to use with Oracle Cloud
 * Infrastructure FastConnect. For more information, see
 * [FastConnect Overview](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm).
 *
 * For the purposes of access control, you must provide the OCID of the
 * compartment where you want the virtual circuit to reside. If you're
 * not sure which compartment to use, put the virtual circuit in the
 * same compartment with the DRG it's using. For more information about
 * compartments and access control, see
 * [Overview of the IAM Service](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm).
 * For information about OCIDs, see
 * [Resource Identifiers](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
 *
 * You may optionally specify a *display name* for the virtual circuit.
 * It does not have to be unique, and you can change it. Avoid entering confidential information.
 *
 * **Important:** When creating a virtual circuit, you specify a DRG for
 * the traffic to flow through. Make sure you attach the DRG to your
 * VCN and confirm the VCN's routing sends traffic to the DRG. Otherwise
 * traffic will not flow. For more information, see
 * [Route Tables](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm).
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testVirtualCircuit = new oci.core.VirtualCircuit("test_virtual_circuit", {
 *     compartmentId: compartmentId,
 *     type: virtualCircuitType,
 *     bandwidthShapeName: virtualCircuitBandwidthShapeName,
 *     bgpAdminState: virtualCircuitBgpAdminState,
 *     crossConnectMappings: [{
 *         bgpMd5authKey: virtualCircuitCrossConnectMappingsBgpMd5authKey,
 *         crossConnectOrCrossConnectGroupId: testCrossConnectOrCrossConnectGroup.id,
 *         customerBgpPeeringIp: virtualCircuitCrossConnectMappingsCustomerBgpPeeringIp,
 *         customerBgpPeeringIpv6: virtualCircuitCrossConnectMappingsCustomerBgpPeeringIpv6,
 *         oracleBgpPeeringIp: virtualCircuitCrossConnectMappingsOracleBgpPeeringIp,
 *         oracleBgpPeeringIpv6: virtualCircuitCrossConnectMappingsOracleBgpPeeringIpv6,
 *         vlan: Number(virtualCircuitCrossConnectMappingsVlan),
 *     }],
 *     customerAsn: virtualCircuitCustomerAsn,
 *     customerBgpAsn: Number(virtualCircuitCustomerBgpAsn),
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     displayName: virtualCircuitDisplayName,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     ipMtu: virtualCircuitIpMtu,
 *     isBfdEnabled: virtualCircuitIsBfdEnabled === "true",
 *     isTransportMode: virtualCircuitIsTransportMode === "true",
 *     gatewayId: testGateway.id,
 *     providerServiceId: testFastConnectProviderServices.fastConnectProviderServices[0].id,
 *     providerServiceKeyName: virtualCircuitProviderServiceKeyName,
 *     publicPrefixes: [{
 *         cidrBlock: virtualCircuitPublicPrefixesCidrBlock,
 *     }],
 *     region: virtualCircuitRegion,
 *     routingPolicies: virtualCircuitRoutingPolicy,
 * });
 * ```
 *
 * ## Import
 *
 * VirtualCircuits can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Core/virtualCircuit:VirtualCircuit test_virtual_circuit "id"
 * ```
 */
class VirtualCircuit extends pulumi.CustomResource {
    /**
     * Get an existing VirtualCircuit 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 VirtualCircuit(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Core/virtualCircuit:VirtualCircuit';
    /**
     * Returns true if the given object is an instance of VirtualCircuit.  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'] === VirtualCircuit.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["bandwidthShapeName"] = state?.bandwidthShapeName;
            resourceInputs["bgpAdminState"] = state?.bgpAdminState;
            resourceInputs["bgpIpv6sessionState"] = state?.bgpIpv6sessionState;
            resourceInputs["bgpManagement"] = state?.bgpManagement;
            resourceInputs["bgpSessionState"] = state?.bgpSessionState;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["crossConnectMappings"] = state?.crossConnectMappings;
            resourceInputs["customerAsn"] = state?.customerAsn;
            resourceInputs["customerBgpAsn"] = state?.customerBgpAsn;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["gatewayId"] = state?.gatewayId;
            resourceInputs["ipMtu"] = state?.ipMtu;
            resourceInputs["isBfdEnabled"] = state?.isBfdEnabled;
            resourceInputs["isTransportMode"] = state?.isTransportMode;
            resourceInputs["oracleBgpAsn"] = state?.oracleBgpAsn;
            resourceInputs["providerServiceId"] = state?.providerServiceId;
            resourceInputs["providerServiceKeyName"] = state?.providerServiceKeyName;
            resourceInputs["providerState"] = state?.providerState;
            resourceInputs["publicPrefixes"] = state?.publicPrefixes;
            resourceInputs["referenceComment"] = state?.referenceComment;
            resourceInputs["region"] = state?.region;
            resourceInputs["routingPolicies"] = state?.routingPolicies;
            resourceInputs["serviceType"] = state?.serviceType;
            resourceInputs["state"] = state?.state;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["type"] = state?.type;
            resourceInputs["virtualCircuitRedundancyMetadatas"] = state?.virtualCircuitRedundancyMetadatas;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.type === undefined && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            resourceInputs["bandwidthShapeName"] = args?.bandwidthShapeName;
            resourceInputs["bgpAdminState"] = args?.bgpAdminState;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["crossConnectMappings"] = args?.crossConnectMappings;
            resourceInputs["customerAsn"] = args?.customerAsn;
            resourceInputs["customerBgpAsn"] = args?.customerBgpAsn;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["gatewayId"] = args?.gatewayId;
            resourceInputs["ipMtu"] = args?.ipMtu;
            resourceInputs["isBfdEnabled"] = args?.isBfdEnabled;
            resourceInputs["isTransportMode"] = args?.isTransportMode;
            resourceInputs["providerServiceId"] = args?.providerServiceId;
            resourceInputs["providerServiceKeyName"] = args?.providerServiceKeyName;
            resourceInputs["publicPrefixes"] = args?.publicPrefixes;
            resourceInputs["region"] = args?.region;
            resourceInputs["routingPolicies"] = args?.routingPolicies;
            resourceInputs["type"] = args?.type;
            resourceInputs["bgpIpv6sessionState"] = undefined /*out*/;
            resourceInputs["bgpManagement"] = undefined /*out*/;
            resourceInputs["bgpSessionState"] = undefined /*out*/;
            resourceInputs["oracleBgpAsn"] = undefined /*out*/;
            resourceInputs["providerState"] = undefined /*out*/;
            resourceInputs["referenceComment"] = undefined /*out*/;
            resourceInputs["serviceType"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["virtualCircuitRedundancyMetadatas"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(VirtualCircuit.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VirtualCircuit = VirtualCircuit;
//# sourceMappingURL=virtualCircuit.js.map