"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.KeystoresAliasesPkcs12 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An alias from a pkcs12 file.
 *
 * To get more information about KeystoresAliasesPkcs12, see:
 *
 * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases)
 * * How-to Guides
 *     * [Keystores Aliases](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases)
 *
 * ## Import
 *
 * KeystoresAliasesPkcs12 can be imported using any of these accepted formats:
 *
 * * `organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}`
 *
 * * `{{org_id}}/{{environment}}/{{keystore}}/{{alias}}`
 *
 * When using the `pulumi import` command, KeystoresAliasesPkcs12 can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:apigee/keystoresAliasesPkcs12:KeystoresAliasesPkcs12 default organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/keystoresAliasesPkcs12:KeystoresAliasesPkcs12 default {{org_id}}/{{environment}}/{{keystore}}/{{alias}}
 * ```
 */
class KeystoresAliasesPkcs12 extends pulumi.CustomResource {
    /**
     * Get an existing KeystoresAliasesPkcs12 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 KeystoresAliasesPkcs12(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of KeystoresAliasesPkcs12.  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'] === KeystoresAliasesPkcs12.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["alias"] = state?.alias;
            resourceInputs["certsInfos"] = state?.certsInfos;
            resourceInputs["environment"] = state?.environment;
            resourceInputs["file"] = state?.file;
            resourceInputs["filehash"] = state?.filehash;
            resourceInputs["keystore"] = state?.keystore;
            resourceInputs["orgId"] = state?.orgId;
            resourceInputs["password"] = state?.password;
            resourceInputs["type"] = state?.type;
        }
        else {
            const args = argsOrState;
            if (args?.alias === undefined && !opts.urn) {
                throw new Error("Missing required property 'alias'");
            }
            if (args?.environment === undefined && !opts.urn) {
                throw new Error("Missing required property 'environment'");
            }
            if (args?.file === undefined && !opts.urn) {
                throw new Error("Missing required property 'file'");
            }
            if (args?.filehash === undefined && !opts.urn) {
                throw new Error("Missing required property 'filehash'");
            }
            if (args?.keystore === undefined && !opts.urn) {
                throw new Error("Missing required property 'keystore'");
            }
            if (args?.orgId === undefined && !opts.urn) {
                throw new Error("Missing required property 'orgId'");
            }
            resourceInputs["alias"] = args?.alias;
            resourceInputs["environment"] = args?.environment;
            resourceInputs["file"] = args?.file;
            resourceInputs["filehash"] = args?.filehash;
            resourceInputs["keystore"] = args?.keystore;
            resourceInputs["orgId"] = args?.orgId;
            resourceInputs["password"] = args?.password;
            resourceInputs["certsInfos"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(KeystoresAliasesPkcs12.__pulumiType, name, resourceInputs, opts);
    }
}
exports.KeystoresAliasesPkcs12 = KeystoresAliasesPkcs12;
/** @internal */
KeystoresAliasesPkcs12.__pulumiType = 'gcp:apigee/keystoresAliasesPkcs12:KeystoresAliasesPkcs12';
//# sourceMappingURL=keystoresAliasesPkcs12.js.map