"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.Group = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The description of a dynamic collection of monitored resources. Each group
 * has a filter that is matched against monitored resources and their
 * associated metadata. If a group's filter matches an available monitored
 * resource, then that resource is a member of that group.
 *
 * To get more information about Group, see:
 *
 * * [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.groups)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/monitoring/groups/)
 *
 * ## Example Usage
 *
 * ### Monitoring Group Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.monitoring.Group("basic", {
 *     displayName: "tf-test MonitoringGroup",
 *     filter: "resource.metadata.region=\"europe-west2\"",
 * });
 * ```
 * ### Monitoring Group Subgroup
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const parent = new gcp.monitoring.Group("parent", {
 *     displayName: "tf-test MonitoringParentGroup",
 *     filter: "resource.metadata.region=\"europe-west2\"",
 * });
 * const subgroup = new gcp.monitoring.Group("subgroup", {
 *     displayName: "tf-test MonitoringSubGroup",
 *     filter: "resource.metadata.region=\"europe-west2\"",
 *     parentName: parent.name,
 * });
 * ```
 *
 * ## Import
 *
 * Group can be imported using any of these accepted formats:
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{project}} {{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Group can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:monitoring/group:Group default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:monitoring/group:Group default "{{project}} {{name}}"
 * ```
 *
 * ```sh
 * $ pulumi import gcp:monitoring/group:Group default {{name}}
 * ```
 */
class Group extends pulumi.CustomResource {
    /**
     * Get an existing Group 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 Group(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Group.  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'] === Group.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["filter"] = state?.filter;
            resourceInputs["isCluster"] = state?.isCluster;
            resourceInputs["name"] = state?.name;
            resourceInputs["parentName"] = state?.parentName;
            resourceInputs["project"] = state?.project;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.filter === undefined && !opts.urn) {
                throw new Error("Missing required property 'filter'");
            }
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["filter"] = args?.filter;
            resourceInputs["isCluster"] = args?.isCluster;
            resourceInputs["parentName"] = args?.parentName;
            resourceInputs["project"] = args?.project;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Group.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Group = Group;
/** @internal */
Group.__pulumiType = 'gcp:monitoring/group:Group';
//# sourceMappingURL=group.js.map