/*
* InfluxDB OSS API Service
*
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
*
* OpenAPI spec version: 2.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
using RestSharp;
using InfluxDB.Client.Api.Client;
using InfluxDB.Client.Api.Domain;
namespace InfluxDB.Client.Api.Service
{
///
/// Represents a collection of functions to interact with the API endpoints
///
public interface ITasksService : IApiAccessor
{
#region Synchronous Operations
///
/// Delete a task
///
///
/// Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
///
void DeleteTasksID(string taskID, string zapTraceSpan = null);
///
/// Delete a task
///
///
/// Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteTasksIDWithHttpInfo(string taskID, string zapTraceSpan = null);
///
/// Delete a label from a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
///
void DeleteTasksIDLabelsID(string taskID, string labelID, string zapTraceSpan = null);
///
/// Delete a label from a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse
DeleteTasksIDLabelsIDWithHttpInfo(string taskID, string labelID, string zapTraceSpan = null);
///
/// Remove a member from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
///
void DeleteTasksIDMembersID(string userID, string taskID, string zapTraceSpan = null);
///
/// Remove a member from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse
DeleteTasksIDMembersIDWithHttpInfo(string userID, string taskID, string zapTraceSpan = null);
///
/// Remove an owner from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
///
void DeleteTasksIDOwnersID(string userID, string taskID, string zapTraceSpan = null);
///
/// Remove an owner from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteTasksIDOwnersIDWithHttpInfo(string userID, string taskID, string zapTraceSpan = null);
///
/// Cancel a running task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
///
void DeleteTasksIDRunsID(string taskID, string runID, string zapTraceSpan = null);
///
/// Cancel a running task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteTasksIDRunsIDWithHttpInfo(string taskID, string runID, string zapTraceSpan = null);
///
/// List all tasks
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Tasks
Tasks GetTasks(string zapTraceSpan = null, string name = null, string after = null, string user = null,
string org = null, string orgID = null, string status = null, int? limit = null, string type = null);
///
/// List all tasks
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// ApiResponse of Tasks
ApiResponse GetTasksWithHttpInfo(string zapTraceSpan = null, string name = null, string after = null,
string user = null, string org = null, string orgID = null, string status = null, int? limit = null,
string type = null);
///
/// Retrieve a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// TaskType
TaskType GetTasksID(string taskID, string zapTraceSpan = null);
///
/// Retrieve a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of TaskType
ApiResponse GetTasksIDWithHttpInfo(string taskID, string zapTraceSpan = null);
///
/// List all labels for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// LabelsResponse
LabelsResponse GetTasksIDLabels(string taskID, string zapTraceSpan = null);
///
/// List all labels for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of LabelsResponse
ApiResponse GetTasksIDLabelsWithHttpInfo(string taskID, string zapTraceSpan = null);
///
/// Retrieve all logs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Logs
Logs GetTasksIDLogs(string taskID, string zapTraceSpan = null);
///
/// Retrieve all logs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Logs
ApiResponse GetTasksIDLogsWithHttpInfo(string taskID, string zapTraceSpan = null);
///
/// List all task members
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ResourceMembers
ResourceMembers GetTasksIDMembers(string taskID, string zapTraceSpan = null);
///
/// List all task members
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMembers
ApiResponse GetTasksIDMembersWithHttpInfo(string taskID, string zapTraceSpan = null);
///
/// List all owners of a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ResourceOwners
ResourceOwners GetTasksIDOwners(string taskID, string zapTraceSpan = null);
///
/// List all owners of a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwners
ApiResponse GetTasksIDOwnersWithHttpInfo(string taskID, string zapTraceSpan = null);
///
/// List runs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the task to get runs for.
/// OpenTracing span context (optional)
/// Returns runs after a specific ID. (optional)
/// The number of runs to return (optional, default to 100)
/// Filter runs to those scheduled after this time, RFC3339 (optional)
/// Filter runs to those scheduled before this time, RFC3339 (optional)
/// Runs
Runs GetTasksIDRuns(string taskID, string zapTraceSpan = null, string after = null, int? limit = null,
DateTime? afterTime = null, DateTime? beforeTime = null);
///
/// List runs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the task to get runs for.
/// OpenTracing span context (optional)
/// Returns runs after a specific ID. (optional)
/// The number of runs to return (optional, default to 100)
/// Filter runs to those scheduled after this time, RFC3339 (optional)
/// Filter runs to those scheduled before this time, RFC3339 (optional)
/// ApiResponse of Runs
ApiResponse GetTasksIDRunsWithHttpInfo(string taskID, string zapTraceSpan = null, string after = null,
int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = null);
///
/// Retrieve a single run for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Run
Run GetTasksIDRunsID(string taskID, string runID, string zapTraceSpan = null);
///
/// Retrieve a single run for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// ApiResponse of Run
ApiResponse GetTasksIDRunsIDWithHttpInfo(string taskID, string runID, string zapTraceSpan = null);
///
/// Retrieve all logs for a run
///
///
///
///
/// Thrown when fails to make API call
/// ID of task to get logs for.
/// ID of run to get logs for.
/// OpenTracing span context (optional)
/// Logs
Logs GetTasksIDRunsIDLogs(string taskID, string runID, string zapTraceSpan = null);
///
/// Retrieve all logs for a run
///
///
///
///
/// Thrown when fails to make API call
/// ID of task to get logs for.
/// ID of run to get logs for.
/// OpenTracing span context (optional)
/// ApiResponse of Logs
ApiResponse GetTasksIDRunsIDLogsWithHttpInfo(string taskID, string runID, string zapTraceSpan = null);
///
/// Update a task
///
///
/// Update a task. This will cancel all queued runs.
///
/// Thrown when fails to make API call
/// The task ID.
/// Task update to apply
/// OpenTracing span context (optional)
/// TaskType
TaskType PatchTasksID(string taskID, TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null);
///
/// Update a task
///
///
/// Update a task. This will cancel all queued runs.
///
/// Thrown when fails to make API call
/// The task ID.
/// Task update to apply
/// OpenTracing span context (optional)
/// ApiResponse of TaskType
ApiResponse PatchTasksIDWithHttpInfo(string taskID, TaskUpdateRequest taskUpdateRequest,
string zapTraceSpan = null);
///
/// Create a new task
///
///
///
///
/// Thrown when fails to make API call
/// Task to create
/// OpenTracing span context (optional)
/// TaskType
TaskType PostTasks(TaskCreateRequest taskCreateRequest, string zapTraceSpan = null);
///
/// Create a new task
///
///
///
///
/// Thrown when fails to make API call
/// Task to create
/// OpenTracing span context (optional)
/// ApiResponse of TaskType
ApiResponse PostTasksWithHttpInfo(TaskCreateRequest taskCreateRequest, string zapTraceSpan = null);
///
/// Add a label to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// Label to add
/// OpenTracing span context (optional)
/// LabelResponse
LabelResponse PostTasksIDLabels(string taskID, LabelMapping labelMapping, string zapTraceSpan = null);
///
/// Add a label to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// Label to add
/// OpenTracing span context (optional)
/// ApiResponse of LabelResponse
ApiResponse PostTasksIDLabelsWithHttpInfo(string taskID, LabelMapping labelMapping,
string zapTraceSpan = null);
///
/// Add a member to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as member
/// OpenTracing span context (optional)
/// ResourceMember
ResourceMember PostTasksIDMembers(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody,
string zapTraceSpan = null);
///
/// Add a member to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as member
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMember
ApiResponse PostTasksIDMembersWithHttpInfo(string taskID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null);
///
/// Add an owner to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// ResourceOwner
ResourceOwner PostTasksIDOwners(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody,
string zapTraceSpan = null);
///
/// Add an owner to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwner
ApiResponse PostTasksIDOwnersWithHttpInfo(string taskID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null);
///
/// Manually start a task run, overriding the current schedule
///
///
///
///
/// Thrown when fails to make API call
///
/// OpenTracing span context (optional)
/// (optional)
/// Run
Run PostTasksIDRuns(string taskID, string zapTraceSpan = null, RunManually runManually = null);
///
/// Manually start a task run, overriding the current schedule
///
///
///
///
/// Thrown when fails to make API call
///
/// OpenTracing span context (optional)
/// (optional)
/// ApiResponse of Run
ApiResponse PostTasksIDRunsWithHttpInfo(string taskID, string zapTraceSpan = null,
RunManually runManually = null);
///
/// Retry a task run
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// (optional)
/// Run
Run PostTasksIDRunsIDRetry(string taskID, string runID, string zapTraceSpan = null, string body = null);
///
/// Retry a task run
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// (optional)
/// ApiResponse of Run
ApiResponse PostTasksIDRunsIDRetryWithHttpInfo(string taskID, string runID, string zapTraceSpan = null,
string body = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
/// Delete a task
///
///
/// Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteTasksIDAsync(string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Delete a task
///
///
/// Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteTasksIDAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Delete a label from a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteTasksIDLabelsIDAsync(string taskID, string labelID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Delete a label from a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteTasksIDLabelsIDAsyncWithHttpInfo(string taskID,
string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove a member from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteTasksIDMembersIDAsync(string userID, string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove a member from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteTasksIDMembersIDAsyncWithHttpInfo(string userID,
string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove an owner from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteTasksIDOwnersIDAsync(string userID, string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Remove an owner from a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteTasksIDOwnersIDAsyncWithHttpInfo(string userID,
string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Cancel a running task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteTasksIDRunsIDAsync(string taskID, string runID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Cancel a running task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteTasksIDRunsIDAsyncWithHttpInfo(string taskID,
string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all tasks
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Cancellation token
/// Task of Tasks
System.Threading.Tasks.Task GetTasksAsync(string zapTraceSpan = null, string name = null,
string after = null, string user = null, string org = null, string orgID = null, string status = null,
int? limit = null, string type = null, CancellationToken cancellationToken = default);
///
/// List all tasks
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Cancellation token
/// Task of ApiResponse (Tasks)
System.Threading.Tasks.Task> GetTasksAsyncWithHttpInfo(string zapTraceSpan = null,
string name = null, string after = null, string user = null, string org = null, string orgID = null,
string status = null, int? limit = null, string type = null, CancellationToken cancellationToken = default);
///
/// Retrieve a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of TaskType
System.Threading.Tasks.Task GetTasksIDAsync(string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Retrieve a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (TaskType)
System.Threading.Tasks.Task> GetTasksIDAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all labels for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of LabelsResponse
System.Threading.Tasks.Task GetTasksIDLabelsAsync(string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// List all labels for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (LabelsResponse)
System.Threading.Tasks.Task> GetTasksIDLabelsAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Retrieve all logs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Logs
System.Threading.Tasks.Task GetTasksIDLogsAsync(string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Retrieve all logs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Logs)
System.Threading.Tasks.Task> GetTasksIDLogsAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all task members
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceMembers
System.Threading.Tasks.Task GetTasksIDMembersAsync(string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// List all task members
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceMembers)
System.Threading.Tasks.Task> GetTasksIDMembersAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all owners of a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceOwners
System.Threading.Tasks.Task GetTasksIDOwnersAsync(string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// List all owners of a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceOwners)
System.Threading.Tasks.Task> GetTasksIDOwnersAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List runs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the task to get runs for.
/// OpenTracing span context (optional)
/// Returns runs after a specific ID. (optional)
/// The number of runs to return (optional, default to 100)
/// Filter runs to those scheduled after this time, RFC3339 (optional)
/// Filter runs to those scheduled before this time, RFC3339 (optional)
/// Cancellation token
/// Task of Runs
System.Threading.Tasks.Task GetTasksIDRunsAsync(string taskID, string zapTraceSpan = null,
string after = null, int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = null,
CancellationToken cancellationToken = default);
///
/// List runs for a task
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the task to get runs for.
/// OpenTracing span context (optional)
/// Returns runs after a specific ID. (optional)
/// The number of runs to return (optional, default to 100)
/// Filter runs to those scheduled after this time, RFC3339 (optional)
/// Filter runs to those scheduled before this time, RFC3339 (optional)
/// Cancellation token
/// Task of ApiResponse (Runs)
System.Threading.Tasks.Task> GetTasksIDRunsAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, string after = null, int? limit = null, DateTime? afterTime = null,
DateTime? beforeTime = null, CancellationToken cancellationToken = default);
///
/// Retrieve a single run for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Run
System.Threading.Tasks.Task GetTasksIDRunsIDAsync(string taskID, string runID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Retrieve a single run for a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Run)
System.Threading.Tasks.Task> GetTasksIDRunsIDAsyncWithHttpInfo(string taskID, string runID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Retrieve all logs for a run
///
///
///
///
/// Thrown when fails to make API call
/// ID of task to get logs for.
/// ID of run to get logs for.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Logs
System.Threading.Tasks.Task GetTasksIDRunsIDLogsAsync(string taskID, string runID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Retrieve all logs for a run
///
///
///
///
/// Thrown when fails to make API call
/// ID of task to get logs for.
/// ID of run to get logs for.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Logs)
System.Threading.Tasks.Task> GetTasksIDRunsIDLogsAsyncWithHttpInfo(string taskID,
string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Update a task
///
///
/// Update a task. This will cancel all queued runs.
///
/// Thrown when fails to make API call
/// The task ID.
/// Task update to apply
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of TaskType
System.Threading.Tasks.Task PatchTasksIDAsync(string taskID, TaskUpdateRequest taskUpdateRequest,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Update a task
///
///
/// Update a task. This will cancel all queued runs.
///
/// Thrown when fails to make API call
/// The task ID.
/// Task update to apply
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (TaskType)
System.Threading.Tasks.Task> PatchTasksIDAsyncWithHttpInfo(string taskID,
TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Create a new task
///
///
///
///
/// Thrown when fails to make API call
/// Task to create
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of TaskType
System.Threading.Tasks.Task PostTasksAsync(TaskCreateRequest taskCreateRequest,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Create a new task
///
///
///
///
/// Thrown when fails to make API call
/// Task to create
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (TaskType)
System.Threading.Tasks.Task> PostTasksAsyncWithHttpInfo(
TaskCreateRequest taskCreateRequest, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add a label to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// Label to add
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of LabelResponse
System.Threading.Tasks.Task PostTasksIDLabelsAsync(string taskID, LabelMapping labelMapping,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Add a label to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// Label to add
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (LabelResponse)
System.Threading.Tasks.Task> PostTasksIDLabelsAsyncWithHttpInfo(string taskID,
LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Add a member to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as member
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceMember
System.Threading.Tasks.Task PostTasksIDMembersAsync(string taskID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add a member to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as member
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceMember)
System.Threading.Tasks.Task> PostTasksIDMembersAsyncWithHttpInfo(string taskID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add an owner to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceOwner
System.Threading.Tasks.Task PostTasksIDOwnersAsync(string taskID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add an owner to a task
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceOwner)
System.Threading.Tasks.Task> PostTasksIDOwnersAsyncWithHttpInfo(string taskID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Manually start a task run, overriding the current schedule
///
///
///
///
/// Thrown when fails to make API call
///
/// OpenTracing span context (optional)
/// (optional)
/// Cancellation token
/// Task of Run
System.Threading.Tasks.Task PostTasksIDRunsAsync(string taskID, string zapTraceSpan = null,
RunManually runManually = null, CancellationToken cancellationToken = default);
///
/// Manually start a task run, overriding the current schedule
///
///
///
///
/// Thrown when fails to make API call
///
/// OpenTracing span context (optional)
/// (optional)
/// Cancellation token
/// Task of ApiResponse (Run)
System.Threading.Tasks.Task> PostTasksIDRunsAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, RunManually runManually = null, CancellationToken cancellationToken = default);
///
/// Retry a task run
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// (optional)
/// Cancellation token
/// Task of Run
System.Threading.Tasks.Task PostTasksIDRunsIDRetryAsync(string taskID, string runID,
string zapTraceSpan = null, string body = null, CancellationToken cancellationToken = default);
///
/// Retry a task run
///
///
///
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// (optional)
/// Cancellation token
/// Task of ApiResponse (Run)
System.Threading.Tasks.Task> PostTasksIDRunsIDRetryAsyncWithHttpInfo(string taskID,
string runID, string zapTraceSpan = null, string body = null,
CancellationToken cancellationToken = default);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class TasksService : ITasksService
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public TasksService(string basePath)
{
Configuration = new Configuration { BasePath = basePath };
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Initializes a new instance of the class
/// using Configuration object
///
/// An instance of Configuration
///
public TasksService(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
{
Configuration = Configuration.Default;
}
else
{
Configuration = configuration;
}
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Gets the base path of the API client.
///
/// The base path
public string GetBasePath()
{
return Configuration.ApiClient.RestClientOptions.BaseUrl.ToString();
}
///
/// Sets the base path of the API client.
///
/// The base path
[Obsolete(
"SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(string basePath)
{
// do nothing
}
///
/// Gets or sets the configuration object
///
/// An instance of the Configuration
public Configuration Configuration { get; set; }
///
/// Provides a factory method hook for the creation of exceptions.
///
public ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set => _exceptionFactory = value;
}
///
/// Gets the default header.
///
/// Dictionary of HTTP header
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary DefaultHeader()
{
return new ReadOnlyDictionary(Configuration.DefaultHeader);
}
///
/// Add default header.
///
/// Header field name.
/// Header field value.
///
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
Configuration.AddDefaultHeader(key, value);
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
///
public void DeleteTasksID(string taskID, string zapTraceSpan = null)
{
DeleteTasksIDWithHttpInfo(taskID, zapTraceSpan);
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteTasksIDWithHttpInfo(string taskID, string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksID");
}
var localVarPath = "/api/v2/tasks/{taskID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteTasksIDWithIRestResponseAsync(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksID");
}
var localVarPath = "/api/v2/tasks/{taskID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteTasksIDWithIRestResponse(string taskID, string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksID");
}
var localVarPath = "/api/v2/tasks/{taskID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteTasksIDWithRestRequest(string taskID, string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksID");
}
var localVarPath = "/api/v2/tasks/{taskID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteTasksIDAsync(string taskID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
return DeleteTasksIDAsyncWithHttpInfo(taskID, zapTraceSpan, cancellationToken);
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteTasksIDAsyncWithHttpInfo(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await DeleteTasksIDAsyncWithIRestResponse(taskID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a task Deletes a task and all associated records
///
/// Thrown when fails to make API call
/// The ID of the task to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteTasksIDAsyncWithIRestResponse(string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksID");
}
var localVarPath = "/api/v2/tasks/{taskID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
///
public void DeleteTasksIDLabelsID(string taskID, string labelID, string zapTraceSpan = null)
{
DeleteTasksIDLabelsIDWithHttpInfo(taskID, labelID, zapTraceSpan);
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteTasksIDLabelsIDWithHttpInfo(string taskID, string labelID,
string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling TasksService->DeleteTasksIDLabelsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteTasksIDLabelsIDWithIRestResponseAsync(
string taskID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling TasksService->DeleteTasksIDLabelsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteTasksIDLabelsIDWithIRestResponse(string taskID, string labelID,
string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling TasksService->DeleteTasksIDLabelsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteTasksIDLabelsIDWithRestRequest(string taskID, string labelID,
string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling TasksService->DeleteTasksIDLabelsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteTasksIDLabelsIDAsync(string taskID, string labelID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteTasksIDLabelsIDAsyncWithHttpInfo(taskID, labelID, zapTraceSpan, cancellationToken);
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteTasksIDLabelsIDAsyncWithHttpInfo(
string taskID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteTasksIDLabelsIDAsyncWithIRestResponse(taskID, labelID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a label from a task
///
/// Thrown when fails to make API call
/// The task ID.
/// The label ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteTasksIDLabelsIDAsyncWithIRestResponse(
string taskID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling TasksService->DeleteTasksIDLabelsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
///
public void DeleteTasksIDMembersID(string userID, string taskID, string zapTraceSpan = null)
{
DeleteTasksIDMembersIDWithHttpInfo(userID, taskID, zapTraceSpan);
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteTasksIDMembersIDWithHttpInfo(string userID, string taskID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDMembersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDMembersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteTasksIDMembersIDWithIRestResponseAsync(
string userID, string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDMembersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDMembersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteTasksIDMembersIDWithIRestResponse(string userID, string taskID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDMembersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDMembersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteTasksIDMembersIDWithRestRequest(string userID, string taskID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDMembersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDMembersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteTasksIDMembersIDAsync(string userID, string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteTasksIDMembersIDAsyncWithHttpInfo(userID, taskID, zapTraceSpan, cancellationToken);
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteTasksIDMembersIDAsyncWithHttpInfo(
string userID, string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteTasksIDMembersIDAsyncWithIRestResponse(userID, taskID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove a member from a task
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteTasksIDMembersIDAsyncWithIRestResponse(
string userID, string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDMembersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDMembersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
///
public void DeleteTasksIDOwnersID(string userID, string taskID, string zapTraceSpan = null)
{
DeleteTasksIDOwnersIDWithHttpInfo(userID, taskID, zapTraceSpan);
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteTasksIDOwnersIDWithHttpInfo(string userID, string taskID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDOwnersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDOwnersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteTasksIDOwnersIDWithIRestResponseAsync(
string userID, string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDOwnersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDOwnersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteTasksIDOwnersIDWithIRestResponse(string userID, string taskID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDOwnersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDOwnersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteTasksIDOwnersIDWithRestRequest(string userID, string taskID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDOwnersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDOwnersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteTasksIDOwnersIDAsync(string userID, string taskID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteTasksIDOwnersIDAsyncWithHttpInfo(userID, taskID, zapTraceSpan, cancellationToken);
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteTasksIDOwnersIDAsyncWithHttpInfo(
string userID, string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteTasksIDOwnersIDAsyncWithIRestResponse(userID, taskID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove an owner from a task
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The task ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteTasksIDOwnersIDAsyncWithIRestResponse(
string userID, string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling TasksService->DeleteTasksIDOwnersID");
}
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDOwnersID");
}
var localVarPath = "/api/v2/tasks/{taskID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
///
public void DeleteTasksIDRunsID(string taskID, string runID, string zapTraceSpan = null)
{
DeleteTasksIDRunsIDWithHttpInfo(taskID, runID, zapTraceSpan);
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteTasksIDRunsIDWithHttpInfo(string taskID, string runID,
string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDRunsID");
}
// verify the required parameter 'runID' is set
if (runID == null)
{
throw new ApiException(400,
"Missing required parameter 'runID' when calling TasksService->DeleteTasksIDRunsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (runID != null)
{
localVarPathParams.Add("runID", Configuration.ApiClient.ParameterToString(runID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDRunsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteTasksIDRunsIDWithIRestResponseAsync(string taskID,
string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDRunsID");
}
// verify the required parameter 'runID' is set
if (runID == null)
{
throw new ApiException(400,
"Missing required parameter 'runID' when calling TasksService->DeleteTasksIDRunsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (runID != null)
{
localVarPathParams.Add("runID", Configuration.ApiClient.ParameterToString(runID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDRunsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteTasksIDRunsIDWithIRestResponse(string taskID, string runID,
string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDRunsID");
}
// verify the required parameter 'runID' is set
if (runID == null)
{
throw new ApiException(400,
"Missing required parameter 'runID' when calling TasksService->DeleteTasksIDRunsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (runID != null)
{
localVarPathParams.Add("runID", Configuration.ApiClient.ParameterToString(runID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDRunsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteTasksIDRunsIDWithRestRequest(string taskID, string runID, string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDRunsID");
}
// verify the required parameter 'runID' is set
if (runID == null)
{
throw new ApiException(400,
"Missing required parameter 'runID' when calling TasksService->DeleteTasksIDRunsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (runID != null)
{
localVarPathParams.Add("runID", Configuration.ApiClient.ParameterToString(runID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteTasksIDRunsIDAsync(string taskID, string runID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteTasksIDRunsIDAsyncWithHttpInfo(taskID, runID, zapTraceSpan, cancellationToken);
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteTasksIDRunsIDAsyncWithHttpInfo(
string taskID, string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteTasksIDRunsIDAsyncWithIRestResponse(taskID, runID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDRunsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Cancel a running task
///
/// Thrown when fails to make API call
/// The task ID.
/// The run ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteTasksIDRunsIDAsyncWithIRestResponse(string taskID,
string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->DeleteTasksIDRunsID");
}
// verify the required parameter 'runID' is set
if (runID == null)
{
throw new ApiException(400,
"Missing required parameter 'runID' when calling TasksService->DeleteTasksIDRunsID");
}
var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (runID != null)
{
localVarPathParams.Add("runID", Configuration.ApiClient.ParameterToString(runID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteTasksIDRunsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Tasks
public Tasks GetTasks(string zapTraceSpan = null, string name = null, string after = null, string user = null,
string org = null, string orgID = null, string status = null, int? limit = null, string type = null)
{
var localVarResponse =
GetTasksWithHttpInfo(zapTraceSpan, name, after, user, org, orgID, status, limit, type);
return localVarResponse.Data;
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// ApiResponse of Tasks
public ApiResponse GetTasksWithHttpInfo(string zapTraceSpan = null, string name = null,
string after = null, string user = null, string org = null, string orgID = null, string status = null,
int? limit = null, string type = null)
{
var localVarPath = "/api/v2/tasks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (user != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (status != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (type != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetTasks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Tasks)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Tasks)));
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Cancellation token
/// ApiResponse of Tasks
public async System.Threading.Tasks.Task GetTasksWithIRestResponseAsync(
string zapTraceSpan = null, string name = null, string after = null, string user = null, string org = null,
string orgID = null, string status = null, int? limit = null, string type = null,
CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/tasks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (user != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (status != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (type != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetTasks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// ApiResponse of Tasks
public RestResponse GetTasksWithIRestResponse(string zapTraceSpan = null, string name = null,
string after = null, string user = null, string org = null, string orgID = null, string status = null,
int? limit = null, string type = null)
{
var localVarPath = "/api/v2/tasks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (user != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (status != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (type != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetTasks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// ApiResponse of Tasks
public RestRequest GetTasksWithRestRequest(string zapTraceSpan = null, string name = null, string after = null,
string user = null, string org = null, string orgID = null, string status = null, int? limit = null,
string type = null)
{
var localVarPath = "/api/v2/tasks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (user != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (status != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (type != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Cancellation token
/// Task of Tasks
public async System.Threading.Tasks.Task GetTasksAsync(string zapTraceSpan = null, string name = null,
string after = null, string user = null, string org = null, string orgID = null, string status = null,
int? limit = null, string type = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await GetTasksAsyncWithHttpInfo(zapTraceSpan, name, after, user, org, orgID, status, limit, type,
cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Cancellation token
/// Task of ApiResponse (Tasks)
public async System.Threading.Tasks.Task> GetTasksAsyncWithHttpInfo(
string zapTraceSpan = null, string name = null, string after = null, string user = null, string org = null,
string orgID = null, string status = null, int? limit = null, string type = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await GetTasksAsyncWithIRestResponse(zapTraceSpan, name, after, user, org, orgID,
status, limit, type, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetTasks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Tasks)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Tasks)));
}
///
/// List all tasks
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Returns task with a specific name. (optional)
/// Return tasks after a specified ID. (optional)
/// Filter tasks to a specific user ID. (optional)
/// Filter tasks to a specific organization name. (optional)
/// Filter tasks to a specific organization ID. (optional)
/// Filter tasks by a status- -\"inactive\" or \"active\". (optional)
/// The number of tasks to return (optional, default to 100)
/// Type of task, unset by default. (optional)
/// Cancellation token
/// Task of RestResponse (Tasks)
public async System.Threading.Tasks.Task GetTasksAsyncWithIRestResponse(
string zapTraceSpan = null, string name = null, string after = null, string user = null, string org = null,
string orgID = null, string status = null, int? limit = null, string type = null,
CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/tasks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (user != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "user", user)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (status != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (type != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetTasks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve a task
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// TaskType
public TaskType GetTasksID(string taskID, string zapTraceSpan = null)
{
var localVarResponse = GetTasksIDWithHttpInfo(taskID, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Retrieve a task
///
/// Thrown when fails to make API call
/// The task ID.
/// OpenTracing span context (optional)
/// ApiResponse of TaskType
public ApiResponse GetTasksIDWithHttpInfo(string taskID, string zapTraceSpan = null)
{
// verify the required parameter 'taskID' is set
if (taskID == null)
{
throw new ApiException(400,
"Missing required parameter 'taskID' when calling TasksService->GetTasksID");
}
var localVarPath = "/api/v2/tasks/{taskID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (taskID != null)
{
localVarPathParams.Add("taskID", Configuration.ApiClient.ParameterToString(taskID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetTasksID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(TaskType)Configuration.ApiClient.Deserialize(localVarResponse, typeof(TaskType)));
}
///