# Drone.java

    package io.github.js0ny.ilp_coursework.data.external;

    import io.github.js0ny.ilp_coursework.data.common.DroneCapability;

    /** Represents the data transfer object for a drone, gained from the endpoints */
    public record Drone(String name, String id, DroneCapability capability) {

        public int parseId() {
            try {
                return Integer.parseInt(id);
            } catch (NumberFormatException e) {
                return id.hashCode();
            }
        }
    }