"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.Index = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage tls index
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.tls.Index("foo", {
 *     enableAutoIndex: true,
 *     fullText: {
 *         caseSensitive: false,
 *         delimiter: `, ;/
 * \x09
 * `,
 *         includeChinese: false,
 *     },
 *     keyValues: [{
 *         caseSensitive: true,
 *         delimiter: "!",
 *         includeChinese: false,
 *         indexAll: true,
 *         jsonKeys: [
 *             {
 *                 key: "name",
 *                 valueType: "text",
 *             },
 *             {
 *                 key: "key",
 *                 valueType: "long",
 *             },
 *         ],
 *         key: "k1",
 *         sqlFlag: true,
 *         valueType: "json",
 *     }],
 *     maxTextLen: 2048,
 *     topicId: "a0197686-1309-4c46-8003-4be3b278a838",
 *     userInnerKeyValues: [{
 *         caseSensitive: false,
 *         delimiter: ",:-/ ",
 *         includeChinese: false,
 *         jsonKeys: [
 *             {
 *                 key: "app",
 *                 valueType: "long",
 *             },
 *             {
 *                 key: "tag",
 *                 valueType: "long",
 *             },
 *         ],
 *         key: "__content__",
 *         sqlFlag: false,
 *         valueType: "json",
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * Tls Index can be imported using the topic id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:tls/index:Index default edf051ed-3c46-49ba-9339-bea628fe****
 * ```
 */
class Index extends pulumi.CustomResource {
    /**
     * Get an existing Index 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 Index(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Index.  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'] === Index.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state ? state.createTime : undefined;
            resourceInputs["enableAutoIndex"] = state ? state.enableAutoIndex : undefined;
            resourceInputs["fullText"] = state ? state.fullText : undefined;
            resourceInputs["keyValues"] = state ? state.keyValues : undefined;
            resourceInputs["maxTextLen"] = state ? state.maxTextLen : undefined;
            resourceInputs["modifyTime"] = state ? state.modifyTime : undefined;
            resourceInputs["topicId"] = state ? state.topicId : undefined;
            resourceInputs["userInnerKeyValues"] = state ? state.userInnerKeyValues : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.topicId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'topicId'");
            }
            resourceInputs["enableAutoIndex"] = args ? args.enableAutoIndex : undefined;
            resourceInputs["fullText"] = args ? args.fullText : undefined;
            resourceInputs["keyValues"] = args ? args.keyValues : undefined;
            resourceInputs["maxTextLen"] = args ? args.maxTextLen : undefined;
            resourceInputs["topicId"] = args ? args.topicId : undefined;
            resourceInputs["userInnerKeyValues"] = args ? args.userInnerKeyValues : undefined;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["modifyTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Index.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Index = Index;
/** @internal */
Index.__pulumiType = 'volcengine:tls/index:Index';
//# sourceMappingURL=index_.js.map