Class Win32LogicalDiskToPartition
Win32DiskPartition association with Win32LogicalDisk.
Fields indirectly correspond to properties retrieved from the Win32_LogicalDiskToPartition WMI class
and represent an association between Win32_DiskPartition and Win32_LogicalDisk.
Associates Win32DiskPartition with Win32LogicalDisk via their device IDs
This class has the following two fields:
diskPartitionDeviceId- contains thedeviceIdfield ofWin32DiskPartitionlogicalDiskDeviceId- contains thedeviceIdfield ofWin32LogicalDisk
Extra Notes: The Win32_LogicalDiskToPartition WMI class itself does not directly expose
the DeviceID (from Win32_DiskPartition) or the DeviceID
(from Win32_LogicalDisk) as standalone properties.
Instead, these values are nested within its references: Antecedent and Dependent.
To simplify data mapping, the PowerShell query defined in
Cimv2.WIN32_LOGICAL_DISK_TO_PARTITION constructs a custom PSObject
that maps Antecedent.DeviceID to diskPartitionDeviceId and Dependent.DeviceID to logicalDiskDeviceId
and the resulting JSON returned is deserialized into this entity class.
Usage examples
// Build a new instance
Win32LogicalDiskToPartition ldt = Win32LogicalDiskToPartition.builder()
.diskPartitionDeviceId("Disk #0 Partition #1")
.logicalDiskDeviceId("C:")
.build();
// Create a modified copy using the builder
LWin32LogicalDiskToPartition updated = ldt.toBuilder()
.logicalDiskDeviceId("D:")
.build();
See Win32DiskPartition for related partitions on a physical disk.
See Win32LogicalDisk for partition info for partitions on a physical disk
- Since:
- 3.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) @Nullable StringContains thedeviceIdfield value ofWin32DiskPartition(package private) @Nullable StringContains thedeviceIdfield value ofWin32LogicalDisk -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
diskPartitionDeviceId
Contains thedeviceIdfield value ofWin32DiskPartition -
logicalDiskDeviceId
Contains thedeviceIdfield value ofWin32LogicalDisk
-
-
Constructor Details
-
Win32LogicalDiskToPartition
public Win32LogicalDiskToPartition()
-
-
Method Details
-
toString
-