"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutonomousDatabaseCloneFromBackup = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manage an autonomous database clone from backup.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "eastus",
 * });
 * const exampleAutonomousDatabase = new azure.oracle.AutonomousDatabase("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     adminPassword: "BEstrO0ng_#11",
 *     backupRetentionPeriodInDays: 7,
 *     characterSet: "AL32UTF8",
 *     computeCount: 2,
 *     computeModel: "ECPU",
 *     dataStorageSizeInTbs: 1,
 *     dbVersion: "19c",
 *     dbWorkload: "OLTP",
 *     displayName: "Example",
 *     licenseModel: "LicenseIncluded",
 *     autoScalingEnabled: false,
 *     autoScalingForStorageEnabled: true,
 *     mtlsConnectionRequired: true,
 *     nationalCharacterSet: "AL16UTF16",
 *     allowedIps: [],
 * });
 * const exampleAutonomousDatabaseCloneFromBackup = new azure.oracle.AutonomousDatabaseCloneFromBackup("example", {
 *     name: "example",
 *     resourceGroupName: exampleAutonomousDatabase.resourceGroupName,
 *     location: exampleAutonomousDatabase.location,
 *     sourceAutonomousDatabaseId: exampleAutonomousDatabase.id,
 *     cloneType: "Metadata",
 *     backupTimestamp: "2025-09-23T02:22:13.000Z",
 *     adminPassword: "BEstrO0ng_#11",
 *     backupRetentionPeriodInDays: 7,
 *     characterSet: "AL32UTF8",
 *     computeCount: 2,
 *     computeModel: "ECPU",
 *     dataStorageSizeInTb: 1,
 *     databaseVersion: "19c",
 *     databaseWorkload: "OLTP",
 *     displayName: "ExampleClone",
 *     licenseModel: "LicenseIncluded",
 *     autoScalingEnabled: false,
 *     autoScalingForStorageEnabled: true,
 *     mtlsConnectionRequired: true,
 *     nationalCharacterSet: "AL16UTF16",
 *     allowedIpAddresses: [],
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Oracle.Database` - 2025-09-01
 *
 * ## Import
 *
 * autonomous database clone from backups can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:oracle/autonomousDatabaseCloneFromBackup:AutonomousDatabaseCloneFromBackup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Oracle.Database/autonomousDatabases/example
 * ```
 */
class AutonomousDatabaseCloneFromBackup extends pulumi.CustomResource {
    /**
     * Get an existing AutonomousDatabaseCloneFromBackup 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 AutonomousDatabaseCloneFromBackup(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:oracle/autonomousDatabaseCloneFromBackup:AutonomousDatabaseCloneFromBackup';
    /**
     * Returns true if the given object is an instance of AutonomousDatabaseCloneFromBackup.  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'] === AutonomousDatabaseCloneFromBackup.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminPassword"] = state?.adminPassword;
            resourceInputs["allowedIpAddresses"] = state?.allowedIpAddresses;
            resourceInputs["autoScalingEnabled"] = state?.autoScalingEnabled;
            resourceInputs["autoScalingForStorageEnabled"] = state?.autoScalingForStorageEnabled;
            resourceInputs["backupRetentionPeriodInDays"] = state?.backupRetentionPeriodInDays;
            resourceInputs["backupTimestamp"] = state?.backupTimestamp;
            resourceInputs["characterSet"] = state?.characterSet;
            resourceInputs["cloneType"] = state?.cloneType;
            resourceInputs["computeCount"] = state?.computeCount;
            resourceInputs["computeModel"] = state?.computeModel;
            resourceInputs["customerContacts"] = state?.customerContacts;
            resourceInputs["dataStorageSizeInTb"] = state?.dataStorageSizeInTb;
            resourceInputs["databaseVersion"] = state?.databaseVersion;
            resourceInputs["databaseWorkload"] = state?.databaseWorkload;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["licenseModel"] = state?.licenseModel;
            resourceInputs["location"] = state?.location;
            resourceInputs["mtlsConnectionRequired"] = state?.mtlsConnectionRequired;
            resourceInputs["name"] = state?.name;
            resourceInputs["nationalCharacterSet"] = state?.nationalCharacterSet;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["sourceAutonomousDatabaseId"] = state?.sourceAutonomousDatabaseId;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["virtualNetworkId"] = state?.virtualNetworkId;
        }
        else {
            const args = argsOrState;
            if (args?.adminPassword === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminPassword'");
            }
            if (args?.autoScalingEnabled === undefined && !opts.urn) {
                throw new Error("Missing required property 'autoScalingEnabled'");
            }
            if (args?.autoScalingForStorageEnabled === undefined && !opts.urn) {
                throw new Error("Missing required property 'autoScalingForStorageEnabled'");
            }
            if (args?.backupRetentionPeriodInDays === undefined && !opts.urn) {
                throw new Error("Missing required property 'backupRetentionPeriodInDays'");
            }
            if (args?.characterSet === undefined && !opts.urn) {
                throw new Error("Missing required property 'characterSet'");
            }
            if (args?.cloneType === undefined && !opts.urn) {
                throw new Error("Missing required property 'cloneType'");
            }
            if (args?.computeCount === undefined && !opts.urn) {
                throw new Error("Missing required property 'computeCount'");
            }
            if (args?.computeModel === undefined && !opts.urn) {
                throw new Error("Missing required property 'computeModel'");
            }
            if (args?.dataStorageSizeInTb === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataStorageSizeInTb'");
            }
            if (args?.databaseVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'databaseVersion'");
            }
            if (args?.databaseWorkload === undefined && !opts.urn) {
                throw new Error("Missing required property 'databaseWorkload'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.licenseModel === undefined && !opts.urn) {
                throw new Error("Missing required property 'licenseModel'");
            }
            if (args?.mtlsConnectionRequired === undefined && !opts.urn) {
                throw new Error("Missing required property 'mtlsConnectionRequired'");
            }
            if (args?.nationalCharacterSet === undefined && !opts.urn) {
                throw new Error("Missing required property 'nationalCharacterSet'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.sourceAutonomousDatabaseId === undefined && !opts.urn) {
                throw new Error("Missing required property 'sourceAutonomousDatabaseId'");
            }
            resourceInputs["adminPassword"] = args?.adminPassword ? pulumi.secret(args.adminPassword) : undefined;
            resourceInputs["allowedIpAddresses"] = args?.allowedIpAddresses;
            resourceInputs["autoScalingEnabled"] = args?.autoScalingEnabled;
            resourceInputs["autoScalingForStorageEnabled"] = args?.autoScalingForStorageEnabled;
            resourceInputs["backupRetentionPeriodInDays"] = args?.backupRetentionPeriodInDays;
            resourceInputs["backupTimestamp"] = args?.backupTimestamp;
            resourceInputs["characterSet"] = args?.characterSet;
            resourceInputs["cloneType"] = args?.cloneType;
            resourceInputs["computeCount"] = args?.computeCount;
            resourceInputs["computeModel"] = args?.computeModel;
            resourceInputs["customerContacts"] = args?.customerContacts;
            resourceInputs["dataStorageSizeInTb"] = args?.dataStorageSizeInTb;
            resourceInputs["databaseVersion"] = args?.databaseVersion;
            resourceInputs["databaseWorkload"] = args?.databaseWorkload;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["licenseModel"] = args?.licenseModel;
            resourceInputs["location"] = args?.location;
            resourceInputs["mtlsConnectionRequired"] = args?.mtlsConnectionRequired;
            resourceInputs["name"] = args?.name;
            resourceInputs["nationalCharacterSet"] = args?.nationalCharacterSet;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["sourceAutonomousDatabaseId"] = args?.sourceAutonomousDatabaseId;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["virtualNetworkId"] = args?.virtualNetworkId;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["adminPassword"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(AutonomousDatabaseCloneFromBackup.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AutonomousDatabaseCloneFromBackup = AutonomousDatabaseCloneFromBackup;
//# sourceMappingURL=autonomousDatabaseCloneFromBackup.js.map