"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.Release = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage vefaas release
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.vefaas.Release("foo", {
 *     functionId: "9p5emxxxx",
 *     revisionNumber: 0,
 *     targetTrafficWeight: 30,
 * });
 * ```
 *
 * ## Import
 *
 * VefaasRelease can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:vefaas/release:Release default FunctionId:ReleaseRecordId
 * ```
 */
class Release extends pulumi.CustomResource {
    /**
     * Get an existing Release 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 Release(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Release.  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'] === Release.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["currentTrafficWeight"] = state ? state.currentTrafficWeight : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["errorCode"] = state ? state.errorCode : undefined;
            resourceInputs["failedInstanceLogs"] = state ? state.failedInstanceLogs : undefined;
            resourceInputs["functionId"] = state ? state.functionId : undefined;
            resourceInputs["maxInstance"] = state ? state.maxInstance : undefined;
            resourceInputs["newRevisionNumber"] = state ? state.newRevisionNumber : undefined;
            resourceInputs["oldRevisionNumber"] = state ? state.oldRevisionNumber : undefined;
            resourceInputs["releaseRecordId"] = state ? state.releaseRecordId : undefined;
            resourceInputs["revisionNumber"] = state ? state.revisionNumber : undefined;
            resourceInputs["rollingStep"] = state ? state.rollingStep : undefined;
            resourceInputs["stableRevisionNumber"] = state ? state.stableRevisionNumber : undefined;
            resourceInputs["startTime"] = state ? state.startTime : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["statusMessage"] = state ? state.statusMessage : undefined;
            resourceInputs["targetTrafficWeight"] = state ? state.targetTrafficWeight : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.functionId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'functionId'");
            }
            if ((!args || args.revisionNumber === undefined) && !opts.urn) {
                throw new Error("Missing required property 'revisionNumber'");
            }
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["functionId"] = args ? args.functionId : undefined;
            resourceInputs["maxInstance"] = args ? args.maxInstance : undefined;
            resourceInputs["revisionNumber"] = args ? args.revisionNumber : undefined;
            resourceInputs["rollingStep"] = args ? args.rollingStep : undefined;
            resourceInputs["targetTrafficWeight"] = args ? args.targetTrafficWeight : undefined;
            resourceInputs["currentTrafficWeight"] = undefined /*out*/;
            resourceInputs["errorCode"] = undefined /*out*/;
            resourceInputs["failedInstanceLogs"] = undefined /*out*/;
            resourceInputs["newRevisionNumber"] = undefined /*out*/;
            resourceInputs["oldRevisionNumber"] = undefined /*out*/;
            resourceInputs["releaseRecordId"] = undefined /*out*/;
            resourceInputs["stableRevisionNumber"] = undefined /*out*/;
            resourceInputs["startTime"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["statusMessage"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Release.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Release = Release;
/** @internal */
Release.__pulumiType = 'volcengine:vefaas/release:Release';
//# sourceMappingURL=release.js.map