"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.ResolverRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage private zone resolver rule
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.private_zone.ResolverRule("foo", {
 *     endpointId: 346,
 *     forwardIps: [{
 *         ip: "10.199.38.19",
 *         port: 33,
 *     }],
 *     projectName: "default",
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 *     type: "OUTBOUND",
 *     vpcs: [{
 *         region: "cn-beijing",
 *         vpcId: "vpc-13f9uuuqfdjb43n6nu5p1****",
 *     }],
 *     zoneNames: ["www.baidu.com"],
 * });
 * ```
 *
 * ## Import
 *
 * PrivateZoneResolverRule can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:private_zone/resolverRule:ResolverRule default resource_id
 * ```
 */
class ResolverRule extends pulumi.CustomResource {
    /**
     * Get an existing ResolverRule 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 ResolverRule(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of ResolverRule.  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'] === ResolverRule.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["endpointId"] = state ? state.endpointId : undefined;
            resourceInputs["endpointTrn"] = state ? state.endpointTrn : undefined;
            resourceInputs["forwardIps"] = state ? state.forwardIps : undefined;
            resourceInputs["line"] = state ? state.line : undefined;
            resourceInputs["name"] = state ? state.name : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["type"] = state ? state.type : undefined;
            resourceInputs["vpcTrns"] = state ? state.vpcTrns : undefined;
            resourceInputs["vpcs"] = state ? state.vpcs : undefined;
            resourceInputs["zoneNames"] = state ? state.zoneNames : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.type === undefined) && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            if ((!args || args.vpcs === undefined) && !opts.urn) {
                throw new Error("Missing required property 'vpcs'");
            }
            resourceInputs["endpointId"] = args ? args.endpointId : undefined;
            resourceInputs["endpointTrn"] = args ? args.endpointTrn : undefined;
            resourceInputs["forwardIps"] = args ? args.forwardIps : undefined;
            resourceInputs["line"] = args ? args.line : undefined;
            resourceInputs["name"] = args ? args.name : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["type"] = args ? args.type : undefined;
            resourceInputs["vpcTrns"] = args ? args.vpcTrns : undefined;
            resourceInputs["vpcs"] = args ? args.vpcs : undefined;
            resourceInputs["zoneNames"] = args ? args.zoneNames : undefined;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ResolverRule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ResolverRule = ResolverRule;
/** @internal */
ResolverRule.__pulumiType = 'volcengine:private_zone/resolverRule:ResolverRule';
//# sourceMappingURL=resolverRule.js.map