"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.Timer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage vefaas timer
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.vefaas.Timer("foo", {
 *     crontab: "*&#47;10 * * * *",
 *     functionId: "35ybaxxx",
 * });
 * ```
 *
 * ## Import
 *
 * VefaasTimer can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:vefaas/timer:Timer default FunctionId:Id
 * ```
 */
class Timer extends pulumi.CustomResource {
    /**
     * Get an existing Timer 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 Timer(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Timer.  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'] === Timer.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["creationTime"] = state ? state.creationTime : undefined;
            resourceInputs["crontab"] = state ? state.crontab : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["enableConcurrency"] = state ? state.enableConcurrency : undefined;
            resourceInputs["enabled"] = state ? state.enabled : undefined;
            resourceInputs["functionId"] = state ? state.functionId : undefined;
            resourceInputs["lastUpdateTime"] = state ? state.lastUpdateTime : undefined;
            resourceInputs["name"] = state ? state.name : undefined;
            resourceInputs["payload"] = state ? state.payload : undefined;
            resourceInputs["retries"] = state ? state.retries : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.crontab === undefined) && !opts.urn) {
                throw new Error("Missing required property 'crontab'");
            }
            if ((!args || args.functionId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'functionId'");
            }
            resourceInputs["crontab"] = args ? args.crontab : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["enableConcurrency"] = args ? args.enableConcurrency : undefined;
            resourceInputs["enabled"] = args ? args.enabled : undefined;
            resourceInputs["functionId"] = args ? args.functionId : undefined;
            resourceInputs["name"] = args ? args.name : undefined;
            resourceInputs["payload"] = args ? args.payload : undefined;
            resourceInputs["retries"] = args ? args.retries : undefined;
            resourceInputs["creationTime"] = undefined /*out*/;
            resourceInputs["lastUpdateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Timer.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Timer = Timer;
/** @internal */
Timer.__pulumiType = 'volcengine:vefaas/timer:Timer';
//# sourceMappingURL=timer.js.map