"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.OperatorControlAssignment = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Operator Control Assignment resource in Oracle Cloud Infrastructure Operator Access Control service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/operatoraccesscontrol/latest/OperatorControlAssignment
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/operator_access_control
 *
 * Creates an Operator Control Assignment resource. In effect, this brings the target resource under the governance of the Operator Control for specified time duration.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOperatorControlAssignment = new oci.operatoraccesscontrol.OperatorControlAssignment("test_operator_control_assignment", {
 *     compartmentId: compartmentId,
 *     isEnforcedAlways: operatorControlAssignmentIsEnforcedAlways === "true",
 *     operatorControlId: testOperatorControl.id,
 *     resourceCompartmentId: testCompartment.id,
 *     resourceId: testResource.id,
 *     resourceName: operatorControlAssignmentResourceName,
 *     resourceType: operatorControlAssignmentResourceType,
 *     comment: operatorControlAssignmentComment,
 *     definedTags: operatorControlAssignmentDefinedTags,
 *     freeformTags: operatorControlAssignmentFreeformTags,
 *     isAutoApproveDuringMaintenance: operatorControlAssignmentIsAutoApproveDuringMaintenance === "true",
 *     isHypervisorLogForwarded: operatorControlAssignmentIsHypervisorLogForwarded === "true",
 *     isLogForwarded: operatorControlAssignmentIsLogForwarded === "true",
 *     remoteSyslogServerAddress: operatorControlAssignmentRemoteSyslogServerAddress,
 *     remoteSyslogServerCaCert: operatorControlAssignmentRemoteSyslogServerCaCert,
 *     remoteSyslogServerPort: Number(operatorControlAssignmentRemoteSyslogServerPort),
 *     timeAssignmentFrom: operatorControlAssignmentTimeAssignmentFrom,
 *     timeAssignmentTo: operatorControlAssignmentTimeAssignmentTo,
 * });
 * ```
 *
 * ## Import
 *
 * OperatorControlAssignments can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:OperatorAccessControl/operatorControlAssignment:OperatorControlAssignment test_operator_control_assignment "id"
 * ```
 */
class OperatorControlAssignment extends pulumi.CustomResource {
    /**
     * Get an existing OperatorControlAssignment 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 OperatorControlAssignment(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:OperatorAccessControl/operatorControlAssignment:OperatorControlAssignment';
    /**
     * Returns true if the given object is an instance of OperatorControlAssignment.  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'] === OperatorControlAssignment.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["assignerId"] = state?.assignerId;
            resourceInputs["comment"] = state?.comment;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["detachmentDescription"] = state?.detachmentDescription;
            resourceInputs["errorCode"] = state?.errorCode;
            resourceInputs["errorMessage"] = state?.errorMessage;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["isAutoApproveDuringMaintenance"] = state?.isAutoApproveDuringMaintenance;
            resourceInputs["isDefaultAssignment"] = state?.isDefaultAssignment;
            resourceInputs["isEnforcedAlways"] = state?.isEnforcedAlways;
            resourceInputs["isHypervisorLogForwarded"] = state?.isHypervisorLogForwarded;
            resourceInputs["isLogForwarded"] = state?.isLogForwarded;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["opControlName"] = state?.opControlName;
            resourceInputs["operatorControlId"] = state?.operatorControlId;
            resourceInputs["remoteSyslogServerAddress"] = state?.remoteSyslogServerAddress;
            resourceInputs["remoteSyslogServerCaCert"] = state?.remoteSyslogServerCaCert;
            resourceInputs["remoteSyslogServerPort"] = state?.remoteSyslogServerPort;
            resourceInputs["resourceCompartmentId"] = state?.resourceCompartmentId;
            resourceInputs["resourceId"] = state?.resourceId;
            resourceInputs["resourceName"] = state?.resourceName;
            resourceInputs["resourceType"] = state?.resourceType;
            resourceInputs["state"] = state?.state;
            resourceInputs["timeAssignmentFrom"] = state?.timeAssignmentFrom;
            resourceInputs["timeAssignmentTo"] = state?.timeAssignmentTo;
            resourceInputs["timeOfAssignment"] = state?.timeOfAssignment;
            resourceInputs["timeOfDeletion"] = state?.timeOfDeletion;
            resourceInputs["unassignerId"] = state?.unassignerId;
            resourceInputs["validateAssignmentTrigger"] = state?.validateAssignmentTrigger;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.isEnforcedAlways === undefined && !opts.urn) {
                throw new Error("Missing required property 'isEnforcedAlways'");
            }
            if (args?.operatorControlId === undefined && !opts.urn) {
                throw new Error("Missing required property 'operatorControlId'");
            }
            if (args?.resourceCompartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceCompartmentId'");
            }
            if (args?.resourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceId'");
            }
            if (args?.resourceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceName'");
            }
            if (args?.resourceType === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceType'");
            }
            resourceInputs["comment"] = args?.comment;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["isAutoApproveDuringMaintenance"] = args?.isAutoApproveDuringMaintenance;
            resourceInputs["isEnforcedAlways"] = args?.isEnforcedAlways;
            resourceInputs["isHypervisorLogForwarded"] = args?.isHypervisorLogForwarded;
            resourceInputs["isLogForwarded"] = args?.isLogForwarded;
            resourceInputs["operatorControlId"] = args?.operatorControlId;
            resourceInputs["remoteSyslogServerAddress"] = args?.remoteSyslogServerAddress;
            resourceInputs["remoteSyslogServerCaCert"] = args?.remoteSyslogServerCaCert;
            resourceInputs["remoteSyslogServerPort"] = args?.remoteSyslogServerPort;
            resourceInputs["resourceCompartmentId"] = args?.resourceCompartmentId;
            resourceInputs["resourceId"] = args?.resourceId;
            resourceInputs["resourceName"] = args?.resourceName;
            resourceInputs["resourceType"] = args?.resourceType;
            resourceInputs["timeAssignmentFrom"] = args?.timeAssignmentFrom;
            resourceInputs["timeAssignmentTo"] = args?.timeAssignmentTo;
            resourceInputs["validateAssignmentTrigger"] = args?.validateAssignmentTrigger;
            resourceInputs["assignerId"] = undefined /*out*/;
            resourceInputs["detachmentDescription"] = undefined /*out*/;
            resourceInputs["errorCode"] = undefined /*out*/;
            resourceInputs["errorMessage"] = undefined /*out*/;
            resourceInputs["isDefaultAssignment"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["opControlName"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeOfAssignment"] = undefined /*out*/;
            resourceInputs["timeOfDeletion"] = undefined /*out*/;
            resourceInputs["unassignerId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(OperatorControlAssignment.__pulumiType, name, resourceInputs, opts);
    }
}
exports.OperatorControlAssignment = OperatorControlAssignment;
//# sourceMappingURL=operatorControlAssignment.js.map