/*
* 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 ICellsService : IApiAccessor
{
#region Synchronous Operations
///
/// Delete a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
///
void DeleteDashboardsIDCellsID(string dashboardID, string cellID, string zapTraceSpan = null);
///
/// Delete a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteDashboardsIDCellsIDWithHttpInfo(string dashboardID, string cellID,
string zapTraceSpan = null);
///
/// Retrieve the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// View
View GetDashboardsIDCellsIDView(string dashboardID, string cellID, string zapTraceSpan = null);
///
/// Retrieve the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// ApiResponse of View
ApiResponse GetDashboardsIDCellsIDViewWithHttpInfo(string dashboardID, string cellID,
string zapTraceSpan = null);
///
/// Update the non-positional information related to a cell
///
///
/// Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cell
Cell PatchDashboardsIDCellsID(string dashboardID, string cellID, CellUpdate cellUpdate,
string zapTraceSpan = null);
///
/// Update the non-positional information related to a cell
///
///
/// Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Cell
ApiResponse PatchDashboardsIDCellsIDWithHttpInfo(string dashboardID, string cellID, CellUpdate cellUpdate,
string zapTraceSpan = null);
///
/// Update the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// View
View PatchDashboardsIDCellsIDView(string dashboardID, string cellID, View view, string zapTraceSpan = null);
///
/// Update the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of View
ApiResponse PatchDashboardsIDCellsIDViewWithHttpInfo(string dashboardID, string cellID, View view,
string zapTraceSpan = null);
///
/// Create a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cell
Cell PostDashboardsIDCells(string dashboardID, CreateCell createCell, string zapTraceSpan = null);
///
/// Create a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// ApiResponse of Cell
ApiResponse PostDashboardsIDCellsWithHttpInfo(string dashboardID, CreateCell createCell,
string zapTraceSpan = null);
///
/// Replace cells in a dashboard
///
///
/// Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Dashboard
Dashboard PutDashboardsIDCells(string dashboardID, List cell, string zapTraceSpan = null);
///
/// Replace cells in a dashboard
///
///
/// Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Dashboard
ApiResponse PutDashboardsIDCellsWithHttpInfo(string dashboardID, List cell,
string zapTraceSpan = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
/// Delete a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteDashboardsIDCellsIDAsync(string dashboardID, string cellID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Delete a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteDashboardsIDCellsIDAsyncWithHttpInfo(string dashboardID,
string cellID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Retrieve the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of View
System.Threading.Tasks.Task GetDashboardsIDCellsIDViewAsync(string dashboardID, string cellID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Retrieve the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (View)
System.Threading.Tasks.Task> GetDashboardsIDCellsIDViewAsyncWithHttpInfo(string dashboardID,
string cellID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Update the non-positional information related to a cell
///
///
/// Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Cell
System.Threading.Tasks.Task PatchDashboardsIDCellsIDAsync(string dashboardID, string cellID,
CellUpdate cellUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Update the non-positional information related to a cell
///
///
/// Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Cell)
System.Threading.Tasks.Task> PatchDashboardsIDCellsIDAsyncWithHttpInfo(string dashboardID,
string cellID, CellUpdate cellUpdate, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Update the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of View
System.Threading.Tasks.Task PatchDashboardsIDCellsIDViewAsync(string dashboardID, string cellID,
View view, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Update the view for a cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (View)
System.Threading.Tasks.Task> PatchDashboardsIDCellsIDViewAsyncWithHttpInfo(string dashboardID,
string cellID, View view, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Create a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Cell
System.Threading.Tasks.Task PostDashboardsIDCellsAsync(string dashboardID, CreateCell createCell,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Create a dashboard cell
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Cell)
System.Threading.Tasks.Task> PostDashboardsIDCellsAsyncWithHttpInfo(string dashboardID,
CreateCell createCell, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Replace cells in a dashboard
///
///
/// Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Dashboard
System.Threading.Tasks.Task PutDashboardsIDCellsAsync(string dashboardID, List cell,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Replace cells in a dashboard
///
///
/// Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Dashboard)
System.Threading.Tasks.Task> PutDashboardsIDCellsAsyncWithHttpInfo(string dashboardID,
List cell, string zapTraceSpan = null, CancellationToken cancellationToken = default);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class CellsService : ICellsService
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public CellsService(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 CellsService(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
{
Configuration = Configuration.Default;
}
else
{
Configuration = configuration;
}
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Gets the base path of the API client.
///
/// The base path
public string GetBasePath()
{
return Configuration.ApiClient.RestClientOptions.BaseUrl.ToString();
}
///
/// Sets the base path of the API client.
///
/// The base path
[Obsolete(
"SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(string basePath)
{
// do nothing
}
///
/// Gets or sets the configuration object
///
/// An instance of the Configuration
public Configuration Configuration { get; set; }
///
/// Provides a factory method hook for the creation of exceptions.
///
public ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set => _exceptionFactory = value;
}
///
/// Gets the default header.
///
/// Dictionary of HTTP header
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary DefaultHeader()
{
return new ReadOnlyDictionary(Configuration.DefaultHeader);
}
///
/// Add default header.
///
/// Header field name.
/// Header field value.
///
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
Configuration.AddDefaultHeader(key, value);
}
///
/// Delete a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
///
public void DeleteDashboardsIDCellsID(string dashboardID, string cellID, string zapTraceSpan = null)
{
DeleteDashboardsIDCellsIDWithHttpInfo(dashboardID, cellID, zapTraceSpan);
}
///
/// Delete a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteDashboardsIDCellsIDWithHttpInfo(string dashboardID, string cellID,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->DeleteDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->DeleteDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("DeleteDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteDashboardsIDCellsIDWithIRestResponseAsync(
string dashboardID, string cellID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->DeleteDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->DeleteDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("DeleteDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteDashboardsIDCellsIDWithIRestResponse(string dashboardID, string cellID,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->DeleteDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->DeleteDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("DeleteDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteDashboardsIDCellsIDWithRestRequest(string dashboardID, string cellID,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->DeleteDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->DeleteDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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 dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteDashboardsIDCellsIDAsync(string dashboardID, string cellID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteDashboardsIDCellsIDAsyncWithHttpInfo(dashboardID, cellID, zapTraceSpan, cancellationToken);
}
///
/// Delete a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteDashboardsIDCellsIDAsyncWithHttpInfo(
string dashboardID, string cellID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteDashboardsIDCellsIDAsyncWithIRestResponse(dashboardID, cellID, zapTraceSpan,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to delete.
/// The ID of the cell to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteDashboardsIDCellsIDAsyncWithIRestResponse(
string dashboardID, string cellID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->DeleteDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->DeleteDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("DeleteDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// View
public View GetDashboardsIDCellsIDView(string dashboardID, string cellID, string zapTraceSpan = null)
{
var localVarResponse = GetDashboardsIDCellsIDViewWithHttpInfo(dashboardID, cellID, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Retrieve the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// ApiResponse of View
public ApiResponse GetDashboardsIDCellsIDViewWithHttpInfo(string dashboardID, string cellID,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->GetDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->GetDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("GetDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(View)Configuration.ApiClient.Deserialize(localVarResponse, typeof(View)));
}
///
/// Retrieve the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of View
public async System.Threading.Tasks.Task GetDashboardsIDCellsIDViewWithIRestResponseAsync(
string dashboardID, string cellID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->GetDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->GetDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("GetDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// ApiResponse of View
public RestResponse GetDashboardsIDCellsIDViewWithIRestResponse(string dashboardID, string cellID,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->GetDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->GetDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("GetDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// ApiResponse of View
public RestRequest GetDashboardsIDCellsIDViewWithRestRequest(string dashboardID, string cellID,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->GetDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->GetDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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 the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of View
public async System.Threading.Tasks.Task GetDashboardsIDCellsIDViewAsync(string dashboardID,
string cellID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await GetDashboardsIDCellsIDViewAsyncWithHttpInfo(dashboardID, cellID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Retrieve the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (View)
public async System.Threading.Tasks.Task> GetDashboardsIDCellsIDViewAsyncWithHttpInfo(
string dashboardID, string cellID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await GetDashboardsIDCellsIDViewAsyncWithIRestResponse(dashboardID, cellID, zapTraceSpan,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(View)Configuration.ApiClient.Deserialize(localVarResponse, typeof(View)));
}
///
/// Retrieve the view for a cell
///
/// Thrown when fails to make API call
/// The dashboard ID.
/// The cell ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (View)
public async System.Threading.Tasks.Task GetDashboardsIDCellsIDViewAsyncWithIRestResponse(
string dashboardID, string cellID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->GetDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->GetDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // 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("GetDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Update the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cell
public Cell PatchDashboardsIDCellsID(string dashboardID, string cellID, CellUpdate cellUpdate,
string zapTraceSpan = null)
{
var localVarResponse = PatchDashboardsIDCellsIDWithHttpInfo(dashboardID, cellID, cellUpdate, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Update the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Cell
public ApiResponse PatchDashboardsIDCellsIDWithHttpInfo(string dashboardID, string cellID,
CellUpdate cellUpdate, string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellUpdate' is set
if (cellUpdate == null)
{
throw new ApiException(400,
"Missing required parameter 'cellUpdate' when calling CellsService->PatchDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cellUpdate != null && cellUpdate.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cellUpdate); // http body (model) parameter
}
else
{
localVarPostBody = cellUpdate; // 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("PatchDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Cell)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Cell)));
}
///
/// Update the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Cell
public async System.Threading.Tasks.Task PatchDashboardsIDCellsIDWithIRestResponseAsync(
string dashboardID, string cellID, CellUpdate cellUpdate, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellUpdate' is set
if (cellUpdate == null)
{
throw new ApiException(400,
"Missing required parameter 'cellUpdate' when calling CellsService->PatchDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cellUpdate != null && cellUpdate.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cellUpdate); // http body (model) parameter
}
else
{
localVarPostBody = cellUpdate; // 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("PatchDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Update the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Cell
public RestResponse PatchDashboardsIDCellsIDWithIRestResponse(string dashboardID, string cellID,
CellUpdate cellUpdate, string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellUpdate' is set
if (cellUpdate == null)
{
throw new ApiException(400,
"Missing required parameter 'cellUpdate' when calling CellsService->PatchDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cellUpdate != null && cellUpdate.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cellUpdate); // http body (model) parameter
}
else
{
localVarPostBody = cellUpdate; // 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("PatchDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Update the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Cell
public RestRequest PatchDashboardsIDCellsIDWithRestRequest(string dashboardID, string cellID,
CellUpdate cellUpdate, string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellUpdate' is set
if (cellUpdate == null)
{
throw new ApiException(400,
"Missing required parameter 'cellUpdate' when calling CellsService->PatchDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cellUpdate != null && cellUpdate.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cellUpdate); // http body (model) parameter
}
else
{
localVarPostBody = cellUpdate; // 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 the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Cell
public async System.Threading.Tasks.Task PatchDashboardsIDCellsIDAsync(string dashboardID, string cellID,
CellUpdate cellUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await PatchDashboardsIDCellsIDAsyncWithHttpInfo(dashboardID, cellID, cellUpdate, zapTraceSpan,
cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Update the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Cell)
public async System.Threading.Tasks.Task> PatchDashboardsIDCellsIDAsyncWithHttpInfo(
string dashboardID, string cellID, CellUpdate cellUpdate, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await PatchDashboardsIDCellsIDAsyncWithIRestResponse(dashboardID, cellID, cellUpdate, zapTraceSpan,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("PatchDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Cell)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Cell)));
}
///
/// Update the non-positional information related to a cell Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (Cell)
public async System.Threading.Tasks.Task PatchDashboardsIDCellsIDAsyncWithIRestResponse(
string dashboardID, string cellID, CellUpdate cellUpdate, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsID");
}
// verify the required parameter 'cellUpdate' is set
if (cellUpdate == null)
{
throw new ApiException(400,
"Missing required parameter 'cellUpdate' when calling CellsService->PatchDashboardsIDCellsID");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cellUpdate != null && cellUpdate.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cellUpdate); // http body (model) parameter
}
else
{
localVarPostBody = cellUpdate; // 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("PatchDashboardsIDCellsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Update the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// View
public View PatchDashboardsIDCellsIDView(string dashboardID, string cellID, View view,
string zapTraceSpan = null)
{
var localVarResponse = PatchDashboardsIDCellsIDViewWithHttpInfo(dashboardID, cellID, view, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Update the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of View
public ApiResponse PatchDashboardsIDCellsIDViewWithHttpInfo(string dashboardID, string cellID, View view,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'view' is set
if (view == null)
{
throw new ApiException(400,
"Missing required parameter 'view' when calling CellsService->PatchDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (view != null && view.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(view); // http body (model) parameter
}
else
{
localVarPostBody = view; // 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("PatchDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(View)Configuration.ApiClient.Deserialize(localVarResponse, typeof(View)));
}
///
/// Update the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of View
public async System.Threading.Tasks.Task PatchDashboardsIDCellsIDViewWithIRestResponseAsync(
string dashboardID, string cellID, View view, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'view' is set
if (view == null)
{
throw new ApiException(400,
"Missing required parameter 'view' when calling CellsService->PatchDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (view != null && view.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(view); // http body (model) parameter
}
else
{
localVarPostBody = view; // 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("PatchDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Update the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of View
public RestResponse PatchDashboardsIDCellsIDViewWithIRestResponse(string dashboardID, string cellID, View view,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'view' is set
if (view == null)
{
throw new ApiException(400,
"Missing required parameter 'view' when calling CellsService->PatchDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (view != null && view.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(view); // http body (model) parameter
}
else
{
localVarPostBody = view; // 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("PatchDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Update the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of View
public RestRequest PatchDashboardsIDCellsIDViewWithRestRequest(string dashboardID, string cellID, View view,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'view' is set
if (view == null)
{
throw new ApiException(400,
"Missing required parameter 'view' when calling CellsService->PatchDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (view != null && view.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(view); // http body (model) parameter
}
else
{
localVarPostBody = view; // 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 the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of View
public async System.Threading.Tasks.Task PatchDashboardsIDCellsIDViewAsync(string dashboardID,
string cellID, View view, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await PatchDashboardsIDCellsIDViewAsyncWithHttpInfo(dashboardID, cellID, view, zapTraceSpan,
cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Update the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (View)
public async System.Threading.Tasks.Task> PatchDashboardsIDCellsIDViewAsyncWithHttpInfo(
string dashboardID, string cellID, View view, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await PatchDashboardsIDCellsIDViewAsyncWithIRestResponse(dashboardID, cellID, view, zapTraceSpan,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("PatchDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(View)Configuration.ApiClient.Deserialize(localVarResponse, typeof(View)));
}
///
/// Update the view for a cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// The ID of the cell to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (View)
public async System.Threading.Tasks.Task PatchDashboardsIDCellsIDViewAsyncWithIRestResponse(
string dashboardID, string cellID, View view, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'cellID' is set
if (cellID == null)
{
throw new ApiException(400,
"Missing required parameter 'cellID' when calling CellsService->PatchDashboardsIDCellsIDView");
}
// verify the required parameter 'view' is set
if (view == null)
{
throw new ApiException(400,
"Missing required parameter 'view' when calling CellsService->PatchDashboardsIDCellsIDView");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells/{cellID}/view";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (cellID != null)
{
localVarPathParams.Add("cellID", Configuration.ApiClient.ParameterToString(cellID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (view != null && view.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(view); // http body (model) parameter
}
else
{
localVarPostBody = view; // 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("PatchDashboardsIDCellsIDView", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cell
public Cell PostDashboardsIDCells(string dashboardID, CreateCell createCell, string zapTraceSpan = null)
{
var localVarResponse = PostDashboardsIDCellsWithHttpInfo(dashboardID, createCell, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// ApiResponse of Cell
public ApiResponse PostDashboardsIDCellsWithHttpInfo(string dashboardID, CreateCell createCell,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PostDashboardsIDCells");
}
// verify the required parameter 'createCell' is set
if (createCell == null)
{
throw new ApiException(400,
"Missing required parameter 'createCell' when calling CellsService->PostDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (createCell != null && createCell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(createCell); // http body (model) parameter
}
else
{
localVarPostBody = createCell; // 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("PostDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Cell)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Cell)));
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Cell
public async System.Threading.Tasks.Task PostDashboardsIDCellsWithIRestResponseAsync(
string dashboardID, CreateCell createCell, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PostDashboardsIDCells");
}
// verify the required parameter 'createCell' is set
if (createCell == null)
{
throw new ApiException(400,
"Missing required parameter 'createCell' when calling CellsService->PostDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (createCell != null && createCell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(createCell); // http body (model) parameter
}
else
{
localVarPostBody = createCell; // 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("PostDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// ApiResponse of Cell
public RestResponse PostDashboardsIDCellsWithIRestResponse(string dashboardID, CreateCell createCell,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PostDashboardsIDCells");
}
// verify the required parameter 'createCell' is set
if (createCell == null)
{
throw new ApiException(400,
"Missing required parameter 'createCell' when calling CellsService->PostDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (createCell != null && createCell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(createCell); // http body (model) parameter
}
else
{
localVarPostBody = createCell; // 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("PostDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// ApiResponse of Cell
public RestRequest PostDashboardsIDCellsWithRestRequest(string dashboardID, CreateCell createCell,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PostDashboardsIDCells");
}
// verify the required parameter 'createCell' is set
if (createCell == null)
{
throw new ApiException(400,
"Missing required parameter 'createCell' when calling CellsService->PostDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (createCell != null && createCell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(createCell); // http body (model) parameter
}
else
{
localVarPostBody = createCell; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Cell
public async System.Threading.Tasks.Task PostDashboardsIDCellsAsync(string dashboardID,
CreateCell createCell, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await PostDashboardsIDCellsAsyncWithHttpInfo(dashboardID, createCell, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Cell)
public async System.Threading.Tasks.Task> PostDashboardsIDCellsAsyncWithHttpInfo(
string dashboardID, CreateCell createCell, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await PostDashboardsIDCellsAsyncWithIRestResponse(dashboardID, createCell, zapTraceSpan,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("PostDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Cell)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Cell)));
}
///
/// Create a dashboard cell
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
/// Cell that will be added
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (Cell)
public async System.Threading.Tasks.Task PostDashboardsIDCellsAsyncWithIRestResponse(
string dashboardID, CreateCell createCell, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PostDashboardsIDCells");
}
// verify the required parameter 'createCell' is set
if (createCell == null)
{
throw new ApiException(400,
"Missing required parameter 'createCell' when calling CellsService->PostDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (createCell != null && createCell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(createCell); // http body (model) parameter
}
else
{
localVarPostBody = createCell; // 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("PostDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Dashboard
public Dashboard PutDashboardsIDCells(string dashboardID, List cell, string zapTraceSpan = null)
{
var localVarResponse = PutDashboardsIDCellsWithHttpInfo(dashboardID, cell, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Dashboard
public ApiResponse PutDashboardsIDCellsWithHttpInfo(string dashboardID, List cell,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PutDashboardsIDCells");
}
// verify the required parameter 'cell' is set
if (cell == null)
{
throw new ApiException(400,
"Missing required parameter 'cell' when calling CellsService->PutDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cell != null && cell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cell); // http body (model) parameter
}
else
{
localVarPostBody = cell; // 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("PutDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Dashboard)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dashboard)));
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Dashboard
public async System.Threading.Tasks.Task PutDashboardsIDCellsWithIRestResponseAsync(
string dashboardID, List cell, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PutDashboardsIDCells");
}
// verify the required parameter 'cell' is set
if (cell == null)
{
throw new ApiException(400,
"Missing required parameter 'cell' when calling CellsService->PutDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cell != null && cell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cell); // http body (model) parameter
}
else
{
localVarPostBody = cell; // 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("PutDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Dashboard
public RestResponse PutDashboardsIDCellsWithIRestResponse(string dashboardID, List cell,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PutDashboardsIDCells");
}
// verify the required parameter 'cell' is set
if (cell == null)
{
throw new ApiException(400,
"Missing required parameter 'cell' when calling CellsService->PutDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cell != null && cell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cell); // http body (model) parameter
}
else
{
localVarPostBody = cell; // 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("PutDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// ApiResponse of Dashboard
public RestRequest PutDashboardsIDCellsWithRestRequest(string dashboardID, List cell,
string zapTraceSpan = null)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PutDashboardsIDCells");
}
// verify the required parameter 'cell' is set
if (cell == null)
{
throw new ApiException(400,
"Missing required parameter 'cell' when calling CellsService->PutDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cell != null && cell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cell); // http body (model) parameter
}
else
{
localVarPostBody = cell; // 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);
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Dashboard
public async System.Threading.Tasks.Task PutDashboardsIDCellsAsync(string dashboardID,
List cell, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await PutDashboardsIDCellsAsyncWithHttpInfo(dashboardID, cell, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Dashboard)
public async System.Threading.Tasks.Task> PutDashboardsIDCellsAsyncWithHttpInfo(
string dashboardID, List cell, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await PutDashboardsIDCellsAsyncWithIRestResponse(dashboardID, cell, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("PutDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Dashboard)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dashboard)));
}
///
/// Replace cells in a dashboard Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
///
/// Thrown when fails to make API call
/// The ID of the dashboard to update.
///
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (Dashboard)
public async System.Threading.Tasks.Task PutDashboardsIDCellsAsyncWithIRestResponse(
string dashboardID, List cell, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'dashboardID' is set
if (dashboardID == null)
{
throw new ApiException(400,
"Missing required parameter 'dashboardID' when calling CellsService->PutDashboardsIDCells");
}
// verify the required parameter 'cell' is set
if (cell == null)
{
throw new ApiException(400,
"Missing required parameter 'cell' when calling CellsService->PutDashboardsIDCells");
}
var localVarPath = "/api/v2/dashboards/{dashboardID}/cells";
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 (dashboardID != null)
{
localVarPathParams.Add("dashboardID",
Configuration.ApiClient.ParameterToString(dashboardID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (cell != null && cell.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(cell); // http body (model) parameter
}
else
{
localVarPostBody = cell; // 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("PutDashboardsIDCells", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
}
} | | | | | | | | | | | | | | | | | | | | | | | |