/*
* 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 IBackupService : IApiAccessor
{
#region Synchronous Operations
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// System.IO.Stream
System.IO.Stream GetBackupKV(string zapTraceSpan = null);
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// ApiResponse of System.IO.Stream
ApiResponse GetBackupKVWithHttpInfo(string zapTraceSpan = null);
///
/// Download snapshot of all metadata in the server
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// MetadataBackup
MetadataBackup GetBackupMetadata(string zapTraceSpan = null, string acceptEncoding = null);
///
/// Download snapshot of all metadata in the server
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// ApiResponse of MetadataBackup
ApiResponse GetBackupMetadataWithHttpInfo(string zapTraceSpan = null,
string acceptEncoding = null);
///
/// Download snapshot of all TSM data in a shard
///
///
///
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// System.IO.Stream
System.IO.Stream GetBackupShardId(long? shardID, string zapTraceSpan = null, string acceptEncoding = null,
DateTime? since = null);
///
/// Download snapshot of all TSM data in a shard
///
///
///
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// ApiResponse of System.IO.Stream
ApiResponse GetBackupShardIdWithHttpInfo(long? shardID, string zapTraceSpan = null,
string acceptEncoding = null, DateTime? since = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of System.IO.Stream
System.Threading.Tasks.Task GetBackupKVAsync(string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (System.IO.Stream)
System.Threading.Tasks.Task> GetBackupKVAsyncWithHttpInfo(
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Download snapshot of all metadata in the server
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Cancellation token
/// Task of MetadataBackup
System.Threading.Tasks.Task GetBackupMetadataAsync(string zapTraceSpan = null,
string acceptEncoding = null, CancellationToken cancellationToken = default);
///
/// Download snapshot of all metadata in the server
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Cancellation token
/// Task of ApiResponse (MetadataBackup)
System.Threading.Tasks.Task> GetBackupMetadataAsyncWithHttpInfo(
string zapTraceSpan = null, string acceptEncoding = null, CancellationToken cancellationToken = default);
///
/// Download snapshot of all TSM data in a shard
///
///
///
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// Cancellation token
/// Task of System.IO.Stream
System.Threading.Tasks.Task GetBackupShardIdAsync(long? shardID, string zapTraceSpan = null,
string acceptEncoding = null, DateTime? since = null, CancellationToken cancellationToken = default);
///
/// Download snapshot of all TSM data in a shard
///
///
///
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// Cancellation token
/// Task of ApiResponse (System.IO.Stream)
System.Threading.Tasks.Task> GetBackupShardIdAsyncWithHttpInfo(long? shardID,
string zapTraceSpan = null, string acceptEncoding = null, DateTime? since = null,
CancellationToken cancellationToken = default);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class BackupService : IBackupService
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public BackupService(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 BackupService(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);
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// System.IO.Stream
public System.IO.Stream GetBackupKV(string zapTraceSpan = null)
{
var localVarResponse = GetBackupKVWithHttpInfo(zapTraceSpan);
return localVarResponse.Data;
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// ApiResponse of System.IO.Stream
public ApiResponse GetBackupKVWithHttpInfo(string zapTraceSpan = null)
{
var localVarPath = "/api/v2/backup/kv";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupKV", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(System.IO.Stream)Configuration.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream)));
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of System.IO.Stream
public async System.Threading.Tasks.Task GetBackupKVWithIRestResponseAsync(
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/backup/kv";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupKV", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// ApiResponse of System.IO.Stream
public RestResponse GetBackupKVWithIRestResponse(string zapTraceSpan = null)
{
var localVarPath = "/api/v2/backup/kv";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupKV", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// ApiResponse of System.IO.Stream
public RestRequest GetBackupKVWithRestRequest(string zapTraceSpan = null)
{
var localVarPath = "/api/v2/backup/kv";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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);
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of System.IO.Stream
public async System.Threading.Tasks.Task GetBackupKVAsync(string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
var localVarResponse =
await GetBackupKVAsyncWithHttpInfo(zapTraceSpan, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (System.IO.Stream)
public async System.Threading.Tasks.Task> GetBackupKVAsyncWithHttpInfo(
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await GetBackupKVAsyncWithIRestResponse(zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBackupKV", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(System.IO.Stream)Configuration.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream)));
}
///
/// Download snapshot of metadata stored in the server's embedded KV store. Should not be used in versions greater than 2.1.x, as it doesn't include metadata stored in embedded SQL.
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (System.IO.Stream)
public async System.Threading.Tasks.Task GetBackupKVAsyncWithIRestResponse(
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/backup/kv";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupKV", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// MetadataBackup
public MetadataBackup GetBackupMetadata(string zapTraceSpan = null, string acceptEncoding = null)
{
var localVarResponse = GetBackupMetadataWithHttpInfo(zapTraceSpan, acceptEncoding);
return localVarResponse.Data;
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// ApiResponse of MetadataBackup
public ApiResponse GetBackupMetadataWithHttpInfo(string zapTraceSpan = null,
string acceptEncoding = null)
{
var localVarPath = "/api/v2/backup/metadata";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"multipart/mixed",
"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("GetBackupMetadata", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(MetadataBackup)Configuration.ApiClient.Deserialize(localVarResponse, typeof(MetadataBackup)));
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Cancellation token
/// ApiResponse of MetadataBackup
public async System.Threading.Tasks.Task GetBackupMetadataWithIRestResponseAsync(
string zapTraceSpan = null, string acceptEncoding = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/backup/metadata";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"multipart/mixed",
"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("GetBackupMetadata", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// ApiResponse of MetadataBackup
public RestResponse GetBackupMetadataWithIRestResponse(string zapTraceSpan = null, string acceptEncoding = null)
{
var localVarPath = "/api/v2/backup/metadata";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"multipart/mixed",
"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("GetBackupMetadata", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// ApiResponse of MetadataBackup
public RestRequest GetBackupMetadataWithRestRequest(string zapTraceSpan = null, string acceptEncoding = null)
{
var localVarPath = "/api/v2/backup/metadata";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"multipart/mixed",
"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);
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Cancellation token
/// Task of MetadataBackup
public async System.Threading.Tasks.Task GetBackupMetadataAsync(string zapTraceSpan = null,
string acceptEncoding = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await GetBackupMetadataAsyncWithHttpInfo(zapTraceSpan, acceptEncoding, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Cancellation token
/// Task of ApiResponse (MetadataBackup)
public async System.Threading.Tasks.Task> GetBackupMetadataAsyncWithHttpInfo(
string zapTraceSpan = null, string acceptEncoding = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await GetBackupMetadataAsyncWithIRestResponse(zapTraceSpan, acceptEncoding, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBackupMetadata", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(MetadataBackup)Configuration.ApiClient.Deserialize(localVarResponse, typeof(MetadataBackup)));
}
///
/// Download snapshot of all metadata in the server
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Cancellation token
/// Task of RestResponse (MetadataBackup)
public async System.Threading.Tasks.Task GetBackupMetadataAsyncWithIRestResponse(
string zapTraceSpan = null, string acceptEncoding = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/backup/metadata";
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 (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"multipart/mixed",
"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("GetBackupMetadata", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// System.IO.Stream
public System.IO.Stream GetBackupShardId(long? shardID, string zapTraceSpan = null,
string acceptEncoding = null, DateTime? since = null)
{
var localVarResponse = GetBackupShardIdWithHttpInfo(shardID, zapTraceSpan, acceptEncoding, since);
return localVarResponse.Data;
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// ApiResponse of System.IO.Stream
public ApiResponse GetBackupShardIdWithHttpInfo(long? shardID, string zapTraceSpan = null,
string acceptEncoding = null, DateTime? since = null)
{
// verify the required parameter 'shardID' is set
if (shardID == null)
{
throw new ApiException(400,
"Missing required parameter 'shardID' when calling BackupService->GetBackupShardId");
}
var localVarPath = "/api/v2/backup/shards/{shardID}";
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 (shardID != null)
{
localVarPathParams.Add("shardID", Configuration.ApiClient.ParameterToString(shardID)); // path parameter
}
if (since != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "since", since)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupShardId", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(System.IO.Stream)Configuration.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream)));
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// Cancellation token
/// ApiResponse of System.IO.Stream
public async System.Threading.Tasks.Task GetBackupShardIdWithIRestResponseAsync(long? shardID,
string zapTraceSpan = null, string acceptEncoding = null, DateTime? since = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'shardID' is set
if (shardID == null)
{
throw new ApiException(400,
"Missing required parameter 'shardID' when calling BackupService->GetBackupShardId");
}
var localVarPath = "/api/v2/backup/shards/{shardID}";
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 (shardID != null)
{
localVarPathParams.Add("shardID", Configuration.ApiClient.ParameterToString(shardID)); // path parameter
}
if (since != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "since", since)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupShardId", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// ApiResponse of System.IO.Stream
public RestResponse GetBackupShardIdWithIRestResponse(long? shardID, string zapTraceSpan = null,
string acceptEncoding = null, DateTime? since = null)
{
// verify the required parameter 'shardID' is set
if (shardID == null)
{
throw new ApiException(400,
"Missing required parameter 'shardID' when calling BackupService->GetBackupShardId");
}
var localVarPath = "/api/v2/backup/shards/{shardID}";
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 (shardID != null)
{
localVarPathParams.Add("shardID", Configuration.ApiClient.ParameterToString(shardID)); // path parameter
}
if (since != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "since", since)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupShardId", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// ApiResponse of System.IO.Stream
public RestRequest GetBackupShardIdWithRestRequest(long? shardID, string zapTraceSpan = null,
string acceptEncoding = null, DateTime? since = null)
{
// verify the required parameter 'shardID' is set
if (shardID == null)
{
throw new ApiException(400,
"Missing required parameter 'shardID' when calling BackupService->GetBackupShardId");
}
var localVarPath = "/api/v2/backup/shards/{shardID}";
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 (shardID != null)
{
localVarPathParams.Add("shardID", Configuration.ApiClient.ParameterToString(shardID)); // path parameter
}
if (since != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "since", since)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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);
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// Cancellation token
/// Task of System.IO.Stream
public async System.Threading.Tasks.Task GetBackupShardIdAsync(long? shardID,
string zapTraceSpan = null, string acceptEncoding = null, DateTime? since = null,
CancellationToken cancellationToken = default)
{
var localVarResponse =
await GetBackupShardIdAsyncWithHttpInfo(shardID, zapTraceSpan, acceptEncoding, since, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// Cancellation token
/// Task of ApiResponse (System.IO.Stream)
public async System.Threading.Tasks.Task> GetBackupShardIdAsyncWithHttpInfo(
long? shardID, string zapTraceSpan = null, string acceptEncoding = null, DateTime? since = null,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await GetBackupShardIdAsyncWithIRestResponse(shardID, zapTraceSpan, acceptEncoding, since,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBackupShardId", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(System.IO.Stream)Configuration.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream)));
}
///
/// Download snapshot of all TSM data in a shard
///
/// Thrown when fails to make API call
/// The shard ID.
/// OpenTracing span context (optional)
/// Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
/// Earliest time to include in the snapshot. RFC3339 format. (optional)
/// Cancellation token
/// Task of RestResponse (System.IO.Stream)
public async System.Threading.Tasks.Task GetBackupShardIdAsyncWithIRestResponse(long? shardID,
string zapTraceSpan = null, string acceptEncoding = null, DateTime? since = null,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'shardID' is set
if (shardID == null)
{
throw new ApiException(400,
"Missing required parameter 'shardID' when calling BackupService->GetBackupShardId");
}
var localVarPath = "/api/v2/backup/shards/{shardID}";
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 (shardID != null)
{
localVarPathParams.Add("shardID", Configuration.ApiClient.ParameterToString(shardID)); // path parameter
}
if (since != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "since", since)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
if (acceptEncoding != null)
{
localVarHeaderParams.Add("Accept-Encoding",
Configuration.ApiClient.ParameterToString(acceptEncoding)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/octet-stream",
"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("GetBackupShardId", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
}
}