/*
* 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 IOrganizationsService : IApiAccessor
{
#region Synchronous Operations
///
/// Delete an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
///
void DeleteOrgsID(string orgID, string zapTraceSpan = null);
///
/// Delete an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteOrgsIDWithHttpInfo(string orgID, string zapTraceSpan = null);
///
/// Remove a member from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
///
void DeleteOrgsIDMembersID(string userID, string orgID, string zapTraceSpan = null);
///
/// Remove a member from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteOrgsIDMembersIDWithHttpInfo(string userID, string orgID, string zapTraceSpan = null);
///
/// Remove an owner from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
///
void DeleteOrgsIDOwnersID(string userID, string orgID, string zapTraceSpan = null);
///
/// Remove an owner from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
ApiResponse DeleteOrgsIDOwnersIDWithHttpInfo(string userID, string orgID, string zapTraceSpan = null);
///
/// List all organizations
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Organizations
Organizations GetOrgs(string zapTraceSpan = null, int? offset = null, int? limit = null,
bool? descending = null, string org = null, string orgID = null, string userID = null);
///
/// List all organizations
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// ApiResponse of Organizations
ApiResponse GetOrgsWithHttpInfo(string zapTraceSpan = null, int? offset = null,
int? limit = null, bool? descending = null, string org = null, string orgID = null, string userID = null);
///
/// Retrieve an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Organization
Organization GetOrgsID(string orgID, string zapTraceSpan = null);
///
/// Retrieve an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// ApiResponse of Organization
ApiResponse GetOrgsIDWithHttpInfo(string orgID, string zapTraceSpan = null);
///
/// List all members of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ResourceMembers
ResourceMembers GetOrgsIDMembers(string orgID, string zapTraceSpan = null);
///
/// List all members of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMembers
ApiResponse GetOrgsIDMembersWithHttpInfo(string orgID, string zapTraceSpan = null);
///
/// List all owners of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ResourceOwners
ResourceOwners GetOrgsIDOwners(string orgID, string zapTraceSpan = null);
///
/// List all owners of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwners
ApiResponse GetOrgsIDOwnersWithHttpInfo(string orgID, string zapTraceSpan = null);
///
/// Update an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// Organization update to apply
/// OpenTracing span context (optional)
/// Organization
Organization PatchOrgsID(string orgID, PatchOrganizationRequest patchOrganizationRequest,
string zapTraceSpan = null);
///
/// Update an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// Organization update to apply
/// OpenTracing span context (optional)
/// ApiResponse of Organization
ApiResponse PatchOrgsIDWithHttpInfo(string orgID,
PatchOrganizationRequest patchOrganizationRequest, string zapTraceSpan = null);
///
/// Create an organization
///
///
///
///
/// Thrown when fails to make API call
/// Organization to create
/// OpenTracing span context (optional)
/// Organization
Organization PostOrgs(PostOrganizationRequest postOrganizationRequest, string zapTraceSpan = null);
///
/// Create an organization
///
///
///
///
/// Thrown when fails to make API call
/// Organization to create
/// OpenTracing span context (optional)
/// ApiResponse of Organization
ApiResponse PostOrgsWithHttpInfo(PostOrganizationRequest postOrganizationRequest,
string zapTraceSpan = null);
///
/// Add a member to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as member
/// OpenTracing span context (optional)
/// ResourceMember
ResourceMember PostOrgsIDMembers(string orgID, AddResourceMemberRequestBody addResourceMemberRequestBody,
string zapTraceSpan = null);
///
/// Add a member to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as member
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMember
ApiResponse PostOrgsIDMembersWithHttpInfo(string orgID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null);
///
/// Add an owner to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// ResourceOwner
ResourceOwner PostOrgsIDOwners(string orgID, AddResourceMemberRequestBody addResourceMemberRequestBody,
string zapTraceSpan = null);
///
/// Add an owner to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwner
ApiResponse PostOrgsIDOwnersWithHttpInfo(string orgID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
/// Delete an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteOrgsIDAsync(string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Delete an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteOrgsIDAsyncWithHttpInfo(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove a member from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteOrgsIDMembersIDAsync(string userID, string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Remove a member from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteOrgsIDMembersIDAsyncWithHttpInfo(string userID,
string orgID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Remove an owner from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteOrgsIDOwnersIDAsync(string userID, string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Remove an owner from an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteOrgsIDOwnersIDAsyncWithHttpInfo(string userID,
string orgID, string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all organizations
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Cancellation token
/// Task of Organizations
System.Threading.Tasks.Task GetOrgsAsync(string zapTraceSpan = null, int? offset = null,
int? limit = null, bool? descending = null, string org = null, string orgID = null, string userID = null,
CancellationToken cancellationToken = default);
///
/// List all organizations
///
///
///
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Cancellation token
/// Task of ApiResponse (Organizations)
System.Threading.Tasks.Task> GetOrgsAsyncWithHttpInfo(string zapTraceSpan = null,
int? offset = null, int? limit = null, bool? descending = null, string org = null, string orgID = null,
string userID = null, CancellationToken cancellationToken = default);
///
/// Retrieve an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Organization
System.Threading.Tasks.Task GetOrgsIDAsync(string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Retrieve an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Organization)
System.Threading.Tasks.Task> GetOrgsIDAsyncWithHttpInfo(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all members of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceMembers
System.Threading.Tasks.Task GetOrgsIDMembersAsync(string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// List all members of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceMembers)
System.Threading.Tasks.Task> GetOrgsIDMembersAsyncWithHttpInfo(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// List all owners of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceOwners
System.Threading.Tasks.Task GetOrgsIDOwnersAsync(string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// List all owners of an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceOwners)
System.Threading.Tasks.Task> GetOrgsIDOwnersAsyncWithHttpInfo(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Update an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// Organization update to apply
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Organization
System.Threading.Tasks.Task PatchOrgsIDAsync(string orgID,
PatchOrganizationRequest patchOrganizationRequest, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Update an organization
///
///
///
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// Organization update to apply
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Organization)
System.Threading.Tasks.Task> PatchOrgsIDAsyncWithHttpInfo(string orgID,
PatchOrganizationRequest patchOrganizationRequest, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Create an organization
///
///
///
///
/// Thrown when fails to make API call
/// Organization to create
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Organization
System.Threading.Tasks.Task PostOrgsAsync(PostOrganizationRequest postOrganizationRequest,
string zapTraceSpan = null, CancellationToken cancellationToken = default);
///
/// Create an organization
///
///
///
///
/// Thrown when fails to make API call
/// Organization to create
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Organization)
System.Threading.Tasks.Task> PostOrgsAsyncWithHttpInfo(
PostOrganizationRequest postOrganizationRequest, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add a member to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as member
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceMember
System.Threading.Tasks.Task PostOrgsIDMembersAsync(string orgID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add a member to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as member
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceMember)
System.Threading.Tasks.Task> PostOrgsIDMembersAsyncWithHttpInfo(string orgID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add an owner to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceOwner
System.Threading.Tasks.Task PostOrgsIDOwnersAsync(string orgID,
AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null,
CancellationToken cancellationToken = default);
///
/// Add an owner to an organization
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID.
/// User to add as owner
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceOwner)
System.Threading.Tasks.Task> PostOrgsIDOwnersAsyncWithHttpInfo(string orgID,
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 OrganizationsService : IOrganizationsService
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public OrganizationsService(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 OrganizationsService(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 an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
///
public void DeleteOrgsID(string orgID, string zapTraceSpan = null)
{
DeleteOrgsIDWithHttpInfo(orgID, zapTraceSpan);
}
///
/// Delete an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteOrgsIDWithHttpInfo(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteOrgsIDWithIRestResponseAsync(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteOrgsIDWithIRestResponse(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteOrgsIDWithRestRequest(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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 an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteOrgsIDAsync(string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
return DeleteOrgsIDAsyncWithHttpInfo(orgID, zapTraceSpan, cancellationToken);
}
///
/// Delete an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteOrgsIDAsyncWithHttpInfo(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await DeleteOrgsIDAsyncWithIRestResponse(orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to delete.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteOrgsIDAsyncWithIRestResponse(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
///
public void DeleteOrgsIDMembersID(string userID, string orgID, string zapTraceSpan = null)
{
DeleteOrgsIDMembersIDWithHttpInfo(userID, orgID, zapTraceSpan);
}
///
/// Remove a member from an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteOrgsIDMembersIDWithHttpInfo(string userID, string orgID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove a member from an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteOrgsIDMembersIDWithIRestResponseAsync(
string userID, string orgID, 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 OrganizationsService->DeleteOrgsIDMembersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteOrgsIDMembersIDWithIRestResponse(string userID, string orgID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove a member from an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteOrgsIDMembersIDWithRestRequest(string userID, string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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 an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteOrgsIDMembersIDAsync(string userID, string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteOrgsIDMembersIDAsyncWithHttpInfo(userID, orgID, zapTraceSpan, cancellationToken);
}
///
/// Remove a member from an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteOrgsIDMembersIDAsyncWithHttpInfo(
string userID, string orgID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteOrgsIDMembersIDAsyncWithIRestResponse(userID, orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteOrgsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove a member from an organization
///
/// Thrown when fails to make API call
/// The ID of the member to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteOrgsIDMembersIDAsyncWithIRestResponse(
string userID, string orgID, 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 OrganizationsService->DeleteOrgsIDMembersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDMembersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDMembersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
///
public void DeleteOrgsIDOwnersID(string userID, string orgID, string zapTraceSpan = null)
{
DeleteOrgsIDOwnersIDWithHttpInfo(userID, orgID, zapTraceSpan);
}
///
/// Remove an owner from an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public ApiResponse DeleteOrgsIDOwnersIDWithHttpInfo(string userID, string orgID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove an owner from an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteOrgsIDOwnersIDWithIRestResponseAsync(string userID,
string orgID, 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 OrganizationsService->DeleteOrgsIDOwnersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestResponse DeleteOrgsIDOwnersIDWithIRestResponse(string userID, string orgID,
string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Remove an owner from an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of Object(void)
public RestRequest DeleteOrgsIDOwnersIDWithRestRequest(string userID, string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'userID' is set
if (userID == null)
{
throw new ApiException(400,
"Missing required parameter 'userID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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 an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteOrgsIDOwnersIDAsync(string userID, string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
return DeleteOrgsIDOwnersIDAsyncWithHttpInfo(userID, orgID, zapTraceSpan, cancellationToken);
}
///
/// Remove an owner from an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteOrgsIDOwnersIDAsyncWithHttpInfo(
string userID, string orgID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await DeleteOrgsIDOwnersIDAsyncWithIRestResponse(userID, orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteOrgsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Remove an owner from an organization
///
/// Thrown when fails to make API call
/// The ID of the owner to remove.
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteOrgsIDOwnersIDAsyncWithIRestResponse(string userID,
string orgID, 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 OrganizationsService->DeleteOrgsIDOwnersID");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->DeleteOrgsIDOwnersID");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("DeleteOrgsIDOwnersID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Organizations
public Organizations GetOrgs(string zapTraceSpan = null, int? offset = null, int? limit = null,
bool? descending = null, string org = null, string orgID = null, string userID = null)
{
var localVarResponse = GetOrgsWithHttpInfo(zapTraceSpan, offset, limit, descending, org, orgID, userID);
return localVarResponse.Data;
}
///
/// List all organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// ApiResponse of Organizations
public ApiResponse GetOrgsWithHttpInfo(string zapTraceSpan = null, int? offset = null,
int? limit = null, bool? descending = null, string org = null, string orgID = null, string userID = null)
{
var localVarPath = "/api/v2/orgs";
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 (descending != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "descending", @descending)); // 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 (userID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "userID", userID)); // 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("GetOrgs", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Organizations)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organizations)));
}
///
/// List all organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Cancellation token
/// ApiResponse of Organizations
public async System.Threading.Tasks.Task GetOrgsWithIRestResponseAsync(string zapTraceSpan = null,
int? offset = null, int? limit = null, bool? descending = null, string org = null, string orgID = null,
string userID = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/orgs";
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 (descending != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "descending", @descending)); // 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 (userID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "userID", userID)); // 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("GetOrgs", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// ApiResponse of Organizations
public RestResponse GetOrgsWithIRestResponse(string zapTraceSpan = null, int? offset = null, int? limit = null,
bool? descending = null, string org = null, string orgID = null, string userID = null)
{
var localVarPath = "/api/v2/orgs";
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 (descending != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "descending", @descending)); // 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 (userID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "userID", userID)); // 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("GetOrgs", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// ApiResponse of Organizations
public RestRequest GetOrgsWithRestRequest(string zapTraceSpan = null, int? offset = null, int? limit = null,
bool? descending = null, string org = null, string orgID = null, string userID = null)
{
var localVarPath = "/api/v2/orgs";
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 (descending != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "descending", @descending)); // 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 (userID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "userID", userID)); // 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 organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Cancellation token
/// Task of Organizations
public async System.Threading.Tasks.Task GetOrgsAsync(string zapTraceSpan = null,
int? offset = null, int? limit = null, bool? descending = null, string org = null, string orgID = null,
string userID = null, CancellationToken cancellationToken = default)
{
var localVarResponse =
await GetOrgsAsyncWithHttpInfo(zapTraceSpan, offset, limit, descending, org, orgID, userID,
cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// List all organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Cancellation token
/// Task of ApiResponse (Organizations)
public async System.Threading.Tasks.Task> GetOrgsAsyncWithHttpInfo(
string zapTraceSpan = null, int? offset = null, int? limit = null, bool? descending = null,
string org = null, string orgID = null, string userID = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await GetOrgsAsyncWithIRestResponse(zapTraceSpan, offset, limit, descending, org, orgID, userID,
cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetOrgs", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Organizations)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organizations)));
}
///
/// List all organizations
///
/// Thrown when fails to make API call
/// OpenTracing span context (optional)
/// (optional)
/// (optional, default to 20)
/// (optional, default to false)
/// Filter organizations to a specific organization name. (optional)
/// Filter organizations to a specific organization ID. (optional)
/// Filter organizations to a specific user ID. (optional)
/// Cancellation token
/// Task of RestResponse (Organizations)
public async System.Threading.Tasks.Task GetOrgsAsyncWithIRestResponse(string zapTraceSpan = null,
int? offset = null, int? limit = null, bool? descending = null, string org = null, string orgID = null,
string userID = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/orgs";
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 (descending != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "descending", @descending)); // 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 (userID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "userID", userID)); // 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("GetOrgs", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Organization
public Organization GetOrgsID(string orgID, string zapTraceSpan = null)
{
var localVarResponse = GetOrgsIDWithHttpInfo(orgID, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Retrieve an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// ApiResponse of Organization
public ApiResponse GetOrgsIDWithHttpInfo(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Organization)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organization)));
}
///
/// Retrieve an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of Organization
public async System.Threading.Tasks.Task GetOrgsIDWithIRestResponseAsync(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// ApiResponse of Organization
public RestResponse GetOrgsIDWithIRestResponse(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// ApiResponse of Organization
public RestRequest GetOrgsIDWithRestRequest(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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 an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of Organization
public async System.Threading.Tasks.Task GetOrgsIDAsync(string orgID, string zapTraceSpan = null,
CancellationToken cancellationToken = default)
{
var localVarResponse = await GetOrgsIDAsyncWithHttpInfo(orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Retrieve an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (Organization)
public async System.Threading.Tasks.Task> GetOrgsIDAsyncWithHttpInfo(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await GetOrgsIDAsyncWithIRestResponse(orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Organization)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organization)));
}
///
/// Retrieve an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (Organization)
public async System.Threading.Tasks.Task GetOrgsIDAsyncWithIRestResponse(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsID", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ResourceMembers
public ResourceMembers GetOrgsIDMembers(string orgID, string zapTraceSpan = null)
{
var localVarResponse = GetOrgsIDMembersWithHttpInfo(orgID, zapTraceSpan);
return localVarResponse.Data;
}
///
/// List all members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMembers
public ApiResponse GetOrgsIDMembersWithHttpInfo(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDMembers");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDMembers", 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 members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of ResourceMembers
public async System.Threading.Tasks.Task GetOrgsIDMembersWithIRestResponseAsync(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDMembers");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDMembers", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMembers
public RestResponse GetOrgsIDMembersWithIRestResponse(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDMembers");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDMembers", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceMembers
public RestRequest GetOrgsIDMembersWithRestRequest(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDMembers");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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 members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceMembers
public async System.Threading.Tasks.Task GetOrgsIDMembersAsync(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarResponse = await GetOrgsIDMembersAsyncWithHttpInfo(orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// List all members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceMembers)
public async System.Threading.Tasks.Task> GetOrgsIDMembersAsyncWithHttpInfo(
string orgID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await GetOrgsIDMembersAsyncWithIRestResponse(orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetOrgsIDMembers", 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 members of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (ResourceMembers)
public async System.Threading.Tasks.Task GetOrgsIDMembersAsyncWithIRestResponse(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDMembers");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDMembers", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all owners of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ResourceOwners
public ResourceOwners GetOrgsIDOwners(string orgID, string zapTraceSpan = null)
{
var localVarResponse = GetOrgsIDOwnersWithHttpInfo(orgID, zapTraceSpan);
return localVarResponse.Data;
}
///
/// List all owners of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwners
public ApiResponse GetOrgsIDOwnersWithHttpInfo(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDOwners");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDOwners", 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 an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// ApiResponse of ResourceOwners
public async System.Threading.Tasks.Task GetOrgsIDOwnersWithIRestResponseAsync(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDOwners");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDOwners", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all owners of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwners
public RestResponse GetOrgsIDOwnersWithIRestResponse(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDOwners");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDOwners", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List all owners of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// ApiResponse of ResourceOwners
public RestRequest GetOrgsIDOwnersWithRestRequest(string orgID, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDOwners");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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 an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ResourceOwners
public async System.Threading.Tasks.Task GetOrgsIDOwnersAsync(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
var localVarResponse = await GetOrgsIDOwnersAsyncWithHttpInfo(orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// List all owners of an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of ApiResponse (ResourceOwners)
public async System.Threading.Tasks.Task> GetOrgsIDOwnersAsyncWithHttpInfo(
string orgID, string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await GetOrgsIDOwnersAsyncWithIRestResponse(orgID, zapTraceSpan, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("GetOrgsIDOwners", 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 an organization
///
/// Thrown when fails to make API call
/// The organization ID.
/// OpenTracing span context (optional)
/// Cancellation token
/// Task of RestResponse (ResourceOwners)
public async System.Threading.Tasks.Task GetOrgsIDOwnersAsyncWithIRestResponse(string orgID,
string zapTraceSpan = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->GetOrgsIDOwners");
}
var localVarPath = "/api/v2/orgs/{orgID}/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 (orgID != null)
{
localVarPathParams.Add("orgID", Configuration.ApiClient.ParameterToString(orgID)); // 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("GetOrgsIDOwners", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Update an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// Organization update to apply
/// OpenTracing span context (optional)
/// Organization
public Organization PatchOrgsID(string orgID, PatchOrganizationRequest patchOrganizationRequest,
string zapTraceSpan = null)
{
var localVarResponse = PatchOrgsIDWithHttpInfo(orgID, patchOrganizationRequest, zapTraceSpan);
return localVarResponse.Data;
}
///
/// Update an organization
///
/// Thrown when fails to make API call
/// The ID of the organization to get.
/// Organization update to apply
/// OpenTracing span context (optional)
/// ApiResponse of Organization
public ApiResponse PatchOrgsIDWithHttpInfo(string orgID,
PatchOrganizationRequest patchOrganizationRequest, string zapTraceSpan = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling OrganizationsService->PatchOrgsID");
}
// verify the required parameter 'patchOrganizationRequest' is set
if (patchOrganizationRequest == null)
{
throw new ApiException(400,
"Missing required parameter 'patchOrganizationRequest' when calling OrganizationsService->PatchOrgsID");
}
var localVarPath = "/api/v2/orgs/{orgID}";
var localVarPathParams = new Dictionary