/* * 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 INotificationEndpointsService : IApiAccessor { #region Synchronous Operations /// /// Add a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// Notification endpoint to create /// NotificationEndpoint NotificationEndpoint CreateNotificationEndpoint(NotificationEndpoint notificationEndpoint); /// /// Add a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// Notification endpoint to create /// ApiResponse of NotificationEndpoint ApiResponse CreateNotificationEndpointWithHttpInfo( NotificationEndpoint notificationEndpoint); /// /// Delete a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// void DeleteNotificationEndpointsID(string endpointID, string zapTraceSpan = null); /// /// Delete a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteNotificationEndpointsIDWithHttpInfo(string endpointID, string zapTraceSpan = null); /// /// Delete a label from a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// void DeleteNotificationEndpointsIDLabelsID(string endpointID, string labelID, string zapTraceSpan = null); /// /// Delete a label from a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteNotificationEndpointsIDLabelsIDWithHttpInfo(string endpointID, string labelID, string zapTraceSpan = null); /// /// List all notification endpoints /// /// /// /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// NotificationEndpoints NotificationEndpoints GetNotificationEndpoints(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null); /// /// List all notification endpoints /// /// /// /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of NotificationEndpoints ApiResponse GetNotificationEndpointsWithHttpInfo(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null); /// /// Retrieve a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// NotificationEndpoint NotificationEndpoint GetNotificationEndpointsID(string endpointID, string zapTraceSpan = null); /// /// Retrieve a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint ApiResponse GetNotificationEndpointsIDWithHttpInfo(string endpointID, string zapTraceSpan = null); /// /// List all labels for a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// LabelsResponse LabelsResponse GetNotificationEndpointsIDLabels(string endpointID, string zapTraceSpan = null); /// /// List all labels for a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse ApiResponse GetNotificationEndpointsIDLabelsWithHttpInfo(string endpointID, string zapTraceSpan = null); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// NotificationEndpoint NotificationEndpoint PatchNotificationEndpointsID(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint ApiResponse PatchNotificationEndpointsIDWithHttpInfo(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null); /// /// Add a label to a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse LabelResponse PostNotificationEndpointIDLabels(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null); /// /// Add a label to a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse ApiResponse PostNotificationEndpointIDLabelsWithHttpInfo(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// NotificationEndpoint NotificationEndpoint PutNotificationEndpointsID(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint ApiResponse PutNotificationEndpointsIDWithHttpInfo(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null); #endregion Synchronous Operations #region Asynchronous Operations /// /// Add a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// Notification endpoint to create /// Cancellation token /// Task of NotificationEndpoint System.Threading.Tasks.Task CreateNotificationEndpointAsync( NotificationEndpoint notificationEndpoint, CancellationToken cancellationToken = default); /// /// Add a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// Notification endpoint to create /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) System.Threading.Tasks.Task> CreateNotificationEndpointAsyncWithHttpInfo( NotificationEndpoint notificationEndpoint, CancellationToken cancellationToken = default); /// /// Delete a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteNotificationEndpointsIDAsync(string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteNotificationEndpointsIDAsyncWithHttpInfo( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete a label from a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteNotificationEndpointsIDLabelsIDAsync(string endpointID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete a label from a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteNotificationEndpointsIDLabelsIDAsyncWithHttpInfo( string endpointID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all notification endpoints /// /// /// /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of NotificationEndpoints System.Threading.Tasks.Task GetNotificationEndpointsAsync(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default); /// /// List all notification endpoints /// /// /// /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of ApiResponse (NotificationEndpoints) System.Threading.Tasks.Task> GetNotificationEndpointsAsyncWithHttpInfo( string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default); /// /// Retrieve a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of NotificationEndpoint System.Threading.Tasks.Task GetNotificationEndpointsIDAsync(string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Retrieve a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) System.Threading.Tasks.Task> GetNotificationEndpointsIDAsyncWithHttpInfo( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all labels for a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelsResponse System.Threading.Tasks.Task GetNotificationEndpointsIDLabelsAsync(string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all labels for a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelsResponse) System.Threading.Tasks.Task> GetNotificationEndpointsIDLabelsAsyncWithHttpInfo( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of NotificationEndpoint System.Threading.Tasks.Task PatchNotificationEndpointsIDAsync(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) System.Threading.Tasks.Task> PatchNotificationEndpointsIDAsyncWithHttpInfo( string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a label to a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelResponse System.Threading.Tasks.Task PostNotificationEndpointIDLabelsAsync(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a label to a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelResponse) System.Threading.Tasks.Task> PostNotificationEndpointIDLabelsAsyncWithHttpInfo( string endpointID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// Cancellation token /// Task of NotificationEndpoint System.Threading.Tasks.Task PutNotificationEndpointsIDAsync(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a notification endpoint /// /// /// /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) System.Threading.Tasks.Task> PutNotificationEndpointsIDAsyncWithHttpInfo( string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null, CancellationToken cancellationToken = default); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class NotificationEndpointsService : INotificationEndpointsService { private ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. /// /// public NotificationEndpointsService(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 NotificationEndpointsService(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); } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// NotificationEndpoint public NotificationEndpoint CreateNotificationEndpoint(NotificationEndpoint notificationEndpoint) { var localVarResponse = CreateNotificationEndpointWithHttpInfo(notificationEndpoint); return localVarResponse.Data; } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// ApiResponse of NotificationEndpoint public ApiResponse CreateNotificationEndpointWithHttpInfo( NotificationEndpoint notificationEndpoint) { // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->CreateNotificationEndpoint"); } var localVarPath = "/api/v2/notificationEndpoints"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("CreateNotificationEndpoint", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// Cancellation token /// ApiResponse of NotificationEndpoint public async System.Threading.Tasks.Task CreateNotificationEndpointWithIRestResponseAsync( NotificationEndpoint notificationEndpoint, CancellationToken cancellationToken = default) { // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->CreateNotificationEndpoint"); } var localVarPath = "/api/v2/notificationEndpoints"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("CreateNotificationEndpoint", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// ApiResponse of NotificationEndpoint public RestResponse CreateNotificationEndpointWithIRestResponse(NotificationEndpoint notificationEndpoint) { // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->CreateNotificationEndpoint"); } var localVarPath = "/api/v2/notificationEndpoints"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("CreateNotificationEndpoint", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// ApiResponse of NotificationEndpoint public RestRequest CreateNotificationEndpointWithRestRequest(NotificationEndpoint notificationEndpoint) { // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->CreateNotificationEndpoint"); } var localVarPath = "/api/v2/notificationEndpoints"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// Cancellation token /// Task of NotificationEndpoint public async System.Threading.Tasks.Task CreateNotificationEndpointAsync( NotificationEndpoint notificationEndpoint, CancellationToken cancellationToken = default) { var localVarResponse = await CreateNotificationEndpointAsyncWithHttpInfo(notificationEndpoint, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) public async System.Threading.Tasks.Task> CreateNotificationEndpointAsyncWithHttpInfo(NotificationEndpoint notificationEndpoint, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await CreateNotificationEndpointAsyncWithIRestResponse(notificationEndpoint, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("CreateNotificationEndpoint", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Add a notification endpoint /// /// Thrown when fails to make API call /// Notification endpoint to create /// Cancellation token /// Task of RestResponse (NotificationEndpoint) public async System.Threading.Tasks.Task CreateNotificationEndpointAsyncWithIRestResponse( NotificationEndpoint notificationEndpoint, CancellationToken cancellationToken = default) { // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->CreateNotificationEndpoint"); } var localVarPath = "/api/v2/notificationEndpoints"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("CreateNotificationEndpoint", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// public void DeleteNotificationEndpointsID(string endpointID, string zapTraceSpan = null) { DeleteNotificationEndpointsIDWithHttpInfo(endpointID, zapTraceSpan); } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteNotificationEndpointsIDWithHttpInfo(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("DeleteNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteNotificationEndpointsIDWithIRestResponseAsync( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("DeleteNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteNotificationEndpointsIDWithIRestResponse(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("DeleteNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteNotificationEndpointsIDWithRestRequest(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteNotificationEndpointsIDAsync(string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteNotificationEndpointsIDAsyncWithHttpInfo(endpointID, zapTraceSpan, cancellationToken); } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteNotificationEndpointsIDAsyncWithHttpInfo( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteNotificationEndpointsIDAsyncWithIRestResponse(endpointID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteNotificationEndpointsIDAsyncWithIRestResponse( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("DeleteNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// public void DeleteNotificationEndpointsIDLabelsID(string endpointID, string labelID, string zapTraceSpan = null) { DeleteNotificationEndpointsIDLabelsIDWithHttpInfo(endpointID, labelID, zapTraceSpan); } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteNotificationEndpointsIDLabelsIDWithHttpInfo(string endpointID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (labelID != null) { localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteNotificationEndpointsIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteNotificationEndpointsIDLabelsIDWithIRestResponseAsync(string endpointID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (labelID != null) { localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteNotificationEndpointsIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteNotificationEndpointsIDLabelsIDWithIRestResponse(string endpointID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (labelID != null) { localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteNotificationEndpointsIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteNotificationEndpointsIDLabelsIDWithRestRequest(string endpointID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (labelID != null) { localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteNotificationEndpointsIDLabelsIDAsync(string endpointID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteNotificationEndpointsIDLabelsIDAsyncWithHttpInfo(endpointID, labelID, zapTraceSpan, cancellationToken); } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteNotificationEndpointsIDLabelsIDAsyncWithHttpInfo(string endpointID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteNotificationEndpointsIDLabelsIDAsyncWithIRestResponse(endpointID, labelID, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteNotificationEndpointsIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a label from a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// The ID of the label to delete. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteNotificationEndpointsIDLabelsIDAsyncWithIRestResponse(string endpointID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling NotificationEndpointsService->DeleteNotificationEndpointsIDLabelsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (labelID != null) { localVarPathParams.Add("labelID", Configuration.ApiClient.ParameterToString(labelID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteNotificationEndpointsIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// NotificationEndpoints public NotificationEndpoints GetNotificationEndpoints(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { var localVarResponse = GetNotificationEndpointsWithHttpInfo(orgID, zapTraceSpan, offset, limit); return localVarResponse.Data; } /// /// List all notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of NotificationEndpoints public ApiResponse GetNotificationEndpointsWithHttpInfo(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling NotificationEndpointsService->GetNotificationEndpoints"); } var localVarPath = "/api/v2/notificationEndpoints"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetNotificationEndpoints", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoints)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoints))); } /// /// List all notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// ApiResponse of NotificationEndpoints public async System.Threading.Tasks.Task GetNotificationEndpointsWithIRestResponseAsync( string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling NotificationEndpointsService->GetNotificationEndpoints"); } var localVarPath = "/api/v2/notificationEndpoints"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetNotificationEndpoints", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of NotificationEndpoints public RestResponse GetNotificationEndpointsWithIRestResponse(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling NotificationEndpointsService->GetNotificationEndpoints"); } var localVarPath = "/api/v2/notificationEndpoints"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetNotificationEndpoints", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// ApiResponse of NotificationEndpoints public RestRequest GetNotificationEndpointsWithRestRequest(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling NotificationEndpointsService->GetNotificationEndpoints"); } var localVarPath = "/api/v2/notificationEndpoints"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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 notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of NotificationEndpoints public async System.Threading.Tasks.Task GetNotificationEndpointsAsync(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetNotificationEndpointsAsyncWithHttpInfo(orgID, zapTraceSpan, offset, limit, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of ApiResponse (NotificationEndpoints) public async System.Threading.Tasks.Task> GetNotificationEndpointsAsyncWithHttpInfo(string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetNotificationEndpointsAsyncWithIRestResponse(orgID, zapTraceSpan, offset, limit, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetNotificationEndpoints", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoints)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoints))); } /// /// List all notification endpoints /// /// Thrown when fails to make API call /// Only show notification endpoints that belong to specific organization ID. /// OpenTracing span context (optional) /// (optional) /// (optional, default to 20) /// Cancellation token /// Task of RestResponse (NotificationEndpoints) public async System.Threading.Tasks.Task GetNotificationEndpointsAsyncWithIRestResponse( string orgID, string zapTraceSpan = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) { // verify the required parameter 'orgID' is set if (orgID == null) { throw new ApiException(400, "Missing required parameter 'orgID' when calling NotificationEndpointsService->GetNotificationEndpoints"); } var localVarPath = "/api/v2/notificationEndpoints"; 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 (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // 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("GetNotificationEndpoints", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// NotificationEndpoint public NotificationEndpoint GetNotificationEndpointsID(string endpointID, string zapTraceSpan = null) { var localVarResponse = GetNotificationEndpointsIDWithHttpInfo(endpointID, zapTraceSpan); return localVarResponse.Data; } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public ApiResponse GetNotificationEndpointsIDWithHttpInfo(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of NotificationEndpoint public async System.Threading.Tasks.Task GetNotificationEndpointsIDWithIRestResponseAsync( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public RestResponse GetNotificationEndpointsIDWithIRestResponse(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public RestRequest GetNotificationEndpointsIDWithRestRequest(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of NotificationEndpoint public async System.Threading.Tasks.Task GetNotificationEndpointsIDAsync( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetNotificationEndpointsIDAsyncWithHttpInfo(endpointID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) public async System.Threading.Tasks.Task> GetNotificationEndpointsIDAsyncWithHttpInfo(string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetNotificationEndpointsIDAsyncWithIRestResponse(endpointID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Retrieve a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (NotificationEndpoint) public async System.Threading.Tasks.Task GetNotificationEndpointsIDAsyncWithIRestResponse( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; 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 (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// LabelsResponse public LabelsResponse GetNotificationEndpointsIDLabels(string endpointID, string zapTraceSpan = null) { var localVarResponse = GetNotificationEndpointsIDLabelsWithHttpInfo(endpointID, zapTraceSpan); return localVarResponse.Data; } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public ApiResponse GetNotificationEndpointsIDLabelsWithHttpInfo(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelsResponse))); } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelsResponse public async System.Threading.Tasks.Task GetNotificationEndpointsIDLabelsWithIRestResponseAsync( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestResponse GetNotificationEndpointsIDLabelsWithIRestResponse(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestRequest GetNotificationEndpointsIDLabelsWithRestRequest(string endpointID, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelsResponse public async System.Threading.Tasks.Task GetNotificationEndpointsIDLabelsAsync( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetNotificationEndpointsIDLabelsAsyncWithHttpInfo(endpointID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelsResponse) public async System.Threading.Tasks.Task> GetNotificationEndpointsIDLabelsAsyncWithHttpInfo(string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetNotificationEndpointsIDLabelsAsyncWithIRestResponse(endpointID, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetNotificationEndpointsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelsResponse))); } /// /// List all labels for a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelsResponse) public async System.Threading.Tasks.Task GetNotificationEndpointsIDLabelsAsyncWithIRestResponse( string endpointID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->GetNotificationEndpointsIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // 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("GetNotificationEndpointsIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// NotificationEndpoint public NotificationEndpoint PatchNotificationEndpointsID(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null) { var localVarResponse = PatchNotificationEndpointsIDWithHttpInfo(endpointID, notificationEndpointUpdate, zapTraceSpan); return localVarResponse.Data; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public ApiResponse PatchNotificationEndpointsIDWithHttpInfo(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } // verify the required parameter 'notificationEndpointUpdate' is set if (notificationEndpointUpdate == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpointUpdate' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpointUpdate != null && notificationEndpointUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpointUpdate); // http body (model) parameter } else { localVarPostBody = notificationEndpointUpdate; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of NotificationEndpoint public async System.Threading.Tasks.Task PatchNotificationEndpointsIDWithIRestResponseAsync( string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } // verify the required parameter 'notificationEndpointUpdate' is set if (notificationEndpointUpdate == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpointUpdate' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpointUpdate != null && notificationEndpointUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpointUpdate); // http body (model) parameter } else { localVarPostBody = notificationEndpointUpdate; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public RestResponse PatchNotificationEndpointsIDWithIRestResponse(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } // verify the required parameter 'notificationEndpointUpdate' is set if (notificationEndpointUpdate == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpointUpdate' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpointUpdate != null && notificationEndpointUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpointUpdate); // http body (model) parameter } else { localVarPostBody = notificationEndpointUpdate; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public RestRequest PatchNotificationEndpointsIDWithRestRequest(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } // verify the required parameter 'notificationEndpointUpdate' is set if (notificationEndpointUpdate == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpointUpdate' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpointUpdate != null && notificationEndpointUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpointUpdate); // http body (model) parameter } else { localVarPostBody = notificationEndpointUpdate; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of NotificationEndpoint public async System.Threading.Tasks.Task PatchNotificationEndpointsIDAsync( string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PatchNotificationEndpointsIDAsyncWithHttpInfo(endpointID, notificationEndpointUpdate, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) public async System.Threading.Tasks.Task> PatchNotificationEndpointsIDAsyncWithHttpInfo(string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PatchNotificationEndpointsIDAsyncWithIRestResponse(endpointID, notificationEndpointUpdate, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Check update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (NotificationEndpoint) public async System.Threading.Tasks.Task PatchNotificationEndpointsIDAsyncWithIRestResponse( string endpointID, NotificationEndpointUpdate notificationEndpointUpdate, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } // verify the required parameter 'notificationEndpointUpdate' is set if (notificationEndpointUpdate == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpointUpdate' when calling NotificationEndpointsService->PatchNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpointUpdate != null && notificationEndpointUpdate.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpointUpdate); // http body (model) parameter } else { localVarPostBody = notificationEndpointUpdate; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse public LabelResponse PostNotificationEndpointIDLabels(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null) { var localVarResponse = PostNotificationEndpointIDLabelsWithHttpInfo(endpointID, labelMapping, zapTraceSpan); return localVarResponse.Data; } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public ApiResponse PostNotificationEndpointIDLabelsWithHttpInfo(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostNotificationEndpointIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelResponse))); } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelResponse public async System.Threading.Tasks.Task PostNotificationEndpointIDLabelsWithIRestResponseAsync( string endpointID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostNotificationEndpointIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public RestResponse PostNotificationEndpointIDLabelsWithIRestResponse(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostNotificationEndpointIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public RestRequest PostNotificationEndpointIDLabelsWithRestRequest(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelResponse public async System.Threading.Tasks.Task PostNotificationEndpointIDLabelsAsync(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostNotificationEndpointIDLabelsAsyncWithHttpInfo(endpointID, labelMapping, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelResponse) public async System.Threading.Tasks.Task> PostNotificationEndpointIDLabelsAsyncWithHttpInfo(string endpointID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostNotificationEndpointIDLabelsAsyncWithIRestResponse(endpointID, labelMapping, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostNotificationEndpointIDLabels", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (LabelResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelResponse))); } /// /// Add a label to a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelResponse) public async System.Threading.Tasks.Task PostNotificationEndpointIDLabelsAsyncWithIRestResponse( string endpointID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling NotificationEndpointsService->PostNotificationEndpointIDLabels"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}/labels"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (labelMapping != null && labelMapping.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(labelMapping); // http body (model) parameter } else { localVarPostBody = labelMapping; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostNotificationEndpointIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// NotificationEndpoint public NotificationEndpoint PutNotificationEndpointsID(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null) { var localVarResponse = PutNotificationEndpointsIDWithHttpInfo(endpointID, notificationEndpoint, zapTraceSpan); return localVarResponse.Data; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public ApiResponse PutNotificationEndpointsIDWithHttpInfo(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of NotificationEndpoint public async System.Threading.Tasks.Task PutNotificationEndpointsIDWithIRestResponseAsync( string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public RestResponse PutNotificationEndpointsIDWithIRestResponse(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// ApiResponse of NotificationEndpoint public RestRequest PutNotificationEndpointsIDWithRestRequest(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// Cancellation token /// Task of NotificationEndpoint public async System.Threading.Tasks.Task PutNotificationEndpointsIDAsync( string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PutNotificationEndpointsIDAsyncWithHttpInfo(endpointID, notificationEndpoint, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (NotificationEndpoint) public async System.Threading.Tasks.Task> PutNotificationEndpointsIDAsyncWithHttpInfo(string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PutNotificationEndpointsIDAsyncWithIRestResponse(endpointID, notificationEndpoint, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PutNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (NotificationEndpoint)Configuration.ApiClient.Deserialize(localVarResponse, typeof(NotificationEndpoint))); } /// /// Update a notification endpoint /// /// Thrown when fails to make API call /// The notification endpoint ID. /// A new notification endpoint to replace the existing endpoint with /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (NotificationEndpoint) public async System.Threading.Tasks.Task PutNotificationEndpointsIDAsyncWithIRestResponse( string endpointID, NotificationEndpoint notificationEndpoint, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'endpointID' is set if (endpointID == null) { throw new ApiException(400, "Missing required parameter 'endpointID' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } // verify the required parameter 'notificationEndpoint' is set if (notificationEndpoint == null) { throw new ApiException(400, "Missing required parameter 'notificationEndpoint' when calling NotificationEndpointsService->PutNotificationEndpointsID"); } var localVarPath = "/api/v2/notificationEndpoints/{endpointID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (endpointID != null) { localVarPathParams.Add("endpointID", Configuration.ApiClient.ParameterToString(endpointID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (notificationEndpoint != null && notificationEndpoint.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(notificationEndpoint); // http body (model) parameter } else { localVarPostBody = notificationEndpoint; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PutNotificationEndpointsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } } }