"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.FutureReservation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a future reservation resource in Compute Engine. Future reservations allow users
 * to reserve capacity for a specified time window, ensuring that resources are available
 * when needed.
 *
 * Reservations apply only to Compute Engine, Cloud Dataproc, and Google
 * Kubernetes Engine VM usage.Reservations do not apply to `f1-micro` or
 * `g1-small` machine types, preemptible VMs, sole tenant nodes, or other
 * services not listed above
 * like Cloud SQL and Dataflow.
 *
 * To get more information about FutureReservation, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/futureReservations)
 * * How-to Guides
 *     * [Future Reservations Guide](https://cloud.google.com/compute/docs/instances/future-reservations-overview)
 *
 * ## Example Usage
 *
 * ### Future Reservation Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const gceFutureReservation = new gcp.compute.FutureReservation("gce_future_reservation", {
 *     name: "gce-future-reservation",
 *     project: "my-project-name",
 *     autoDeleteAutoCreatedReservations: true,
 *     planningStatus: "DRAFT",
 *     namePrefix: "fr-basic",
 *     timeWindow: {
 *         startTime: "2025-11-01T00:00:00Z",
 *         endTime: "2025-11-02T00:00:00Z",
 *     },
 *     specificSkuProperties: {
 *         totalCount: "1",
 *         instanceProperties: {
 *             machineType: "e2-standard-2",
 *         },
 *     },
 * });
 * ```
 * ### Future Reservation Aggregate Reservation
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const gceFutureReservation = new gcp.compute.FutureReservation("gce_future_reservation", {
 *     name: "gce-future-reservation-aggregate-reservation",
 *     project: "my-project-name",
 *     autoDeleteAutoCreatedReservations: true,
 *     planningStatus: "DRAFT",
 *     namePrefix: "fr-basic",
 *     timeWindow: {
 *         startTime: "2025-11-01T00:00:00Z",
 *         endTime: "2025-11-02T00:00:00Z",
 *     },
 *     aggregateReservation: {
 *         vmFamily: "VM_FAMILY_CLOUD_TPU_DEVICE_CT3",
 *         workloadType: "UNSPECIFIED",
 *         reservedResources: [
 *             {
 *                 accelerator: {
 *                     acceleratorCount: 32,
 *                     acceleratorType: "projects/my-project-name/zones/us-central1-a/acceleratorTypes/ct3",
 *                 },
 *             },
 *             {
 *                 accelerator: {
 *                     acceleratorCount: 2,
 *                     acceleratorType: "projects/my-project-name/zones/us-central1-a/acceleratorTypes/ct3",
 *                 },
 *             },
 *         ],
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * FutureReservation can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/zones/{{zone}}/futureReservations/{{name}}`
 *
 * * `{{project}}/{{zone}}/{{name}}`
 *
 * * `{{zone}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, FutureReservation can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/futureReservation:FutureReservation default projects/{{project}}/zones/{{zone}}/futureReservations/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/futureReservation:FutureReservation default {{project}}/{{zone}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/futureReservation:FutureReservation default {{zone}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/futureReservation:FutureReservation default {{name}}
 * ```
 */
class FutureReservation extends pulumi.CustomResource {
    /**
     * Get an existing FutureReservation 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 FutureReservation(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of FutureReservation.  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'] === FutureReservation.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["aggregateReservation"] = state?.aggregateReservation;
            resourceInputs["autoCreatedReservationsDeleteTime"] = state?.autoCreatedReservationsDeleteTime;
            resourceInputs["autoCreatedReservationsDuration"] = state?.autoCreatedReservationsDuration;
            resourceInputs["autoDeleteAutoCreatedReservations"] = state?.autoDeleteAutoCreatedReservations;
            resourceInputs["commitmentInfo"] = state?.commitmentInfo;
            resourceInputs["creationTimestamp"] = state?.creationTimestamp;
            resourceInputs["deploymentType"] = state?.deploymentType;
            resourceInputs["description"] = state?.description;
            resourceInputs["name"] = state?.name;
            resourceInputs["namePrefix"] = state?.namePrefix;
            resourceInputs["planningStatus"] = state?.planningStatus;
            resourceInputs["project"] = state?.project;
            resourceInputs["reservationMode"] = state?.reservationMode;
            resourceInputs["reservationName"] = state?.reservationName;
            resourceInputs["schedulingType"] = state?.schedulingType;
            resourceInputs["selfLink"] = state?.selfLink;
            resourceInputs["selfLinkWithId"] = state?.selfLinkWithId;
            resourceInputs["shareSettings"] = state?.shareSettings;
            resourceInputs["specificReservationRequired"] = state?.specificReservationRequired;
            resourceInputs["specificSkuProperties"] = state?.specificSkuProperties;
            resourceInputs["statuses"] = state?.statuses;
            resourceInputs["timeWindow"] = state?.timeWindow;
            resourceInputs["zone"] = state?.zone;
        }
        else {
            const args = argsOrState;
            if (args?.timeWindow === undefined && !opts.urn) {
                throw new Error("Missing required property 'timeWindow'");
            }
            resourceInputs["aggregateReservation"] = args?.aggregateReservation;
            resourceInputs["autoCreatedReservationsDeleteTime"] = args?.autoCreatedReservationsDeleteTime;
            resourceInputs["autoCreatedReservationsDuration"] = args?.autoCreatedReservationsDuration;
            resourceInputs["autoDeleteAutoCreatedReservations"] = args?.autoDeleteAutoCreatedReservations;
            resourceInputs["commitmentInfo"] = args?.commitmentInfo;
            resourceInputs["deploymentType"] = args?.deploymentType;
            resourceInputs["description"] = args?.description;
            resourceInputs["name"] = args?.name;
            resourceInputs["namePrefix"] = args?.namePrefix;
            resourceInputs["planningStatus"] = args?.planningStatus;
            resourceInputs["project"] = args?.project;
            resourceInputs["reservationMode"] = args?.reservationMode;
            resourceInputs["reservationName"] = args?.reservationName;
            resourceInputs["schedulingType"] = args?.schedulingType;
            resourceInputs["shareSettings"] = args?.shareSettings;
            resourceInputs["specificReservationRequired"] = args?.specificReservationRequired;
            resourceInputs["specificSkuProperties"] = args?.specificSkuProperties;
            resourceInputs["timeWindow"] = args?.timeWindow;
            resourceInputs["creationTimestamp"] = undefined /*out*/;
            resourceInputs["selfLink"] = undefined /*out*/;
            resourceInputs["selfLinkWithId"] = undefined /*out*/;
            resourceInputs["statuses"] = undefined /*out*/;
            resourceInputs["zone"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(FutureReservation.__pulumiType, name, resourceInputs, opts);
    }
}
exports.FutureReservation = FutureReservation;
/** @internal */
FutureReservation.__pulumiType = 'gcp:compute/futureReservation:FutureReservation';
//# sourceMappingURL=futureReservation.js.map