code: public DeviceTaskUpdateResponse updateTaskForDevice(String tid, String did, DeviceTaskUpdateRequest deviceTaskUpdateRequest) throws ApiException {
          ApiResponse<DeviceTaskUpdateResponse> resp = updateTaskForDeviceWithHttpInfo(tid, did, deviceTaskUpdateRequest);
          return resp.getData();
      }
docs: Updates a task for a specific device - For now just allows changing the state to cancelled.
  Updates a task for a specific device - For now just allows changing the state to cancelled.
  @param tid Task ID. (required)
  @param did Device ID. (required)
  @param deviceTaskUpdateRequest Device task update request (required)
  @return DeviceTaskUpdateResponse
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body