Class Win32AssociatedProcessorMemory

java.lang.Object
io.github.eggy03.ferrumx.windows.entity.processor.Win32AssociatedProcessorMemory

@ShallowImmutable public class Win32AssociatedProcessorMemory extends Object
Immutable representation of a Win32Processor association with Win32CacheMemory.

Fields indirectly correspond to properties retrieved from the Win32_AssociatedProcessorMemory WMI class and represent an association between Win32_Processor and Win32_CacheMemory.

Links Win32Processor with Win32CacheMemory via their device IDs

This class has the following two fields:

Extra Notes: The Win32_AssociatedProcessorMemory WMI class itself does not directly expose the DeviceID (from Win32_CacheMemory) or the DeviceID (from Win32_Processor) 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_ASSOCIATED_PROCESSOR_MEMORY constructs a custom PSObject that maps Antecedent.DeviceID to cacheMemoryDeviceId and Dependent.DeviceID to processorDeviceId and the resulting JSON returned is deserialized into this entity class.

Usage examples

// Build a new instance
Win32AssociatedProcessorMemory apm = Win32AssociatedProcessorMemory.builder()
    .cacheMemoryDeviceId("Cache Memory 1")
    .processorDeviceId("CPU0")
    .build();
// Create a modified copy using the builder
Win32AssociatedProcessorMemory updated = apm.toBuilder()
    .cacheMemoryDeviceId("Cache Memory 2")
    .build();

See Win32Processor for related CPU information.

See Win32CacheMemory for related CPU Cache information.

Since:
3.0.0
See Also:
  • Field Details

    • cacheMemoryDeviceId

      @SerializedName("CacheMemoryDeviceID") @Nullable @Nullable String cacheMemoryDeviceId
      Contains the deviceId field value of Win32CacheMemory
    • processorDeviceId

      @SerializedName("ProcessorDeviceID") @Nullable @Nullable String processorDeviceId
      Contains the deviceId field value of Win32Processor
  • Constructor Details

    • Win32AssociatedProcessorMemory

      public Win32AssociatedProcessorMemory()
  • Method Details

    • toString

      @NotNull public @NotNull String toString()
      Retrieves the entity in a JSON pretty-print formatted string
      Overrides:
      toString in class Object
      Returns:
      the String value of the object in JSON pretty-print format