"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.Asset = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Asset resource in Oracle Cloud Infrastructure Cloud Bridge service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/OCB/latest/Asset
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/cloudBridge
 *
 * Creates an asset.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testAsset = new oci.cloudbridge.Asset("test_asset", {
 *     assetType: assetAssetType,
 *     compartmentId: compartmentId,
 *     externalAssetKey: assetExternalAssetKey,
 *     inventoryId: testInventory.id,
 *     sourceKey: assetSourceKey,
 *     assetClassName: assetAssetClassName,
 *     assetClassVersion: assetAssetClassVersion,
 *     assetDetails: assetAssetDetails,
 *     assetSourceIds: assetAssetSourceIds,
 *     attachedEbsVolumesCost: {
 *         amount: assetAttachedEbsVolumesCostAmount,
 *         currencyCode: assetAttachedEbsVolumesCostCurrencyCode,
 *     },
 *     awsEbs: {
 *         attachments: [{
 *             device: assetAwsEbsAttachmentsDevice,
 *             instanceKey: assetAwsEbsAttachmentsInstanceKey,
 *             isDeleteOnTermination: assetAwsEbsAttachmentsIsDeleteOnTermination === "true",
 *             status: assetAwsEbsAttachmentsStatus,
 *             volumeKey: assetAwsEbsAttachmentsVolumeKey,
 *         }],
 *         availabilityZone: assetAwsEbsAvailabilityZone,
 *         iops: Number(assetAwsEbsIops),
 *         isEncrypted: assetAwsEbsIsEncrypted === "true",
 *         isMultiAttachEnabled: assetAwsEbsIsMultiAttachEnabled === "true",
 *         sizeInGiBs: Number(assetAwsEbsSizeInGiBs),
 *         status: assetAwsEbsStatus,
 *         tags: [{
 *             key: assetAwsEbsTagsKey,
 *             value: assetAwsEbsTagsValue,
 *         }],
 *         throughput: Number(assetAwsEbsThroughput),
 *         volumeKey: assetAwsEbsVolumeKey,
 *         volumeType: assetAwsEbsVolumeType,
 *     },
 *     awsEc2: {
 *         architecture: assetAwsEc2Architecture,
 *         areElasticInferenceAcceleratorsPresent: assetAwsEc2AreElasticInferenceAcceleratorsPresent === "true",
 *         bootMode: assetAwsEc2BootMode,
 *         capacityReservationKey: assetAwsEc2CapacityReservationKey,
 *         imageKey: assetAwsEc2ImageKey,
 *         instanceKey: assetAwsEc2InstanceKey,
 *         instanceLifecycle: assetAwsEc2InstanceLifecycle,
 *         instanceType: assetAwsEc2InstanceType,
 *         ipAddress: assetAwsEc2IpAddress,
 *         ipv6address: assetAwsEc2Ipv6address,
 *         isEnclaveOptions: assetAwsEc2IsEnclaveOptions === "true",
 *         isHibernationOptions: assetAwsEc2IsHibernationOptions === "true",
 *         isSourceDestCheck: assetAwsEc2IsSourceDestCheck === "true",
 *         isSpotInstance: assetAwsEc2IsSpotInstance === "true",
 *         kernelKey: assetAwsEc2KernelKey,
 *         licenses: assetAwsEc2Licenses,
 *         maintenanceOptions: assetAwsEc2MaintenanceOptions,
 *         monitoring: assetAwsEc2Monitoring,
 *         networkInterfaces: [{
 *             association: {
 *                 carrierIp: assetAwsEc2NetworkInterfacesAssociationCarrierIp,
 *                 customerOwnedIp: assetAwsEc2NetworkInterfacesAssociationCustomerOwnedIp,
 *                 ipOwnerKey: assetAwsEc2NetworkInterfacesAssociationIpOwnerKey,
 *                 publicDnsName: assetAwsEc2NetworkInterfacesAssociationPublicDnsName,
 *                 publicIp: assetAwsEc2NetworkInterfacesAssociationPublicIp,
 *             },
 *             attachment: {
 *                 attachmentKey: assetAwsEc2NetworkInterfacesAttachmentAttachmentKey,
 *                 deviceIndex: Number(assetAwsEc2NetworkInterfacesAttachmentDeviceIndex),
 *                 isDeleteOnTermination: assetAwsEc2NetworkInterfacesAttachmentIsDeleteOnTermination === "true",
 *                 networkCardIndex: Number(assetAwsEc2NetworkInterfacesAttachmentNetworkCardIndex),
 *                 status: assetAwsEc2NetworkInterfacesAttachmentStatus,
 *                 timeAttach: assetAwsEc2NetworkInterfacesAttachmentTimeAttach,
 *             },
 *             description: assetAwsEc2NetworkInterfacesDescription,
 *             interfaceType: assetAwsEc2NetworkInterfacesInterfaceType,
 *             ipv4prefixes: assetAwsEc2NetworkInterfacesIpv4prefixes,
 *             ipv6addresses: assetAwsEc2NetworkInterfacesIpv6addresses,
 *             ipv6prefixes: assetAwsEc2NetworkInterfacesIpv6prefixes,
 *             isSourceDestCheck: assetAwsEc2NetworkInterfacesIsSourceDestCheck === "true",
 *             macAddress: assetAwsEc2NetworkInterfacesMacAddress,
 *             networkInterfaceKey: assetAwsEc2NetworkInterfacesNetworkInterfaceKey,
 *             ownerKey: assetAwsEc2NetworkInterfacesOwnerKey,
 *             privateIpAddresses: [{
 *                 association: {
 *                     carrierIp: assetAwsEc2NetworkInterfacesPrivateIpAddressesAssociationCarrierIp,
 *                     customerOwnedIp: assetAwsEc2NetworkInterfacesPrivateIpAddressesAssociationCustomerOwnedIp,
 *                     ipOwnerKey: assetAwsEc2NetworkInterfacesPrivateIpAddressesAssociationIpOwnerKey,
 *                     publicDnsName: assetAwsEc2NetworkInterfacesPrivateIpAddressesAssociationPublicDnsName,
 *                     publicIp: assetAwsEc2NetworkInterfacesPrivateIpAddressesAssociationPublicIp,
 *                 },
 *                 isPrimary: assetAwsEc2NetworkInterfacesPrivateIpAddressesIsPrimary === "true",
 *                 privateDnsName: assetAwsEc2NetworkInterfacesPrivateIpAddressesPrivateDnsName,
 *                 privateIpAddress: assetAwsEc2NetworkInterfacesPrivateIpAddressesPrivateIpAddress,
 *             }],
 *             securityGroups: [{
 *                 groupKey: assetAwsEc2NetworkInterfacesSecurityGroupsGroupKey,
 *                 groupName: testGroup.name,
 *             }],
 *             status: assetAwsEc2NetworkInterfacesStatus,
 *             subnetKey: assetAwsEc2NetworkInterfacesSubnetKey,
 *         }],
 *         placement: {
 *             affinity: assetAwsEc2PlacementAffinity,
 *             availabilityZone: assetAwsEc2PlacementAvailabilityZone,
 *             groupName: testGroup.name,
 *             hostKey: assetAwsEc2PlacementHostKey,
 *             hostResourceGroupArn: assetAwsEc2PlacementHostResourceGroupArn,
 *             partitionNumber: Number(assetAwsEc2PlacementPartitionNumber),
 *             spreadDomain: assetAwsEc2PlacementSpreadDomain,
 *             tenancy: assetAwsEc2PlacementTenancy,
 *         },
 *         privateDnsName: assetAwsEc2PrivateDnsName,
 *         privateIpAddress: assetAwsEc2PrivateIpAddress,
 *         rootDeviceName: assetAwsEc2RootDeviceName,
 *         rootDeviceType: assetAwsEc2RootDeviceType,
 *         securityGroups: [{
 *             groupKey: assetAwsEc2SecurityGroupsGroupKey,
 *             groupName: testGroup.name,
 *         }],
 *         sriovNetSupport: assetAwsEc2SriovNetSupport,
 *         state: {
 *             code: Number(assetAwsEc2StateCode),
 *             name: assetAwsEc2StateName,
 *         },
 *         subnetKey: assetAwsEc2SubnetKey,
 *         tags: [{
 *             key: assetAwsEc2TagsKey,
 *             value: assetAwsEc2TagsValue,
 *         }],
 *         timeLaunch: assetAwsEc2TimeLaunch,
 *         tpmSupport: assetAwsEc2TpmSupport,
 *         virtualizationType: assetAwsEc2VirtualizationType,
 *         vpcKey: assetAwsEc2VpcKey,
 *     },
 *     awsEc2cost: {
 *         amount: assetAwsEc2costAmount,
 *         currencyCode: assetAwsEc2costCurrencyCode,
 *     },
 *     compute: {
 *         connectedNetworks: Number(assetComputeConnectedNetworks),
 *         coresCount: Number(assetComputeCoresCount),
 *         cpuModel: assetComputeCpuModel,
 *         description: assetComputeDescription,
 *         disks: [{
 *             bootOrder: Number(assetComputeDisksBootOrder),
 *             isCbtEnabled: assetComputeDisksIsCbtEnabled === "true",
 *             location: assetComputeDisksLocation,
 *             name: assetComputeDisksName,
 *             persistentMode: assetComputeDisksPersistentMode,
 *             sizeInMbs: assetComputeDisksSizeInMbs,
 *             uuid: assetComputeDisksUuid,
 *             uuidLun: assetComputeDisksUuidLun,
 *         }],
 *         disksCount: Number(assetComputeDisksCount),
 *         dnsName: assetComputeDnsName,
 *         firmware: assetComputeFirmware,
 *         gpuDevices: [{
 *             coresCount: Number(assetComputeGpuDevicesCoresCount),
 *             description: assetComputeGpuDevicesDescription,
 *             manufacturer: assetComputeGpuDevicesManufacturer,
 *             memoryInMbs: assetComputeGpuDevicesMemoryInMbs,
 *             name: assetComputeGpuDevicesName,
 *         }],
 *         gpuDevicesCount: Number(assetComputeGpuDevicesCount),
 *         guestState: assetComputeGuestState,
 *         hardwareVersion: assetComputeHardwareVersion,
 *         hostName: assetComputeHostName,
 *         isPmemEnabled: assetComputeIsPmemEnabled === "true",
 *         isTpmEnabled: assetComputeIsTpmEnabled === "true",
 *         latencySensitivity: assetComputeLatencySensitivity,
 *         memoryInMbs: assetComputeMemoryInMbs,
 *         nics: [{
 *             ipAddresses: assetComputeNicsIpAddresses,
 *             label: assetComputeNicsLabel,
 *             macAddress: assetComputeNicsMacAddress,
 *             macAddressType: assetComputeNicsMacAddressType,
 *             networkName: assetComputeNicsNetworkName,
 *             switchName: assetComputeNicsSwitchName,
 *         }],
 *         nicsCount: Number(assetComputeNicsCount),
 *         nvdimmController: {
 *             busNumber: Number(assetComputeNvdimmControllerBusNumber),
 *             label: assetComputeNvdimmControllerLabel,
 *         },
 *         nvdimms: [{
 *             controllerKey: Number(assetComputeNvdimmsControllerKey),
 *             label: assetComputeNvdimmsLabel,
 *             unitNumber: Number(assetComputeNvdimmsUnitNumber),
 *         }],
 *         operatingSystem: assetComputeOperatingSystem,
 *         operatingSystemVersion: assetComputeOperatingSystemVersion,
 *         pmemInMbs: assetComputePmemInMbs,
 *         powerState: assetComputePowerState,
 *         primaryIp: assetComputePrimaryIp,
 *         scsiController: {
 *             label: assetComputeScsiControllerLabel,
 *             sharedBus: assetComputeScsiControllerSharedBus,
 *             unitNumber: Number(assetComputeScsiControllerUnitNumber),
 *         },
 *         storageProvisionedInMbs: assetComputeStorageProvisionedInMbs,
 *         threadsPerCoreCount: Number(assetComputeThreadsPerCoreCount),
 *     },
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     displayName: assetDisplayName,
 *     environmentType: assetEnvironmentType,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     vm: {
 *         hypervisorHost: assetVmHypervisorHost,
 *         hypervisorVendor: assetVmHypervisorVendor,
 *         hypervisorVersion: assetVmHypervisorVersion,
 *     },
 *     vmwareVcenter: {
 *         dataCenter: assetVmwareVcenterDataCenter,
 *         vcenterKey: assetVmwareVcenterVcenterKey,
 *         vcenterVersion: assetVmwareVcenterVcenterVersion,
 *     },
 *     vmwareVm: {
 *         cluster: assetVmwareVmCluster,
 *         customerFields: assetVmwareVmCustomerFields,
 *         customerTags: [{
 *             description: assetVmwareVmCustomerTagsDescription,
 *             name: assetVmwareVmCustomerTagsName,
 *         }],
 *         faultToleranceBandwidth: Number(assetVmwareVmFaultToleranceBandwidth),
 *         faultToleranceSecondaryLatency: Number(assetVmwareVmFaultToleranceSecondaryLatency),
 *         faultToleranceState: assetVmwareVmFaultToleranceState,
 *         instanceUuid: assetVmwareVmInstanceUuid,
 *         isDisksCbtEnabled: assetVmwareVmIsDisksCbtEnabled === "true",
 *         isDisksUuidEnabled: assetVmwareVmIsDisksUuidEnabled === "true",
 *         path: assetVmwareVmPath,
 *         vmwareToolsStatus: assetVmwareVmVmwareToolsStatus,
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Assets can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:CloudBridge/asset:Asset test_asset "id"
 * ```
 */
class Asset extends pulumi.CustomResource {
    /**
     * Get an existing Asset 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 Asset(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:CloudBridge/asset:Asset';
    /**
     * Returns true if the given object is an instance of Asset.  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'] === Asset.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["assetClassName"] = state?.assetClassName;
            resourceInputs["assetClassVersion"] = state?.assetClassVersion;
            resourceInputs["assetDetails"] = state?.assetDetails;
            resourceInputs["assetSourceIds"] = state?.assetSourceIds;
            resourceInputs["assetType"] = state?.assetType;
            resourceInputs["attachedEbsVolumesCost"] = state?.attachedEbsVolumesCost;
            resourceInputs["awsEbs"] = state?.awsEbs;
            resourceInputs["awsEc2"] = state?.awsEc2;
            resourceInputs["awsEc2cost"] = state?.awsEc2cost;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["compute"] = state?.compute;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["environmentType"] = state?.environmentType;
            resourceInputs["externalAssetKey"] = state?.externalAssetKey;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["inventoryId"] = state?.inventoryId;
            resourceInputs["sourceKey"] = state?.sourceKey;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["vm"] = state?.vm;
            resourceInputs["vmwareVcenter"] = state?.vmwareVcenter;
            resourceInputs["vmwareVm"] = state?.vmwareVm;
        }
        else {
            const args = argsOrState;
            if (args?.assetType === undefined && !opts.urn) {
                throw new Error("Missing required property 'assetType'");
            }
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.externalAssetKey === undefined && !opts.urn) {
                throw new Error("Missing required property 'externalAssetKey'");
            }
            if (args?.inventoryId === undefined && !opts.urn) {
                throw new Error("Missing required property 'inventoryId'");
            }
            if (args?.sourceKey === undefined && !opts.urn) {
                throw new Error("Missing required property 'sourceKey'");
            }
            resourceInputs["assetClassName"] = args?.assetClassName;
            resourceInputs["assetClassVersion"] = args?.assetClassVersion;
            resourceInputs["assetDetails"] = args?.assetDetails;
            resourceInputs["assetSourceIds"] = args?.assetSourceIds;
            resourceInputs["assetType"] = args?.assetType;
            resourceInputs["attachedEbsVolumesCost"] = args?.attachedEbsVolumesCost;
            resourceInputs["awsEbs"] = args?.awsEbs;
            resourceInputs["awsEc2"] = args?.awsEc2;
            resourceInputs["awsEc2cost"] = args?.awsEc2cost;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["compute"] = args?.compute;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["externalAssetKey"] = args?.externalAssetKey;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["inventoryId"] = args?.inventoryId;
            resourceInputs["sourceKey"] = args?.sourceKey;
            resourceInputs["vm"] = args?.vm;
            resourceInputs["vmwareVcenter"] = args?.vmwareVcenter;
            resourceInputs["vmwareVm"] = args?.vmwareVm;
            resourceInputs["environmentType"] = 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(Asset.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Asset = Asset;
//# sourceMappingURL=asset.js.map