"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.DownloadTask = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage tls download task
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.tls.DownloadTask("foo", {
 *     topicId: "3c57a110-399a-43b3-bc3c-5d60e065239a",
 *     taskName: "tf-test-download",
 *     query: "*",
 *     startTime: 1768448896,
 *     endTime: 1768450896,
 *     compression: "gzip",
 *     dataFormat: "json",
 *     limit: 1000000,
 *     sort: "asc",
 *     allowIncomplete: false,
 *     taskType: 1,
 *     logContextInfos: {
 *         source: "your ip",
 *         contextFlow: "1768450893021#4258909d8fc97e7d-286d6d5f6966623c-6943",
 *         packageOffset: 4833728523,
 *     },
 * });
 * export const tlsDownloadTaskId = foo.taskId;
 * ```
 *
 * ## Import
 *
 * tls download task can be imported using the topic_id and task_id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:tls/downloadTask:DownloadTask default topic-123456:task-1234567890
 * ```
 */
class DownloadTask extends pulumi.CustomResource {
    /**
     * Get an existing DownloadTask 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 DownloadTask(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of DownloadTask.  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'] === DownloadTask.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["allowIncomplete"] = state ? state.allowIncomplete : undefined;
            resourceInputs["compression"] = state ? state.compression : undefined;
            resourceInputs["dataFormat"] = state ? state.dataFormat : undefined;
            resourceInputs["downloadUrl"] = state ? state.downloadUrl : undefined;
            resourceInputs["endTime"] = state ? state.endTime : undefined;
            resourceInputs["limit"] = state ? state.limit : undefined;
            resourceInputs["logContextInfos"] = state ? state.logContextInfos : undefined;
            resourceInputs["query"] = state ? state.query : undefined;
            resourceInputs["sort"] = state ? state.sort : undefined;
            resourceInputs["startTime"] = state ? state.startTime : undefined;
            resourceInputs["taskId"] = state ? state.taskId : undefined;
            resourceInputs["taskName"] = state ? state.taskName : undefined;
            resourceInputs["taskStatus"] = state ? state.taskStatus : undefined;
            resourceInputs["taskType"] = state ? state.taskType : undefined;
            resourceInputs["topicId"] = state ? state.topicId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.endTime === undefined) && !opts.urn) {
                throw new Error("Missing required property 'endTime'");
            }
            if ((!args || args.startTime === undefined) && !opts.urn) {
                throw new Error("Missing required property 'startTime'");
            }
            if ((!args || args.taskName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'taskName'");
            }
            if ((!args || args.taskType === undefined) && !opts.urn) {
                throw new Error("Missing required property 'taskType'");
            }
            if ((!args || args.topicId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'topicId'");
            }
            resourceInputs["allowIncomplete"] = args ? args.allowIncomplete : undefined;
            resourceInputs["compression"] = args ? args.compression : undefined;
            resourceInputs["dataFormat"] = args ? args.dataFormat : undefined;
            resourceInputs["endTime"] = args ? args.endTime : undefined;
            resourceInputs["limit"] = args ? args.limit : undefined;
            resourceInputs["logContextInfos"] = args ? args.logContextInfos : undefined;
            resourceInputs["query"] = args ? args.query : undefined;
            resourceInputs["sort"] = args ? args.sort : undefined;
            resourceInputs["startTime"] = args ? args.startTime : undefined;
            resourceInputs["taskName"] = args ? args.taskName : undefined;
            resourceInputs["taskType"] = args ? args.taskType : undefined;
            resourceInputs["topicId"] = args ? args.topicId : undefined;
            resourceInputs["downloadUrl"] = undefined /*out*/;
            resourceInputs["taskId"] = undefined /*out*/;
            resourceInputs["taskStatus"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(DownloadTask.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DownloadTask = DownloadTask;
/** @internal */
DownloadTask.__pulumiType = 'volcengine:tls/downloadTask:DownloadTask';
//# sourceMappingURL=downloadTask.js.map