/* * 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))); } /// /// Retrieve a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of TaskType public async System.Threading.Tasks.Task GetTasksIDWithIRestResponseAsync(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->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)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("GetTasksID", 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) /// ApiResponse of TaskType public RestResponse GetTasksIDWithIRestResponse(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 localVarResponse; } /// /// Retrieve a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of TaskType public RestRequest GetTasksIDWithRestRequest(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); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Retrieve a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of TaskType public async System.Threading.Tasks.Task GetTasksIDAsync(string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetTasksIDAsyncWithHttpInfo(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Retrieve a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (TaskType) public async System.Threading.Tasks.Task> GetTasksIDAsyncWithHttpInfo(string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetTasksIDAsyncWithIRestResponse(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); 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))); } /// /// Retrieve a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (TaskType) public async System.Threading.Tasks.Task GetTasksIDAsyncWithIRestResponse(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->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)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// LabelsResponse public LabelsResponse GetTasksIDLabels(string taskID, string zapTraceSpan = null) { var localVarResponse = GetTasksIDLabelsWithHttpInfo(taskID, zapTraceSpan); return localVarResponse.Data; } /// /// List all labels for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public ApiResponse GetTasksIDLabelsWithHttpInfo(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->GetTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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("GetTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelsResponse))); } /// /// List all labels for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelsResponse public async System.Threading.Tasks.Task GetTasksIDLabelsWithIRestResponseAsync(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->GetTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestResponse GetTasksIDLabelsWithIRestResponse(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->GetTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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("GetTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestRequest GetTasksIDLabelsWithRestRequest(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->GetTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task GetTasksIDLabelsAsync(string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetTasksIDLabelsAsyncWithHttpInfo(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetTasksIDLabelsAsyncWithHttpInfo( string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetTasksIDLabelsAsyncWithIRestResponse(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelsResponse))); } /// /// List all labels for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelsResponse) public async System.Threading.Tasks.Task GetTasksIDLabelsAsyncWithIRestResponse(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->GetTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve all logs for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Logs public Logs GetTasksIDLogs(string taskID, string zapTraceSpan = null) { var localVarResponse = GetTasksIDLogsWithHttpInfo(taskID, zapTraceSpan); return localVarResponse.Data; } /// /// Retrieve all logs for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of Logs public ApiResponse GetTasksIDLogsWithHttpInfo(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->GetTasksIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/logs"; 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("GetTasksIDLogs", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Logs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Logs))); } /// /// Retrieve all logs for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Logs public async System.Threading.Tasks.Task GetTasksIDLogsWithIRestResponseAsync(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->GetTasksIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDLogs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve all logs for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of Logs public RestResponse GetTasksIDLogsWithIRestResponse(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->GetTasksIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/logs"; 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("GetTasksIDLogs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve all logs for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of Logs public RestRequest GetTasksIDLogsWithRestRequest(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->GetTasksIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task GetTasksIDLogsAsync(string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetTasksIDLogsAsyncWithHttpInfo(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetTasksIDLogsAsyncWithHttpInfo(string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetTasksIDLogsAsyncWithIRestResponse(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDLogs", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Logs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Logs))); } /// /// Retrieve all logs for a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (Logs) public async System.Threading.Tasks.Task GetTasksIDLogsAsyncWithIRestResponse(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->GetTasksIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDLogs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ResourceMembers public ResourceMembers GetTasksIDMembers(string taskID, string zapTraceSpan = null) { var localVarResponse = GetTasksIDMembersWithHttpInfo(taskID, zapTraceSpan); return localVarResponse.Data; } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceMembers public ApiResponse GetTasksIDMembersWithHttpInfo(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->GetTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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("GetTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMembers)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMembers))); } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ResourceMembers public async System.Threading.Tasks.Task GetTasksIDMembersWithIRestResponseAsync(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->GetTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceMembers public RestResponse GetTasksIDMembersWithIRestResponse(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->GetTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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("GetTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceMembers public RestRequest GetTasksIDMembersWithRestRequest(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->GetTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceMembers public async System.Threading.Tasks.Task GetTasksIDMembersAsync(string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetTasksIDMembersAsyncWithHttpInfo(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceMembers) public async System.Threading.Tasks.Task> GetTasksIDMembersAsyncWithHttpInfo( string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetTasksIDMembersAsyncWithIRestResponse(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMembers)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMembers))); } /// /// List all task members /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ResourceMembers) public async System.Threading.Tasks.Task GetTasksIDMembersAsyncWithIRestResponse(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->GetTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ResourceOwners public ResourceOwners GetTasksIDOwners(string taskID, string zapTraceSpan = null) { var localVarResponse = GetTasksIDOwnersWithHttpInfo(taskID, zapTraceSpan); return localVarResponse.Data; } /// /// List all owners of a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public ApiResponse GetTasksIDOwnersWithHttpInfo(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->GetTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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("GetTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwners)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwners))); } /// /// List all owners of a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ResourceOwners public async System.Threading.Tasks.Task GetTasksIDOwnersWithIRestResponseAsync(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->GetTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public RestResponse GetTasksIDOwnersWithIRestResponse(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->GetTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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("GetTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public RestRequest GetTasksIDOwnersWithRestRequest(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->GetTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task GetTasksIDOwnersAsync(string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetTasksIDOwnersAsyncWithHttpInfo(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetTasksIDOwnersAsyncWithHttpInfo( string taskID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetTasksIDOwnersAsyncWithIRestResponse(taskID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwners)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwners))); } /// /// List all owners of a task /// /// Thrown when fails to make API call /// The task ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ResourceOwners) public async System.Threading.Tasks.Task GetTasksIDOwnersAsyncWithIRestResponse(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->GetTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public Runs GetTasksIDRuns(string taskID, string zapTraceSpan = null, string after = null, int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = null) { var localVarResponse = GetTasksIDRunsWithHttpInfo(taskID, zapTraceSpan, after, limit, afterTime, beforeTime); return localVarResponse.Data; } /// /// 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 public ApiResponse GetTasksIDRunsWithHttpInfo(string taskID, string zapTraceSpan = null, string after = null, int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->GetTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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 (after != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (afterTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "afterTime", afterTime)); // query parameter } if (beforeTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "beforeTime", beforeTime)); // 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("GetTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Runs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Runs))); } /// /// 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 /// ApiResponse of Runs public async System.Threading.Tasks.Task GetTasksIDRunsWithIRestResponseAsync(string taskID, string zapTraceSpan = null, string after = null, int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = 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->GetTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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 (after != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (afterTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "afterTime", afterTime)); // query parameter } if (beforeTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "beforeTime", beforeTime)); // 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("GetTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse GetTasksIDRunsWithIRestResponse(string taskID, string zapTraceSpan = null, string after = null, int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->GetTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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 (after != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (afterTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "afterTime", afterTime)); // query parameter } if (beforeTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "beforeTime", beforeTime)); // 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("GetTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest GetTasksIDRunsWithRestRequest(string taskID, string zapTraceSpan = null, string after = null, int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->GetTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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 (after != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (afterTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "afterTime", afterTime)); // query parameter } if (beforeTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "beforeTime", beforeTime)); // 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 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 public async 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) { var localVarResponse = await GetTasksIDRunsAsyncWithHttpInfo(taskID, zapTraceSpan, after, limit, afterTime, beforeTime, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async 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) { // make the HTTP request var localVarResponse = await GetTasksIDRunsAsyncWithIRestResponse(taskID, zapTraceSpan, after, limit, afterTime, beforeTime, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Runs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Runs))); } /// /// 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 RestResponse (Runs) public async System.Threading.Tasks.Task GetTasksIDRunsAsyncWithIRestResponse(string taskID, string zapTraceSpan = null, string after = null, int? limit = null, DateTime? afterTime = null, DateTime? beforeTime = 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->GetTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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 (after != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (afterTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "afterTime", afterTime)); // query parameter } if (beforeTime != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "beforeTime", beforeTime)); // 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("GetTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public Run GetTasksIDRunsID(string taskID, string runID, string zapTraceSpan = null) { var localVarResponse = GetTasksIDRunsIDWithHttpInfo(taskID, runID, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse GetTasksIDRunsIDWithHttpInfo(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->GetTasksIDRunsID"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsID"); } 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Run)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); } /// /// 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 /// ApiResponse of Run public async System.Threading.Tasks.Task GetTasksIDRunsIDWithIRestResponseAsync(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->GetTasksIDRunsID"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsID"); } 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse GetTasksIDRunsIDWithIRestResponse(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->GetTasksIDRunsID"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsID"); } 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest GetTasksIDRunsIDWithRestRequest(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->GetTasksIDRunsID"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsID"); } 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task GetTasksIDRunsIDAsync(string taskID, string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetTasksIDRunsIDAsyncWithHttpInfo(taskID, runID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetTasksIDRunsIDAsyncWithHttpInfo(string taskID, string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetTasksIDRunsIDAsyncWithIRestResponse(taskID, runID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Run)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); } /// /// 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 RestResponse (Run) public async System.Threading.Tasks.Task GetTasksIDRunsIDAsyncWithIRestResponse(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->GetTasksIDRunsID"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsID"); } 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public Logs GetTasksIDRunsIDLogs(string taskID, string runID, string zapTraceSpan = null) { var localVarResponse = GetTasksIDRunsIDLogsWithHttpInfo(taskID, runID, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse GetTasksIDRunsIDLogsWithHttpInfo(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->GetTasksIDRunsIDLogs"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsIDLogs", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Logs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Logs))); } /// /// 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 /// ApiResponse of Logs public async System.Threading.Tasks.Task GetTasksIDRunsIDLogsWithIRestResponseAsync(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->GetTasksIDRunsIDLogs"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsIDLogs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse GetTasksIDRunsIDLogsWithIRestResponse(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->GetTasksIDRunsIDLogs"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsIDLogs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest GetTasksIDRunsIDLogsWithRestRequest(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->GetTasksIDRunsIDLogs"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task GetTasksIDRunsIDLogsAsync(string taskID, string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetTasksIDRunsIDLogsAsyncWithHttpInfo(taskID, runID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetTasksIDRunsIDLogsAsyncWithHttpInfo(string taskID, string runID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetTasksIDRunsIDLogsAsyncWithIRestResponse(taskID, runID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsIDLogs", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Logs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Logs))); } /// /// 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 RestResponse (Logs) public async System.Threading.Tasks.Task GetTasksIDRunsIDLogsAsyncWithIRestResponse(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->GetTasksIDRunsIDLogs"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->GetTasksIDRunsIDLogs"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/logs"; 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.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetTasksIDRunsIDLogs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public TaskType PatchTasksID(string taskID, TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null) { var localVarResponse = PatchTasksIDWithHttpInfo(taskID, taskUpdateRequest, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse PatchTasksIDWithHttpInfo(string taskID, TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PatchTasksID"); } // verify the required parameter 'taskUpdateRequest' is set if (taskUpdateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskUpdateRequest' when calling TasksService->PatchTasksID"); } 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[] { "application/json" }; 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 } if (taskUpdateRequest != null && taskUpdateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskUpdateRequest); // http body (model) parameter } else { localVarPostBody = taskUpdateRequest; // byte array } // 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.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchTasksID", 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))); } /// /// 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 /// ApiResponse of TaskType public async System.Threading.Tasks.Task PatchTasksIDWithIRestResponseAsync(string taskID, TaskUpdateRequest taskUpdateRequest, 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->PatchTasksID"); } // verify the required parameter 'taskUpdateRequest' is set if (taskUpdateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskUpdateRequest' when calling TasksService->PatchTasksID"); } 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[] { "application/json" }; 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 } if (taskUpdateRequest != null && taskUpdateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskUpdateRequest); // http body (model) parameter } else { localVarPostBody = taskUpdateRequest; // byte array } // 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.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchTasksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PatchTasksIDWithIRestResponse(string taskID, TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PatchTasksID"); } // verify the required parameter 'taskUpdateRequest' is set if (taskUpdateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskUpdateRequest' when calling TasksService->PatchTasksID"); } 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[] { "application/json" }; 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 } if (taskUpdateRequest != null && taskUpdateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskUpdateRequest); // http body (model) parameter } else { localVarPostBody = taskUpdateRequest; // byte array } // 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.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchTasksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PatchTasksIDWithRestRequest(string taskID, TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PatchTasksID"); } // verify the required parameter 'taskUpdateRequest' is set if (taskUpdateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskUpdateRequest' when calling TasksService->PatchTasksID"); } 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[] { "application/json" }; 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 } if (taskUpdateRequest != null && taskUpdateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskUpdateRequest); // http body (model) parameter } else { localVarPostBody = taskUpdateRequest; // byte array } // 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.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task PatchTasksIDAsync(string taskID, TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PatchTasksIDAsyncWithHttpInfo(taskID, taskUpdateRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PatchTasksIDAsyncWithHttpInfo(string taskID, TaskUpdateRequest taskUpdateRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PatchTasksIDAsyncWithIRestResponse(taskID, taskUpdateRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchTasksID", 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))); } /// /// 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 RestResponse (TaskType) public async System.Threading.Tasks.Task PatchTasksIDAsyncWithIRestResponse(string taskID, TaskUpdateRequest taskUpdateRequest, 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->PatchTasksID"); } // verify the required parameter 'taskUpdateRequest' is set if (taskUpdateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskUpdateRequest' when calling TasksService->PatchTasksID"); } 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[] { "application/json" }; 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 } if (taskUpdateRequest != null && taskUpdateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskUpdateRequest); // http body (model) parameter } else { localVarPostBody = taskUpdateRequest; // byte array } // 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.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchTasksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// TaskType public TaskType PostTasks(TaskCreateRequest taskCreateRequest, string zapTraceSpan = null) { var localVarResponse = PostTasksWithHttpInfo(taskCreateRequest, zapTraceSpan); return localVarResponse.Data; } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// ApiResponse of TaskType public ApiResponse PostTasksWithHttpInfo(TaskCreateRequest taskCreateRequest, string zapTraceSpan = null) { // verify the required parameter 'taskCreateRequest' is set if (taskCreateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskCreateRequest' when calling TasksService->PostTasks"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (taskCreateRequest != null && taskCreateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskCreateRequest); // http body (model) parameter } else { localVarPostBody = taskCreateRequest; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasks", 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))); } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of TaskType public async System.Threading.Tasks.Task PostTasksWithIRestResponseAsync( TaskCreateRequest taskCreateRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'taskCreateRequest' is set if (taskCreateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskCreateRequest' when calling TasksService->PostTasks"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (taskCreateRequest != null && taskCreateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskCreateRequest); // http body (model) parameter } else { localVarPostBody = taskCreateRequest; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasks", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// ApiResponse of TaskType public RestResponse PostTasksWithIRestResponse(TaskCreateRequest taskCreateRequest, string zapTraceSpan = null) { // verify the required parameter 'taskCreateRequest' is set if (taskCreateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskCreateRequest' when calling TasksService->PostTasks"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (taskCreateRequest != null && taskCreateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskCreateRequest); // http body (model) parameter } else { localVarPostBody = taskCreateRequest; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasks", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// ApiResponse of TaskType public RestRequest PostTasksWithRestRequest(TaskCreateRequest taskCreateRequest, string zapTraceSpan = null) { // verify the required parameter 'taskCreateRequest' is set if (taskCreateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskCreateRequest' when calling TasksService->PostTasks"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (taskCreateRequest != null && taskCreateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskCreateRequest); // http body (model) parameter } else { localVarPostBody = taskCreateRequest; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// Cancellation token /// Task of TaskType public async System.Threading.Tasks.Task PostTasksAsync(TaskCreateRequest taskCreateRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostTasksAsyncWithHttpInfo(taskCreateRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (TaskType) public async System.Threading.Tasks.Task> PostTasksAsyncWithHttpInfo( TaskCreateRequest taskCreateRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostTasksAsyncWithIRestResponse(taskCreateRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasks", 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))); } /// /// Create a new task /// /// Thrown when fails to make API call /// Task to create /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (TaskType) public async System.Threading.Tasks.Task PostTasksAsyncWithIRestResponse( TaskCreateRequest taskCreateRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'taskCreateRequest' is set if (taskCreateRequest == null) { throw new ApiException(400, "Missing required parameter 'taskCreateRequest' when calling TasksService->PostTasks"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (taskCreateRequest != null && taskCreateRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(taskCreateRequest); // http body (model) parameter } else { localVarPostBody = taskCreateRequest; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasks", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a task /// /// Thrown when fails to make API call /// The task ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse public LabelResponse PostTasksIDLabels(string taskID, LabelMapping labelMapping, string zapTraceSpan = null) { var localVarResponse = PostTasksIDLabelsWithHttpInfo(taskID, labelMapping, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse PostTasksIDLabelsWithHttpInfo(string taskID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling TasksService->PostTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelResponse))); } /// /// 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 /// ApiResponse of LabelResponse public async System.Threading.Tasks.Task PostTasksIDLabelsWithIRestResponseAsync(string taskID, LabelMapping labelMapping, 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->PostTasksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling TasksService->PostTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PostTasksIDLabelsWithIRestResponse(string taskID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling TasksService->PostTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PostTasksIDLabelsWithRestRequest(string taskID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling TasksService->PostTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task PostTasksIDLabelsAsync(string taskID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostTasksIDLabelsAsyncWithHttpInfo(taskID, labelMapping, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostTasksIDLabelsAsyncWithHttpInfo( string taskID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostTasksIDLabelsAsyncWithIRestResponse(taskID, labelMapping, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelResponse))); } /// /// 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 RestResponse (LabelResponse) public async System.Threading.Tasks.Task PostTasksIDLabelsAsyncWithIRestResponse(string taskID, LabelMapping labelMapping, 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->PostTasksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling TasksService->PostTasksIDLabels"); } var localVarPath = "/api/v2/tasks/{taskID}/labels"; 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public ResourceMember PostTasksIDMembers(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { var localVarResponse = PostTasksIDMembersWithHttpInfo(taskID, addResourceMemberRequestBody, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse PostTasksIDMembersWithHttpInfo(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMember)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMember))); } /// /// 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 /// ApiResponse of ResourceMember public async System.Threading.Tasks.Task PostTasksIDMembersWithIRestResponseAsync(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostTasksIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PostTasksIDMembersWithIRestResponse(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PostTasksIDMembersWithRestRequest(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task PostTasksIDMembersAsync(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostTasksIDMembersAsyncWithHttpInfo(taskID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostTasksIDMembersAsyncWithHttpInfo( string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostTasksIDMembersAsyncWithIRestResponse(taskID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMember)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMember))); } /// /// 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 RestResponse (ResourceMember) public async System.Threading.Tasks.Task PostTasksIDMembersAsyncWithIRestResponse(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostTasksIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDMembers"); } var localVarPath = "/api/v2/tasks/{taskID}/members"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public ResourceOwner PostTasksIDOwners(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { var localVarResponse = PostTasksIDOwnersWithHttpInfo(taskID, addResourceMemberRequestBody, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse PostTasksIDOwnersWithHttpInfo(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwner)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwner))); } /// /// 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 /// ApiResponse of ResourceOwner public async System.Threading.Tasks.Task PostTasksIDOwnersWithIRestResponseAsync(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostTasksIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PostTasksIDOwnersWithIRestResponse(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PostTasksIDOwnersWithRestRequest(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task PostTasksIDOwnersAsync(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostTasksIDOwnersAsyncWithHttpInfo(taskID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostTasksIDOwnersAsyncWithHttpInfo( string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostTasksIDOwnersAsyncWithIRestResponse(taskID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwner)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwner))); } /// /// 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 RestResponse (ResourceOwner) public async System.Threading.Tasks.Task PostTasksIDOwnersAsyncWithIRestResponse(string taskID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostTasksIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling TasksService->PostTasksIDOwners"); } var localVarPath = "/api/v2/tasks/{taskID}/owners"; 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[] { "application/json" }; 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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Manually start a task run, overriding the current schedule /// /// Thrown when fails to make API call /// /// OpenTracing span context (optional) /// (optional) /// Run public Run PostTasksIDRuns(string taskID, string zapTraceSpan = null, RunManually runManually = null) { var localVarResponse = PostTasksIDRunsWithHttpInfo(taskID, zapTraceSpan, runManually); return localVarResponse.Data; } /// /// Manually start a task run, overriding the current schedule /// /// Thrown when fails to make API call /// /// OpenTracing span context (optional) /// (optional) /// ApiResponse of Run public ApiResponse PostTasksIDRunsWithHttpInfo(string taskID, string zapTraceSpan = null, RunManually runManually = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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[] { "application/json" }; 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 } if (runManually != null && runManually.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(runManually); // http body (model) parameter } else { localVarPostBody = runManually; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Run)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); } /// /// Manually start a task run, overriding the current schedule /// /// Thrown when fails to make API call /// /// OpenTracing span context (optional) /// (optional) /// Cancellation token /// ApiResponse of Run public async System.Threading.Tasks.Task PostTasksIDRunsWithIRestResponseAsync(string taskID, string zapTraceSpan = null, RunManually runManually = 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->PostTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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[] { "application/json" }; 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 } if (runManually != null && runManually.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(runManually); // http body (model) parameter } else { localVarPostBody = runManually; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Manually start a task run, overriding the current schedule /// /// Thrown when fails to make API call /// /// OpenTracing span context (optional) /// (optional) /// ApiResponse of Run public RestResponse PostTasksIDRunsWithIRestResponse(string taskID, string zapTraceSpan = null, RunManually runManually = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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[] { "application/json" }; 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 } if (runManually != null && runManually.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(runManually); // http body (model) parameter } else { localVarPostBody = runManually; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Manually start a task run, overriding the current schedule /// /// Thrown when fails to make API call /// /// OpenTracing span context (optional) /// (optional) /// ApiResponse of Run public RestRequest PostTasksIDRunsWithRestRequest(string taskID, string zapTraceSpan = null, RunManually runManually = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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[] { "application/json" }; 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 } if (runManually != null && runManually.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(runManually); // http body (model) parameter } else { localVarPostBody = runManually; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task PostTasksIDRunsAsync(string taskID, string zapTraceSpan = null, RunManually runManually = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostTasksIDRunsAsyncWithHttpInfo(taskID, zapTraceSpan, runManually, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostTasksIDRunsAsyncWithHttpInfo(string taskID, string zapTraceSpan = null, RunManually runManually = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostTasksIDRunsAsyncWithIRestResponse(taskID, zapTraceSpan, runManually, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Run)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); } /// /// 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 RestResponse (Run) public async System.Threading.Tasks.Task PostTasksIDRunsAsyncWithIRestResponse(string taskID, string zapTraceSpan = null, RunManually runManually = 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->PostTasksIDRuns"); } var localVarPath = "/api/v2/tasks/{taskID}/runs"; 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[] { "application/json" }; 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 } if (runManually != null && runManually.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(runManually); // http body (model) parameter } else { localVarPostBody = runManually; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRuns", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retry a task run /// /// Thrown when fails to make API call /// The task ID. /// The run ID. /// OpenTracing span context (optional) /// (optional) /// Run public Run PostTasksIDRunsIDRetry(string taskID, string runID, string zapTraceSpan = null, string body = null) { var localVarResponse = PostTasksIDRunsIDRetryWithHttpInfo(taskID, runID, zapTraceSpan, body); return localVarResponse.Data; } /// /// 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 public ApiResponse PostTasksIDRunsIDRetryWithHttpInfo(string taskID, string runID, string zapTraceSpan = null, string body = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDRunsIDRetry"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->PostTasksIDRunsIDRetry"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/retry"; 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[] { "application/json; charset=utf-8" }; 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 } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRunsIDRetry", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Run)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); } /// /// Retry a task run /// /// Thrown when fails to make API call /// The task ID. /// The run ID. /// OpenTracing span context (optional) /// (optional) /// Cancellation token /// ApiResponse of Run public async System.Threading.Tasks.Task PostTasksIDRunsIDRetryWithIRestResponseAsync( string taskID, string runID, string zapTraceSpan = null, string body = 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->PostTasksIDRunsIDRetry"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->PostTasksIDRunsIDRetry"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/retry"; 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[] { "application/json; charset=utf-8" }; 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 } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRunsIDRetry", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PostTasksIDRunsIDRetryWithIRestResponse(string taskID, string runID, string zapTraceSpan = null, string body = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDRunsIDRetry"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->PostTasksIDRunsIDRetry"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/retry"; 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[] { "application/json; charset=utf-8" }; 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 } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRunsIDRetry", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PostTasksIDRunsIDRetryWithRestRequest(string taskID, string runID, string zapTraceSpan = null, string body = null) { // verify the required parameter 'taskID' is set if (taskID == null) { throw new ApiException(400, "Missing required parameter 'taskID' when calling TasksService->PostTasksIDRunsIDRetry"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->PostTasksIDRunsIDRetry"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/retry"; 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[] { "application/json; charset=utf-8" }; 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 } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task PostTasksIDRunsIDRetryAsync(string taskID, string runID, string zapTraceSpan = null, string body = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostTasksIDRunsIDRetryAsyncWithHttpInfo(taskID, runID, zapTraceSpan, body, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostTasksIDRunsIDRetryAsyncWithHttpInfo( string taskID, string runID, string zapTraceSpan = null, string body = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostTasksIDRunsIDRetryAsyncWithIRestResponse(taskID, runID, zapTraceSpan, body, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRunsIDRetry", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Run)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Run))); } /// /// 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 RestResponse (Run) public async System.Threading.Tasks.Task PostTasksIDRunsIDRetryAsyncWithIRestResponse( string taskID, string runID, string zapTraceSpan = null, string body = 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->PostTasksIDRunsIDRetry"); } // verify the required parameter 'runID' is set if (runID == null) { throw new ApiException(400, "Missing required parameter 'runID' when calling TasksService->PostTasksIDRunsIDRetry"); } var localVarPath = "/api/v2/tasks/{taskID}/runs/{runID}/retry"; 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[] { "application/json; charset=utf-8" }; 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 } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // 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.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostTasksIDRunsIDRetry", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } } }