code: private static Client deviceToClient(Device device) {
          LinkObject[] linkObjects = device.getObjectLinks().stream().map(
                  link -> new LinkObject(link.getUrl(), link.getAttributes())).collect(Collectors.toList()
          ).toArray(new LinkObject[device.getObjectLinks().size()]);
  
          String bindingModeValue = (String) device.getProperties().get("bindingMode");
          BindingMode bindingMode = bindingModeValue == null ? null : BindingMode.valueOf(bindingModeValue);
  
          InetAddress address = InetAddresses.forString(device.getAddress());
  
          String lwM2mVersion = (String) device.getProperties().get("lwM2mVersion");
  
          String smsNumber = (String) device.getProperties().get("smsNumber");
  
          return new Client(
                  device.getRegistrationId(), device.getDeviceId(),
                  address, device.getPort(), lwM2mVersion, device.getLifeTimeInSec(), smsNumber, bindingMode, linkObjects, device.getRegistrationEndpointAddress(),
                  device.getRegistrationDate(), device.getLastUpdate()
          );
      }
docs: Helpers