"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.GenericService = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A Service is a discrete, autonomous, and network-accessible unit,
 * designed to solve an individual concern. In Cloud Monitoring,
 * a Service acts as the root resource under which operational aspects of
 * the service are accessible
 *
 * To get more information about GenericService, see:
 *
 * * [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services)
 * * How-to Guides
 *     * [Monitoring API Documentation](https://cloud.google.com/monitoring/api/v3/)
 *     * [Service Monitoring](https://cloud.google.com/monitoring/service-monitoring)
 *     * [Service-orientation on Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)
 *
 * ## Example Usage
 *
 * ### Monitoring Service Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const myService = new gcp.monitoring.GenericService("my_service", {
 *     serviceId: "my-service",
 *     displayName: "My Service my-service",
 *     userLabels: {
 *         my_key: "my_value",
 *         my_other_key: "my_other_value",
 *     },
 *     basicService: {
 *         serviceType: "APP_ENGINE",
 *         serviceLabels: {
 *             module_id: "another-module-id",
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * GenericService can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/services/{{service_id}}`
 *
 * * `{{project}}/{{service_id}}`
 *
 * * `{{service_id}}`
 *
 * When using the `pulumi import` command, GenericService can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:monitoring/genericService:GenericService default projects/{{project}}/services/{{service_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:monitoring/genericService:GenericService default {{project}}/{{service_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:monitoring/genericService:GenericService default {{service_id}}
 * ```
 */
class GenericService extends pulumi.CustomResource {
    /**
     * Get an existing GenericService 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 GenericService(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of GenericService.  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'] === GenericService.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["basicService"] = state?.basicService;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["serviceId"] = state?.serviceId;
            resourceInputs["telemetries"] = state?.telemetries;
            resourceInputs["userLabels"] = state?.userLabels;
        }
        else {
            const args = argsOrState;
            if (args?.serviceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceId'");
            }
            resourceInputs["basicService"] = args?.basicService;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["project"] = args?.project;
            resourceInputs["serviceId"] = args?.serviceId;
            resourceInputs["userLabels"] = args?.userLabels;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["telemetries"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(GenericService.__pulumiType, name, resourceInputs, opts);
    }
}
exports.GenericService = GenericService;
/** @internal */
GenericService.__pulumiType = 'gcp:monitoring/genericService:GenericService';
//# sourceMappingURL=genericService.js.map