patchTasksIDWithHttpInfo method

Future<Response> patchTasksIDWithHttpInfo(
  1. String taskID,
  2. TaskUpdateRequest taskUpdateRequest, {
  3. String? zapTraceSpan,
})

Update a task

Update a task. This will cancel all queued runs.

Note: This method returns the HTTP Response.

Parameters:

  • String taskID (required): The task ID.

  • TaskUpdateRequest taskUpdateRequest (required): Task update to apply

  • String zapTraceSpan: OpenTracing span context

Implementation

Future<Response> patchTasksIDWithHttpInfo(
  String taskID,
  TaskUpdateRequest taskUpdateRequest, {
  String? zapTraceSpan,
}) async {
  final path = r'/tasks/{taskID}'.replaceAll('{taskID}', taskID);

  // ignore: prefer_final_locals
  Object? postBody = taskUpdateRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (zapTraceSpan != null) {
    headerParams[r'Zap-Trace-Span'] = parameterToString(zapTraceSpan);
  }

  const authNames = <String>[
    'BasicAuthentication',
    'QuerystringAuthentication',
    'TokenAuthentication'
  ];
  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'PATCH',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes[0],
    authNames,
  );
}