"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.DbNode = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Db Node resource in Oracle Cloud Infrastructure Database service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/database/latest/DbNode
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/database
 *
 * Updates the specified database node.
 *
 * ## Import
 *
 * DbNodes can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Database/dbNode:DbNode test_db_node "id"
 * ```
 */
class DbNode extends pulumi.CustomResource {
    /**
     * Get an existing DbNode 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 DbNode(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Database/dbNode:DbNode';
    /**
     * Returns true if the given object is an instance of DbNode.  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'] === DbNode.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["additionalDetails"] = state?.additionalDetails;
            resourceInputs["backupIpId"] = state?.backupIpId;
            resourceInputs["backupIpv6id"] = state?.backupIpv6id;
            resourceInputs["backupVnic2id"] = state?.backupVnic2id;
            resourceInputs["backupVnicId"] = state?.backupVnicId;
            resourceInputs["computeCount"] = state?.computeCount;
            resourceInputs["computeModel"] = state?.computeModel;
            resourceInputs["cpuCoreCount"] = state?.cpuCoreCount;
            resourceInputs["dbNodeId"] = state?.dbNodeId;
            resourceInputs["dbNodeStorageSizeInGbs"] = state?.dbNodeStorageSizeInGbs;
            resourceInputs["dbServerId"] = state?.dbServerId;
            resourceInputs["dbSystemId"] = state?.dbSystemId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["faultDomain"] = state?.faultDomain;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["hostIpId"] = state?.hostIpId;
            resourceInputs["hostIpv6id"] = state?.hostIpv6id;
            resourceInputs["hostname"] = state?.hostname;
            resourceInputs["isOsPatchRebootRequired"] = state?.isOsPatchRebootRequired;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["maintenanceType"] = state?.maintenanceType;
            resourceInputs["memorySizeInGbs"] = state?.memorySizeInGbs;
            resourceInputs["softwareStorageSizeInGb"] = state?.softwareStorageSizeInGb;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeMaintenanceWindowEnd"] = state?.timeMaintenanceWindowEnd;
            resourceInputs["timeMaintenanceWindowStart"] = state?.timeMaintenanceWindowStart;
            resourceInputs["totalCpuCoreCount"] = state?.totalCpuCoreCount;
            resourceInputs["vnic2id"] = state?.vnic2id;
            resourceInputs["vnicId"] = state?.vnicId;
        }
        else {
            const args = argsOrState;
            if (args?.dbNodeId === undefined && !opts.urn) {
                throw new Error("Missing required property 'dbNodeId'");
            }
            resourceInputs["dbNodeId"] = args?.dbNodeId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["additionalDetails"] = undefined /*out*/;
            resourceInputs["backupIpId"] = undefined /*out*/;
            resourceInputs["backupIpv6id"] = undefined /*out*/;
            resourceInputs["backupVnic2id"] = undefined /*out*/;
            resourceInputs["backupVnicId"] = undefined /*out*/;
            resourceInputs["computeCount"] = undefined /*out*/;
            resourceInputs["computeModel"] = undefined /*out*/;
            resourceInputs["cpuCoreCount"] = undefined /*out*/;
            resourceInputs["dbNodeStorageSizeInGbs"] = undefined /*out*/;
            resourceInputs["dbServerId"] = undefined /*out*/;
            resourceInputs["dbSystemId"] = undefined /*out*/;
            resourceInputs["faultDomain"] = undefined /*out*/;
            resourceInputs["hostIpId"] = undefined /*out*/;
            resourceInputs["hostIpv6id"] = undefined /*out*/;
            resourceInputs["hostname"] = undefined /*out*/;
            resourceInputs["isOsPatchRebootRequired"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["maintenanceType"] = undefined /*out*/;
            resourceInputs["memorySizeInGbs"] = undefined /*out*/;
            resourceInputs["softwareStorageSizeInGb"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeMaintenanceWindowEnd"] = undefined /*out*/;
            resourceInputs["timeMaintenanceWindowStart"] = undefined /*out*/;
            resourceInputs["totalCpuCoreCount"] = undefined /*out*/;
            resourceInputs["vnic2id"] = undefined /*out*/;
            resourceInputs["vnicId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(DbNode.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DbNode = DbNode;
//# sourceMappingURL=dbNode.js.map