"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.LiteTopic = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * > **Warning:** [Pubsub Lite is deprecated and will be turned down effective March 18, 2026](https://cloud.google.com/pubsub/lite/docs/release-notes#June_17_2024). The resource will be removed in a future major release, please use `gcp.pubsub.Topic` instead.
 *
 * A named resource to which messages are sent by publishers.
 *
 * To get more information about Topic, see:
 *
 * * [API documentation](https://cloud.google.com/pubsub/lite/docs/reference/rest/v1/admin.projects.locations.topics)
 * * How-to Guides
 *     * [Managing Topics](https://cloud.google.com/pubsub/lite/docs/topics)
 *
 * ## Example Usage
 *
 * ### Pubsub Lite Topic Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const example = new gcp.pubsub.LiteReservation("example", {
 *     name: "example-reservation",
 *     project: project.then(project => project.number),
 *     throughputCapacity: 2,
 * });
 * const exampleLiteTopic = new gcp.pubsub.LiteTopic("example", {
 *     name: "example-topic",
 *     project: project.then(project => project.number),
 *     partitionConfig: {
 *         count: 1,
 *         capacity: {
 *             publishMibPerSec: 4,
 *             subscribeMibPerSec: 8,
 *         },
 *     },
 *     retentionConfig: {
 *         perPartitionBytes: "32212254720",
 *     },
 *     reservationConfig: {
 *         throughputReservation: example.name,
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Topic can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{zone}}/topics/{{name}}`
 *
 * * `{{project}}/{{zone}}/{{name}}`
 *
 * * `{{zone}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Topic can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:pubsub/liteTopic:LiteTopic default projects/{{project}}/locations/{{zone}}/topics/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:pubsub/liteTopic:LiteTopic default {{project}}/{{zone}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:pubsub/liteTopic:LiteTopic default {{zone}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:pubsub/liteTopic:LiteTopic default {{name}}
 * ```
 */
class LiteTopic extends pulumi.CustomResource {
    /**
     * Get an existing LiteTopic 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 LiteTopic(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of LiteTopic.  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'] === LiteTopic.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["name"] = state?.name;
            resourceInputs["partitionConfig"] = state?.partitionConfig;
            resourceInputs["project"] = state?.project;
            resourceInputs["region"] = state?.region;
            resourceInputs["reservationConfig"] = state?.reservationConfig;
            resourceInputs["retentionConfig"] = state?.retentionConfig;
            resourceInputs["zone"] = state?.zone;
        }
        else {
            const args = argsOrState;
            resourceInputs["name"] = args?.name;
            resourceInputs["partitionConfig"] = args?.partitionConfig;
            resourceInputs["project"] = args?.project;
            resourceInputs["region"] = args?.region;
            resourceInputs["reservationConfig"] = args?.reservationConfig;
            resourceInputs["retentionConfig"] = args?.retentionConfig;
            resourceInputs["zone"] = args?.zone;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(LiteTopic.__pulumiType, name, resourceInputs, opts);
    }
}
exports.LiteTopic = LiteTopic;
/** @internal */
LiteTopic.__pulumiType = 'gcp:pubsub/liteTopic:LiteTopic';
//# sourceMappingURL=liteTopic.js.map