"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.ModuleVersion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A module that has been registered in the CloudFormation registry.
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const moduleVersion1 = new aws_native.cloudformation.ModuleVersion("moduleVersion1", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v1.zip",
 * });
 * const moduleVersion2 = new aws_native.cloudformation.ModuleVersion("moduleVersion2", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v2.zip",
 * }, {
 *     dependsOn: [moduleVersion1],
 * });
 * const moduleDefaultVersion = new aws_native.cloudformation.ModuleDefaultVersion("moduleDefaultVersion", {arn: moduleVersion2.id});
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const moduleVersion1 = new aws_native.cloudformation.ModuleVersion("moduleVersion1", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v1.zip",
 * });
 * const moduleVersion2 = new aws_native.cloudformation.ModuleVersion("moduleVersion2", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v2.zip",
 * }, {
 *     dependsOn: [moduleVersion1],
 * });
 * const moduleDefaultVersion = new aws_native.cloudformation.ModuleDefaultVersion("moduleDefaultVersion", {arn: moduleVersion2.id});
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const moduleVersion = new aws_native.cloudformation.ModuleVersion("moduleVersion", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v1.zip",
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const moduleVersion = new aws_native.cloudformation.ModuleVersion("moduleVersion", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v1.zip",
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const moduleVersion1 = new aws_native.cloudformation.ModuleVersion("moduleVersion1", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v1.zip",
 * });
 * const moduleVersion2 = new aws_native.cloudformation.ModuleVersion("moduleVersion2", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v2.zip",
 * }, {
 *     dependsOn: [moduleVersion1],
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const moduleVersion1 = new aws_native.cloudformation.ModuleVersion("moduleVersion1", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v1.zip",
 * });
 * const moduleVersion2 = new aws_native.cloudformation.ModuleVersion("moduleVersion2", {
 *     moduleName: "My::Sample::Test::MODULE",
 *     modulePackage: "s3://my-sample-moduleversion-bucket/sample-module-package-v2.zip",
 * }, {
 *     dependsOn: [moduleVersion1],
 * });
 *
 * ```
 */
class ModuleVersion extends pulumi.CustomResource {
    /**
     * Get an existing ModuleVersion 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 opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new ModuleVersion(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of ModuleVersion.  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'] === ModuleVersion.__pulumiType;
    }
    /**
     * Create a ModuleVersion resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.moduleName === undefined && !opts.urn) {
                throw new Error("Missing required property 'moduleName'");
            }
            if (args?.modulePackage === undefined && !opts.urn) {
                throw new Error("Missing required property 'modulePackage'");
            }
            resourceInputs["moduleName"] = args?.moduleName;
            resourceInputs["modulePackage"] = args?.modulePackage;
            resourceInputs["arn"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["documentationUrl"] = undefined /*out*/;
            resourceInputs["isDefaultVersion"] = undefined /*out*/;
            resourceInputs["schema"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["versionId"] = undefined /*out*/;
            resourceInputs["visibility"] = undefined /*out*/;
        }
        else {
            resourceInputs["arn"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["documentationUrl"] = undefined /*out*/;
            resourceInputs["isDefaultVersion"] = undefined /*out*/;
            resourceInputs["moduleName"] = undefined /*out*/;
            resourceInputs["modulePackage"] = undefined /*out*/;
            resourceInputs["schema"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["versionId"] = undefined /*out*/;
            resourceInputs["visibility"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["moduleName", "modulePackage"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(ModuleVersion.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ModuleVersion = ModuleVersion;
/** @internal */
ModuleVersion.__pulumiType = 'aws-native:cloudformation:ModuleVersion';
//# sourceMappingURL=moduleVersion.js.map