"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.AuditProfileManagement = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Audit Profile Management resource in Oracle Cloud Infrastructure Data Safe service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/data-safe/latest/AuditProfileManagement
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/datasafe
 *
 * Create a new audit profile resource for a target group. For a target database, it will update the auto created audit profile by fetching the Audit profile.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testAuditProfileManagement = new oci.datasafe.AuditProfileManagement("test_audit_profile_management", {
 *     compartmentId: compartmentId,
 *     targetId: testTarget.id,
 *     targetType: auditProfileTargetType,
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     description: auditProfileDescription,
 *     displayName: auditProfileDisplayName,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     isOverrideGlobalPaidUsage: auditProfileIsOverrideGlobalPaidUsage === "true",
 *     isPaidUsageEnabled: auditProfileIsPaidUsageEnabled === "true",
 *     offlineMonths: Number(auditProfileOfflineMonths),
 *     onlineMonths: Number(auditProfileOnlineMonths),
 *     changeRetentionTrigger: Number(retentionTrigger),
 *     isOverrideGlobalRetentionSetting: true,
 * });
 * ```
 *
 * ## Import
 *
 * AuditProfiles can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:DataSafe/auditProfileManagement:AuditProfileManagement test_audit_profile_management "id"
 * ```
 */
class AuditProfileManagement extends pulumi.CustomResource {
    /**
     * Get an existing AuditProfileManagement 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 AuditProfileManagement(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:DataSafe/auditProfileManagement:AuditProfileManagement';
    /**
     * Returns true if the given object is an instance of AuditProfileManagement.  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'] === AuditProfileManagement.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["auditCollectedVolume"] = state?.auditCollectedVolume;
            resourceInputs["auditTrails"] = state?.auditTrails;
            resourceInputs["changeRetentionTrigger"] = state?.changeRetentionTrigger;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["isOverrideGlobalPaidUsage"] = state?.isOverrideGlobalPaidUsage;
            resourceInputs["isOverrideGlobalRetentionSetting"] = state?.isOverrideGlobalRetentionSetting;
            resourceInputs["isPaidUsageEnabled"] = state?.isPaidUsageEnabled;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["offlineMonths"] = state?.offlineMonths;
            resourceInputs["offlineMonthsSource"] = state?.offlineMonthsSource;
            resourceInputs["onlineMonths"] = state?.onlineMonths;
            resourceInputs["onlineMonthsSource"] = state?.onlineMonthsSource;
            resourceInputs["paidUsageSource"] = state?.paidUsageSource;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["targetId"] = state?.targetId;
            resourceInputs["targetType"] = state?.targetType;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.targetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'targetId'");
            }
            if (args?.targetType === undefined && !opts.urn) {
                throw new Error("Missing required property 'targetType'");
            }
            resourceInputs["changeRetentionTrigger"] = args?.changeRetentionTrigger;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["isOverrideGlobalPaidUsage"] = args?.isOverrideGlobalPaidUsage;
            resourceInputs["isOverrideGlobalRetentionSetting"] = args?.isOverrideGlobalRetentionSetting;
            resourceInputs["isPaidUsageEnabled"] = args?.isPaidUsageEnabled;
            resourceInputs["offlineMonths"] = args?.offlineMonths;
            resourceInputs["onlineMonths"] = args?.onlineMonths;
            resourceInputs["targetId"] = args?.targetId;
            resourceInputs["targetType"] = args?.targetType;
            resourceInputs["auditCollectedVolume"] = undefined /*out*/;
            resourceInputs["auditTrails"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["offlineMonthsSource"] = undefined /*out*/;
            resourceInputs["onlineMonthsSource"] = undefined /*out*/;
            resourceInputs["paidUsageSource"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AuditProfileManagement.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AuditProfileManagement = AuditProfileManagement;
//# sourceMappingURL=auditProfileManagement.js.map