"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.AndroidApp = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A Google Cloud Firebase Android application instance
 *
 * To get more information about AndroidApp, see:
 *
 * * [API documentation](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.androidApps)
 * * How-to Guides
 *     * [Official Documentation](https://firebase.google.com/docs/android/setup)
 *
 * ## Example Usage
 *
 * ### Firebase Android App Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.firebase.AndroidApp("basic", {
 *     project: "my-project-name",
 *     displayName: "Display Name Basic",
 *     packageName: "android.package.app",
 *     sha1Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21c"],
 *     sha256Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"],
 * });
 * ```
 * ### Firebase Android App Custom Api Key
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const android = new gcp.projects.ApiKey("android", {
 *     name: "api-key",
 *     displayName: "Display Name",
 *     project: "my-project-name",
 *     restrictions: {
 *         androidKeyRestrictions: {
 *             allowedApplications: [{
 *                 packageName: "android.package.app",
 *                 sha1Fingerprint: "2145bdf698b8715039bd0e83f2069bed435ac21c",
 *             }],
 *         },
 *     },
 * });
 * const _default = new gcp.firebase.AndroidApp("default", {
 *     project: "my-project-name",
 *     displayName: "Display Name",
 *     packageName: "android.package.app",
 *     sha1Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21c"],
 *     sha256Hashes: ["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"],
 *     apiKeyId: android.uid,
 * });
 * ```
 *
 * ## Import
 *
 * AndroidApp can be imported using any of these accepted formats:
 *
 * * `{{project}} projects/{{project}}/androidApps/{{app_id}}`
 *
 * * `projects/{{project}}/androidApps/{{app_id}}`
 *
 * * `{{project}}/{{project}}/{{app_id}}`
 *
 * * `androidApps/{{app_id}}`
 *
 * * `{{app_id}}`
 *
 * When using the `pulumi import` command, AndroidApp can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default "{{project}} projects/{{project}}/androidApps/{{app_id}}"
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default projects/{{project}}/androidApps/{{app_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default {{project}}/{{project}}/{{app_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default androidApps/{{app_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/androidApp:AndroidApp default {{app_id}}
 * ```
 */
class AndroidApp extends pulumi.CustomResource {
    /**
     * Get an existing AndroidApp 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 AndroidApp(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AndroidApp.  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'] === AndroidApp.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["apiKeyId"] = state?.apiKeyId;
            resourceInputs["appId"] = state?.appId;
            resourceInputs["deletionPolicy"] = state?.deletionPolicy;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["name"] = state?.name;
            resourceInputs["packageName"] = state?.packageName;
            resourceInputs["project"] = state?.project;
            resourceInputs["sha1Hashes"] = state?.sha1Hashes;
            resourceInputs["sha256Hashes"] = state?.sha256Hashes;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.packageName === undefined && !opts.urn) {
                throw new Error("Missing required property 'packageName'");
            }
            resourceInputs["apiKeyId"] = args?.apiKeyId;
            resourceInputs["deletionPolicy"] = args?.deletionPolicy;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["packageName"] = args?.packageName;
            resourceInputs["project"] = args?.project;
            resourceInputs["sha1Hashes"] = args?.sha1Hashes;
            resourceInputs["sha256Hashes"] = args?.sha256Hashes;
            resourceInputs["appId"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AndroidApp.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AndroidApp = AndroidApp;
/** @internal */
AndroidApp.__pulumiType = 'gcp:firebase/androidApp:AndroidApp';
//# sourceMappingURL=androidApp.js.map