/* * 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 IChecksService : IApiAccessor { #region Synchronous Operations /// /// Add new check /// /// /// /// /// Thrown when fails to make API call /// Check to create /// Check Check CreateCheck(Check check); /// /// Add new check /// /// /// /// /// Thrown when fails to make API call /// Check to create /// ApiResponse of Check ApiResponse CreateCheckWithHttpInfo(Check check); /// /// Delete a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// void DeleteChecksID(string checkID, string zapTraceSpan = null); /// /// Delete a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteChecksIDWithHttpInfo(string checkID, string zapTraceSpan = null); /// /// Delete label from a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// void DeleteChecksIDLabelsID(string checkID, string labelID, string zapTraceSpan = null); /// /// Delete label from a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteChecksIDLabelsIDWithHttpInfo(string checkID, string labelID, string zapTraceSpan = null); /// /// List all checks /// /// /// /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Checks Checks GetChecks(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null); /// /// List all checks /// /// /// /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of Checks ApiResponse GetChecksWithHttpInfo(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null); /// /// Retrieve a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Check Check GetChecksID(string checkID, string zapTraceSpan = null); /// /// Retrieve a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Check ApiResponse GetChecksIDWithHttpInfo(string checkID, string zapTraceSpan = null); /// /// List all labels for a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// LabelsResponse LabelsResponse GetChecksIDLabels(string checkID, string zapTraceSpan = null); /// /// List all labels for a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse ApiResponse GetChecksIDLabelsWithHttpInfo(string checkID, string zapTraceSpan = null); /// /// Retrieve a check query /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// FluxResponse FluxResponse GetChecksIDQuery(string checkID, string zapTraceSpan = null); /// /// Retrieve a check query /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of FluxResponse ApiResponse GetChecksIDQueryWithHttpInfo(string checkID, string zapTraceSpan = null); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Check Check PatchChecksID(string checkID, CheckPatch checkPatch, string zapTraceSpan = null); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check ApiResponse PatchChecksIDWithHttpInfo(string checkID, CheckPatch checkPatch, string zapTraceSpan = null); /// /// Add a label to a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse LabelResponse PostChecksIDLabels(string checkID, LabelMapping labelMapping, string zapTraceSpan = null); /// /// Add a label to a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse ApiResponse PostChecksIDLabelsWithHttpInfo(string checkID, LabelMapping labelMapping, string zapTraceSpan = null); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Check Check PutChecksID(string checkID, Check check, string zapTraceSpan = null); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check ApiResponse PutChecksIDWithHttpInfo(string checkID, Check check, string zapTraceSpan = null); #endregion Synchronous Operations #region Asynchronous Operations /// /// Add new check /// /// /// /// /// Thrown when fails to make API call /// Check to create /// Cancellation token /// Task of Check System.Threading.Tasks.Task CreateCheckAsync(Check check, CancellationToken cancellationToken = default); /// /// Add new check /// /// /// /// /// Thrown when fails to make API call /// Check to create /// Cancellation token /// Task of ApiResponse (Check) System.Threading.Tasks.Task> CreateCheckAsyncWithHttpInfo(Check check, CancellationToken cancellationToken = default); /// /// Delete a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteChecksIDAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteChecksIDAsyncWithHttpInfo(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete label from a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteChecksIDLabelsIDAsync(string checkID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete label from a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteChecksIDLabelsIDAsyncWithHttpInfo(string checkID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all checks /// /// /// /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of Checks System.Threading.Tasks.Task GetChecksAsync(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default); /// /// List all checks /// /// /// /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of ApiResponse (Checks) System.Threading.Tasks.Task> GetChecksAsyncWithHttpInfo(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default); /// /// Retrieve a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of Check System.Threading.Tasks.Task GetChecksIDAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Retrieve a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (Check) System.Threading.Tasks.Task> GetChecksIDAsyncWithHttpInfo(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all labels for a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelsResponse System.Threading.Tasks.Task GetChecksIDLabelsAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all labels for a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelsResponse) System.Threading.Tasks.Task> GetChecksIDLabelsAsyncWithHttpInfo(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Retrieve a check query /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of FluxResponse System.Threading.Tasks.Task GetChecksIDQueryAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Retrieve a check query /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (FluxResponse) System.Threading.Tasks.Task> GetChecksIDQueryAsyncWithHttpInfo(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of Check System.Threading.Tasks.Task PatchChecksIDAsync(string checkID, CheckPatch checkPatch, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (Check) System.Threading.Tasks.Task> PatchChecksIDAsyncWithHttpInfo(string checkID, CheckPatch checkPatch, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a label to a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelResponse System.Threading.Tasks.Task PostChecksIDLabelsAsync(string checkID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a label to a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelResponse) System.Threading.Tasks.Task> PostChecksIDLabelsAsyncWithHttpInfo(string checkID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of Check System.Threading.Tasks.Task PutChecksIDAsync(string checkID, Check check, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a check /// /// /// /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (Check) System.Threading.Tasks.Task> PutChecksIDAsyncWithHttpInfo(string checkID, Check check, string zapTraceSpan = null, CancellationToken cancellationToken = default); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class ChecksService : IChecksService { private ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. /// /// public ChecksService(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 ChecksService(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); } /// /// Add new check /// /// Thrown when fails to make API call /// Check to create /// Check public Check CreateCheck(Check check) { var localVarResponse = CreateCheckWithHttpInfo(check); return localVarResponse.Data; } /// /// Add new check /// /// Thrown when fails to make API call /// Check to create /// ApiResponse of Check public ApiResponse CreateCheckWithHttpInfo(Check check) { // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->CreateCheck"); } var localVarPath = "/api/v2/checks"; 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 (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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("CreateCheck", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Add new check /// /// Thrown when fails to make API call /// Check to create /// Cancellation token /// ApiResponse of Check public async System.Threading.Tasks.Task CreateCheckWithIRestResponseAsync(Check check, CancellationToken cancellationToken = default) { // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->CreateCheck"); } var localVarPath = "/api/v2/checks"; 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 (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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("CreateCheck", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add new check /// /// Thrown when fails to make API call /// Check to create /// ApiResponse of Check public RestResponse CreateCheckWithIRestResponse(Check check) { // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->CreateCheck"); } var localVarPath = "/api/v2/checks"; 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 (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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("CreateCheck", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add new check /// /// Thrown when fails to make API call /// Check to create /// ApiResponse of Check public RestRequest CreateCheckWithRestRequest(Check check) { // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->CreateCheck"); } var localVarPath = "/api/v2/checks"; 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 (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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 new check /// /// Thrown when fails to make API call /// Check to create /// Cancellation token /// Task of Check public async System.Threading.Tasks.Task CreateCheckAsync(Check check, CancellationToken cancellationToken = default) { var localVarResponse = await CreateCheckAsyncWithHttpInfo(check, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Add new check /// /// Thrown when fails to make API call /// Check to create /// Cancellation token /// Task of ApiResponse (Check) public async System.Threading.Tasks.Task> CreateCheckAsyncWithHttpInfo(Check check, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await CreateCheckAsyncWithIRestResponse(check, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("CreateCheck", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Add new check /// /// Thrown when fails to make API call /// Check to create /// Cancellation token /// Task of RestResponse (Check) public async System.Threading.Tasks.Task CreateCheckAsyncWithIRestResponse(Check check, CancellationToken cancellationToken = default) { // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->CreateCheck"); } var localVarPath = "/api/v2/checks"; 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 (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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("CreateCheck", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// public void DeleteChecksID(string checkID, string zapTraceSpan = null) { DeleteChecksIDWithHttpInfo(checkID, zapTraceSpan); } /// /// Delete a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteChecksIDWithHttpInfo(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteChecksIDWithIRestResponseAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteChecksIDWithIRestResponse(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteChecksIDWithRestRequest(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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 check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteChecksIDAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteChecksIDAsyncWithHttpInfo(checkID, zapTraceSpan, cancellationToken); } /// /// Delete a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteChecksIDAsyncWithHttpInfo(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteChecksIDAsyncWithIRestResponse(checkID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteChecksIDAsyncWithIRestResponse(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// public void DeleteChecksIDLabelsID(string checkID, string labelID, string zapTraceSpan = null) { DeleteChecksIDLabelsIDWithHttpInfo(checkID, labelID, zapTraceSpan); } /// /// Delete label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteChecksIDLabelsIDWithHttpInfo(string checkID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ChecksService->DeleteChecksIDLabelsID"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteChecksIDLabelsIDWithIRestResponseAsync( string checkID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ChecksService->DeleteChecksIDLabelsID"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteChecksIDLabelsIDWithIRestResponse(string checkID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ChecksService->DeleteChecksIDLabelsID"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteChecksIDLabelsIDWithRestRequest(string checkID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ChecksService->DeleteChecksIDLabelsID"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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 label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteChecksIDLabelsIDAsync(string checkID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteChecksIDLabelsIDAsyncWithHttpInfo(checkID, labelID, zapTraceSpan, cancellationToken); } /// /// Delete label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteChecksIDLabelsIDAsyncWithHttpInfo( string checkID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteChecksIDLabelsIDAsyncWithIRestResponse(checkID, labelID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteChecksIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete label from a check /// /// Thrown when fails to make API call /// The check ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteChecksIDLabelsIDAsyncWithIRestResponse( string checkID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->DeleteChecksIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ChecksService->DeleteChecksIDLabelsID"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("DeleteChecksIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Checks public Checks GetChecks(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { var localVarResponse = GetChecksWithHttpInfo(orgID, zapTraceSpan, offset, limit); return localVarResponse.Data; } /// /// List all checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of Checks public ApiResponse GetChecksWithHttpInfo(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling ChecksService->GetChecks"); } var localVarPath = "/api/v2/checks"; 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 (offset != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetChecks", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Checks)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Checks))); } /// /// List all checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// ApiResponse of Checks public async System.Threading.Tasks.Task GetChecksWithIRestResponseAsync(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling ChecksService->GetChecks"); } var localVarPath = "/api/v2/checks"; 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 (offset != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetChecks", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of Checks public RestResponse GetChecksWithIRestResponse(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling ChecksService->GetChecks"); } var localVarPath = "/api/v2/checks"; 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 (offset != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetChecks", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of Checks public RestRequest GetChecksWithRestRequest(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling ChecksService->GetChecks"); } var localVarPath = "/api/v2/checks"; 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 (offset != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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 checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of Checks public async System.Threading.Tasks.Task GetChecksAsync(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetChecksAsyncWithHttpInfo(orgID, zapTraceSpan, offset, limit, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of ApiResponse (Checks) public async System.Threading.Tasks.Task> GetChecksAsyncWithHttpInfo(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetChecksAsyncWithIRestResponse(orgID, zapTraceSpan, offset, limit, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetChecks", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Checks)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Checks))); } /// /// List all checks /// /// Thrown when fails to make API call /// Only show checks that belong to a specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of RestResponse (Checks) public async System.Threading.Tasks.Task GetChecksAsyncWithIRestResponse(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling ChecksService->GetChecks"); } var localVarPath = "/api/v2/checks"; 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 (offset != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter } if (limit != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetChecks", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Check public Check GetChecksID(string checkID, string zapTraceSpan = null) { var localVarResponse = GetChecksIDWithHttpInfo(checkID, zapTraceSpan); return localVarResponse.Data; } /// /// Retrieve a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Check public ApiResponse GetChecksIDWithHttpInfo(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Retrieve a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Check public async System.Threading.Tasks.Task GetChecksIDWithIRestResponseAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Check public RestResponse GetChecksIDWithIRestResponse(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of Check public RestRequest GetChecksIDWithRestRequest(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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 check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of Check public async System.Threading.Tasks.Task GetChecksIDAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetChecksIDAsyncWithHttpInfo(checkID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Retrieve a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (Check) public async System.Threading.Tasks.Task> GetChecksIDAsyncWithHttpInfo(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetChecksIDAsyncWithIRestResponse(checkID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Retrieve a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (Check) public async System.Threading.Tasks.Task GetChecksIDAsyncWithIRestResponse(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// LabelsResponse public LabelsResponse GetChecksIDLabels(string checkID, string zapTraceSpan = null) { var localVarResponse = GetChecksIDLabelsWithHttpInfo(checkID, zapTraceSpan); return localVarResponse.Data; } /// /// List all labels for a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public ApiResponse GetChecksIDLabelsWithHttpInfo(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDLabels", 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 check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelsResponse public async System.Threading.Tasks.Task GetChecksIDLabelsWithIRestResponseAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestResponse GetChecksIDLabelsWithIRestResponse(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestRequest GetChecksIDLabelsWithRestRequest(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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 check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelsResponse public async System.Threading.Tasks.Task GetChecksIDLabelsAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetChecksIDLabelsAsyncWithHttpInfo(checkID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all labels for a check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelsResponse) public async System.Threading.Tasks.Task> GetChecksIDLabelsAsyncWithHttpInfo( string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetChecksIDLabelsAsyncWithIRestResponse(checkID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetChecksIDLabels", 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 check /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelsResponse) public async System.Threading.Tasks.Task GetChecksIDLabelsAsyncWithIRestResponse(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// FluxResponse public FluxResponse GetChecksIDQuery(string checkID, string zapTraceSpan = null) { var localVarResponse = GetChecksIDQueryWithHttpInfo(checkID, zapTraceSpan); return localVarResponse.Data; } /// /// Retrieve a check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of FluxResponse public ApiResponse GetChecksIDQueryWithHttpInfo(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDQuery"); } var localVarPath = "/api/v2/checks/{checkID}/query"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDQuery", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (FluxResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(FluxResponse))); } /// /// Retrieve a check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of FluxResponse public async System.Threading.Tasks.Task GetChecksIDQueryWithIRestResponseAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDQuery"); } var localVarPath = "/api/v2/checks/{checkID}/query"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDQuery", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of FluxResponse public RestResponse GetChecksIDQueryWithIRestResponse(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDQuery"); } var localVarPath = "/api/v2/checks/{checkID}/query"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDQuery", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// ApiResponse of FluxResponse public RestRequest GetChecksIDQueryWithRestRequest(string checkID, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDQuery"); } var localVarPath = "/api/v2/checks/{checkID}/query"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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 check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of FluxResponse public async System.Threading.Tasks.Task GetChecksIDQueryAsync(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetChecksIDQueryAsyncWithHttpInfo(checkID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Retrieve a check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (FluxResponse) public async System.Threading.Tasks.Task> GetChecksIDQueryAsyncWithHttpInfo( string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetChecksIDQueryAsyncWithIRestResponse(checkID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetChecksIDQuery", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (FluxResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(FluxResponse))); } /// /// Retrieve a check query /// /// Thrown when fails to make API call /// The check ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (FluxResponse) public async System.Threading.Tasks.Task GetChecksIDQueryAsyncWithIRestResponse(string checkID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->GetChecksIDQuery"); } var localVarPath = "/api/v2/checks/{checkID}/query"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("GetChecksIDQuery", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Check public Check PatchChecksID(string checkID, CheckPatch checkPatch, string zapTraceSpan = null) { var localVarResponse = PatchChecksIDWithHttpInfo(checkID, checkPatch, zapTraceSpan); return localVarResponse.Data; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check public ApiResponse PatchChecksIDWithHttpInfo(string checkID, CheckPatch checkPatch, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PatchChecksID"); } // verify the required parameter 'checkPatch' is set if (checkPatch == null) { throw new ApiException(400, "Missing required parameter 'checkPatch' when calling ChecksService->PatchChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (checkPatch != null && checkPatch.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(checkPatch); // http body (model) parameter } else { localVarPostBody = checkPatch; // 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("PatchChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Check public async System.Threading.Tasks.Task PatchChecksIDWithIRestResponseAsync(string checkID, CheckPatch checkPatch, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PatchChecksID"); } // verify the required parameter 'checkPatch' is set if (checkPatch == null) { throw new ApiException(400, "Missing required parameter 'checkPatch' when calling ChecksService->PatchChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (checkPatch != null && checkPatch.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(checkPatch); // http body (model) parameter } else { localVarPostBody = checkPatch; // 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("PatchChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check public RestResponse PatchChecksIDWithIRestResponse(string checkID, CheckPatch checkPatch, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PatchChecksID"); } // verify the required parameter 'checkPatch' is set if (checkPatch == null) { throw new ApiException(400, "Missing required parameter 'checkPatch' when calling ChecksService->PatchChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (checkPatch != null && checkPatch.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(checkPatch); // http body (model) parameter } else { localVarPostBody = checkPatch; // 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("PatchChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check public RestRequest PatchChecksIDWithRestRequest(string checkID, CheckPatch checkPatch, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PatchChecksID"); } // verify the required parameter 'checkPatch' is set if (checkPatch == null) { throw new ApiException(400, "Missing required parameter 'checkPatch' when calling ChecksService->PatchChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (checkPatch != null && checkPatch.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(checkPatch); // http body (model) parameter } else { localVarPostBody = checkPatch; // 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 check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of Check public async System.Threading.Tasks.Task PatchChecksIDAsync(string checkID, CheckPatch checkPatch, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PatchChecksIDAsyncWithHttpInfo(checkID, checkPatch, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (Check) public async System.Threading.Tasks.Task> PatchChecksIDAsyncWithHttpInfo(string checkID, CheckPatch checkPatch, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PatchChecksIDAsyncWithIRestResponse(checkID, checkPatch, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (Check) public async System.Threading.Tasks.Task PatchChecksIDAsyncWithIRestResponse(string checkID, CheckPatch checkPatch, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PatchChecksID"); } // verify the required parameter 'checkPatch' is set if (checkPatch == null) { throw new ApiException(400, "Missing required parameter 'checkPatch' when calling ChecksService->PatchChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (checkPatch != null && checkPatch.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(checkPatch); // http body (model) parameter } else { localVarPostBody = checkPatch; // 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("PatchChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse public LabelResponse PostChecksIDLabels(string checkID, LabelMapping labelMapping, string zapTraceSpan = null) { var localVarResponse = PostChecksIDLabelsWithHttpInfo(checkID, labelMapping, zapTraceSpan); return localVarResponse.Data; } /// /// Add a label to a check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public ApiResponse PostChecksIDLabelsWithHttpInfo(string checkID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PostChecksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ChecksService->PostChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("PostChecksIDLabels", 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 check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelResponse public async System.Threading.Tasks.Task PostChecksIDLabelsWithIRestResponseAsync(string checkID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PostChecksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ChecksService->PostChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("PostChecksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public RestResponse PostChecksIDLabelsWithIRestResponse(string checkID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PostChecksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ChecksService->PostChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("PostChecksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public RestRequest PostChecksIDLabelsWithRestRequest(string checkID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PostChecksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ChecksService->PostChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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 check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelResponse public async System.Threading.Tasks.Task PostChecksIDLabelsAsync(string checkID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostChecksIDLabelsAsyncWithHttpInfo(checkID, labelMapping, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Add a label to a check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelResponse) public async System.Threading.Tasks.Task> PostChecksIDLabelsAsyncWithHttpInfo( string checkID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostChecksIDLabelsAsyncWithIRestResponse(checkID, labelMapping, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostChecksIDLabels", 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 check /// /// Thrown when fails to make API call /// The check ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelResponse) public async System.Threading.Tasks.Task PostChecksIDLabelsAsyncWithIRestResponse(string checkID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PostChecksIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ChecksService->PostChecksIDLabels"); } var localVarPath = "/api/v2/checks/{checkID}/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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // 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("PostChecksIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Check public Check PutChecksID(string checkID, Check check, string zapTraceSpan = null) { var localVarResponse = PutChecksIDWithHttpInfo(checkID, check, zapTraceSpan); return localVarResponse.Data; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check public ApiResponse PutChecksIDWithHttpInfo(string checkID, Check check, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PutChecksID"); } // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->PutChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Check public async System.Threading.Tasks.Task PutChecksIDWithIRestResponseAsync(string checkID, Check check, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PutChecksID"); } // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->PutChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check public RestResponse PutChecksIDWithIRestResponse(string checkID, Check check, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PutChecksID"); } // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->PutChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of Check public RestRequest PutChecksIDWithRestRequest(string checkID, Check check, string zapTraceSpan = null) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PutChecksID"); } // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->PutChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of Check public async System.Threading.Tasks.Task PutChecksIDAsync(string checkID, Check check, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PutChecksIDAsyncWithHttpInfo(checkID, check, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (Check) public async System.Threading.Tasks.Task> PutChecksIDAsyncWithHttpInfo(string checkID, Check check, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PutChecksIDAsyncWithIRestResponse(checkID, check, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutChecksID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (Check)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Check))); } /// /// Update a check /// /// Thrown when fails to make API call /// The check ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (Check) public async System.Threading.Tasks.Task PutChecksIDAsyncWithIRestResponse(string checkID, Check check, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'checkID' is set if (checkID == null) { throw new ApiException(400, "Missing required parameter 'checkID' when calling ChecksService->PutChecksID"); } // verify the required parameter 'check' is set if (check == null) { throw new ApiException(400, "Missing required parameter 'check' when calling ChecksService->PutChecksID"); } var localVarPath = "/api/v2/checks/{checkID}"; 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 (checkID != null) { localVarPathParams.Add("checkID", Configuration.ApiClient.ParameterToString(checkID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (check != null && check.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(check); // http body (model) parameter } else { localVarPostBody = check; // 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.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PutChecksID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } } }