restartDevice method

Future<void> restartDevice({
  1. String? mode,
  2. String? uuidToken,
})

Restart the device

Reboots the device. The query parameter 'mode' selects between a 'soft' and an 'hard' reboot. A soft reboot will waits the termination of all processes before being restarted, while a hard one will not. When 'mode' is not provided, the default behaviour will be 'soft' mode.

Parameters:

  • String mode: Kind of device's reboot.

  • String uuidToken: Used for remote connections to device

Implementation

Future<void> restartDevice({
  String? mode,
  String? uuidToken,
}) async {
  final response = await restartDeviceWithHttpInfo(
    mode: mode,
    uuidToken: uuidToken,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
}