"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Registry = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage cr registry
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * // create cr registry
 * const fooRegistry = new volcengine.cr.Registry("fooRegistry", {
 *     deleteImmediately: false,
 *     password: "1qaz!QAZ",
 *     project: "default",
 * });
 * // create cr namespace
 * const fooNamespace = new volcengine.cr.Namespace("fooNamespace", {
 *     registry: fooRegistry.id,
 *     project: "default",
 * });
 * // create cr repository
 * const fooRepository = new volcengine.cr.Repository("fooRepository", {
 *     registry: fooRegistry.id,
 *     namespace: fooNamespace.name,
 *     description: "A test repository created by terraform.",
 *     accessLevel: "Public",
 * });
 * ```
 *
 * ## Import
 *
 * CR Registry can be imported using the name, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:cr/registry:Registry default enterprise-x
 * ```
 */
class Registry extends pulumi.CustomResource {
    /**
     * Get an existing Registry 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 Registry(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Registry.  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'] === Registry.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["chargeType"] = state ? state.chargeType : undefined;
            resourceInputs["createTime"] = state ? state.createTime : undefined;
            resourceInputs["deleteImmediately"] = state ? state.deleteImmediately : undefined;
            resourceInputs["domains"] = state ? state.domains : undefined;
            resourceInputs["name"] = state ? state.name : undefined;
            resourceInputs["password"] = state ? state.password : undefined;
            resourceInputs["project"] = state ? state.project : undefined;
            resourceInputs["proxyCache"] = state ? state.proxyCache : undefined;
            resourceInputs["proxyCacheEnabled"] = state ? state.proxyCacheEnabled : undefined;
            resourceInputs["resourceTags"] = state ? state.resourceTags : undefined;
            resourceInputs["statuses"] = state ? state.statuses : undefined;
            resourceInputs["type"] = state ? state.type : undefined;
            resourceInputs["userStatus"] = state ? state.userStatus : undefined;
            resourceInputs["username"] = state ? state.username : undefined;
        }
        else {
            const args = argsOrState;
            resourceInputs["deleteImmediately"] = args ? args.deleteImmediately : undefined;
            resourceInputs["name"] = args ? args.name : undefined;
            resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
            resourceInputs["project"] = args ? args.project : undefined;
            resourceInputs["proxyCache"] = args ? args.proxyCache : undefined;
            resourceInputs["proxyCacheEnabled"] = args ? args.proxyCacheEnabled : undefined;
            resourceInputs["resourceTags"] = args ? args.resourceTags : undefined;
            resourceInputs["type"] = args ? args.type : undefined;
            resourceInputs["chargeType"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["domains"] = undefined /*out*/;
            resourceInputs["statuses"] = undefined /*out*/;
            resourceInputs["userStatus"] = undefined /*out*/;
            resourceInputs["username"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["password"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Registry.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Registry = Registry;
/** @internal */
Registry.__pulumiType = 'volcengine:cr/registry:Registry';
//# sourceMappingURL=registry.js.map