"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.Instance = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Oce Instance resource in Oracle Cloud Infrastructure Content and Experience service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/oce/latest/OceInstance
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/
 *
 * Creates a new OceInstance.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOceInstance = new oci.oce.Instance("test_oce_instance", {
 *     adminEmail: oceInstanceAdminEmail,
 *     compartmentId: compartmentId,
 *     idcsAccessToken: oceInstanceIdcsAccessToken,
 *     name: oceInstanceName,
 *     objectStorageNamespace: oceInstanceObjectStorageNamespace,
 *     tenancyId: testTenancy.id,
 *     tenancyName: testTenancy.name,
 *     addOnFeatures: oceInstanceAddOnFeatures,
 *     definedTags: {
 *         "foo-namespace.bar-key": "value",
 *     },
 *     description: oceInstanceDescription,
 *     drRegion: oceInstanceDrRegion,
 *     freeformTags: {
 *         "bar-key": "value",
 *     },
 *     instanceAccessType: oceInstanceInstanceAccessType,
 *     instanceLicenseType: oceInstanceInstanceLicenseType,
 *     instanceUsageType: oceInstanceInstanceUsageType,
 *     upgradeSchedule: oceInstanceUpgradeSchedule,
 *     wafPrimaryDomain: oceInstanceWafPrimaryDomain,
 * });
 * ```
 *
 * ## Import
 *
 * OceInstances can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Oce/instance:Instance test_oce_instance "id"
 * ```
 */
class Instance extends pulumi.CustomResource {
    /**
     * Get an existing Instance 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 Instance(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Oce/instance:Instance';
    /**
     * Returns true if the given object is an instance of Instance.  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'] === Instance.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["addOnFeatures"] = state?.addOnFeatures;
            resourceInputs["adminEmail"] = state?.adminEmail;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["description"] = state?.description;
            resourceInputs["drRegion"] = state?.drRegion;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["guid"] = state?.guid;
            resourceInputs["idcsAccessToken"] = state?.idcsAccessToken;
            resourceInputs["idcsTenancy"] = state?.idcsTenancy;
            resourceInputs["instanceAccessType"] = state?.instanceAccessType;
            resourceInputs["instanceLicenseType"] = state?.instanceLicenseType;
            resourceInputs["instanceUsageType"] = state?.instanceUsageType;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["name"] = state?.name;
            resourceInputs["objectStorageNamespace"] = state?.objectStorageNamespace;
            resourceInputs["service"] = state?.service;
            resourceInputs["state"] = state?.state;
            resourceInputs["stateMessage"] = state?.stateMessage;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["tenancyId"] = state?.tenancyId;
            resourceInputs["tenancyName"] = state?.tenancyName;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["upgradeSchedule"] = state?.upgradeSchedule;
            resourceInputs["wafPrimaryDomain"] = state?.wafPrimaryDomain;
        }
        else {
            const args = argsOrState;
            if (args?.adminEmail === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminEmail'");
            }
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.idcsAccessToken === undefined && !opts.urn) {
                throw new Error("Missing required property 'idcsAccessToken'");
            }
            if (args?.objectStorageNamespace === undefined && !opts.urn) {
                throw new Error("Missing required property 'objectStorageNamespace'");
            }
            if (args?.tenancyId === undefined && !opts.urn) {
                throw new Error("Missing required property 'tenancyId'");
            }
            if (args?.tenancyName === undefined && !opts.urn) {
                throw new Error("Missing required property 'tenancyName'");
            }
            resourceInputs["addOnFeatures"] = args?.addOnFeatures;
            resourceInputs["adminEmail"] = args?.adminEmail;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["description"] = args?.description;
            resourceInputs["drRegion"] = args?.drRegion;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["idcsAccessToken"] = args?.idcsAccessToken ? pulumi.secret(args.idcsAccessToken) : undefined;
            resourceInputs["instanceAccessType"] = args?.instanceAccessType;
            resourceInputs["instanceLicenseType"] = args?.instanceLicenseType;
            resourceInputs["instanceUsageType"] = args?.instanceUsageType;
            resourceInputs["name"] = args?.name;
            resourceInputs["objectStorageNamespace"] = args?.objectStorageNamespace;
            resourceInputs["tenancyId"] = args?.tenancyId;
            resourceInputs["tenancyName"] = args?.tenancyName;
            resourceInputs["upgradeSchedule"] = args?.upgradeSchedule;
            resourceInputs["wafPrimaryDomain"] = args?.wafPrimaryDomain;
            resourceInputs["guid"] = undefined /*out*/;
            resourceInputs["idcsTenancy"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["service"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["stateMessage"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["idcsAccessToken"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Instance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Instance = Instance;
//# sourceMappingURL=instance.js.map