"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.Migration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a migration resource.
 *
 * Uses Azure REST API version 2024-08-01. In version 2.x of the Azure Native provider, it used API version 2023-03-01-preview.
 *
 * Other available API versions: 2023-03-01-preview, 2023-06-01-preview, 2023-12-01-preview, 2024-03-01-preview, 2024-11-01-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native dbforpostgresql [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
 */
class Migration extends pulumi.CustomResource {
    /**
     * Get an existing Migration 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 Migration(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Migration.  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'] === Migration.__pulumiType;
    }
    /**
     * Create a Migration 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 || args.resourceGroupName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if ((!args || args.targetDbServerName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'targetDbServerName'");
            }
            resourceInputs["cancel"] = args ? args.cancel : undefined;
            resourceInputs["dbsToCancelMigrationOn"] = args ? args.dbsToCancelMigrationOn : undefined;
            resourceInputs["dbsToMigrate"] = args ? args.dbsToMigrate : undefined;
            resourceInputs["dbsToTriggerCutoverOn"] = args ? args.dbsToTriggerCutoverOn : undefined;
            resourceInputs["location"] = args ? args.location : undefined;
            resourceInputs["migrateRoles"] = args ? args.migrateRoles : undefined;
            resourceInputs["migrationInstanceResourceId"] = args ? args.migrationInstanceResourceId : undefined;
            resourceInputs["migrationMode"] = args ? args.migrationMode : undefined;
            resourceInputs["migrationName"] = args ? args.migrationName : undefined;
            resourceInputs["migrationOption"] = args ? args.migrationOption : undefined;
            resourceInputs["migrationWindowEndTimeInUtc"] = args ? args.migrationWindowEndTimeInUtc : undefined;
            resourceInputs["migrationWindowStartTimeInUtc"] = args ? args.migrationWindowStartTimeInUtc : undefined;
            resourceInputs["overwriteDbsInTarget"] = args ? args.overwriteDbsInTarget : undefined;
            resourceInputs["resourceGroupName"] = args ? args.resourceGroupName : undefined;
            resourceInputs["secretParameters"] = args ? args.secretParameters : undefined;
            resourceInputs["setupLogicalReplicationOnSourceDbIfNeeded"] = args ? args.setupLogicalReplicationOnSourceDbIfNeeded : undefined;
            resourceInputs["sourceDbServerFullyQualifiedDomainName"] = args ? args.sourceDbServerFullyQualifiedDomainName : undefined;
            resourceInputs["sourceDbServerResourceId"] = args ? args.sourceDbServerResourceId : undefined;
            resourceInputs["sourceType"] = args ? args.sourceType : undefined;
            resourceInputs["sslMode"] = args ? args.sslMode : undefined;
            resourceInputs["startDataMigration"] = args ? args.startDataMigration : undefined;
            resourceInputs["subscriptionId"] = args ? args.subscriptionId : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["targetDbServerFullyQualifiedDomainName"] = args ? args.targetDbServerFullyQualifiedDomainName : undefined;
            resourceInputs["targetDbServerName"] = args ? args.targetDbServerName : undefined;
            resourceInputs["triggerCutover"] = args ? args.triggerCutover : undefined;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["currentStatus"] = undefined /*out*/;
            resourceInputs["migrationId"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["sourceDbServerMetadata"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["targetDbServerMetadata"] = undefined /*out*/;
            resourceInputs["targetDbServerResourceId"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["cancel"] = undefined /*out*/;
            resourceInputs["currentStatus"] = undefined /*out*/;
            resourceInputs["dbsToCancelMigrationOn"] = undefined /*out*/;
            resourceInputs["dbsToMigrate"] = undefined /*out*/;
            resourceInputs["dbsToTriggerCutoverOn"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["migrateRoles"] = undefined /*out*/;
            resourceInputs["migrationId"] = undefined /*out*/;
            resourceInputs["migrationInstanceResourceId"] = undefined /*out*/;
            resourceInputs["migrationMode"] = undefined /*out*/;
            resourceInputs["migrationOption"] = undefined /*out*/;
            resourceInputs["migrationWindowEndTimeInUtc"] = undefined /*out*/;
            resourceInputs["migrationWindowStartTimeInUtc"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["overwriteDbsInTarget"] = undefined /*out*/;
            resourceInputs["setupLogicalReplicationOnSourceDbIfNeeded"] = undefined /*out*/;
            resourceInputs["sourceDbServerFullyQualifiedDomainName"] = undefined /*out*/;
            resourceInputs["sourceDbServerMetadata"] = undefined /*out*/;
            resourceInputs["sourceDbServerResourceId"] = undefined /*out*/;
            resourceInputs["sourceType"] = undefined /*out*/;
            resourceInputs["sslMode"] = undefined /*out*/;
            resourceInputs["startDataMigration"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["targetDbServerFullyQualifiedDomainName"] = undefined /*out*/;
            resourceInputs["targetDbServerMetadata"] = undefined /*out*/;
            resourceInputs["targetDbServerResourceId"] = undefined /*out*/;
            resourceInputs["triggerCutover"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:dbforpostgresql/v20210615privatepreview:Migration" }, { type: "azure-native:dbforpostgresql/v20220501preview:Migration" }, { type: "azure-native:dbforpostgresql/v20230301preview:Migration" }, { type: "azure-native:dbforpostgresql/v20230601preview:Migration" }, { type: "azure-native:dbforpostgresql/v20231201preview:Migration" }, { type: "azure-native:dbforpostgresql/v20240301preview:Migration" }, { type: "azure-native:dbforpostgresql/v20240801:Migration" }, { type: "azure-native:dbforpostgresql/v20241101preview:Migration" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(Migration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Migration = Migration;
/** @internal */
Migration.__pulumiType = 'azure-native:dbforpostgresql:Migration';
//# sourceMappingURL=data:application/json;base64, 