"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.AuthConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The AuthConfig resource use to hold channels and connection config data.
 *
 * To get more information about AuthConfig, see:
 *
 * * [API documentation](https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.authConfigs)
 * * How-to Guides
 *     * [Manage authentication profiles](https://cloud.google.com/application-integration/docs/configure-authentication-profiles)
 *     * [Official Documentation](https://cloud.google.com/application-integration/docs/overview)
 *
 * ## Example Usage
 *
 * ### Integrations Auth Config Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const client = new gcp.applicationintegration.Client("client", {location: "us-west1"});
 * const basicExample = new gcp.applicationintegration.AuthConfig("basic_example", {
 *     location: "us-west1",
 *     displayName: "test-authconfig",
 *     description: "Test auth config created via terraform",
 *     decryptedCredential: {
 *         credentialType: "USERNAME_AND_PASSWORD",
 *         usernameAndPassword: {
 *             username: "test-username",
 *             password: "test-password",
 *         },
 *     },
 * }, {
 *     dependsOn: [client],
 * });
 * ```
 *
 * ## Import
 *
 * AuthConfig can be imported using any of these accepted formats:
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{project}} {{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, AuthConfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default "{{project}} {{name}}"
 * ```
 *
 * ```sh
 * $ pulumi import gcp:applicationintegration/authConfig:AuthConfig default {{name}}
 * ```
 */
class AuthConfig extends pulumi.CustomResource {
    /**
     * Get an existing AuthConfig 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 AuthConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AuthConfig.  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'] === AuthConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["certificateId"] = state?.certificateId;
            resourceInputs["clientCertificate"] = state?.clientCertificate;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["creatorEmail"] = state?.creatorEmail;
            resourceInputs["credentialType"] = state?.credentialType;
            resourceInputs["decryptedCredential"] = state?.decryptedCredential;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["encryptedCredential"] = state?.encryptedCredential;
            resourceInputs["expiryNotificationDurations"] = state?.expiryNotificationDurations;
            resourceInputs["lastModifierEmail"] = state?.lastModifierEmail;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["overrideValidTime"] = state?.overrideValidTime;
            resourceInputs["project"] = state?.project;
            resourceInputs["reason"] = state?.reason;
            resourceInputs["state"] = state?.state;
            resourceInputs["updateTime"] = state?.updateTime;
            resourceInputs["validTime"] = state?.validTime;
            resourceInputs["visibility"] = state?.visibility;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["clientCertificate"] = args?.clientCertificate;
            resourceInputs["decryptedCredential"] = args?.decryptedCredential;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["expiryNotificationDurations"] = args?.expiryNotificationDurations;
            resourceInputs["location"] = args?.location;
            resourceInputs["overrideValidTime"] = args?.overrideValidTime;
            resourceInputs["project"] = args?.project;
            resourceInputs["visibility"] = args?.visibility;
            resourceInputs["certificateId"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["creatorEmail"] = undefined /*out*/;
            resourceInputs["credentialType"] = undefined /*out*/;
            resourceInputs["encryptedCredential"] = undefined /*out*/;
            resourceInputs["lastModifierEmail"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["reason"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
            resourceInputs["validTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AuthConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AuthConfig = AuthConfig;
/** @internal */
AuthConfig.__pulumiType = 'gcp:applicationintegration/authConfig:AuthConfig';
//# sourceMappingURL=authConfig.js.map