/* * 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); } /// /// 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 public async System.Threading.Tasks.Task GetBucketsIDLabelsAsync(string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetBucketsIDLabelsAsyncWithHttpInfo(bucketID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetBucketsIDLabelsAsyncWithHttpInfo( string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetBucketsIDLabelsAsyncWithIRestResponse(bucketID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); 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 /// Task of RestResponse (LabelsResponse) public async System.Threading.Tasks.Task GetBucketsIDLabelsAsyncWithIRestResponse(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); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetBucketsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all users with member privileges for a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// OpenTracing span context (optional) /// ResourceMembers public ResourceMembers GetBucketsIDMembers(string bucketID, string zapTraceSpan = null) { var localVarResponse = GetBucketsIDMembersWithHttpInfo(bucketID, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse GetBucketsIDMembersWithHttpInfo(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->GetBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; 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("GetBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMembers)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMembers))); } /// /// 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 /// ApiResponse of ResourceMembers public async System.Threading.Tasks.Task GetBucketsIDMembersWithIRestResponseAsync( 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->GetBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; 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("GetBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse GetBucketsIDMembersWithIRestResponse(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->GetBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; 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("GetBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest GetBucketsIDMembersWithRestRequest(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->GetBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; 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); } /// /// 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 public async System.Threading.Tasks.Task GetBucketsIDMembersAsync(string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetBucketsIDMembersAsyncWithHttpInfo(bucketID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetBucketsIDMembersAsyncWithHttpInfo( string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetBucketsIDMembersAsyncWithIRestResponse(bucketID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMembers)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMembers))); } /// /// 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 RestResponse (ResourceMembers) public async System.Threading.Tasks.Task GetBucketsIDMembersAsyncWithIRestResponse( 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->GetBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; 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("GetBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// OpenTracing span context (optional) /// ResourceOwners public ResourceOwners GetBucketsIDOwners(string bucketID, string zapTraceSpan = null) { var localVarResponse = GetBucketsIDOwnersWithHttpInfo(bucketID, zapTraceSpan); return localVarResponse.Data; } /// /// List all owners of a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public ApiResponse GetBucketsIDOwnersWithHttpInfo(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->GetBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; 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("GetBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwners)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwners))); } /// /// List all owners of a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ResourceOwners public async System.Threading.Tasks.Task GetBucketsIDOwnersWithIRestResponseAsync(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->GetBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; 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("GetBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public RestResponse GetBucketsIDOwnersWithIRestResponse(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->GetBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; 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("GetBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public RestRequest GetBucketsIDOwnersWithRestRequest(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->GetBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; 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); } /// /// 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 public async System.Threading.Tasks.Task GetBucketsIDOwnersAsync(string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetBucketsIDOwnersAsyncWithHttpInfo(bucketID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetBucketsIDOwnersAsyncWithHttpInfo( string bucketID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetBucketsIDOwnersAsyncWithIRestResponse(bucketID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwners)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwners))); } /// /// List all owners of a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ResourceOwners) public async System.Threading.Tasks.Task GetBucketsIDOwnersAsyncWithIRestResponse(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->GetBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; 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("GetBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public Buckets GetSourcesIDBuckets(string sourceID, string zapTraceSpan = null, string org = null) { var localVarResponse = GetSourcesIDBucketsWithHttpInfo(sourceID, zapTraceSpan, org); return localVarResponse.Data; } /// /// 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 public ApiResponse GetSourcesIDBucketsWithHttpInfo(string sourceID, string zapTraceSpan = null, string org = null) { // verify the required parameter 'sourceID' is set if (sourceID == null) { throw new ApiException(400, "Missing required parameter 'sourceID' when calling BucketsService->GetSourcesIDBuckets"); } var localVarPath = "/api/v2/sources/{sourceID}/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 (sourceID != null) { localVarPathParams.Add("sourceID", Configuration.ApiClient.ParameterToString(sourceID)); // path parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetSourcesIDBuckets", 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))); } /// /// 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 /// ApiResponse of Buckets public async System.Threading.Tasks.Task GetSourcesIDBucketsWithIRestResponseAsync( string sourceID, string zapTraceSpan = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'sourceID' is set if (sourceID == null) { throw new ApiException(400, "Missing required parameter 'sourceID' when calling BucketsService->GetSourcesIDBuckets"); } var localVarPath = "/api/v2/sources/{sourceID}/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 (sourceID != null) { localVarPathParams.Add("sourceID", Configuration.ApiClient.ParameterToString(sourceID)); // path parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetSourcesIDBuckets", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse GetSourcesIDBucketsWithIRestResponse(string sourceID, string zapTraceSpan = null, string org = null) { // verify the required parameter 'sourceID' is set if (sourceID == null) { throw new ApiException(400, "Missing required parameter 'sourceID' when calling BucketsService->GetSourcesIDBuckets"); } var localVarPath = "/api/v2/sources/{sourceID}/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 (sourceID != null) { localVarPathParams.Add("sourceID", Configuration.ApiClient.ParameterToString(sourceID)); // path parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetSourcesIDBuckets", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest GetSourcesIDBucketsWithRestRequest(string sourceID, string zapTraceSpan = null, string org = null) { // verify the required parameter 'sourceID' is set if (sourceID == null) { throw new ApiException(400, "Missing required parameter 'sourceID' when calling BucketsService->GetSourcesIDBuckets"); } var localVarPath = "/api/v2/sources/{sourceID}/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 (sourceID != null) { localVarPathParams.Add("sourceID", Configuration.ApiClient.ParameterToString(sourceID)); // path parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// 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 public async System.Threading.Tasks.Task GetSourcesIDBucketsAsync(string sourceID, string zapTraceSpan = null, string org = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetSourcesIDBucketsAsyncWithHttpInfo(sourceID, zapTraceSpan, org, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> GetSourcesIDBucketsAsyncWithHttpInfo( string sourceID, string zapTraceSpan = null, string org = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetSourcesIDBucketsAsyncWithIRestResponse(sourceID, zapTraceSpan, org, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetSourcesIDBuckets", 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))); } /// /// 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 RestResponse (Buckets) public async System.Threading.Tasks.Task GetSourcesIDBucketsAsyncWithIRestResponse( string sourceID, string zapTraceSpan = null, string org = null, CancellationToken cancellationToken = default) { // verify the required parameter 'sourceID' is set if (sourceID == null) { throw new ApiException(400, "Missing required parameter 'sourceID' when calling BucketsService->GetSourcesIDBuckets"); } var localVarPath = "/api/v2/sources/{sourceID}/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 (sourceID != null) { localVarPathParams.Add("sourceID", Configuration.ApiClient.ParameterToString(sourceID)); // path parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetSourcesIDBuckets", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Bucket update to apply /// OpenTracing span context (optional) /// Bucket public Bucket PatchBucketsID(string bucketID, PatchBucketRequest patchBucketRequest, string zapTraceSpan = null) { var localVarResponse = PatchBucketsIDWithHttpInfo(bucketID, patchBucketRequest, zapTraceSpan); return localVarResponse.Data; } /// /// Update a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Bucket update to apply /// OpenTracing span context (optional) /// ApiResponse of Bucket public ApiResponse PatchBucketsIDWithHttpInfo(string bucketID, PatchBucketRequest patchBucketRequest, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PatchBucketsID"); } // verify the required parameter 'patchBucketRequest' is set if (patchBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'patchBucketRequest' when calling BucketsService->PatchBucketsID"); } 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[] { "application/json" }; 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 } if (patchBucketRequest != null && patchBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(patchBucketRequest); // http body (model) parameter } else { localVarPostBody = patchBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchBucketsID", 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))); } /// /// Update a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Bucket update to apply /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Bucket public async System.Threading.Tasks.Task PatchBucketsIDWithIRestResponseAsync(string bucketID, PatchBucketRequest patchBucketRequest, 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->PatchBucketsID"); } // verify the required parameter 'patchBucketRequest' is set if (patchBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'patchBucketRequest' when calling BucketsService->PatchBucketsID"); } 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[] { "application/json" }; 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 } if (patchBucketRequest != null && patchBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(patchBucketRequest); // http body (model) parameter } else { localVarPostBody = patchBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchBucketsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Bucket update to apply /// OpenTracing span context (optional) /// ApiResponse of Bucket public RestResponse PatchBucketsIDWithIRestResponse(string bucketID, PatchBucketRequest patchBucketRequest, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PatchBucketsID"); } // verify the required parameter 'patchBucketRequest' is set if (patchBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'patchBucketRequest' when calling BucketsService->PatchBucketsID"); } 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[] { "application/json" }; 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 } if (patchBucketRequest != null && patchBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(patchBucketRequest); // http body (model) parameter } else { localVarPostBody = patchBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchBucketsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Bucket update to apply /// OpenTracing span context (optional) /// ApiResponse of Bucket public RestRequest PatchBucketsIDWithRestRequest(string bucketID, PatchBucketRequest patchBucketRequest, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PatchBucketsID"); } // verify the required parameter 'patchBucketRequest' is set if (patchBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'patchBucketRequest' when calling BucketsService->PatchBucketsID"); } 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[] { "application/json" }; 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 } if (patchBucketRequest != null && patchBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(patchBucketRequest); // http body (model) parameter } else { localVarPostBody = patchBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Update a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Bucket update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of Bucket public async System.Threading.Tasks.Task PatchBucketsIDAsync(string bucketID, PatchBucketRequest patchBucketRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PatchBucketsIDAsyncWithHttpInfo(bucketID, patchBucketRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PatchBucketsIDAsyncWithHttpInfo(string bucketID, PatchBucketRequest patchBucketRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PatchBucketsIDAsyncWithIRestResponse(bucketID, patchBucketRequest, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchBucketsID", 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))); } /// /// 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 RestResponse (Bucket) public async System.Threading.Tasks.Task PatchBucketsIDAsyncWithIRestResponse(string bucketID, PatchBucketRequest patchBucketRequest, 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->PatchBucketsID"); } // verify the required parameter 'patchBucketRequest' is set if (patchBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'patchBucketRequest' when calling BucketsService->PatchBucketsID"); } 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[] { "application/json" }; 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 } if (patchBucketRequest != null && patchBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(patchBucketRequest); // http body (model) parameter } else { localVarPostBody = patchBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchBucketsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// Bucket public Bucket PostBuckets(PostBucketRequest postBucketRequest, string zapTraceSpan = null) { var localVarResponse = PostBucketsWithHttpInfo(postBucketRequest, zapTraceSpan); return localVarResponse.Data; } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// ApiResponse of Bucket public ApiResponse PostBucketsWithHttpInfo(PostBucketRequest postBucketRequest, string zapTraceSpan = null) { // verify the required parameter 'postBucketRequest' is set if (postBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'postBucketRequest' when calling BucketsService->PostBuckets"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (postBucketRequest != null && postBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(postBucketRequest); // http body (model) parameter } else { localVarPostBody = postBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBuckets", 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))); } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Bucket public async System.Threading.Tasks.Task PostBucketsWithIRestResponseAsync( PostBucketRequest postBucketRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'postBucketRequest' is set if (postBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'postBucketRequest' when calling BucketsService->PostBuckets"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (postBucketRequest != null && postBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(postBucketRequest); // http body (model) parameter } else { localVarPostBody = postBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBuckets", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// ApiResponse of Bucket public RestResponse PostBucketsWithIRestResponse(PostBucketRequest postBucketRequest, string zapTraceSpan = null) { // verify the required parameter 'postBucketRequest' is set if (postBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'postBucketRequest' when calling BucketsService->PostBuckets"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (postBucketRequest != null && postBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(postBucketRequest); // http body (model) parameter } else { localVarPostBody = postBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBuckets", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// ApiResponse of Bucket public RestRequest PostBucketsWithRestRequest(PostBucketRequest postBucketRequest, string zapTraceSpan = null) { // verify the required parameter 'postBucketRequest' is set if (postBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'postBucketRequest' when calling BucketsService->PostBuckets"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (postBucketRequest != null && postBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(postBucketRequest); // http body (model) parameter } else { localVarPostBody = postBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// Cancellation token /// Task of Bucket public async System.Threading.Tasks.Task PostBucketsAsync(PostBucketRequest postBucketRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostBucketsAsyncWithHttpInfo(postBucketRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (Bucket) public async System.Threading.Tasks.Task> PostBucketsAsyncWithHttpInfo( PostBucketRequest postBucketRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostBucketsAsyncWithIRestResponse(postBucketRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBuckets", 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))); } /// /// Create a bucket /// /// Thrown when fails to make API call /// Bucket to create /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (Bucket) public async System.Threading.Tasks.Task PostBucketsAsyncWithIRestResponse( PostBucketRequest postBucketRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'postBucketRequest' is set if (postBucketRequest == null) { throw new ApiException(400, "Missing required parameter 'postBucketRequest' when calling BucketsService->PostBuckets"); } 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[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (postBucketRequest != null && postBucketRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(postBucketRequest); // http body (model) parameter } else { localVarPostBody = postBucketRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBuckets", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse public LabelResponse PostBucketsIDLabels(string bucketID, LabelMapping labelMapping, string zapTraceSpan = null) { var localVarResponse = PostBucketsIDLabelsWithHttpInfo(bucketID, labelMapping, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse PostBucketsIDLabelsWithHttpInfo(string bucketID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling BucketsService->PostBucketsIDLabels"); } 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelResponse))); } /// /// Add a label to a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelResponse public async System.Threading.Tasks.Task PostBucketsIDLabelsWithIRestResponseAsync( string bucketID, LabelMapping labelMapping, 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->PostBucketsIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling BucketsService->PostBucketsIDLabels"); } 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PostBucketsIDLabelsWithIRestResponse(string bucketID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling BucketsService->PostBucketsIDLabels"); } 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PostBucketsIDLabelsWithRestRequest(string bucketID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling BucketsService->PostBucketsIDLabels"); } 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add a label to a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelResponse public async System.Threading.Tasks.Task PostBucketsIDLabelsAsync(string bucketID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostBucketsIDLabelsAsyncWithHttpInfo(bucketID, labelMapping, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostBucketsIDLabelsAsyncWithHttpInfo( string bucketID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostBucketsIDLabelsAsyncWithIRestResponse(bucketID, labelMapping, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelResponse))); } /// /// Add a label to a bucket /// /// Thrown when fails to make API call /// The bucket ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelResponse) public async System.Threading.Tasks.Task PostBucketsIDLabelsAsyncWithIRestResponse( string bucketID, LabelMapping labelMapping, 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->PostBucketsIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling BucketsService->PostBucketsIDLabels"); } 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[] { "application/json" }; 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 } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public ResourceMember PostBucketsIDMembers(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { var localVarResponse = PostBucketsIDMembersWithHttpInfo(bucketID, addResourceMemberRequestBody, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse PostBucketsIDMembersWithHttpInfo(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMember)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMember))); } /// /// 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 /// ApiResponse of ResourceMember public async System.Threading.Tasks.Task PostBucketsIDMembersWithIRestResponseAsync( string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostBucketsIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PostBucketsIDMembersWithIRestResponse(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PostBucketsIDMembersWithRestRequest(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add a 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 public async System.Threading.Tasks.Task PostBucketsIDMembersAsync(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostBucketsIDMembersAsyncWithHttpInfo(bucketID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostBucketsIDMembersAsyncWithHttpInfo( string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostBucketsIDMembersAsyncWithIRestResponse(bucketID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMember)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMember))); } /// /// 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 RestResponse (ResourceMember) public async System.Threading.Tasks.Task PostBucketsIDMembersAsyncWithIRestResponse( string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostBucketsIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDMembers"); } var localVarPath = "/api/v2/buckets/{bucketID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public ResourceOwner PostBucketsIDOwners(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { var localVarResponse = PostBucketsIDOwnersWithHttpInfo(bucketID, addResourceMemberRequestBody, zapTraceSpan); return localVarResponse.Data; } /// /// 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 public ApiResponse PostBucketsIDOwnersWithHttpInfo(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwner)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwner))); } /// /// 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 /// ApiResponse of ResourceOwner public async System.Threading.Tasks.Task PostBucketsIDOwnersWithIRestResponseAsync( string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostBucketsIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestResponse PostBucketsIDOwnersWithIRestResponse(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// 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 public RestRequest PostBucketsIDOwnersWithRestRequest(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'bucketID' is set if (bucketID == null) { throw new ApiException(400, "Missing required parameter 'bucketID' when calling BucketsService->PostBucketsIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add 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 public async System.Threading.Tasks.Task PostBucketsIDOwnersAsync(string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostBucketsIDOwnersAsyncWithHttpInfo(bucketID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// 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) public async System.Threading.Tasks.Task> PostBucketsIDOwnersAsyncWithHttpInfo( string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostBucketsIDOwnersAsyncWithIRestResponse(bucketID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwner)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwner))); } /// /// 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 RestResponse (ResourceOwner) public async System.Threading.Tasks.Task PostBucketsIDOwnersAsyncWithIRestResponse( string bucketID, AddResourceMemberRequestBody addResourceMemberRequestBody, 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->PostBucketsIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling BucketsService->PostBucketsIDOwners"); } var localVarPath = "/api/v2/buckets/{bucketID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (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 } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostBucketsIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } } }