"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.Client = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Application Integration Client.
 *
 * To get more information about Client, see:
 *
 * * [API documentation](https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.clients)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/application-integration/docs/overview)
 *     * [Set up Application Integration](https://cloud.google.com/application-integration/docs/setup-application-integration)
 *
 * ## Example Usage
 *
 * ### Integrations Client Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.applicationintegration.Client("example", {location: "us-central1"});
 * ```
 * ### Integrations Client Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as std from "@pulumi/std";
 *
 * const _default = gcp.organizations.getProject({});
 * const keyring = gcp.kms.getKMSKeyRing({
 *     name: "my-keyring",
 *     location: "us-east1",
 * });
 * const cryptokey = keyring.then(keyring => gcp.kms.getKMSCryptoKey({
 *     name: "my-crypto-key",
 *     keyRing: keyring.id,
 * }));
 * const testKey = cryptokey.then(cryptokey => gcp.kms.getKMSCryptoKeyVersion({
 *     cryptoKey: cryptokey.id,
 * }));
 * const example = new gcp.applicationintegration.Client("example", {
 *     location: "us-east1",
 *     createSampleIntegrations: true,
 *     cloudKmsConfig: {
 *         kmsLocation: "us-east1",
 *         kmsRing: keyring.then(keyring => std.basename({
 *             input: keyring.id,
 *         })).then(invoke => invoke.result),
 *         key: cryptokey.then(cryptokey => std.basename({
 *             input: cryptokey.id,
 *         })).then(invoke => invoke.result),
 *         keyVersion: testKey.then(testKey => std.basename({
 *             input: testKey.id,
 *         })).then(invoke => invoke.result),
 *         kmsProjectId: _default.then(_default => _default.projectId),
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Client can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/clients`
 *
 * * `{{project}}/{{location}}`
 *
 * * `{{location}}`
 *
 * When using the `pulumi import` command, Client can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:applicationintegration/client:Client default projects/{{project}}/locations/{{location}}/clients
 * ```
 *
 * ```sh
 * $ pulumi import gcp:applicationintegration/client:Client default {{project}}/{{location}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:applicationintegration/client:Client default {{location}}
 * ```
 */
class Client extends pulumi.CustomResource {
    /**
     * Get an existing Client 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 Client(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Client.  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'] === Client.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["cloudKmsConfig"] = state?.cloudKmsConfig;
            resourceInputs["createSampleIntegrations"] = state?.createSampleIntegrations;
            resourceInputs["location"] = state?.location;
            resourceInputs["project"] = state?.project;
            resourceInputs["runAsServiceAccount"] = state?.runAsServiceAccount;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["cloudKmsConfig"] = args?.cloudKmsConfig;
            resourceInputs["createSampleIntegrations"] = args?.createSampleIntegrations;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["runAsServiceAccount"] = args?.runAsServiceAccount;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Client.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Client = Client;
/** @internal */
Client.__pulumiType = 'gcp:applicationintegration/client:Client';
//# sourceMappingURL=client.js.map