Class DMISystem

java.lang.Object
io.github.eggy03.dmidecode.entity.system.AbstractDMISystem
io.github.eggy03.dmidecode.entity.system.DMISystem

@Generated(from="AbstractDMISystem", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class DMISystem extends AbstractDMISystem
Immutable representation of system information retrieved via DMI.

Fields correspond to properties reported by dmidecode for the System Information (Type 1) SMBIOS structure.

Instances of this class are thread-safe.

Usage example


 DMISystem system = new DMISystem.Builder()
     .manufacturer("LENOVO")
     .productName("ThinkPad T14 Gen 3")
     .serialNumber("PF123ABC")
     .uuid("4C4C4544-0038-4D10-8051-CAC04F4A1234")
     .build();
 // Create a modified copy
 DMISystem updated = system
     .withSkuNumber("21CFCTO1WW");
 
Since:
0.2.0
  • Field Details

    • manufacturer

      private final @Nullable String manufacturer
    • productName

      private final @Nullable String productName
    • version

      private final @Nullable String version
    • serialNumber

      private final @Nullable String serialNumber
    • uuid

      private final @Nullable String uuid
    • wakeupType

      private final @Nullable String wakeupType
    • skuNumber

      private final @Nullable String skuNumber
    • family

      private final @Nullable String family
  • Constructor Details

    • DMISystem

      private DMISystem(@Nullable String manufacturer, @Nullable String productName, @Nullable String version, @Nullable String serialNumber, @Nullable String uuid, @Nullable String wakeupType, @Nullable String skuNumber, @Nullable String family)
  • Method Details

    • manufacturer

      public @Nullable String manufacturer()
      Specified by:
      manufacturer in class AbstractDMISystem
      Returns:
      The value of the manufacturer attribute
    • productName

      public @Nullable String productName()
      Specified by:
      productName in class AbstractDMISystem
      Returns:
      The value of the productName attribute
    • version

      public @Nullable String version()
      Specified by:
      version in class AbstractDMISystem
      Returns:
      The value of the version attribute
    • serialNumber

      public @Nullable String serialNumber()
      Specified by:
      serialNumber in class AbstractDMISystem
      Returns:
      The value of the serialNumber attribute
    • uuid

      public @Nullable String uuid()
      Specified by:
      uuid in class AbstractDMISystem
      Returns:
      The value of the uuid attribute
    • wakeupType

      public @Nullable String wakeupType()
      Specified by:
      wakeupType in class AbstractDMISystem
      Returns:
      The value of the wakeupType attribute
    • skuNumber

      public @Nullable String skuNumber()
      Specified by:
      skuNumber in class AbstractDMISystem
      Returns:
      The value of the skuNumber attribute
    • family

      public @Nullable String family()
      Specified by:
      family in class AbstractDMISystem
      Returns:
      The value of the family attribute
    • withManufacturer

      public final DMISystem withManufacturer(@Nullable String value)
      Copy the current immutable object by setting a value for the manufacturer attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for manufacturer (can be null)
      Returns:
      A modified copy or the this object
    • withProductName

      public final DMISystem withProductName(@Nullable String value)
      Copy the current immutable object by setting a value for the productName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for productName (can be null)
      Returns:
      A modified copy or the this object
    • withVersion

      public final DMISystem withVersion(@Nullable String value)
      Copy the current immutable object by setting a value for the version attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for version (can be null)
      Returns:
      A modified copy or the this object
    • withSerialNumber

      public final DMISystem withSerialNumber(@Nullable String value)
      Copy the current immutable object by setting a value for the serialNumber attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for serialNumber (can be null)
      Returns:
      A modified copy or the this object
    • withUuid

      public final DMISystem withUuid(@Nullable String value)
      Copy the current immutable object by setting a value for the uuid attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for uuid (can be null)
      Returns:
      A modified copy or the this object
    • withWakeupType

      public final DMISystem withWakeupType(@Nullable String value)
      Copy the current immutable object by setting a value for the wakeupType attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for wakeupType (can be null)
      Returns:
      A modified copy or the this object
    • withSkuNumber

      public final DMISystem withSkuNumber(@Nullable String value)
      Copy the current immutable object by setting a value for the skuNumber attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for skuNumber (can be null)
      Returns:
      A modified copy or the this object
    • withFamily

      public final DMISystem withFamily(@Nullable String value)
      Copy the current immutable object by setting a value for the family attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for family (can be null)
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of DMISystem that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalsByValue

      private boolean equalsByValue(DMISystem another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: manufacturer, productName, version, serialNumber, uuid, wakeupType, skuNumber, family.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • fromJson

      @Deprecated static DMISystem fromJson(DMISystem.Json json)
      Deprecated.
      Do not use this method directly, it exists only for the Jackson-binding infrastructure
      Parameters:
      json - A JSON-bindable data structure
      Returns:
      An immutable value type
    • copyOf

      public static DMISystem copyOf(AbstractDMISystem instance)
      Creates an immutable copy of a AbstractDMISystem value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable DMISystem instance