/*
* 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 IBucketsService : IApiAccessor
{
#region Synchronous Operations
///
/// Delete a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
///
void DeleteBucketsID(string bucketID, string zapTraceSpan = null);
///
/// Delete a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteBucketsIDWithHttpInfo(string bucketID, string zapTraceSpan = null);
///
/// Delete a label from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
///
void DeleteBucketsIDLabelsID(string bucketID, string labelID, string zapTraceSpan = null);
///
/// Delete a label from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteBucketsIDLabelsIDWithHttpInfo(string bucketID, string labelID,
string zapTraceSpan = null);
///
/// Remove a member from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
///
void DeleteBucketsIDMembersID(string userID, string bucketID, string zapTraceSpan = null);
///
/// Remove a member from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteBucketsIDMembersIDWithHttpInfo(string userID, string bucketID,
string zapTraceSpan = null);
///
/// Remove an owner from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
///
void DeleteBucketsIDOwnersID(string userID, string bucketID, string zapTraceSpan = null);
///
/// Remove an owner from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteBucketsIDOwnersIDWithHttpInfo(string userID, string bucketID,
string zapTraceSpan = null);
///
/// List all buckets
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Buckets
Buckets GetBuckets(string zapTraceSpan = null, int? offset = null, int? limit = null, string after = null,
string org = null, string orgID = null, string name = null, string id = null);
///
/// List all buckets
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// ApiResponse of Buckets
ApiResponse GetBucketsWithHttpInfo(string zapTraceSpan = null, int? offset = null, int? limit = null,
string after = null, string org = null, string orgID = null, string name = null, string id = null);
///
/// Retrieve a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Bucket
Bucket GetBucketsID(string bucketID, string zapTraceSpan = null);
///
/// Retrieve a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Bucket
ApiResponse GetBucketsIDWithHttpInfo(string bucketID, string zapTraceSpan = null);
///
/// List all labels for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// LabelsResponse
LabelsResponse GetBucketsIDLabels(string bucketID, string zapTraceSpan = null);
///
/// List all labels for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of LabelsResponse
ApiResponse GetBucketsIDLabelsWithHttpInfo(string bucketID, string zapTraceSpan = null);
///
/// List all users with member privileges for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ResourceMembers
ResourceMembers GetBucketsIDMembers(string bucketID, string zapTraceSpan = null);
///
/// List all users with member privileges for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMembers
ApiResponse GetBucketsIDMembersWithHttpInfo(string bucketID, string zapTraceSpan = null);
///
/// List all owners of a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ResourceOwners
ResourceOwners GetBucketsIDOwners(string bucketID, string zapTraceSpan = null);
///
/// List all owners of a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwners
ApiResponse GetBucketsIDOwnersWithHttpInfo(string bucketID, string zapTraceSpan = null);
///
/// Get buckets in a source
///
///
///
///
/// Thrown when fails to make API call
/// The source ID.
/// OpenTracing span context (optional)
/// The name of the organization. (optional)
/// Buckets
Buckets GetSourcesIDBuckets(string sourceID, string zapTraceSpan = null, string org = null);
///
/// Get buckets in a source
///
///
///
///
/// Thrown when fails to make API call
/// The source ID.
/// OpenTracing span context (optional)
/// The name of the organization. (optional)
/// ApiResponse of Buckets
ApiResponse GetSourcesIDBucketsWithHttpInfo(string sourceID, string zapTraceSpan = null,
string org = null);
///
/// Update a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Bucket update to apply
/// OpenTracing span context (optional)
/// Bucket
Bucket PatchBucketsID(string bucketID, PatchBucketRequest patchBucketRequest, string zapTraceSpan = null);
///
/// Update a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Bucket update to apply
/// OpenTracing span context (optional)
/// ApiResponse of Bucket
ApiResponse PatchBucketsIDWithHttpInfo(string bucketID, PatchBucketRequest patchBucketRequest,
string zapTraceSpan = null);
///
/// Create a bucket
///
///
///
///
/// Thrown when fails to make API call
/// Bucket to create
/// OpenTracing span context (optional)
/// Bucket
Bucket PostBuckets(PostBucketRequest postBucketRequest, string zapTraceSpan = null);
///
/// Create a bucket
///
///
///
///
/// Thrown when fails to make API call
/// Bucket to create
/// OpenTracing span context (optional)
/// ApiResponse of Bucket
ApiResponse PostBucketsWithHttpInfo(PostBucketRequest postBucketRequest, string zapTraceSpan = null);
///
/// Add a label to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Label to add
/// OpenTracing span context (optional)
/// LabelResponse
LabelResponse PostBucketsIDLabels(string bucketID, LabelMapping labelMapping, string zapTraceSpan = null);
///
/// Add a label to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Label to add
/// OpenTracing span context (optional)
/// ApiResponse of LabelResponse
ApiResponse PostBucketsIDLabelsWithHttpInfo(string bucketID, LabelMapping labelMapping,
string zapTraceSpan = null);
///
/// Add a member to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as member
/// OpenTracing span context (optional)
/// ResourceMember
ResourceMember PostBucketsIDMembers(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody,
string zapTraceSpan = null);
///
/// Add a member to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as member
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMember
ApiResponse PostBucketsIDMembersWithHttpInfo(string bucketID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null);
///
/// Add an owner to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// ResourceOwner
ResourceOwner PostBucketsIDOwners(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody,
string zapTraceSpan = null);
///
/// Add an owner to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwner
ApiResponse PostBucketsIDOwnersWithHttpInfo(string bucketID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
/// Delete a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteBucketsIDAsync(string bucketID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Delete a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteBucketsIDAsyncWithHttpInfo(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Delete a label from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteBucketsIDLabelsIDAsync(string bucketID, string labelID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Delete a label from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteBucketsIDLabelsIDAsyncWithHttpInfo(string bucketID,
string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove a member from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteBucketsIDMembersIDAsync(string userID, string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove a member from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteBucketsIDMembersIDAsyncWithHttpInfo(string userID,
string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove an owner from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteBucketsIDOwnersIDAsync(string userID, string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove an owner from a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteBucketsIDOwnersIDAsyncWithHttpInfo(string userID,
string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all buckets
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Cancellation token
/// Task of Buckets
System.Threading.Tasks.Task GetBucketsAsync(string zapTraceSpan = null, int? offset = null,
int? limit = null, string after = null, string org = null, string orgID = null, string name = null,
string id = null, CancellationToken cancellationToken = default);
///
/// List all buckets
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Cancellation token
/// Task of ApiResponse (Buckets)
System.Threading.Tasks.Task> GetBucketsAsyncWithHttpInfo(string zapTraceSpan = null,
int? offset = null, int? limit = null, string after = null, string org = null, string orgID = null,
string name = null, string id = null, CancellationToken cancellationToken = default);
///
/// Retrieve a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Bucket
System.Threading.Tasks.Task GetBucketsIDAsync(string bucketID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Retrieve a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Bucket)
System.Threading.Tasks.Task> GetBucketsIDAsyncWithHttpInfo(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all labels for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of LabelsResponse
System.Threading.Tasks.Task GetBucketsIDLabelsAsync(string bucketID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// List all labels for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (LabelsResponse)
System.Threading.Tasks.Task> GetBucketsIDLabelsAsyncWithHttpInfo(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all users with member privileges for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceMembers
System.Threading.Tasks.Task GetBucketsIDMembersAsync(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all users with member privileges for a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceMembers)
System.Threading.Tasks.Task> GetBucketsIDMembersAsyncWithHttpInfo(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all owners of a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceOwners
System.Threading.Tasks.Task GetBucketsIDOwnersAsync(string bucketID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// List all owners of a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceOwners)
System.Threading.Tasks.Task> GetBucketsIDOwnersAsyncWithHttpInfo(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Get buckets in a source
///
///
///
///
/// Thrown when fails to make API call
/// The source ID.
/// OpenTracing span context (optional)
/// The name of the organization. (optional)
/// Cancellation token
/// Task of Buckets
System.Threading.Tasks.Task GetSourcesIDBucketsAsync(string sourceID, string zapTraceSpan = null,
string org = null, CancellationToken cancellationToken = default);
///
/// Get buckets in a source
///
///
///
///
/// Thrown when fails to make API call
/// The source ID.
/// OpenTracing span context (optional)
/// The name of the organization. (optional)
/// Cancellation token
/// Task of ApiResponse (Buckets)
System.Threading.Tasks.Task> GetSourcesIDBucketsAsyncWithHttpInfo(string sourceID,
string zapTraceSpan = null, string org = null, CancellationToken cancellationToken = default);
///
/// Update a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Bucket update to apply
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Bucket
System.Threading.Tasks.Task PatchBucketsIDAsync(string bucketID, PatchBucketRequest patchBucketRequest,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Update a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Bucket update to apply
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Bucket)
System.Threading.Tasks.Task> PatchBucketsIDAsyncWithHttpInfo(string bucketID,
PatchBucketRequest patchBucketRequest, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Create a bucket
///
///
///
///
/// Thrown when fails to make API call
/// Bucket to create
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Bucket
System.Threading.Tasks.Task PostBucketsAsync(PostBucketRequest postBucketRequest,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Create a bucket
///
///
///
///
/// Thrown when fails to make API call
/// Bucket to create
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Bucket)
System.Threading.Tasks.Task> PostBucketsAsyncWithHttpInfo(
PostBucketRequest postBucketRequest, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add a label to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Label to add
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of LabelResponse
System.Threading.Tasks.Task PostBucketsIDLabelsAsync(string bucketID, LabelMapping labelMapping,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Add a label to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// Label to add
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (LabelResponse)
System.Threading.Tasks.Task> PostBucketsIDLabelsAsyncWithHttpInfo(string bucketID,
LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Add a member to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as member
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceMember
System.Threading.Tasks.Task PostBucketsIDMembersAsync(string bucketID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add a member to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as member
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceMember)
System.Threading.Tasks.Task> PostBucketsIDMembersAsyncWithHttpInfo(string bucketID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add an owner to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceOwner
System.Threading.Tasks.Task PostBucketsIDOwnersAsync(string bucketID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add an owner to a bucket
///
///
///
///
/// Thrown when fails to make API call
/// The bucket ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceOwner)
System.Threading.Tasks.Task> PostBucketsIDOwnersAsyncWithHttpInfo(string bucketID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class BucketsService : IBucketsService
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public BucketsService(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 BucketsService(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 bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
///
public void DeleteBucketsID(string bucketID, string zapTraceSpan = null)
{
DeleteBucketsIDWithHttpInfo(bucketID, zapTraceSpan);
}
///
/// Delete a bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteBucketsIDWithHttpInfo(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteBucketsIDWithIRestResponseAsync(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteBucketsIDWithIRestResponse(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteBucketsIDWithRestRequest(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Delete a bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteBucketsIDAsync(string bucketID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
return DeleteBucketsIDAsyncWithHttpInfo(bucketID, zapTraceSpan, cancellationToken);
}
///
/// Delete a bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteBucketsIDAsyncWithHttpInfo(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteBucketsIDAsyncWithIRestResponse(bucketID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a bucket
///
/// Thrown when fails to make API call
/// The ID of the bucket to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteBucketsIDAsyncWithIRestResponse(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
///
public void DeleteBucketsIDLabelsID(string bucketID, string labelID, string zapTraceSpan = null)
{
DeleteBucketsIDLabelsIDWithHttpInfo(bucketID, labelID, zapTraceSpan);
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteBucketsIDLabelsIDWithHttpInfo(string bucketID, string labelID,
string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteBucketsIDLabelsIDWithIRestResponseAsync(
string bucketID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteBucketsIDLabelsIDWithIRestResponse(string bucketID, string labelID,
string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteBucketsIDLabelsIDWithRestRequest(string bucketID, string labelID,
string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteBucketsIDLabelsIDAsync(string bucketID, string labelID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteBucketsIDLabelsIDAsyncWithHttpInfo(bucketID, labelID, zapTraceSpan, cancellationToken);
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteBucketsIDLabelsIDAsyncWithHttpInfo(
string bucketID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteBucketsIDLabelsIDAsyncWithIRestResponse(bucketID, labelID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a label from a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// The ID of the label to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteBucketsIDLabelsIDAsyncWithIRestResponse(
string bucketID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
// verify the required parameter 'labelID' is set
if (labelID == null)
{
throw new ApiException(400,
"Missing required parameter 'labelID' when calling BucketsService->DeleteBucketsIDLabelsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels/{labelID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (labelID != null)
{
localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDLabelsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
///
public void DeleteBucketsIDMembersID(string userID, string bucketID, string zapTraceSpan = null)
{
DeleteBucketsIDMembersIDWithHttpInfo(userID, bucketID, zapTraceSpan);
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteBucketsIDMembersIDWithHttpInfo(string userID, string bucketID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDMembersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDMembersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteBucketsIDMembersIDWithIRestResponseAsync(
string userID, string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDMembersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDMembersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteBucketsIDMembersIDWithIRestResponse(string userID, string bucketID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDMembersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDMembersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteBucketsIDMembersIDWithRestRequest(string userID, string bucketID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDMembersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDMembersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteBucketsIDMembersIDAsync(string userID, string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteBucketsIDMembersIDAsyncWithHttpInfo(userID, bucketID, zapTraceSpan, cancellationToken);
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteBucketsIDMembersIDAsyncWithHttpInfo(
string userID, string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteBucketsIDMembersIDAsyncWithIRestResponse(userID, bucketID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove a member from a bucket
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteBucketsIDMembersIDAsyncWithIRestResponse(
string userID, string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDMembersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDMembersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/members/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
///
public void DeleteBucketsIDOwnersID(string userID, string bucketID, string zapTraceSpan = null)
{
DeleteBucketsIDOwnersIDWithHttpInfo(userID, bucketID, zapTraceSpan);
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteBucketsIDOwnersIDWithHttpInfo(string userID, string bucketID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteBucketsIDOwnersIDWithIRestResponseAsync(
string userID, string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteBucketsIDOwnersIDWithIRestResponse(string userID, string bucketID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteBucketsIDOwnersIDWithRestRequest(string userID, string bucketID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteBucketsIDOwnersIDAsync(string userID, string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteBucketsIDOwnersIDAsyncWithHttpInfo(userID, bucketID, zapTraceSpan, cancellationToken);
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteBucketsIDOwnersIDAsyncWithHttpInfo(
string userID, string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteBucketsIDOwnersIDAsyncWithIRestResponse(userID, bucketID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove an owner from a bucket
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteBucketsIDOwnersIDAsyncWithIRestResponse(
string userID, string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->DeleteBucketsIDOwnersID");
}
var localVarPath = "/api/v2/buckets/{bucketID}/owners/{userID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (userID != null)
{
localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter
}
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteBucketsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Buckets
public Buckets GetBuckets(string zapTraceSpan = null, int? offset = null, int? limit = null,
string after = null, string org = null, string orgID = null, string name = null, string id = null)
{
var localVarResponse = GetBucketsWithHttpInfo(zapTraceSpan, offset, limit, after, org, orgID, name, id);
return localVarResponse.Data;
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// ApiResponse of Buckets
public ApiResponse GetBucketsWithHttpInfo(string zapTraceSpan = null, int? offset = null,
int? limit = null, string after = null, string org = null, string orgID = null, string name = null,
string id = null)
{
var localVarPath = "/api/v2/buckets";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (offset != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (id != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // 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("GetBuckets", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Buckets)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Buckets)));
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Cancellation token
/// ApiResponse of Buckets
public async System.Threading.Tasks.Task GetBucketsWithIRestResponseAsync(
string zapTraceSpan = null, int? offset = null, int? limit = null, string after = null, string org = null,
string orgID = null, string name = null, string id = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/buckets";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (offset != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (id != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // 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("GetBuckets", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// ApiResponse of Buckets
public RestResponse GetBucketsWithIRestResponse(string zapTraceSpan = null, int? offset = null,
int? limit = null, string after = null, string org = null, string orgID = null, string name = null,
string id = null)
{
var localVarPath = "/api/v2/buckets";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (offset != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (id != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // 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("GetBuckets", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// ApiResponse of Buckets
public RestRequest GetBucketsWithRestRequest(string zapTraceSpan = null, int? offset = null, int? limit = null,
string after = null, string org = null, string orgID = null, string name = null, string id = null)
{
var localVarPath = "/api/v2/buckets";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (offset != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (id != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // query parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Cancellation token
/// Task of Buckets
public async System.Threading.Tasks.Task GetBucketsAsync(string zapTraceSpan = null,
int? offset = null, int? limit = null, string after = null, string org = null, string orgID = null,
string name = null, string id = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await GetBucketsAsyncWithHttpInfo(zapTraceSpan, offset, limit, after, org, orgID, name, id,
cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Cancellation token
/// Task of ApiResponse (Buckets)
public async System.Threading.Tasks.Task> GetBucketsAsyncWithHttpInfo(
string zapTraceSpan = null, int? offset = null, int? limit = null, string after = null, string org = null,
string orgID = null, string name = null, string id = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await GetBucketsAsyncWithIRestResponse(zapTraceSpan, offset, limit, after, org, orgID, name, id,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBuckets", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Buckets)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Buckets)));
}
///
/// List all buckets
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
/// The name of the organization. (optional)
/// The organization ID. (optional)
/// Only returns buckets with a specific name. (optional)
/// Only returns buckets with a specific ID. (optional)
/// Cancellation token
/// Task of RestResponse (Buckets)
public async System.Threading.Tasks.Task GetBucketsAsyncWithIRestResponse(
string zapTraceSpan = null, int? offset = null, int? limit = null, string after = null, string org = null,
string orgID = null, string name = null, string id = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/buckets";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (offset != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter
}
if (limit != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter
}
if (after != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "after", after)); // query parameter
}
if (org != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (id != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "id", id)); // 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("GetBuckets", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Bucket
public Bucket GetBucketsID(string bucketID, string zapTraceSpan = null)
{
var localVarResponse = GetBucketsIDWithHttpInfo(bucketID, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Bucket
public ApiResponse GetBucketsIDWithHttpInfo(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Bucket)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Bucket)));
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Bucket
public async System.Threading.Tasks.Task GetBucketsIDWithIRestResponseAsync(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Bucket
public RestResponse GetBucketsIDWithIRestResponse(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of Bucket
public RestRequest GetBucketsIDWithRestRequest(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Bucket
public async System.Threading.Tasks.Task GetBucketsIDAsync(string bucketID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
var localVarResponse = await GetBucketsIDAsyncWithHttpInfo(bucketID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Bucket)
public async System.Threading.Tasks.Task> GetBucketsIDAsyncWithHttpInfo(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await GetBucketsIDAsyncWithIRestResponse(bucketID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Bucket)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Bucket)));
}
///
/// Retrieve a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (Bucket)
public async System.Threading.Tasks.Task GetBucketsIDAsyncWithIRestResponse(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsID");
}
var localVarPath = "/api/v2/buckets/{bucketID}";
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 (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all labels for a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// LabelsResponse
public LabelsResponse GetBucketsIDLabels(string bucketID, string zapTraceSpan = null)
{
var localVarResponse = GetBucketsIDLabelsWithHttpInfo(bucketID, zapTraceSpan);
return localVarResponse.Data;
}
///
/// List all labels for a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of LabelsResponse
public ApiResponse GetBucketsIDLabelsWithHttpInfo(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsIDLabels");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsIDLabels", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(LabelsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelsResponse)));
}
///
/// List all labels for a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of LabelsResponse
public async System.Threading.Tasks.Task GetBucketsIDLabelsWithIRestResponseAsync(string bucketID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsIDLabels");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsIDLabels", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all labels for a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of LabelsResponse
public RestResponse GetBucketsIDLabelsWithIRestResponse(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsIDLabels");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetBucketsIDLabels", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all labels for a bucket
///
/// Thrown when fails to make API call
/// The bucket ID.
/// OpenTracing span context (optional)
/// ApiResponse of LabelsResponse
public RestRequest GetBucketsIDLabelsWithRestRequest(string bucketID, string zapTraceSpan = null)
{
// verify the required parameter 'bucketID' is set
if (bucketID == null)
{
throw new ApiException(400,
"Missing required parameter 'bucketID' when calling BucketsService->GetBucketsIDLabels");
}
var localVarPath = "/api/v2/buckets/{bucketID}/labels";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (bucketID != null)
{
localVarPathParams.Add("bucketID",
Configuration.ApiClient.ParameterToString(bucketID)); // path parameter
}
if (zapTraceSpan != null)
{
localVarHeaderParams.Add("Zap-Trace-Span",
Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///