// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputBatteryLevel.java
// public enum XInputBatteryLevel {
//     EMPTY, LOW, MEDIUM, FULL;
// 
//     /**
//      * Retrieves the appropriate enum value from the native value.
//      *
//      * @param value the native value
//      * @return the corresponding enum constant
//      * @throws IllegalArgumentException if the given native value does not correspond
//      * to an enum value
//      */
//     public static XInputBatteryLevel fromNative(final byte value) {
//         switch (value) {
//             case XInputConstants.BATTERY_LEVEL_EMPTY:
//                 return EMPTY;
//             case XInputConstants.BATTERY_LEVEL_LOW:
//                 return LOW;
//             case XInputConstants.BATTERY_LEVEL_MEDIUM:
//                 return MEDIUM;
//             case XInputConstants.BATTERY_LEVEL_FULL:
//                 return FULL;
//             default:
//                 throw new IllegalArgumentException("Invalid native value " + value);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputBatteryType.java
// public enum XInputBatteryType {
//     DISCONNECTED, WIRED, ALKALINE, NIMH, UNKNOWN;
// 
//     /**
//      * Retrieves the appropriate enum value from the native value.
//      *
//      * @param value the native value
//      * @return the corresponding enum constant
//      * @throws IllegalArgumentException if the given native value does not correspond
//      * to an enum value
//      */
//     public static XInputBatteryType fromNative(final byte value) {
//         switch (value) {
//             case XInputConstants.BATTERY_TYPE_DISCONNECTED:
//                 return DISCONNECTED;
//             case XInputConstants.BATTERY_TYPE_WIRED:
//                 return WIRED;
//             case XInputConstants.BATTERY_TYPE_ALKALINE:
//                 return ALKALINE;
//             case XInputConstants.BATTERY_TYPE_NIMH:
//                 return NIMH;
//             case XInputConstants.BATTERY_TYPE_UNKNOWN:
//                 return UNKNOWN;
//             default:
//                 throw new IllegalArgumentException("Invalid native value " + value);
//         }
//     }
// }


import java.nio.ByteBuffer;
import com.github.strikerx3.jxinput.enums.XInputBatteryLevel;
import com.github.strikerx3.jxinput.enums.XInputBatteryType;
package com.github.strikerx3.jxinput;



/**
 * Contains information about the device's battery.
 *
 * @author Ivan "StrikerX3" Oliveira
 */
public class XInputBatteryInformation {
    private final XInputBatteryType type;
    private final XInputBatteryLevel level;

// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputBatteryLevel.java
// public enum XInputBatteryLevel {
//     EMPTY, LOW, MEDIUM, FULL;
// 
//     /**
//      * Retrieves the appropriate enum value from the native value.
//      *
//      * @param value the native value
//      * @return the corresponding enum constant
//      * @throws IllegalArgumentException if the given native value does not correspond
//      * to an enum value
//      */
//     public static XInputBatteryLevel fromNative(final byte value) {
//         switch (value) {
//             case XInputConstants.BATTERY_LEVEL_EMPTY:
//                 return EMPTY;
//             case XInputConstants.BATTERY_LEVEL_LOW:
//                 return LOW;
//             case XInputConstants.BATTERY_LEVEL_MEDIUM:
//                 return MEDIUM;
//             case XInputConstants.BATTERY_LEVEL_FULL:
//                 return FULL;
//             default:
//                 throw new IllegalArgumentException("Invalid native value " + value);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputBatteryType.java
// public enum XInputBatteryType {
//     DISCONNECTED, WIRED, ALKALINE, NIMH, UNKNOWN;
// 
//     /**
//      * Retrieves the appropriate enum value from the native value.
//      *
//      * @param value the native value
//      * @return the corresponding enum constant
//      * @throws IllegalArgumentException if the given native value does not correspond
//      * to an enum value
//      */
//     public static XInputBatteryType fromNative(final byte value) {
//         switch (value) {
//             case XInputConstants.BATTERY_TYPE_DISCONNECTED:
//                 return DISCONNECTED;
//             case XInputConstants.BATTERY_TYPE_WIRED:
//                 return WIRED;
//             case XInputConstants.BATTERY_TYPE_ALKALINE:
//                 return ALKALINE;
//             case XInputConstants.BATTERY_TYPE_NIMH:
//                 return NIMH;
//             case XInputConstants.BATTERY_TYPE_UNKNOWN:
//                 return UNKNOWN;
//             default:
//                 throw new IllegalArgumentException("Invalid native value " + value);
//         }
//     }
// }


// Path: src/main/java/com/github/strikerx3/jxinput/XInputBatteryInformation.java
import java.nio.ByteBuffer;
import com.github.strikerx3.jxinput.enums.XInputBatteryLevel;
import com.github.strikerx3.jxinput.enums.XInputBatteryType;

package com.github.strikerx3.jxinput;



/**
 * Contains information about the device's battery.
 *
 * @author Ivan "StrikerX3" Oliveira
 */
public class XInputBatteryInformation {
    private final XInputBatteryType type;
    private final XInputBatteryLevel level;

    XInputBatteryInformation(final ByteBuffer buffer) {