"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.AppGateway = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates
 * all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be
 * authorised for a single AppGateway.
 *
 * To get more information about AppGateway, see:
 *
 * * [API documentation](https://cloud.google.com/beyondcorp/docs/reference/rest#rest-resource:-v1.projects.locations.appgateways)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/beyondcorp-enterprise/docs/enable-app-connector)
 *
 * ## Example Usage
 *
 * ### Beyondcorp App Gateway Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const appGateway = new gcp.beyondcorp.AppGateway("app_gateway", {
 *     name: "my-app-gateway",
 *     type: "TCP_PROXY",
 *     region: "us-central1",
 *     hostType: "GCP_REGIONAL_MIG",
 * });
 * ```
 * ### Beyondcorp App Gateway Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const appGateway = new gcp.beyondcorp.AppGateway("app_gateway", {
 *     name: "my-app-gateway",
 *     type: "TCP_PROXY",
 *     region: "us-central1",
 *     displayName: "some display name",
 *     labels: {
 *         foo: "bar",
 *         bar: "baz",
 *     },
 *     hostType: "GCP_REGIONAL_MIG",
 * });
 * ```
 *
 * ## Import
 *
 * AppGateway can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{region}}/appGateways/{{name}}`
 *
 * * `{{project}}/{{region}}/{{name}}`
 *
 * * `{{region}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, AppGateway can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default projects/{{project}}/locations/{{region}}/appGateways/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default {{project}}/{{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default {{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:beyondcorp/appGateway:AppGateway default {{name}}
 * ```
 */
class AppGateway extends pulumi.CustomResource {
    /**
     * Get an existing AppGateway 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 AppGateway(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AppGateway.  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'] === AppGateway.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["allocatedConnections"] = state?.allocatedConnections;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["hostType"] = state?.hostType;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["region"] = state?.region;
            resourceInputs["state"] = state?.state;
            resourceInputs["type"] = state?.type;
            resourceInputs["uri"] = state?.uri;
        }
        else {
            const args = argsOrState;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["hostType"] = args?.hostType;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["region"] = args?.region;
            resourceInputs["type"] = args?.type;
            resourceInputs["allocatedConnections"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["uri"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(AppGateway.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AppGateway = AppGateway;
/** @internal */
AppGateway.__pulumiType = 'gcp:beyondcorp/appGateway:AppGateway';
//# sourceMappingURL=appGateway.js.map