/* * 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 IDBRPsService : IApiAccessor { #region Synchronous Operations /// /// Delete a database retention policy /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// void DeleteDBRPID(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null); /// /// Delete a database retention policy /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of Object(void) ApiResponse DeleteDBRPIDWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null); /// /// List database retention policy mappings /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// DBRPs DBRPs GetDBRPs(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null); /// /// List database retention policy mappings /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// ApiResponse of DBRPs ApiResponse GetDBRPsWithHttpInfo(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null); /// /// Retrieve a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// DBRPGet DBRPGet GetDBRPsID(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null); /// /// Retrieve a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet ApiResponse GetDBRPsIDWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null); /// /// Update a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// DBRPGet DBRPGet PatchDBRPID(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null); /// /// Update a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet ApiResponse PatchDBRPIDWithHttpInfo(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null); /// /// Add a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// DBRP DBRP PostDBRP(DBRPCreate dBRPCreate, string zapTraceSpan = null); /// /// Add a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// ApiResponse of DBRP ApiResponse PostDBRPWithHttpInfo(DBRPCreate dBRPCreate, string zapTraceSpan = null); #endregion Synchronous Operations #region Asynchronous Operations /// /// Delete a database retention policy /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteDBRPIDAsync(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// Delete a database retention policy /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteDBRPIDAsyncWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// List database retention policy mappings /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// Cancellation token /// Task of DBRPs System.Threading.Tasks.Task GetDBRPsAsync(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null, CancellationToken cancellationToken = default); /// /// List database retention policy mappings /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// Cancellation token /// Task of ApiResponse (DBRPs) System.Threading.Tasks.Task> GetDBRPsAsyncWithHttpInfo(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null, CancellationToken cancellationToken = default); /// /// Retrieve a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of DBRPGet System.Threading.Tasks.Task GetDBRPsIDAsync(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// Retrieve a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of ApiResponse (DBRPGet) System.Threading.Tasks.Task> GetDBRPsIDAsyncWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// Update a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of DBRPGet System.Threading.Tasks.Task PatchDBRPIDAsync(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// Update a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of ApiResponse (DBRPGet) System.Threading.Tasks.Task> PatchDBRPIDAsyncWithHttpInfo(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// Add a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// Cancellation token /// Task of DBRP System.Threading.Tasks.Task PostDBRPAsync(DBRPCreate dBRPCreate, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a database retention policy mapping /// /// /// /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (DBRP) System.Threading.Tasks.Task> PostDBRPAsyncWithHttpInfo(DBRPCreate dBRPCreate, string zapTraceSpan = null, CancellationToken cancellationToken = default); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class DBRPsService : IDBRPsService { private ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. /// /// public DBRPsService(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 DBRPsService(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 database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// public void DeleteDBRPID(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { DeleteDBRPIDWithHttpInfo(dbrpID, zapTraceSpan, orgID, org); } /// /// Delete a database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of Object(void) public ApiResponse DeleteDBRPIDWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->DeleteDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteDBRPID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteDBRPIDWithIRestResponseAsync(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->DeleteDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteDBRPID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of Object(void) public RestResponse DeleteDBRPIDWithIRestResponse(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->DeleteDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteDBRPID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of Object(void) public RestRequest DeleteDBRPIDWithRestRequest(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->DeleteDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Delete a database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteDBRPIDAsync(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { return DeleteDBRPIDAsyncWithHttpInfo(dbrpID, zapTraceSpan, orgID, org, cancellationToken); } /// /// Delete a database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteDBRPIDAsyncWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteDBRPIDAsyncWithIRestResponse(dbrpID, zapTraceSpan, orgID, org, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteDBRPID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a database retention policy /// /// Thrown when fails to make API call /// The database retention policy mapping /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteDBRPIDAsyncWithIRestResponse(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->DeleteDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteDBRPID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// DBRPs public DBRPs GetDBRPs(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null) { var localVarResponse = GetDBRPsWithHttpInfo(zapTraceSpan, orgID, org, id, bucketID, _default, db, rp); return localVarResponse.Data; } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// ApiResponse of DBRPs public ApiResponse GetDBRPsWithHttpInfo(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null) { var localVarPath = "/api/v2/dbrps"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // query parameter } if (bucketID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "bucketID", bucketID)); // query parameter } if (_default != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "default", _default)); // query parameter } if (db != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "db", db)); // query parameter } if (rp != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "rp", rp)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPs", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRPs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRPs))); } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// Cancellation token /// ApiResponse of DBRPs public async System.Threading.Tasks.Task GetDBRPsWithIRestResponseAsync( string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null, CancellationToken cancellationToken = default) { var localVarPath = "/api/v2/dbrps"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // query parameter } if (bucketID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "bucketID", bucketID)); // query parameter } if (_default != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "default", _default)); // query parameter } if (db != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "db", db)); // query parameter } if (rp != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "rp", rp)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// ApiResponse of DBRPs public RestResponse GetDBRPsWithIRestResponse(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null) { var localVarPath = "/api/v2/dbrps"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // query parameter } if (bucketID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "bucketID", bucketID)); // query parameter } if (_default != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "default", _default)); // query parameter } if (db != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "db", db)); // query parameter } if (rp != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "rp", rp)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// ApiResponse of DBRPs public RestRequest GetDBRPsWithRestRequest(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null) { var localVarPath = "/api/v2/dbrps"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // query parameter } if (bucketID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "bucketID", bucketID)); // query parameter } if (_default != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "default", _default)); // query parameter } if (db != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "db", db)); // query parameter } if (rp != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "rp", rp)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// Cancellation token /// Task of DBRPs public async System.Threading.Tasks.Task GetDBRPsAsync(string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetDBRPsAsyncWithHttpInfo(zapTraceSpan, orgID, org, id, bucketID, _default, db, rp, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// Cancellation token /// Task of ApiResponse (DBRPs) public async System.Threading.Tasks.Task> GetDBRPsAsyncWithHttpInfo( string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetDBRPsAsyncWithIRestResponse(zapTraceSpan, orgID, org, id, bucketID, _default, db, rp, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPs", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRPs)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRPs))); } /// /// List database retention policy mappings /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the organization ID to filter on (optional) /// Specifies the organization name to filter on (optional) /// Specifies the mapping ID to filter on (optional) /// Specifies the bucket ID to filter on (optional) /// Specifies filtering on default (optional) /// Specifies the database to filter on (optional) /// Specifies the retention policy to filter on (optional) /// Cancellation token /// Task of RestResponse (DBRPs) public async System.Threading.Tasks.Task GetDBRPsAsyncWithIRestResponse( string zapTraceSpan = null, string orgID = null, string org = null, string id = null, string bucketID = null, bool? _default = null, string db = null, string rp = null, CancellationToken cancellationToken = default) { var localVarPath = "/api/v2/dbrps"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // query parameter } if (bucketID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "bucketID", bucketID)); // query parameter } if (_default != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "default", _default)); // query parameter } if (db != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "db", db)); // query parameter } if (rp != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "rp", rp)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPs", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// DBRPGet public DBRPGet GetDBRPsID(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { var localVarResponse = GetDBRPsIDWithHttpInfo(dbrpID, zapTraceSpan, orgID, org); return localVarResponse.Data; } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet public ApiResponse GetDBRPsIDWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->GetDBRPsID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRPGet)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRPGet))); } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// ApiResponse of DBRPGet public async System.Threading.Tasks.Task GetDBRPsIDWithIRestResponseAsync(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->GetDBRPsID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet public RestResponse GetDBRPsIDWithIRestResponse(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->GetDBRPsID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet public RestRequest GetDBRPsIDWithRestRequest(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->GetDBRPsID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of DBRPGet public async System.Threading.Tasks.Task GetDBRPsIDAsync(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetDBRPsIDAsyncWithHttpInfo(dbrpID, zapTraceSpan, orgID, org, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of ApiResponse (DBRPGet) public async System.Threading.Tasks.Task> GetDBRPsIDAsyncWithHttpInfo(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetDBRPsIDAsyncWithIRestResponse(dbrpID, zapTraceSpan, orgID, org, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRPGet)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRPGet))); } /// /// Retrieve a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping ID /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of RestResponse (DBRPGet) public async System.Threading.Tasks.Task GetDBRPsIDAsyncWithIRestResponse(string dbrpID, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->GetDBRPsID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetDBRPsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// DBRPGet public DBRPGet PatchDBRPID(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null) { var localVarResponse = PatchDBRPIDWithHttpInfo(dbrpID, dBRPUpdate, zapTraceSpan, orgID, org); return localVarResponse.Data; } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet public ApiResponse PatchDBRPIDWithHttpInfo(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->PatchDBRPID"); } // verify the required parameter 'dBRPUpdate' is set if (dBRPUpdate == null) { throw new ApiException(400, "Missing required parameter 'dBRPUpdate' when calling DBRPsService->PatchDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPUpdate != null && dBRPUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPUpdate); // http body (model) parameter } else { localVarPostBody = dBRPUpdate; // 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("PatchDBRPID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRPGet)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRPGet))); } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// ApiResponse of DBRPGet public async System.Threading.Tasks.Task PatchDBRPIDWithIRestResponseAsync(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->PatchDBRPID"); } // verify the required parameter 'dBRPUpdate' is set if (dBRPUpdate == null) { throw new ApiException(400, "Missing required parameter 'dBRPUpdate' when calling DBRPsService->PatchDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPUpdate != null && dBRPUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPUpdate); // http body (model) parameter } else { localVarPostBody = dBRPUpdate; // 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("PatchDBRPID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet public RestResponse PatchDBRPIDWithIRestResponse(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->PatchDBRPID"); } // verify the required parameter 'dBRPUpdate' is set if (dBRPUpdate == null) { throw new ApiException(400, "Missing required parameter 'dBRPUpdate' when calling DBRPsService->PatchDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPUpdate != null && dBRPUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPUpdate); // http body (model) parameter } else { localVarPostBody = dBRPUpdate; // 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("PatchDBRPID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// ApiResponse of DBRPGet public RestRequest PatchDBRPIDWithRestRequest(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->PatchDBRPID"); } // verify the required parameter 'dBRPUpdate' is set if (dBRPUpdate == null) { throw new ApiException(400, "Missing required parameter 'dBRPUpdate' when calling DBRPsService->PatchDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPUpdate != null && dBRPUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPUpdate); // http body (model) parameter } else { localVarPostBody = dBRPUpdate; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of DBRPGet public async System.Threading.Tasks.Task PatchDBRPIDAsync(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { var localVarResponse = await PatchDBRPIDAsyncWithHttpInfo(dbrpID, dBRPUpdate, zapTraceSpan, orgID, org, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of ApiResponse (DBRPGet) public async System.Threading.Tasks.Task> PatchDBRPIDAsyncWithHttpInfo(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PatchDBRPIDAsyncWithIRestResponse(dbrpID, dBRPUpdate, zapTraceSpan, orgID, org, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchDBRPID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRPGet)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRPGet))); } /// /// Update a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping. /// Database retention policy update to apply /// OpenTracing span context (optional) /// Specifies the organization ID of the mapping (optional) /// Specifies the organization name of the mapping (optional) /// Cancellation token /// Task of RestResponse (DBRPGet) public async System.Threading.Tasks.Task PatchDBRPIDAsyncWithIRestResponse(string dbrpID, DBRPUpdate dBRPUpdate, string zapTraceSpan = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dbrpID' is set if (dbrpID == null) { throw new ApiException(400, "Missing required parameter 'dbrpID' when calling DBRPsService->PatchDBRPID"); } // verify the required parameter 'dBRPUpdate' is set if (dBRPUpdate == null) { throw new ApiException(400, "Missing required parameter 'dBRPUpdate' when calling DBRPsService->PatchDBRPID"); } var localVarPath = "/api/v2/dbrps/{dbrpID}"; 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 (dbrpID != null) { localVarPathParams.Add("dbrpID", Configuration.ApiClient.ParameterToString(dbrpID)); // path parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPUpdate != null && dBRPUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPUpdate); // http body (model) parameter } else { localVarPostBody = dBRPUpdate; // 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("PatchDBRPID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// DBRP public DBRP PostDBRP(DBRPCreate dBRPCreate, string zapTraceSpan = null) { var localVarResponse = PostDBRPWithHttpInfo(dBRPCreate, zapTraceSpan); return localVarResponse.Data; } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// ApiResponse of DBRP public ApiResponse PostDBRPWithHttpInfo(DBRPCreate dBRPCreate, string zapTraceSpan = null) { // verify the required parameter 'dBRPCreate' is set if (dBRPCreate == null) { throw new ApiException(400, "Missing required parameter 'dBRPCreate' when calling DBRPsService->PostDBRP"); } var localVarPath = "/api/v2/dbrps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPCreate != null && dBRPCreate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPCreate); // http body (model) parameter } else { localVarPostBody = dBRPCreate; // 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("PostDBRP", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRP)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRP))); } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of DBRP public async System.Threading.Tasks.Task PostDBRPWithIRestResponseAsync(DBRPCreate dBRPCreate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dBRPCreate' is set if (dBRPCreate == null) { throw new ApiException(400, "Missing required parameter 'dBRPCreate' when calling DBRPsService->PostDBRP"); } var localVarPath = "/api/v2/dbrps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPCreate != null && dBRPCreate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPCreate); // http body (model) parameter } else { localVarPostBody = dBRPCreate; // 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("PostDBRP", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// ApiResponse of DBRP public RestResponse PostDBRPWithIRestResponse(DBRPCreate dBRPCreate, string zapTraceSpan = null) { // verify the required parameter 'dBRPCreate' is set if (dBRPCreate == null) { throw new ApiException(400, "Missing required parameter 'dBRPCreate' when calling DBRPsService->PostDBRP"); } var localVarPath = "/api/v2/dbrps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPCreate != null && dBRPCreate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPCreate); // http body (model) parameter } else { localVarPostBody = dBRPCreate; // 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("PostDBRP", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// ApiResponse of DBRP public RestRequest PostDBRPWithRestRequest(DBRPCreate dBRPCreate, string zapTraceSpan = null) { // verify the required parameter 'dBRPCreate' is set if (dBRPCreate == null) { throw new ApiException(400, "Missing required parameter 'dBRPCreate' when calling DBRPsService->PostDBRP"); } var localVarPath = "/api/v2/dbrps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPCreate != null && dBRPCreate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPCreate); // http body (model) parameter } else { localVarPostBody = dBRPCreate; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// Cancellation token /// Task of DBRP public async System.Threading.Tasks.Task PostDBRPAsync(DBRPCreate dBRPCreate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostDBRPAsyncWithHttpInfo(dBRPCreate, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (DBRP) public async System.Threading.Tasks.Task> PostDBRPAsyncWithHttpInfo(DBRPCreate dBRPCreate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostDBRPAsyncWithIRestResponse(dBRPCreate, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostDBRP", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (DBRP)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DBRP))); } /// /// Add a database retention policy mapping /// /// Thrown when fails to make API call /// The database retention policy mapping to add /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (DBRP) public async System.Threading.Tasks.Task PostDBRPAsyncWithIRestResponse(DBRPCreate dBRPCreate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'dBRPCreate' is set if (dBRPCreate == null) { throw new ApiException(400, "Missing required parameter 'dBRPCreate' when calling DBRPsService->PostDBRP"); } var localVarPath = "/api/v2/dbrps"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (dBRPCreate != null && dBRPCreate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(dBRPCreate); // http body (model) parameter } else { localVarPostBody = dBRPCreate; // 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("PostDBRP", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } } }