restartDeviceWithHttpInfo method
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.
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> restartDeviceWithHttpInfo({
String? mode,
String? uuidToken,
}) async {
// ignore: prefer_const_declarations
final path = uuidToken != null
? '${LbSetupEnvironment.getApiEndpoint(iotUuid: uuidToken)}/device/restart'
: '/device/restart';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (mode != null) {
queryParams.addAll(_queryParams('', 'mode', mode));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}