"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.RouteEntry = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage transit router route entry
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooCustomerGateway = new volcengine.vpn.CustomerGateway("fooCustomerGateway", {
 *     ipAddress: "192.0.1.3",
 *     customerGatewayName: "acc-test",
 *     description: "acc-test",
 * });
 * const fooConnection = new volcengine.vpn.Connection("fooConnection", {
 *     vpnConnectionName: "acc-tf-test",
 *     description: "acc-tf-test",
 *     attachType: "TransitRouter",
 *     customerGatewayId: fooCustomerGateway.id,
 *     localSubnets: ["192.168.0.0/22"],
 *     remoteSubnets: ["192.161.0.0/20"],
 *     dpdAction: "none",
 *     natTraversal: true,
 *     ikeConfigPsk: "acctest@!3",
 *     ikeConfigVersion: "ikev1",
 *     ikeConfigMode: "main",
 *     ikeConfigEncAlg: "aes",
 *     ikeConfigAuthAlg: "md5",
 *     ikeConfigDhGroup: "group2",
 *     ikeConfigLifetime: 9000,
 *     ikeConfigLocalId: "acc_test",
 *     ikeConfigRemoteId: "acc_test",
 *     ipsecConfigEncAlg: "aes",
 *     ipsecConfigAuthAlg: "sha256",
 *     ipsecConfigDhGroup: "group2",
 *     ipsecConfigLifetime: 9000,
 *     logEnabled: false,
 * });
 * const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
 *     transitRouterName: "test-tf-acc",
 *     description: "test-tf-acc",
 * });
 * const fooVpnAttachment = new volcengine.transit_router.VpnAttachment("fooVpnAttachment", {
 *     zoneId: "cn-beijing-a",
 *     transitRouterAttachmentName: "tf-test-acc",
 *     description: "tf-test-acc-desc",
 *     transitRouterId: fooTransitRouter.id,
 *     vpnConnectionId: fooConnection.id,
 * });
 * const fooRouteTable = new volcengine.transit_router.RouteTable("fooRouteTable", {
 *     description: "tf-test-acc-description-route-route-table",
 *     transitRouterRouteTableName: "tf-table-test-acc",
 *     transitRouterId: fooTransitRouter.id,
 * });
 * const fooRouteEntry = new volcengine.transit_router.RouteEntry("fooRouteEntry", {
 *     description: "tf-test-acc-description-entry",
 *     transitRouterRouteEntryName: "tf-acc-test-entry",
 *     destinationCidrBlock: "192.168.0.0/24",
 *     transitRouterRouteEntryNextHopType: "Attachment",
 *     transitRouterRouteTableId: fooRouteTable.transitRouterRouteTableId,
 *     transitRouterRouteEntryNextHopId: fooVpnAttachment.transitRouterAttachmentId,
 * });
 * ```
 *
 * ## Import
 *
 * transit router route entry can be imported using the table and entry id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:transit_router/routeEntry:RouteEntry default tr-rtb-12b7qd3fmzf2817q7y2jkbd55:tr-rte-1i5i8khf9m58gae5kcx6***
 * ```
 */
class RouteEntry extends pulumi.CustomResource {
    /**
     * Get an existing RouteEntry 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 RouteEntry(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of RouteEntry.  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'] === RouteEntry.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["asPath"] = state ? state.asPath : undefined;
            resourceInputs["creationTime"] = state ? state.creationTime : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["destinationCidrBlock"] = state ? state.destinationCidrBlock : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["transitRouterRouteEntryId"] = state ? state.transitRouterRouteEntryId : undefined;
            resourceInputs["transitRouterRouteEntryName"] = state ? state.transitRouterRouteEntryName : undefined;
            resourceInputs["transitRouterRouteEntryNextHopId"] = state ? state.transitRouterRouteEntryNextHopId : undefined;
            resourceInputs["transitRouterRouteEntryNextHopType"] = state ? state.transitRouterRouteEntryNextHopType : undefined;
            resourceInputs["transitRouterRouteEntryType"] = state ? state.transitRouterRouteEntryType : undefined;
            resourceInputs["transitRouterRouteTableId"] = state ? state.transitRouterRouteTableId : undefined;
            resourceInputs["updateTime"] = state ? state.updateTime : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.destinationCidrBlock === undefined) && !opts.urn) {
                throw new Error("Missing required property 'destinationCidrBlock'");
            }
            if ((!args || args.transitRouterRouteEntryNextHopType === undefined) && !opts.urn) {
                throw new Error("Missing required property 'transitRouterRouteEntryNextHopType'");
            }
            if ((!args || args.transitRouterRouteTableId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'transitRouterRouteTableId'");
            }
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["destinationCidrBlock"] = args ? args.destinationCidrBlock : undefined;
            resourceInputs["transitRouterRouteEntryName"] = args ? args.transitRouterRouteEntryName : undefined;
            resourceInputs["transitRouterRouteEntryNextHopId"] = args ? args.transitRouterRouteEntryNextHopId : undefined;
            resourceInputs["transitRouterRouteEntryNextHopType"] = args ? args.transitRouterRouteEntryNextHopType : undefined;
            resourceInputs["transitRouterRouteTableId"] = args ? args.transitRouterRouteTableId : undefined;
            resourceInputs["asPath"] = undefined /*out*/;
            resourceInputs["creationTime"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["transitRouterRouteEntryId"] = undefined /*out*/;
            resourceInputs["transitRouterRouteEntryType"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RouteEntry.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RouteEntry = RouteEntry;
/** @internal */
RouteEntry.__pulumiType = 'volcengine:transit_router/routeEntry:RouteEntry';
//# sourceMappingURL=routeEntry.js.map