diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..81b49e6
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,19 @@
+## **Description**
+
+Provide a clear and concise description of the changes in this PR.
+What problem does it solve? What does it add or improve?
+
+## **Type of Change**
+
+Keep all that apply:
+
+- Bug fix
+- New feature
+- Documentation update
+- Refactor
+- Tests
+- Other (please describe):
+
+## **Related Issues**
+
+If this PR closes or relates to an existing issue, link it here:
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e81cb95..822cd40 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,9 +7,118 @@ commits and PRs that contributed to each of the releases.
This project tries its best to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+The following headings may be used while categorizing the list of changes made in each version:
+
+- New Features
+- Removed Features
+- Bug Fixes
+- Non-Breaking Changes
+- Breaking Changes
+- Test Changes
+- Dependency Updates
+- Documentation
+- Known Issues
+
+## [0.2.0] - April 06, 2026
+
+This update introduces several breaking changes and is not backwards compatible with the previous versions.
+For a complete list of changes, see the enclosed [PR](https://github.com/eggy03/dmidecode4j/pull/2)
+
+### Non-Breaking Changes
+
+- Replaced the underlying mapper from GSON to Jackson
+- Replaced `DMIType.getCommand(int)` with `DMIType.getCommandFor(DMIType)` in `DMIType.java`.
+- Updated all service classes to use the new `DMIType.getCommandFor()` method.
+
+### Breaking Changes
+
+- Removed all traces of `Lombok` and replaced them with `Immutables` equivalents for deep immutability of entity
+ classes.
+ As a result, the builder methods now have a slightly different syntax. The remaining changes involve writing more
+ boilerplate code to make up for removal of Lombok's annotations but are non-breaking in nature.
+ The complete list of changes can be found in the enclosed PR.
+
+During Lombok, the syntax for an entity builder was as follows:
+
+```java
+import io.github.eggy03.dmidecode.entity.processor.DMIProcessor;
+
+void main() {
+ // building a new entity using builder
+ DMIProcessor processor = DMIProcessor.Builder.build();
+
+
+ DMIProcessor processorTwo = processor.toBuilder().build();
+
+ // accessing fields
+ processor.getCurrentSpeed();
+}
+
+
+```
+
+With Immutables, the new syntax is:
+
+```java
+import io.github.eggy03.dmidecode.entity.processor.DMIProcessor;
+
+@SuppressWarnings("all")
+void main() {
+
+ // building a new entity using builder
+ DMIProcessor processor = new DMIProcessor.Builder().build();
+
+ // updating a built entity
+ DMIProcessor processorTwo = processor.withProperties();
+
+ // accessing fields
+ processor.currentSpeed();
+}
+```
+
+- All entities have been converted to their abstract forms.
+ Immutables handles their concrete implementation during compile time.
+ This is technically not a breaking change since the generated implementations retain their `pre-0.2.0` names
+
+- `CommonDMIMapper#mapToList` returns an unmodifiable list using `Collections.unmodifiableList`
+
+### Test Changes
+
+- Updated corresponding entity tests to use the `Immutables` builder pattern
+- Updated `MockEntityClass` in `CommonDMIMapperTest` to use Jackson's `@JsonProperty` as a replacement for GSON's
+ `@SerializedValue`.
+- Removed all traces of Lombok from the tests.
+
+### Dependency Updates
+
+- Added Jackson and Immutables BOMs and dependencies
+- Removed GSON and Lombok
+- Updated source generation plugins to support packing Immutables generated code in `sources.jar`
+- Updated `maven-compiler-plugin` from `3.14.1` to `3.15.0`
+- Updated `maven-surefire-plugin` from `3.5.4` to `3.5.5`
+- Updated `central-publishing-maven-plugin` from `0.9.0` to `0.10.0`
+- Updated `assertj-core` from `3.27.6` to `3.27.7`
+
+### Documentation
+
+- Replaced JetBrains `@NotNull` and `@Nullable` and Lombok's `@NonNull` annotations with Jspecify equivalents.
+ For `@Unmodifiable`, an equivalent custom `@Unmodifiable` annotation has been introduced.
+
+- Introduced two new annotations `@FragileMethod` and `@InvokesFragileMethod`.
+ These two annotations when used, document that a method or a constructor's implementation is fragile in nature
+ and may break in the future.
+
+- Updated Javadocs to reflect the Immutable builder style examples
+- Removed `@author` tag from Javadocs
+- Updated developer mail in `pom.xml`
+- Corrected `project.license.url` branch from `main` to `master` in `pom.xml`
+- Added an implementation status table in `README.md`
+
## [0.1.1] - January 14, 2026
-- `DMIProcessorService` now returns a list of `DMIProcessor` objects instead of an `Optional` object 0a0ea2306cbe2bf6f15bf14190c28be58f609f55
+## Breaking Changes
+
+- `DMIProcessorService` now returns a list of `DMIProcessor` objects instead of an `Optional
+ * A custom annotation that is intended to be applied with {@link Value.Immutable},
+ * on {@link io.github.eggy03.dmidecode.entity} package classes.
+ *
+ * It modifies the naming and structural style of the generated immutable implementations via {@link Value.Style}
+ * and contains {@link JsonSerialize} for automatic Jackson integration.
+ *
+ * Indicates that the underlying `Collection` or `Map` is unmodifiable.
+ * Any attempts to mutate such a collection or map may result in exceptions being
+ * thrown, or no result at all.
+ *
+ * The referenced objects within the collection or map may still be mutable, depending on
+ * their implementation.
+ *
+ * When marked on a method (or a constructor), it serves as an indication that
+ * the method's behavior depends on unstable and or environment-specific logic
+ * and may break without notice.
+ *
+ * A method annotated with {@code @FragileMethod} should not be used in production.
+ * However, if usage in production is unavoidable, any method or constructor that
+ * invokes a fragile method in its definition should be annotated with {@code @InvokesFragileMethod}.
+ *
+ * This annotation is for documentation purposes only.
+ *
+ * When marked on a method (or a constructor), it indicates that annotated method or constructor
+ * has a definition that invokes a method or a constructor annotated with {@code FragileMethod}
+ *
+ * This annotation is for documentation purposes only.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the BIOS
+ * (Type 0) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the BIOS
+ * Language (Type 13) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the Base Board
+ * (Type 2) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the Chassis
+ * (Type 3) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the Port
+ * Connector Information (Type 8) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the System
+ * Slots (Type 9) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
- * Fields correspond to properties reported by {@code dmidecode} for the BIOS
- * (Type 0) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
- * Fields correspond to properties reported by {@code dmidecode} for the BIOS
- * Language (Type 13) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
- * Fields correspond to properties reported by {@code dmidecode} for the Base Board
- * (Type 2) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
- * Fields correspond to properties reported by {@code dmidecode} for the Chassis
- * (Type 3) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
- * Fields correspond to properties reported by {@code dmidecode} for the Port
- * Connector Information (Type 8) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
- * Fields correspond to properties reported by {@code dmidecode} for the System
- * Slots (Type 9) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
+ * Fields correspond to properties reported by {@code dmidecode} for the Memory
+ * Device (Type 17) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the Physical
+ * Memory Array (Type 16) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
- * Fields correspond to properties reported by {@code dmidecode} for the Memory
- * Device (Type 17) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
- * Fields correspond to properties reported by {@code dmidecode} for the Physical
- * Memory Array (Type 16) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
+ * Fields correspond to properties reported by {@code dmidecode} for the Portable
+ * Battery (Type 22) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
- * Fields correspond to properties reported by {@code dmidecode} for the Portable
- * Battery (Type 22) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
+ * Fields correspond to properties reported by {@code dmidecode} for the Cache
+ * Information (Type 7) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
+ * Fields correspond to properties reported by {@code dmidecode} for the Processor
+ * Information (Type 4) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
- * Fields correspond to properties reported by {@code dmidecode} for the Cache
- * Information (Type 7) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
- * Fields correspond to properties reported by {@code dmidecode} for the Processor
- * Information (Type 4) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- *
+ * Fields correspond to properties reported by {@code dmidecode} for the System
+ * Information (Type 1) SMBIOS structure.
+ *
+ * Instances of this class are thread-safe.
+ *
- * Fields correspond to properties reported by {@code dmidecode} for the System
- * Information (Type 1) SMBIOS structure.
- *
- * Instances of this class are thread-safe.
- * Usage example
* {@code
* // Build a dmidecode command for querying baseboard information
- * String command = DMIType.getCommand(DMIType.BASEBOARD.getValue());
+ * String command = DMIType.getCommandFor(DMIType.BASEBOARD);
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
-@RequiredArgsConstructor
-@Getter
public enum DMIType {
BIOS(0),
@@ -71,10 +65,14 @@ public enum DMIType {
POWER_SUPPLY(39),
ADDITIONAL_INFORMATION(40),
ONBOARD_DEVICE(41);
-
+
private final int value;
- public static String getCommand(int dmiType){
- return "sudo /usr/sbin/dmidecode --type "+dmiType;
+ DMIType(int value) {
+ this.value = value;
+ }
+
+ public static String getCommandFor(DMIType type) {
+ return "sudo /usr/sbin/dmidecode --type " + type.value;
}
}
\ No newline at end of file
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOS.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOS.java
new file mode 100644
index 0000000..62de8f7
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOS.java
@@ -0,0 +1,89 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.board;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+import java.util.List;
+
+/**
+ * Immutable representation of BIOS information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIBIOS bios = new DMIBIOS.Builder()
+ * .vendor("American Megatrends Inc.")
+ * .version("F10")
+ * .releaseDate("07/15/2023")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIBIOS updated = bios
+ * .withVersion("F11");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIBIOS {
+
+ @JsonProperty("Vendor")
+ @Nullable
+ public abstract String vendor();
+
+ @JsonProperty("Version")
+ @Nullable
+ public abstract String version();
+
+ @JsonProperty("Release Date")
+ @Nullable
+ public abstract String releaseDate();
+
+ @JsonProperty("Address")
+ @Nullable
+ public abstract String address();
+
+ @JsonProperty("Runtime Size")
+ @Nullable
+ public abstract String runtimeSize();
+
+ @JsonProperty("ROM Size")
+ @Nullable
+ public abstract String romSize();
+
+ @JsonProperty("Characteristics")
+ @Nullable
+ public abstract List<@Nullable String> characteristics();
+
+ @JsonProperty("BIOS Revision")
+ @Nullable
+ public abstract String biosRevision();
+
+ @JsonProperty("Firmware Revision")
+ @Nullable
+ public abstract String firmwareRevision();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOSLanguage.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOSLanguage.java
new file mode 100644
index 0000000..ba3cdb1
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOSLanguage.java
@@ -0,0 +1,60 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.board;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+import java.util.List;
+
+/**
+ * Immutable representation of BIOS language information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIBIOSLanguage language = new DMIBIOSLanguage.Builder()
+ * .installableLanguages(List.of("en|US", "fr|FR"))
+ * .currentLanguage("en|US")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIBIOSLanguage updated = language
+ * .withCurrentLanguage("fr|FR");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIBIOSLanguage {
+
+ @JsonProperty("Installable Languages")
+ @Nullable
+ public abstract List<@Nullable String> installableLanguages();
+
+ @JsonProperty("Currently Installed Language")
+ @Nullable
+ public abstract String currentLanguage();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBaseboard.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBaseboard.java
new file mode 100644
index 0000000..72adbed
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBaseboard.java
@@ -0,0 +1,94 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.board;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+import java.util.List;
+
+/**
+ * Immutable representation of a baseboard (motherboard) device retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIBaseboard board = new DMIBaseboard.Builder()
+ * .manufacturer("ASUSTeK COMPUTER INC.")
+ * .productName("PRIME B550M-A")
+ * .serialNumber("ABC123456")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIBaseboard updated = board
+ * .withSerialNumber("XYZ987654")
+ * .withProductName("PRIME A320");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIBaseboard {
+
+ @JsonProperty("Manufacturer")
+ @Nullable
+ public abstract String manufacturer();
+
+ @JsonProperty("Product Name")
+ @Nullable
+ public abstract String productName();
+
+ @JsonProperty("Version")
+ @Nullable
+ public abstract String version();
+
+ @JsonProperty("Serial Number")
+ @Nullable
+ public abstract String serialNumber();
+
+ @JsonProperty("Asset Tag")
+ @Nullable
+ public abstract String assetTag();
+
+ @JsonProperty("Features")
+ @Nullable
+ public abstract List<@Nullable String> features();
+
+ @JsonProperty("Location In Chassis")
+ @Nullable
+ public abstract String locationInChassis();
+
+ @JsonProperty("Chassis Handle")
+ @Nullable
+ public abstract String chassisHandle();
+
+ @JsonProperty("Type")
+ @Nullable
+ public abstract String type();
+
+ @JsonProperty("Contained Object Handles")
+ @Nullable
+ public abstract Integer containedObjectHandles();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIChassis.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIChassis.java
new file mode 100644
index 0000000..a36fce1
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIChassis.java
@@ -0,0 +1,112 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.board;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+/**
+ * Immutable representation of system chassis information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIChassis chassis = new DMIChassis.Builder()
+ * .manufacturer("Dell Inc.")
+ * .type("Desktop")
+ * .serialNumber("ABC123456")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIChassis updated = chassis
+ * .withAssetTag("OFFICE-PC-01");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIChassis {
+
+ @JsonProperty("Manufacturer")
+ @Nullable
+ public abstract String manufacturer();
+
+ @JsonProperty("Type")
+ @Nullable
+ public abstract String type();
+
+ @JsonProperty("Lock")
+ @Nullable
+ public abstract String lock();
+
+ @JsonProperty("Version")
+ @Nullable
+ public abstract String version();
+
+ @JsonProperty("Serial Number")
+ @Nullable
+ public abstract String serialNumber();
+
+ @JsonProperty("Asset Tag")
+ @Nullable
+ public abstract String assetTag();
+
+ @JsonProperty("Boot-up State")
+ @Nullable
+ public abstract String bootUpState();
+
+ @JsonProperty("Power Supply State")
+ @Nullable
+ public abstract String powerSupplyState();
+
+ @JsonProperty("Thermal State")
+ @Nullable
+ public abstract String thermalState();
+
+ @JsonProperty("Security Status")
+ @Nullable
+ public abstract String securityStatus();
+
+ @JsonProperty("OEM Information")
+ @Nullable
+ public abstract String oemInformation();
+
+ @JsonProperty("Height")
+ @Nullable
+ public abstract String height();
+
+ @JsonProperty("Number Of Power Cords")
+ @Nullable
+ public abstract Integer numberOfPowerCords();
+
+ @JsonProperty("Contained Elements")
+ @Nullable
+ public abstract Integer containedElements();
+
+ @JsonProperty("SKU Number")
+ @Nullable
+ public abstract String skuNumber();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIPortConnectorInformation.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIPortConnectorInformation.java
new file mode 100644
index 0000000..cfeaa3e
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIPortConnectorInformation.java
@@ -0,0 +1,72 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.board;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+/**
+ * Immutable representation of port connector information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIPortConnectorInformation port = new DMIPortConnectorInformation.Builder()
+ * .externalReferenceDesignator("USB1")
+ * .externalConnectorType("USB")
+ * .portType("USB")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIPortConnectorInformation updated = port
+ * .withPortType("USB Type-C");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIPortConnectorInformation {
+
+ @JsonProperty("External Reference Designator")
+ @Nullable
+ public abstract String externalReferenceDesignator();
+
+ @JsonProperty("Internal Reference Designator")
+ @Nullable
+ public abstract String internalReferenceDesignator();
+
+ @JsonProperty("External Connector Type")
+ @Nullable
+ public abstract String externalConnectorType();
+
+ @JsonProperty("Internal Connector Type")
+ @Nullable
+ public abstract String internalConnectorType();
+
+ @JsonProperty("Port Type")
+ @Nullable
+ public abstract String portType();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMISystemSlots.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMISystemSlots.java
new file mode 100644
index 0000000..956f169
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMISystemSlots.java
@@ -0,0 +1,82 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.board;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+import java.util.List;
+
+/**
+ * Immutable representation of system slot information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMISystemSlots slot = new DMISystemSlots.Builder()
+ * .designation("PCIEX16")
+ * .type("PCI Express")
+ * .currentUsage("In Use")
+ * .busAddress("0000:01:00.0")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMISystemSlots updated = slot
+ * .withCurrentUsage("Available");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMISystemSlots {
+
+ @JsonProperty("Designation")
+ @Nullable
+ public abstract String designation();
+
+ @JsonProperty("Type")
+ @Nullable
+ public abstract String type();
+
+ @JsonProperty("Current Usage")
+ @Nullable
+ public abstract String currentUsage();
+
+ @JsonProperty("Length")
+ @Nullable
+ public abstract String length();
+
+ @JsonProperty("ID")
+ @Nullable
+ public abstract Integer id();
+
+ @JsonProperty("Characteristics")
+ @Nullable
+ public abstract List<@Nullable String> characteristics();
+
+ @JsonProperty("Bus Address")
+ @Nullable
+ public abstract String busAddress();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/DMIBIOS.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/DMIBIOS.java
deleted file mode 100644
index 5aa15ef..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/DMIBIOS.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.board;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.List;
-
-/**
- * Immutable representation of BIOS information retrieved via DMI.
- * Usage example
- * {@code
- * DMIBIOS bios = DMIBIOS.builder()
- * .vendor("American Megatrends Inc.")
- * .version("F10")
- * .releaseDate("07/15/2023")
- * .build();
- *
- * // Create a modified copy
- * DMIBIOS updated = bios.toBuilder()
- * .version("F11")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIBIOS {
-
- @SerializedName("Vendor")
- @Nullable
- String vendor;
-
- @SerializedName("Version")
- @Nullable
- String version;
-
- @SerializedName("Release Date")
- @Nullable
- String releaseDate;
-
- @SerializedName("Address")
- @Nullable
- String address;
-
- @SerializedName("Runtime Size")
- @Nullable
- String runtimeSize;
-
- @SerializedName("ROM Size")
- @Nullable
- String romSize;
-
- @SerializedName("Characteristics")
- @Nullable
- ListUsage example
- * {@code
- * DMIBIOSLanguage language = DMIBIOSLanguage.builder()
- * .installableLanguages(List.of("en|US", "fr|FR"))
- * .currentLanguage("en|US")
- * .build();
- *
- * // Create a modified copy
- * DMIBIOSLanguage updated = language.toBuilder()
- * .currentLanguage("fr|FR")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIBIOSLanguage {
-
- @SerializedName("Installable Languages")
- @Nullable
- ListUsage example
- * {@code
- * DMIBaseboard board = DMIBaseboard.builder()
- * .manufacturer("ASUSTeK COMPUTER INC.")
- * .productName("PRIME B550M-A")
- * .serialNumber("ABC123456")
- * .build();
- *
- * // Create a modified copy
- * DMIBaseboard updated = board.toBuilder()
- * .serialNumber("XYZ987654")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIBaseboard {
-
- @SerializedName("Manufacturer")
- @Nullable
- String manufacturer;
-
- @SerializedName("Product Name")
- @Nullable
- String productName;
-
- @SerializedName("Version")
- @Nullable
- String version;
-
- @SerializedName("Serial Number")
- @Nullable
- String serialNumber;
-
- @SerializedName("Asset Tag")
- @Nullable
- String assetTag;
-
- @SerializedName("Features")
- @Nullable
- ListUsage example
- * {@code
- * DMIChassis chassis = DMIChassis.builder()
- * .manufacturer("Dell Inc.")
- * .type("Desktop")
- * .serialNumber("ABC123456")
- * .build();
- *
- * // Create a modified copy
- * DMIChassis updated = chassis.toBuilder()
- * .assetTag("OFFICE-PC-01")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIChassis {
-
- @SerializedName("Manufacturer")
- @Nullable
- String manufacturer;
-
- @SerializedName("Type")
- @Nullable
- String type;
-
- @SerializedName("Lock")
- @Nullable
- String lock;
-
- @SerializedName("Version")
- @Nullable
- String version;
-
- @SerializedName("Serial Number")
- @Nullable
- String serialNumber;
-
- @SerializedName("Asset Tag")
- @Nullable
- String assetTag;
-
- @SerializedName("Boot-up State")
- @Nullable
- String bootUpState;
-
- @SerializedName("Power Supply State")
- @Nullable
- String powerSupplyState;
-
- @SerializedName("Thermal State")
- @Nullable
- String thermalState;
-
- @SerializedName("Security Status")
- @Nullable
- String securityStatus;
-
- @SerializedName("OEM Information")
- @Nullable
- String oemInformation;
-
- @SerializedName("Height")
- @Nullable
- String height;
-
- @SerializedName("Number Of Power Cords")
- @Nullable
- Integer numberOfPowerCords;
-
- @SerializedName("Contained Elements")
- @Nullable
- Integer containedElements;
-
- @SerializedName("SKU Number")
- @Nullable
- String skuNumber;
-
- @Override
- public String toString() {
- return new GsonBuilder()
- .serializeNulls()
- .setPrettyPrinting()
- .create()
- .toJson(this);
- }
-}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/DMIPortConnectorInformation.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/DMIPortConnectorInformation.java
deleted file mode 100644
index 07472e0..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/DMIPortConnectorInformation.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.board;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Immutable representation of port connector information retrieved via DMI.
- * Usage example
- * {@code
- * DMIPortConnectorInformation port = DMIPortConnectorInformation.builder()
- * .externalReferenceDesignator("USB1")
- * .externalConnectorType("USB")
- * .portType("USB")
- * .build();
- *
- * // Create a modified copy
- * DMIPortConnectorInformation updated = port.toBuilder()
- * .portType("USB Type-C")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIPortConnectorInformation {
-
- @SerializedName("External Reference Designator")
- @Nullable
- String externalReferenceDesignator;
-
- @SerializedName("Internal Reference Designator")
- @Nullable
- String internalReferenceDesignator;
-
- @SerializedName("External Connector Type")
- @Nullable
- String externalConnectorType;
-
- @SerializedName("Internal Connector Type")
- @Nullable
- String internalConnectorType;
-
- @SerializedName("Port Type")
- @Nullable
- String portType;
-
- @Override
- public String toString() {
- return new GsonBuilder()
- .serializeNulls()
- .setPrettyPrinting()
- .create()
- .toJson(this);
- }
-
-}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/DMISystemSlots.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/DMISystemSlots.java
deleted file mode 100644
index 4d84fd0..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/DMISystemSlots.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.board;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-
-import java.util.List;
-
-/**
- * Immutable representation of system slot information retrieved via DMI.
- * Usage example
- * {@code
- * DMISystemSlots slot = DMISystemSlots.builder()
- * .designation("PCIEX16")
- * .type("PCI Express")
- * .currentUsage("In Use")
- * .busAddress("0000:01:00.0")
- * .build();
- *
- * // Create a modified copy
- * DMISystemSlots updated = slot.toBuilder()
- * .currentUsage("Available")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMISystemSlots {
-
- @SerializedName("Designation")
- String designation;
-
- @SerializedName("Type")
- String type;
-
- @SerializedName("Current Usage")
- String currentUsage;
-
- @SerializedName("Length")
- String length;
-
- @SerializedName("ID")
- Integer id;
-
- @SerializedName("Characteristics")
- ListUsage example
+ * {@code
+ * DMIMemoryDevice memory = new DMIMemoryDevice.Builder()
+ * .locator("DIMM_A1")
+ * .size("16 GB")
+ * .type("DDR4")
+ * .speed("3200 MT/s")
+ * .manufacturer("Samsung")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIMemoryDevice updated = memory
+ * .withConfiguredMemorySpeed("2933 MT/s");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIMemoryDevice {
+
+ @JsonProperty("Array Handle")
+ @Nullable
+ public abstract String arrayHandle();
+
+ @JsonProperty("Error Information Handle")
+ @Nullable
+ public abstract String errorInformationHandle();
+
+ @JsonProperty("Total Width")
+ @Nullable
+ public abstract String totalWidth();
+
+ @JsonProperty("Data Width")
+ @Nullable
+ public abstract String dataWidth();
+
+ @JsonProperty("Size")
+ @Nullable
+ public abstract String size();
+
+ @JsonProperty("Form Factor")
+ @Nullable
+ public abstract String formFactor();
+
+ @JsonProperty("Set")
+ @Nullable
+ public abstract String set();
+
+ @JsonProperty("Locator")
+ @Nullable
+ public abstract String locator();
+
+ @JsonProperty("Bank Locator")
+ @Nullable
+ public abstract String bankLocator();
+
+ @JsonProperty("Type")
+ @Nullable
+ public abstract String type();
+
+ @JsonProperty("Type Detail")
+ @Nullable
+ public abstract String typeDetail();
+
+ @JsonProperty("Speed")
+ @Nullable
+ public abstract String speed();
+
+ @JsonProperty("Manufacturer")
+ @Nullable
+ public abstract String manufacturer();
+
+ @JsonProperty("Serial Number")
+ @Nullable
+ public abstract String serialNumber();
+
+ @JsonProperty("Asset Tag")
+ @Nullable
+ public abstract String assetTag();
+
+ @JsonProperty("Part Number")
+ @Nullable
+ public abstract String partNumber();
+
+ @JsonProperty("Rank")
+ @Nullable
+ public abstract Integer rank();
+
+ @JsonProperty("Configured Memory Speed")
+ @Nullable
+ public abstract String configuredMemorySpeed();
+
+ @JsonProperty("Minimum Voltage")
+ @Nullable
+ public abstract String minimumVoltage();
+
+ @JsonProperty("Maximum Voltage")
+ @Nullable
+ public abstract String maximumVoltage();
+
+ @JsonProperty("Configured Voltage")
+ @Nullable
+ public abstract String configuredVoltage();
+
+ @JsonProperty("Memory Technology")
+ @Nullable
+ public abstract String memoryTechnology();
+
+ @JsonProperty("Memory Operating Mode Capability")
+ @Nullable
+ public abstract String memoryOperatingModeCapability();
+
+ @JsonProperty("Firmware Version")
+ @Nullable
+ public abstract String firmwareVersion();
+
+ @JsonProperty("Module Manufacturer ID")
+ @Nullable
+ public abstract String moduleManufacturerId();
+
+ @JsonProperty("Module Product ID")
+ @Nullable
+ public abstract String moduleProductId();
+
+ @JsonProperty("Memory Subsystem Controller Manufacturer ID")
+ @Nullable
+ public abstract String memorySubsystemControllerManufacturerId();
+
+ @JsonProperty("Memory Subsystem Controller Product ID")
+ @Nullable
+ public abstract String memorySubsystemControllerProductId();
+
+ @JsonProperty("Non-Volatile Size")
+ @Nullable
+ public abstract String nonVolatileSize();
+
+ @JsonProperty("Volatile Size")
+ @Nullable
+ public abstract String volatileSize();
+
+ @JsonProperty("Cache Size")
+ @Nullable
+ public abstract String cacheSize();
+
+ @JsonProperty("Logical Size")
+ @Nullable
+ public abstract String logicalSize();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIPhysicalMemoryArray.java b/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIPhysicalMemoryArray.java
new file mode 100644
index 0000000..a6b2204
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIPhysicalMemoryArray.java
@@ -0,0 +1,76 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.memory;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+/**
+ * Immutable representation of physical memory array information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIPhysicalMemoryArray array = new DMIPhysicalMemoryArray.Builder()
+ * .location("System Board Or Motherboard")
+ * .use("System Memory")
+ * .maximumCapacity("128 GB")
+ * .numberOfDevices(4)
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIPhysicalMemoryArray updated = array
+ * .withErrorCorrectionType("Multi-bit ECC");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIPhysicalMemoryArray {
+
+ @JsonProperty("Location")
+ @Nullable
+ public abstract String location();
+
+ @JsonProperty("Use")
+ @Nullable
+ public abstract String use();
+
+ @JsonProperty("Error Correction Type")
+ @Nullable
+ public abstract String errorCorrectionType();
+
+ @JsonProperty("Maximum Capacity")
+ @Nullable
+ public abstract String maximumCapacity();
+
+ @JsonProperty("Error Information Handle")
+ @Nullable
+ public abstract String errorInformationHandle();
+
+ @JsonProperty("Number Of Devices")
+ @Nullable
+ public abstract Integer numberOfDevices();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/memory/DMIMemoryDevice.java b/src/main/java/io/github/eggy03/dmidecode/entity/memory/DMIMemoryDevice.java
deleted file mode 100644
index 7bb58b5..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/memory/DMIMemoryDevice.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.memory;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Immutable representation of memory device information retrieved via DMI.
- * Usage example
- * {@code
- * DMIMemoryDevice memory = DMIMemoryDevice.builder()
- * .locator("DIMM_A1")
- * .size("16 GB")
- * .type("DDR4")
- * .speed("3200 MT/s")
- * .manufacturer("Samsung")
- * .build();
- *
- * // Create a modified copy
- * DMIMemoryDevice updated = memory.toBuilder()
- * .configuredMemorySpeed("2933 MT/s")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIMemoryDevice {
-
- @SerializedName("Array Handle")
- @Nullable
- String arrayHandle;
-
- @SerializedName("Error Information Handle")
- @Nullable
- String errorInformationHandle;
-
- @SerializedName("Total Width")
- @Nullable
- String totalWidth;
-
- @SerializedName("Data Width")
- @Nullable
- String dataWidth;
-
- @SerializedName("Size")
- @Nullable
- String size;
-
- @SerializedName("Form Factor")
- @Nullable
- String formFactor;
-
- @SerializedName("Set")
- @Nullable
- String set;
-
- @SerializedName("Locator")
- @Nullable
- String locator;
-
- @SerializedName("Bank Locator")
- @Nullable
- String bankLocator;
-
- @SerializedName("Type")
- @Nullable
- String type;
-
- @SerializedName("Type Detail")
- @Nullable
- String typeDetail;
-
- @SerializedName("Speed")
- @Nullable
- String speed;
-
- @SerializedName("Manufacturer")
- @Nullable
- String manufacturer;
-
- @SerializedName("Serial Number")
- @Nullable
- String serialNumber;
-
- @SerializedName("Asset Tag")
- @Nullable
- String assetTag;
-
- @SerializedName("Part Number")
- @Nullable
- String partNumber;
-
- @SerializedName("Rank")
- @Nullable
- Integer rank;
-
- @SerializedName("Configured Memory Speed")
- @Nullable
- String configuredMemorySpeed;
-
- @SerializedName("Minimum Voltage")
- @Nullable
- String minimumVoltage;
-
- @SerializedName("Maximum Voltage")
- @Nullable
- String maximumVoltage;
-
- @SerializedName("Configured Voltage")
- @Nullable
- String configuredVoltage;
-
- @SerializedName("Memory Technology")
- @Nullable
- String memoryTechnology;
-
- @SerializedName("Memory Operating Mode Capability")
- @Nullable
- String memoryOperatingModeCapability;
-
- @SerializedName("Firmware Version")
- @Nullable
- String firmwareVersion;
-
- @SerializedName("Module Manufacturer ID")
- @Nullable
- String moduleManufacturerId;
-
- @SerializedName("Module Product ID")
- @Nullable
- String moduleProductId;
-
- @SerializedName("Memory Subsystem Controller Manufacturer ID")
- @Nullable
- String memorySubsystemControllerManufacturerId;
-
- @SerializedName("Memory Subsystem Controller Product ID")
- @Nullable
- String memorySubsystemControllerProductId;
-
- @SerializedName("Non-Volatile Size")
- @Nullable
- String nonVolatileSize;
-
- @SerializedName("Volatile Size")
- @Nullable
- String volatileSize;
-
- @SerializedName("Cache Size")
- @Nullable
- String cacheSize;
-
- @SerializedName("Logical Size")
- @Nullable
- String logicalSize;
-
- @Override
- public String toString() {
- return new GsonBuilder()
- .serializeNulls()
- .setPrettyPrinting()
- .create()
- .toJson(this);
- }
-}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/memory/DMIPhysicalMemoryArray.java b/src/main/java/io/github/eggy03/dmidecode/entity/memory/DMIPhysicalMemoryArray.java
deleted file mode 100644
index d6ee2cc..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/memory/DMIPhysicalMemoryArray.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.memory;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Immutable representation of physical memory array information retrieved via DMI.
- * Usage example
- * {@code
- * DMIPhysicalMemoryArray array = DMIPhysicalMemoryArray.builder()
- * .location("System Board Or Motherboard")
- * .use("System Memory")
- * .maximumCapacity("128 GB")
- * .numberOfDevices(4)
- * .build();
- *
- * // Create a modified copy
- * DMIPhysicalMemoryArray updated = array.toBuilder()
- * .errorCorrectionType("Multi-bit ECC")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIPhysicalMemoryArray {
-
- @SerializedName("Location")
- @Nullable
- String location;
-
- @SerializedName("Use")
- @Nullable
- String use;
-
- @SerializedName("Error Correction Type")
- @Nullable
- String errorCorrectionType;
-
- @SerializedName("Maximum Capacity")
- @Nullable
- String maximumCapacity;
-
- @SerializedName("Error Information Handle")
- @Nullable
- String errorInformationHandle;
-
- @SerializedName("Number Of Devices")
- @Nullable
- Integer numberOfDevices;
-
- @Override
- public String toString() {
- return new GsonBuilder()
- .serializeNulls()
- .setPrettyPrinting()
- .create()
- .toJson(this);
- }
-}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/AbstractDMIPortableBattery.java b/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/AbstractDMIPortableBattery.java
new file mode 100644
index 0000000..1bca010
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/AbstractDMIPortableBattery.java
@@ -0,0 +1,96 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.peripheral;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+/**
+ * Immutable representation of portable battery information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIPortableBattery battery = new DMIPortableBattery.Builder()
+ * .location("Internal Battery")
+ * .manufacturer("LG")
+ * .designCapacity("50000 mWh")
+ * .designVoltage("11.4 V")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIPortableBattery updated = battery
+ * .withMaximumError("2%");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIPortableBattery {
+
+ @JsonProperty("Location")
+ @Nullable
+ public abstract String location();
+
+ @JsonProperty("Manufacturer")
+ @Nullable
+ public abstract String manufacturer();
+
+ @JsonProperty("Name")
+ @Nullable
+ public abstract String name();
+
+ @JsonProperty("Design Capacity")
+ @Nullable
+ public abstract String designCapacity();
+
+ @JsonProperty("Design Voltage")
+ @Nullable
+ public abstract String designVoltage();
+
+ @JsonProperty("SBDS Version")
+ @Nullable
+ public abstract String sbdsVersion();
+
+ @JsonProperty("Maximum Error")
+ @Nullable
+ public abstract String maximumError();
+
+ @JsonProperty("SBDS Serial Number")
+ @Nullable
+ public abstract String sbdsSerialNumber();
+
+ @JsonProperty("SBDS Manufacture Date")
+ @Nullable
+ public abstract String sbdsManufactureDate();
+
+ @JsonProperty("SBDS Chemistry")
+ @Nullable
+ public abstract String sbdsChemistry();
+
+ @JsonProperty("OEM-specific Information")
+ @Nullable
+ public abstract String oemSpecificInformation();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/DMIPortableBattery.java b/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/DMIPortableBattery.java
deleted file mode 100644
index 6b15685..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/DMIPortableBattery.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.peripheral;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-
-/**
- * Immutable representation of portable battery information retrieved via DMI.
- * Usage example
- * {@code
- * DMIPortableBattery battery = DMIPortableBattery.builder()
- * .location("Internal Battery")
- * .manufacturer("LG")
- * .designCapacity("50000 mWh")
- * .designVoltage("11.4 V")
- * .build();
- *
- * // Create a modified copy
- * DMIPortableBattery updated = battery.toBuilder()
- * .maximumError("2%")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIPortableBattery {
-
- @SerializedName("Location")
- String location;
-
- @SerializedName("Manufacturer")
- String manufacturer;
-
- @SerializedName("Name")
- String name;
-
- @SerializedName("Design Capacity")
- String designCapacity;
-
- @SerializedName("Design Voltage")
- String designVoltage;
-
- @SerializedName("SBDS Version")
- String sbdsVersion;
-
- @SerializedName("Maximum Error")
- String maximumError;
-
- @SerializedName("SBDS Serial Number")
- String sbdsSerialNumber;
-
- @SerializedName("SBDS Manufacture Date")
- String sbdsManufactureDate;
-
- @SerializedName("SBDS Chemistry")
- String sbdsChemistry;
-
- @SerializedName("OEM-specific Information")
- String oemSpecificInformation;
-
- @Override
- public String toString() {
- return new GsonBuilder()
- .serializeNulls()
- .setPrettyPrinting()
- .create()
- .toJson(this);
- }
-}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMICache.java b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMICache.java
new file mode 100644
index 0000000..c50f1f5
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMICache.java
@@ -0,0 +1,102 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.processor;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+import java.util.List;
+
+/**
+ * Immutable representation of processor cache information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMICache cache = new DMICache.Builder()
+ * .socketDesignation("L3-Cache")
+ * .location("Internal")
+ * .installedSize("32 MB")
+ * .associativity("16-way Set-Associative")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMICache updated = cache
+ * .withInstalledSize("64 MB");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMICache {
+
+ @JsonProperty("Socket Designation")
+ @Nullable
+ public abstract String socketDesignation();
+
+ @JsonProperty("Configuration")
+ @Nullable
+ public abstract String configuration();
+
+ @JsonProperty("Operational Mode")
+ @Nullable
+ public abstract String operationalMode();
+
+ @JsonProperty("Location")
+ @Nullable
+ public abstract String location();
+
+ @JsonProperty("Installed Size")
+ @Nullable
+ public abstract String installedSize();
+
+ @JsonProperty("Maximum Size")
+ @Nullable
+ public abstract String maximumSize();
+
+ @JsonProperty("Supported SRAM Types")
+ @Nullable
+ public abstract List<@Nullable String> supportedSramTypes();
+
+ @JsonProperty("Installed SRAM Type")
+ @Nullable
+ public abstract String installedSramType();
+
+ @JsonProperty("Speed")
+ @Nullable
+ public abstract String speed();
+
+ @JsonProperty("Error Correction Type")
+ @Nullable
+ public abstract String errorCorrectionType();
+
+ @JsonProperty("System Type")
+ @Nullable
+ public abstract String systemType();
+
+ @JsonProperty("Associativity")
+ @Nullable
+ public abstract String associativity();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMIProcessor.java b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMIProcessor.java
new file mode 100644
index 0000000..c5e3ee6
--- /dev/null
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMIProcessor.java
@@ -0,0 +1,152 @@
+/*
+ * © 2026 The dmidecode4j contributors
+ * Licensed under the MIT License.
+ * See the LICENSE file in the project root for more information.
+ */
+package io.github.eggy03.dmidecode.entity.processor;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.github.eggy03.dmidecode.annotation.ImmutableEntityStyle;
+import org.immutables.value.Value;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
+
+import java.util.List;
+
+/**
+ * Immutable representation of processor information retrieved via DMI.
+ * Usage example
+ * {@code
+ * DMIProcessor processor = new DMIProcessor.Builder()
+ * .socketDesignation("CPU0")
+ * .manufacturer("Intel")
+ * .version("Intel(R) Core(TM) i7-12700H")
+ * .coreCount(14)
+ * .threadCount(20)
+ * .currentSpeed("2700 MHz")
+ * .build();
+ *
+ * // Create a modified copy
+ * DMIProcessor updated = processor
+ * .withCurrentSpeed("3900 MHz");
+ * }
+ *
+ * @since 0.2.0
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMIProcessor {
+
+ @JsonProperty("Socket Designation")
+ @Nullable
+ public abstract String socketDesignation();
+
+ @JsonProperty("Type")
+ @Nullable
+ public abstract String type();
+
+ @JsonProperty("Family")
+ @Nullable
+ public abstract String family();
+
+ @JsonProperty("Manufacturer")
+ @Nullable
+ public abstract String manufacturer();
+
+ @JsonProperty("ID")
+ @Nullable
+ public abstract String id();
+
+ @JsonProperty("Signature")
+ @Nullable
+ public abstract String signature();
+
+ @JsonProperty("Flags")
+ @Nullable
+ public abstract List<@Nullable String> flags();
+
+ @JsonProperty("Version")
+ @Nullable
+ public abstract String version();
+
+ @JsonProperty("Voltage")
+ @Nullable
+ public abstract String voltage();
+
+ @JsonProperty("External Clock")
+ @Nullable
+ public abstract String externalClock();
+
+ @JsonProperty("Max Speed")
+ @Nullable
+ public abstract String maxSpeed();
+
+ @JsonProperty("Current Speed")
+ @Nullable
+ public abstract String currentSpeed();
+
+ @JsonProperty("Status")
+ @Nullable
+ public abstract String status();
+
+ @JsonProperty("Upgrade")
+ @Nullable
+ public abstract String upgrade();
+
+ @JsonProperty("L1 Cache Handle")
+ @Nullable
+ public abstract String l1CacheHandle();
+
+ @JsonProperty("L2 Cache Handle")
+ @Nullable
+ public abstract String l2CacheHandle();
+
+ @JsonProperty("L3 Cache Handle")
+ @Nullable
+ public abstract String l3CacheHandle();
+
+ @JsonProperty("Serial Number")
+ @Nullable
+ public abstract String serialNumber();
+
+ @JsonProperty("Asset Tag")
+ @Nullable
+ public abstract String assetTag();
+
+ @JsonProperty("Part Number")
+ @Nullable
+ public abstract String partNumber();
+
+ @JsonProperty("Core Count")
+ @Nullable
+ public abstract Integer coreCount();
+
+ @JsonProperty("Core Enabled")
+ @Nullable
+ public abstract Integer coreEnabled();
+
+ @JsonProperty("Thread Count")
+ @Nullable
+ public abstract Integer threadCount();
+
+ @JsonProperty("Characteristics")
+ @Nullable
+ public abstract List<@Nullable String> characteristics();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/processor/DMICache.java b/src/main/java/io/github/eggy03/dmidecode/entity/processor/DMICache.java
deleted file mode 100644
index 00f23e6..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/processor/DMICache.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.processor;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.List;
-
-/**
- * Immutable representation of processor cache information retrieved via DMI.
- * Usage example
- * {@code
- * DMICache cache = DMICache.builder()
- * .socketDesignation("L3-Cache")
- * .location("Internal")
- * .installedSize("32 MB")
- * .associativity("16-way Set-Associative")
- * .build();
- *
- * // Create a modified copy
- * DMICache updated = cache.toBuilder()
- * .installedSize("64 MB")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMICache {
-
- @SerializedName("Socket Designation")
- @Nullable
- String socketDesignation;
-
- @SerializedName("Configuration")
- @Nullable
- String configuration;
-
- @SerializedName("Operational Mode")
- @Nullable
- String operationalMode;
-
- @SerializedName("Location")
- @Nullable
- String location;
-
- @SerializedName("Installed Size")
- @Nullable
- String installedSize;
-
- @SerializedName("Maximum Size")
- @Nullable
- String maximumSize;
-
- @SerializedName("Supported SRAM Types")
- @Nullable
- ListUsage example
- * {@code
- * DMIProcessor processor = DMIProcessor.builder()
- * .socketDesignation("CPU0")
- * .manufacturer("Intel")
- * .version("Intel(R) Core(TM) i7-12700H")
- * .coreCount(14)
- * .threadCount(20)
- * .currentSpeed("2700 MHz")
- * .build();
- *
- * // Create a modified copy
- * DMIProcessor updated = processor.toBuilder()
- * .currentSpeed("3900 MHz")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMIProcessor {
-
- @SerializedName("Socket Designation")
- @Nullable
- String socketDesignation;
-
- @SerializedName("Type")
- @Nullable
- String type;
-
- @SerializedName("Family")
- @Nullable
- String family;
-
- @SerializedName("Manufacturer")
- @Nullable
- String manufacturer;
-
- @SerializedName("ID")
- @Nullable
- String id;
-
- @SerializedName("Signature")
- @Nullable
- String signature;
-
- @SerializedName("Flags")
- @Nullable
- ListUsage example
+ * {@code
+ * 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
+ */
+@Value.Immutable
+@ImmutableEntityStyle
+@NullMarked
+public abstract class AbstractDMISystem {
+
+ @JsonProperty("Manufacturer")
+ @Nullable
+ public abstract String manufacturer();
+
+ @JsonProperty("Product Name")
+ @Nullable
+ public abstract String productName();
+
+ @JsonProperty("Version")
+ @Nullable
+ public abstract String version();
+
+ @JsonProperty("Serial Number")
+ @Nullable
+ public abstract String serialNumber();
+
+ @JsonProperty("UUID")
+ @Nullable
+ public abstract String uuid();
+
+ @JsonProperty("Wake-up Type")
+ @Nullable
+ public abstract String wakeupType();
+
+ @JsonProperty("SKU Number")
+ @Nullable
+ public abstract String skuNumber();
+
+ @JsonProperty("Family")
+ @Nullable
+ public abstract String family();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/system/DMISystem.java b/src/main/java/io/github/eggy03/dmidecode/entity/system/DMISystem.java
deleted file mode 100644
index 8c3cc7d..0000000
--- a/src/main/java/io/github/eggy03/dmidecode/entity/system/DMISystem.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * © 2026 The dmidecode4j contributors
- * Licensed under the MIT License.
- * See the LICENSE file in the project root for more information.
- */
-package io.github.eggy03.dmidecode.entity.system;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Immutable representation of system information retrieved via DMI.
- * Usage example
- * {@code
- * DMISystem system = 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.toBuilder()
- * .skuNumber("21CFCTO1WW")
- * .build();
- * }
- *
- * @since 0.1.0
- * @author Sayan Bhattacharya
- */
-@Value
-@Builder(toBuilder = true)
-public class DMISystem {
-
- @Nullable
- @SerializedName("Manufacturer")
- String manufacturer;
-
- @Nullable
- @SerializedName("Product Name")
- String productName;
-
- @Nullable
- @SerializedName("Version")
- String version;
-
- @Nullable
- @SerializedName("Serial Number")
- String serialNumber;
-
- @Nullable
- @SerializedName("UUID")
- String uuid;
-
- @Nullable
- @SerializedName("Wake-up Type")
- String wakeupType;
-
- @Nullable
- @SerializedName("SKU Number")
- String skuNumber;
-
- @Nullable
- @SerializedName("Family")
- String family;
-
- @Override
- public String toString() {
- return new GsonBuilder()
- .serializeNulls()
- .setPrettyPrinting()
- .create()
- .toJson(this);
- }
-}
diff --git a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
index eb43b7b..3a7597f 100644
--- a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
+++ b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
@@ -5,14 +5,26 @@
*/
package io.github.eggy03.dmidecode.exception;
-import lombok.experimental.StandardException;
-
/**
* Thrown when the terminal fails to execute a command or a script
+ *
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
-@StandardException
public class TerminalExecutionException extends RuntimeException {
+ @SuppressWarnings("unused")
+ public TerminalExecutionException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ @SuppressWarnings("unused")
+ public TerminalExecutionException(String message) {
+ super(message);
+ }
+
+ @SuppressWarnings("unused")
+ public TerminalExecutionException(Throwable cause) {
+ super("Terminal Execution Failure", cause);
+ }
+
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
index 2acae89..94e0b2e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
@@ -5,10 +5,12 @@
*/
package io.github.eggy03.dmidecode.mapper;
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
+import io.github.eggy03.dmidecode.annotation.fragility.FragileMethod;
+import io.github.eggy03.dmidecode.annotation.fragility.MethodType;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
import java.util.ArrayList;
import java.util.Collections;
@@ -37,16 +39,15 @@
* the entity type returned by the service implementation
* @since 0.1.0
- * @author Sayan Bhattacharjee
*/
public interface CommonDMIMapper {
- Gson GSON = new Gson();
+ ObjectMapper jacksonMapper = new ObjectMapper();
/**
* Maps raw {@code dmidecode} output into a single entity of type {@code }.
@@ -78,63 +79,66 @@ public interface CommonDMIMapper {
* 64-bit capable
* Multi-Core
*
- * @param rawDMIData the raw {@code dmidecode} output
+ *
+ * @param rawDMIData the raw {@code dmidecode} output
* @param mappableEntityClass the target entity class
* @return an {@link Optional} containing the mapped entity, or empty if
- * no mappable data is found
+ * no mappable data is found
* @since 0.1.0
*/
- default Optional mapToEntity(@Nullable String rawDMIData, @NotNull Class mappableEntityClass) {
+ @FragileMethod(
+ type = MethodType.INTERFACE_DEFAULT_METHOD,
+ reason = "Parsing formatted human readable dmidecode output is always error-prone and subject to change without notice",
+ requiresReplacement = true,
+ replacementNote = "Consider using --json flag of dmidecode if available"
+ )
+ default @NonNull Optional mapToEntity(@Nullable String rawDMIData, @NonNull Class mappableEntityClass) {
- if(rawDMIData==null)
+ if (rawDMIData == null)
return Optional.empty();
Map
* Mostly for internal use
- * @author Sayan Bhattacharya
+ *
* @since 0.1.0
*/
-@UtilityClass
-@Slf4j
public class TerminalUtility {
+ private static final Logger log = LoggerFactory.getLogger(TerminalUtility.class);
+
+ private TerminalUtility() {
+ throw new IllegalStateException("Utility Class");
+ }
+
/**
* Launches a standalone terminal session, executes the given command
* and returns the result
*
- * @param command The command/script to be executed in the terminal
+ * @param command The command/script to be executed in the terminal
* @param timeoutSeconds Time in seconds after which the session will be force stopped
* @return The result of the command executed
* @throws TerminalExecutionException When the process is killed pre-maturely upon reaching the timeout
- * or when the command yields an error, or when the terminal cannot be accessed.
- * @throws IllegalArgumentException If the provided timeout is in the negative
+ * or when the command yields an error, or when the terminal cannot be accessed.
+ * @throws IllegalArgumentException If the provided timeout is in the negative
*/
- public static String executeCommand(@NotNull String command, long timeoutSeconds) {
+ public static @NonNull String executeCommand(@NonNull String command, long timeoutSeconds) {
- if(timeoutSeconds<0)
+ if (timeoutSeconds < 0)
throw new IllegalArgumentException("Timeout cannot be negative");
CommandLine cmdLine = new CommandLine("bash");
@@ -66,7 +70,7 @@ public static String executeCommand(@NotNull String command, long timeoutSeconds
} catch (ExecuteException e) {
String reason = watchdog.killedProcess() ?
"\nProcess executing the following command: " + command + "\nWas killed after a timeout of " + timeoutSeconds + " seconds\n" :
- "\nProcess executing the following command: " + command + "\nExited with a non-zero exit code\nTerminal Error Output: "+ err;
+ "\nProcess executing the following command: " + command + "\nExited with a non-zero exit code\nTerminal Error Output: " + err;
throw new TerminalExecutionException(reason, e);
} catch (IOException e) {
diff --git a/src/test/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapperTest.java b/src/test/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapperTest.java
index 8731c71..04d56ec 100644
--- a/src/test/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapperTest.java
+++ b/src/test/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapperTest.java
@@ -1,14 +1,13 @@
package io.github.eggy03.dmidecode.mapper;
-import com.google.gson.annotations.SerializedName;
-import lombok.Builder;
-import lombok.Value;
-import org.jetbrains.annotations.Nullable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.List;
+import java.util.Objects;
import java.util.Optional;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
@@ -17,21 +16,51 @@ class CommonDMIMapperTest {
private static final String LS = System.lineSeparator();
- @Value
- @Builder(toBuilder = true)
static class MockEntityClass {
@Nullable
- @SerializedName("ID")
+ @JsonProperty("ID")
Long id;
@Nullable
- @SerializedName("Value")
+ @JsonProperty("Value")
String value;
@Nullable
- @SerializedName("Values")
- List