"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.TargetAsset = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Target Asset resource in Oracle Cloud Infrastructure Cloud Migrations service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/ocm/latest/TargetAsset
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/cloudMigrations
 *
 * Creates a target asset.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testTargetAsset = new oci.cloudmigrations.TargetAsset("test_target_asset", {
 *     isExcludedFromExecution: targetAssetIsExcludedFromExecution === "true",
 *     migrationPlanId: testMigrationPlan.id,
 *     type: targetAssetType,
 *     blockVolumesPerformance: Number(targetAssetBlockVolumesPerformance),
 *     msLicense: targetAssetMsLicense,
 *     preferredShapeType: targetAssetPreferredShapeType,
 *     userSpec: {
 *         agentConfig: {
 *             areAllPluginsDisabled: targetAssetUserSpecAgentConfigAreAllPluginsDisabled === "true",
 *             isManagementDisabled: targetAssetUserSpecAgentConfigIsManagementDisabled === "true",
 *             isMonitoringDisabled: targetAssetUserSpecAgentConfigIsMonitoringDisabled === "true",
 *             pluginsConfigs: [{
 *                 desiredState: targetAssetUserSpecAgentConfigPluginsConfigDesiredState,
 *                 name: targetAssetUserSpecAgentConfigPluginsConfigName,
 *             }],
 *         },
 *         availabilityDomain: targetAssetUserSpecAvailabilityDomain,
 *         capacityReservationId: testCapacityReservation.id,
 *         compartmentId: compartmentId,
 *         createVnicDetails: {
 *             assignPrivateDnsRecord: targetAssetUserSpecCreateVnicDetailsAssignPrivateDnsRecord === "true",
 *             assignPublicIp: targetAssetUserSpecCreateVnicDetailsAssignPublicIp === "true",
 *             definedTags: {
 *                 "foo-namespace.bar-key": "value",
 *             },
 *             displayName: targetAssetUserSpecCreateVnicDetailsDisplayName,
 *             freeformTags: {
 *                 "bar-key": "value",
 *             },
 *             hostnameLabel: targetAssetUserSpecCreateVnicDetailsHostnameLabel,
 *             nsgIds: targetAssetUserSpecCreateVnicDetailsNsgIds,
 *             privateIp: targetAssetUserSpecCreateVnicDetailsPrivateIp,
 *             skipSourceDestCheck: targetAssetUserSpecCreateVnicDetailsSkipSourceDestCheck === "true",
 *             subnetId: testSubnet.id,
 *             vlanId: testVlan.id,
 *         },
 *         dedicatedVmHostId: testDedicatedVmHost.id,
 *         definedTags: {
 *             "foo-namespace.bar-key": "value",
 *         },
 *         displayName: targetAssetUserSpecDisplayName,
 *         faultDomain: targetAssetUserSpecFaultDomain,
 *         freeformTags: {
 *             "bar-key": "value",
 *         },
 *         hostnameLabel: targetAssetUserSpecHostnameLabel,
 *         instanceOptions: {
 *             areLegacyImdsEndpointsDisabled: targetAssetUserSpecInstanceOptionsAreLegacyImdsEndpointsDisabled === "true",
 *         },
 *         ipxeScript: targetAssetUserSpecIpxeScript,
 *         isPvEncryptionInTransitEnabled: targetAssetUserSpecIsPvEncryptionInTransitEnabled === "true",
 *         preemptibleInstanceConfig: {
 *             preemptionAction: {
 *                 type: targetAssetUserSpecPreemptibleInstanceConfigPreemptionActionType,
 *                 preserveBootVolume: targetAssetUserSpecPreemptibleInstanceConfigPreemptionActionPreserveBootVolume === "true",
 *             },
 *         },
 *         shape: targetAssetUserSpecShape,
 *         shapeConfig: {
 *             baselineOcpuUtilization: targetAssetUserSpecShapeConfigBaselineOcpuUtilization,
 *             memoryInGbs: targetAssetUserSpecShapeConfigMemoryInGbs,
 *             ocpus: targetAssetUserSpecShapeConfigOcpus,
 *         },
 *         sourceDetails: {
 *             sourceType: targetAssetUserSpecSourceDetailsSourceType,
 *             bootVolumeId: testBootVolume.id,
 *             bootVolumeSizeInGbs: targetAssetUserSpecSourceDetailsBootVolumeSizeInGbs,
 *             bootVolumeVpusPerGb: targetAssetUserSpecSourceDetailsBootVolumeVpusPerGb,
 *             imageId: testImage.id,
 *             kmsKeyId: testKey.id,
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * TargetAssets can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:CloudMigrations/targetAsset:TargetAsset test_target_asset "id"
 * ```
 */
class TargetAsset extends pulumi.CustomResource {
    /**
     * Get an existing TargetAsset 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 TargetAsset(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:CloudMigrations/targetAsset:TargetAsset';
    /**
     * Returns true if the given object is an instance of TargetAsset.  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'] === TargetAsset.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["blockVolumesPerformance"] = state?.blockVolumesPerformance;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["compatibilityMessages"] = state?.compatibilityMessages;
            resourceInputs["createdResourceId"] = state?.createdResourceId;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["estimatedCosts"] = state?.estimatedCosts;
            resourceInputs["isExcludedFromExecution"] = state?.isExcludedFromExecution;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["migrationAssets"] = state?.migrationAssets;
            resourceInputs["migrationPlanId"] = state?.migrationPlanId;
            resourceInputs["msLicense"] = state?.msLicense;
            resourceInputs["preferredShapeType"] = state?.preferredShapeType;
            resourceInputs["recommendedSpecs"] = state?.recommendedSpecs;
            resourceInputs["state"] = state?.state;
            resourceInputs["testSpecs"] = state?.testSpecs;
            resourceInputs["timeAssessed"] = state?.timeAssessed;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["type"] = state?.type;
            resourceInputs["userSpec"] = state?.userSpec;
        }
        else {
            const args = argsOrState;
            if (args?.isExcludedFromExecution === undefined && !opts.urn) {
                throw new Error("Missing required property 'isExcludedFromExecution'");
            }
            if (args?.migrationPlanId === undefined && !opts.urn) {
                throw new Error("Missing required property 'migrationPlanId'");
            }
            if (args?.type === undefined && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            resourceInputs["blockVolumesPerformance"] = args?.blockVolumesPerformance;
            resourceInputs["isExcludedFromExecution"] = args?.isExcludedFromExecution;
            resourceInputs["migrationPlanId"] = args?.migrationPlanId;
            resourceInputs["msLicense"] = args?.msLicense;
            resourceInputs["preferredShapeType"] = args?.preferredShapeType;
            resourceInputs["recommendedSpecs"] = args?.recommendedSpecs;
            resourceInputs["testSpecs"] = args?.testSpecs;
            resourceInputs["type"] = args?.type;
            resourceInputs["userSpec"] = args?.userSpec;
            resourceInputs["compartmentId"] = undefined /*out*/;
            resourceInputs["compatibilityMessages"] = undefined /*out*/;
            resourceInputs["createdResourceId"] = undefined /*out*/;
            resourceInputs["displayName"] = undefined /*out*/;
            resourceInputs["estimatedCosts"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["migrationAssets"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeAssessed"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(TargetAsset.__pulumiType, name, resourceInputs, opts);
    }
}
exports.TargetAsset = TargetAsset;
//# sourceMappingURL=targetAsset.js.map