/* * 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 IScraperTargetsService : IApiAccessor { #region Synchronous Operations /// /// Delete a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// void DeleteScrapersID(string scraperTargetID, string zapTraceSpan = null); /// /// Delete a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteScrapersIDWithHttpInfo(string scraperTargetID, string zapTraceSpan = null); /// /// Delete a label from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// void DeleteScrapersIDLabelsID(string scraperTargetID, string labelID, string zapTraceSpan = null); /// /// Delete a label from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteScrapersIDLabelsIDWithHttpInfo(string scraperTargetID, string labelID, string zapTraceSpan = null); /// /// Remove a member from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// void DeleteScrapersIDMembersID(string userID, string scraperTargetID, string zapTraceSpan = null); /// /// Remove a member from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteScrapersIDMembersIDWithHttpInfo(string userID, string scraperTargetID, string zapTraceSpan = null); /// /// Remove an owner from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// void DeleteScrapersIDOwnersID(string userID, string scraperTargetID, string zapTraceSpan = null); /// /// Remove an owner from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) ApiResponse DeleteScrapersIDOwnersIDWithHttpInfo(string userID, string scraperTargetID, string zapTraceSpan = null); /// /// List all scraper targets /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// ScraperTargetResponses ScraperTargetResponses GetScrapers(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null); /// /// List all scraper targets /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// ApiResponse of ScraperTargetResponses ApiResponse GetScrapersWithHttpInfo(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null); /// /// Retrieve a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ScraperTargetResponse ScraperTargetResponse GetScrapersID(string scraperTargetID, string zapTraceSpan = null); /// /// Retrieve a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse ApiResponse GetScrapersIDWithHttpInfo(string scraperTargetID, string zapTraceSpan = null); /// /// List all labels for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// LabelsResponse LabelsResponse GetScrapersIDLabels(string scraperTargetID, string zapTraceSpan = null); /// /// List all labels for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse ApiResponse GetScrapersIDLabelsWithHttpInfo(string scraperTargetID, string zapTraceSpan = null); /// /// List all users with member privileges for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ResourceMembers ResourceMembers GetScrapersIDMembers(string scraperTargetID, string zapTraceSpan = null); /// /// List all users with member privileges for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceMembers ApiResponse GetScrapersIDMembersWithHttpInfo(string scraperTargetID, string zapTraceSpan = null); /// /// List all owners of a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ResourceOwners ResourceOwners GetScrapersIDOwners(string scraperTargetID, string zapTraceSpan = null); /// /// List all owners of a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners ApiResponse GetScrapersIDOwnersWithHttpInfo(string scraperTargetID, string zapTraceSpan = null); /// /// Update a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// ScraperTargetResponse ScraperTargetResponse PatchScrapersID(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null); /// /// Update a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse ApiResponse PatchScrapersIDWithHttpInfo(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null); /// /// Create a scraper target /// /// /// /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// ScraperTargetResponse ScraperTargetResponse PostScrapers(ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null); /// /// Create a scraper target /// /// /// /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse ApiResponse PostScrapersWithHttpInfo(ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null); /// /// Add a label to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse LabelResponse PostScrapersIDLabels(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null); /// /// Add a label to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse ApiResponse PostScrapersIDLabelsWithHttpInfo(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null); /// /// Add a member to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// ResourceMember ResourceMember PostScrapersIDMembers(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null); /// /// Add a member to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// ApiResponse of ResourceMember ApiResponse PostScrapersIDMembersWithHttpInfo(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null); /// /// Add an owner to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// ResourceOwner ResourceOwner PostScrapersIDOwners(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null); /// /// Add an owner to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// ApiResponse of ResourceOwner ApiResponse PostScrapersIDOwnersWithHttpInfo(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null); #endregion Synchronous Operations #region Asynchronous Operations /// /// Delete a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteScrapersIDAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteScrapersIDAsyncWithHttpInfo(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete a label from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteScrapersIDLabelsIDAsync(string scraperTargetID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Delete a label from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteScrapersIDLabelsIDAsyncWithHttpInfo( string scraperTargetID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Remove a member from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteScrapersIDMembersIDAsync(string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Remove a member from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteScrapersIDMembersIDAsyncWithHttpInfo(string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Remove an owner from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void System.Threading.Tasks.Task DeleteScrapersIDOwnersIDAsync(string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Remove an owner from a scraper target /// /// /// /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse System.Threading.Tasks.Task> DeleteScrapersIDOwnersIDAsyncWithHttpInfo(string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all scraper targets /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// Cancellation token /// Task of ScraperTargetResponses System.Threading.Tasks.Task GetScrapersAsync(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// List all scraper targets /// /// /// /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponses) System.Threading.Tasks.Task> GetScrapersAsyncWithHttpInfo( string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null, CancellationToken cancellationToken = default); /// /// Retrieve a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of ScraperTargetResponse System.Threading.Tasks.Task GetScrapersIDAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Retrieve a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponse) System.Threading.Tasks.Task> GetScrapersIDAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all labels for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelsResponse System.Threading.Tasks.Task GetScrapersIDLabelsAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all labels for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelsResponse) System.Threading.Tasks.Task> GetScrapersIDLabelsAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all users with member privileges for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceMembers System.Threading.Tasks.Task GetScrapersIDMembersAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all users with member privileges for a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceMembers) System.Threading.Tasks.Task> GetScrapersIDMembersAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all owners of a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceOwners System.Threading.Tasks.Task GetScrapersIDOwnersAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// List all owners of a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceOwners) System.Threading.Tasks.Task> GetScrapersIDOwnersAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ScraperTargetResponse System.Threading.Tasks.Task PatchScrapersIDAsync(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Update a scraper target /// /// /// /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponse) System.Threading.Tasks.Task> PatchScrapersIDAsyncWithHttpInfo( string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Create a scraper target /// /// /// /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// Cancellation token /// Task of ScraperTargetResponse System.Threading.Tasks.Task PostScrapersAsync(ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Create a scraper target /// /// /// /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponse) System.Threading.Tasks.Task> PostScrapersAsyncWithHttpInfo( ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a label to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelResponse System.Threading.Tasks.Task PostScrapersIDLabelsAsync(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a label to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelResponse) System.Threading.Tasks.Task> PostScrapersIDLabelsAsyncWithHttpInfo( string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a member to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceMember System.Threading.Tasks.Task PostScrapersIDMembersAsync(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add a member to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceMember) System.Threading.Tasks.Task> PostScrapersIDMembersAsyncWithHttpInfo( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add an owner to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceOwner System.Threading.Tasks.Task PostScrapersIDOwnersAsync(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default); /// /// Add an owner to a scraper target /// /// /// /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceOwner) System.Threading.Tasks.Task> PostScrapersIDOwnersAsyncWithHttpInfo( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class ScraperTargetsService : IScraperTargetsService { private ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. /// /// public ScraperTargetsService(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 ScraperTargetsService(Configuration configuration = null) { if (configuration == null) // use the default one in Configuration { Configuration = Configuration.Default; } else { Configuration = configuration; } ExceptionFactory = Configuration.DefaultExceptionFactory; } /// /// Gets the base path of the API client. /// /// The base path public string GetBasePath() { return Configuration.ApiClient.RestClientOptions.BaseUrl.ToString(); } /// /// Sets the base path of the API client. /// /// The base path [Obsolete( "SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(string basePath) { // do nothing } /// /// Gets or sets the configuration object /// /// An instance of the Configuration public Configuration Configuration { get; set; } /// /// Provides a factory method hook for the creation of exceptions. /// public ExceptionFactory ExceptionFactory { get { if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); } return _exceptionFactory; } set => _exceptionFactory = value; } /// /// Gets the default header. /// /// Dictionary of HTTP header [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] public IDictionary DefaultHeader() { return new ReadOnlyDictionary(Configuration.DefaultHeader); } /// /// Add default header. /// /// Header field name. /// Header field value. /// [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] public void AddDefaultHeader(string key, string value) { Configuration.AddDefaultHeader(key, value); } /// /// Delete a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// public void DeleteScrapersID(string scraperTargetID, string zapTraceSpan = null) { DeleteScrapersIDWithHttpInfo(scraperTargetID, zapTraceSpan); } /// /// Delete a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteScrapersIDWithHttpInfo(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteScrapersIDWithIRestResponseAsync( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteScrapersIDWithIRestResponse(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteScrapersIDWithRestRequest(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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 scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteScrapersIDAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteScrapersIDAsyncWithHttpInfo(scraperTargetID, zapTraceSpan, cancellationToken); } /// /// Delete a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteScrapersIDAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteScrapersIDAsyncWithIRestResponse(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteScrapersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteScrapersIDAsyncWithIRestResponse( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a label from a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// public void DeleteScrapersIDLabelsID(string scraperTargetID, string labelID, string zapTraceSpan = null) { DeleteScrapersIDLabelsIDWithHttpInfo(scraperTargetID, labelID, zapTraceSpan); } /// /// Delete a label from a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteScrapersIDLabelsIDWithHttpInfo(string scraperTargetID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a label from a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteScrapersIDLabelsIDWithIRestResponseAsync( string scraperTargetID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a label from a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteScrapersIDLabelsIDWithIRestResponse(string scraperTargetID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Delete a label from a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteScrapersIDLabelsIDWithRestRequest(string scraperTargetID, string labelID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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 scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteScrapersIDLabelsIDAsync(string scraperTargetID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteScrapersIDLabelsIDAsyncWithHttpInfo(scraperTargetID, labelID, zapTraceSpan, cancellationToken); } /// /// Delete a label from a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteScrapersIDLabelsIDAsyncWithHttpInfo( string scraperTargetID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteScrapersIDLabelsIDAsyncWithIRestResponse(scraperTargetID, labelID, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteScrapersIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Delete a label from a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// The label ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteScrapersIDLabelsIDAsyncWithIRestResponse( string scraperTargetID, string labelID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } // verify the required parameter 'labelID' is set if (labelID == null) { throw new ApiException(400, "Missing required parameter 'labelID' when calling ScraperTargetsService->DeleteScrapersIDLabelsID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDLabelsID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// public void DeleteScrapersIDMembersID(string userID, string scraperTargetID, string zapTraceSpan = null) { DeleteScrapersIDMembersIDWithHttpInfo(userID, scraperTargetID, zapTraceSpan); } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteScrapersIDMembersIDWithHttpInfo(string userID, string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDMembersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteScrapersIDMembersIDWithIRestResponseAsync( string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDMembersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteScrapersIDMembersIDWithIRestResponse(string userID, string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDMembersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteScrapersIDMembersIDWithRestRequest(string userID, string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteScrapersIDMembersIDAsync(string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteScrapersIDMembersIDAsyncWithHttpInfo(userID, scraperTargetID, zapTraceSpan, cancellationToken); } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteScrapersIDMembersIDAsyncWithHttpInfo( string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteScrapersIDMembersIDAsyncWithIRestResponse(userID, scraperTargetID, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteScrapersIDMembersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Remove a member from a scraper target /// /// Thrown when fails to make API call /// The ID of member to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteScrapersIDMembersIDAsyncWithIRestResponse( string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDMembersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDMembersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// public void DeleteScrapersIDOwnersID(string userID, string scraperTargetID, string zapTraceSpan = null) { DeleteScrapersIDOwnersIDWithHttpInfo(userID, scraperTargetID, zapTraceSpan); } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public ApiResponse DeleteScrapersIDOwnersIDWithHttpInfo(string userID, string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDOwnersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of Object(void) public async System.Threading.Tasks.Task DeleteScrapersIDOwnersIDWithIRestResponseAsync( string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDOwnersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestResponse DeleteScrapersIDOwnersIDWithIRestResponse(string userID, string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDOwnersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of Object(void) public RestRequest DeleteScrapersIDOwnersIDWithRestRequest(string userID, string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of void public System.Threading.Tasks.Task DeleteScrapersIDOwnersIDAsync(string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { return DeleteScrapersIDOwnersIDAsyncWithHttpInfo(userID, scraperTargetID, zapTraceSpan, cancellationToken); } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteScrapersIDOwnersIDAsyncWithHttpInfo( string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await DeleteScrapersIDOwnersIDAsyncWithIRestResponse(userID, scraperTargetID, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("DeleteScrapersIDOwnersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), null); } /// /// Remove an owner from a scraper target /// /// Thrown when fails to make API call /// The ID of owner to remove. /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse public async System.Threading.Tasks.Task DeleteScrapersIDOwnersIDAsyncWithIRestResponse( string userID, string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'userID' is set if (userID == null) { throw new ApiException(400, "Missing required parameter 'userID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->DeleteScrapersIDOwnersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners/{userID}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (userID != null) { localVarPathParams.Add("userID", Configuration.ApiClient.ParameterToString(userID)); // path parameter } if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("DeleteScrapersIDOwnersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// ScraperTargetResponses public ScraperTargetResponses GetScrapers(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null) { var localVarResponse = GetScrapersWithHttpInfo(zapTraceSpan, name, id, orgID, org); return localVarResponse.Data; } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// ApiResponse of ScraperTargetResponses public ApiResponse GetScrapersWithHttpInfo(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null) { var localVarPath = "/api/v2/scrapers"; 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 (name != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("multi", "id", id)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponses)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponses))); } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// Cancellation token /// ApiResponse of ScraperTargetResponses public async System.Threading.Tasks.Task GetScrapersWithIRestResponseAsync( string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { var localVarPath = "/api/v2/scrapers"; 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 (name != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("multi", "id", id)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// ApiResponse of ScraperTargetResponses public RestResponse GetScrapersWithIRestResponse(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null) { var localVarPath = "/api/v2/scrapers"; 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 (name != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("multi", "id", id)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// ApiResponse of ScraperTargetResponses public RestRequest GetScrapersWithRestRequest(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null) { var localVarPath = "/api/v2/scrapers"; 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 (name != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("multi", "id", id)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// Cancellation token /// Task of ScraperTargetResponses public async System.Threading.Tasks.Task GetScrapersAsync(string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetScrapersAsyncWithHttpInfo(zapTraceSpan, name, id, orgID, org, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponses) public async System.Threading.Tasks.Task> GetScrapersAsyncWithHttpInfo( string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetScrapersAsyncWithIRestResponse(zapTraceSpan, name, id, orgID, org, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponses)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponses))); } /// /// List all scraper targets /// /// Thrown when fails to make API call /// OpenTracing span context (optional) /// Specifies the name of the scraper target. (optional) /// List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) /// Specifies the organization ID of the scraper target. (optional) /// Specifies the organization name of the scraper target. (optional) /// Cancellation token /// Task of RestResponse (ScraperTargetResponses) public async System.Threading.Tasks.Task GetScrapersAsyncWithIRestResponse( string zapTraceSpan = null, string name = null, List id = null, string orgID = null, string org = null, CancellationToken cancellationToken = default) { var localVarPath = "/api/v2/scrapers"; 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 (name != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter } if (id != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("multi", "id", id)); // query parameter } if (orgID != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter } if (org != null) { localVarQueryParams.AddRange( Configuration.ApiClient.ParameterToKeyValuePairs("", "org", org)); // query parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ScraperTargetResponse public ScraperTargetResponse GetScrapersID(string scraperTargetID, string zapTraceSpan = null) { var localVarResponse = GetScrapersIDWithHttpInfo(scraperTargetID, zapTraceSpan); return localVarResponse.Data; } /// /// Retrieve a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public ApiResponse GetScrapersIDWithHttpInfo(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponse))); } /// /// Retrieve a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ScraperTargetResponse public async System.Threading.Tasks.Task GetScrapersIDWithIRestResponseAsync( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public RestResponse GetScrapersIDWithIRestResponse(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Retrieve a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public RestRequest GetScrapersIDWithRestRequest(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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 scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of ScraperTargetResponse public async System.Threading.Tasks.Task GetScrapersIDAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetScrapersIDAsyncWithHttpInfo(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Retrieve a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponse) public async System.Threading.Tasks.Task> GetScrapersIDAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetScrapersIDAsyncWithIRestResponse(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponse))); } /// /// Retrieve a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ScraperTargetResponse) public async System.Threading.Tasks.Task GetScrapersIDAsyncWithIRestResponse( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// LabelsResponse public LabelsResponse GetScrapersIDLabels(string scraperTargetID, string zapTraceSpan = null) { var localVarResponse = GetScrapersIDLabelsWithHttpInfo(scraperTargetID, zapTraceSpan); return localVarResponse.Data; } /// /// List all labels for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public ApiResponse GetScrapersIDLabelsWithHttpInfo(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDLabels", 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 scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelsResponse public async System.Threading.Tasks.Task GetScrapersIDLabelsWithIRestResponseAsync( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestResponse GetScrapersIDLabelsWithIRestResponse(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all labels for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of LabelsResponse public RestRequest GetScrapersIDLabelsWithRestRequest(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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 scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelsResponse public async System.Threading.Tasks.Task GetScrapersIDLabelsAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetScrapersIDLabelsAsyncWithHttpInfo(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all labels for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelsResponse) public async System.Threading.Tasks.Task> GetScrapersIDLabelsAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetScrapersIDLabelsAsyncWithIRestResponse(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapersIDLabels", 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 scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelsResponse) public async System.Threading.Tasks.Task GetScrapersIDLabelsAsyncWithIRestResponse( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ResourceMembers public ResourceMembers GetScrapersIDMembers(string scraperTargetID, string zapTraceSpan = null) { var localVarResponse = GetScrapersIDMembersWithHttpInfo(scraperTargetID, zapTraceSpan); return localVarResponse.Data; } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceMembers public ApiResponse GetScrapersIDMembersWithHttpInfo(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMembers)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMembers))); } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ResourceMembers public async System.Threading.Tasks.Task GetScrapersIDMembersWithIRestResponseAsync( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceMembers public RestResponse GetScrapersIDMembersWithIRestResponse(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceMembers public RestRequest GetScrapersIDMembersWithRestRequest(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceMembers public async System.Threading.Tasks.Task GetScrapersIDMembersAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetScrapersIDMembersAsyncWithHttpInfo(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceMembers) public async System.Threading.Tasks.Task> GetScrapersIDMembersAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetScrapersIDMembersAsyncWithIRestResponse(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMembers)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMembers))); } /// /// List all users with member privileges for a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ResourceMembers) public async System.Threading.Tasks.Task GetScrapersIDMembersAsyncWithIRestResponse( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ResourceOwners public ResourceOwners GetScrapersIDOwners(string scraperTargetID, string zapTraceSpan = null) { var localVarResponse = GetScrapersIDOwnersWithHttpInfo(scraperTargetID, zapTraceSpan); return localVarResponse.Data; } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public ApiResponse GetScrapersIDOwnersWithHttpInfo(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwners)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwners))); } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ResourceOwners public async System.Threading.Tasks.Task GetScrapersIDOwnersWithIRestResponseAsync( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public RestResponse GetScrapersIDOwnersWithIRestResponse(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// ApiResponse of ResourceOwners public RestRequest GetScrapersIDOwnersWithRestRequest(string scraperTargetID, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceOwners public async System.Threading.Tasks.Task GetScrapersIDOwnersAsync(string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await GetScrapersIDOwnersAsyncWithHttpInfo(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceOwners) public async System.Threading.Tasks.Task> GetScrapersIDOwnersAsyncWithHttpInfo( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await GetScrapersIDOwnersAsyncWithIRestResponse(scraperTargetID, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("GetScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwners)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwners))); } /// /// List all owners of a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ResourceOwners) public async System.Threading.Tasks.Task GetScrapersIDOwnersAsyncWithIRestResponse( string scraperTargetID, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->GetScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("GetScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// ScraperTargetResponse public ScraperTargetResponse PatchScrapersID(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { var localVarResponse = PatchScrapersIDWithHttpInfo(scraperTargetID, scraperTargetRequest, zapTraceSpan); return localVarResponse.Data; } /// /// Update a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public ApiResponse PatchScrapersIDWithHttpInfo(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PatchScrapersID"); } // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PatchScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PatchScrapersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponse))); } /// /// Update a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ScraperTargetResponse public async System.Threading.Tasks.Task PatchScrapersIDWithIRestResponseAsync( string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PatchScrapersID"); } // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PatchScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PatchScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public RestResponse PatchScrapersIDWithIRestResponse(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PatchScrapersID"); } // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PatchScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PatchScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Update a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public RestRequest PatchScrapersIDWithRestRequest(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PatchScrapersID"); } // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PatchScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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 scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ScraperTargetResponse public async System.Threading.Tasks.Task PatchScrapersIDAsync(string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PatchScrapersIDAsyncWithHttpInfo(scraperTargetID, scraperTargetRequest, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Update a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponse) public async System.Threading.Tasks.Task> PatchScrapersIDAsyncWithHttpInfo( string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PatchScrapersIDAsyncWithIRestResponse(scraperTargetID, scraperTargetRequest, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PatchScrapersID", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponse))); } /// /// Update a scraper target /// /// Thrown when fails to make API call /// The identifier of the scraper target. /// Scraper target update to apply /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ScraperTargetResponse) public async System.Threading.Tasks.Task PatchScrapersIDAsyncWithIRestResponse( string scraperTargetID, ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PatchScrapersID"); } // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PatchScrapersID"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}"; 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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PatchScrapersID", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// ScraperTargetResponse public ScraperTargetResponse PostScrapers(ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { var localVarResponse = PostScrapersWithHttpInfo(scraperTargetRequest, zapTraceSpan); return localVarResponse.Data; } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public ApiResponse PostScrapersWithHttpInfo(ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PostScrapers"); } var localVarPath = "/api/v2/scrapers"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PostScrapers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponse))); } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ScraperTargetResponse public async System.Threading.Tasks.Task PostScrapersWithIRestResponseAsync( ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PostScrapers"); } var localVarPath = "/api/v2/scrapers"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PostScrapers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public RestResponse PostScrapersWithIRestResponse(ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PostScrapers"); } var localVarPath = "/api/v2/scrapers"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PostScrapers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// ApiResponse of ScraperTargetResponse public RestRequest PostScrapersWithRestRequest(ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PostScrapers"); } var localVarPath = "/api/v2/scrapers"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// Cancellation token /// Task of ScraperTargetResponse public async System.Threading.Tasks.Task PostScrapersAsync( ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostScrapersAsyncWithHttpInfo(scraperTargetRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); return localVarResponse.Data; } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ScraperTargetResponse) public async System.Threading.Tasks.Task> PostScrapersAsyncWithHttpInfo( ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostScrapersAsyncWithIRestResponse(scraperTargetRequest, zapTraceSpan, cancellationToken) .ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ScraperTargetResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScraperTargetResponse))); } /// /// Create a scraper target /// /// Thrown when fails to make API call /// Scraper target to create /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ScraperTargetResponse) public async System.Threading.Tasks.Task PostScrapersAsyncWithIRestResponse( ScraperTargetRequest scraperTargetRequest, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetRequest' is set if (scraperTargetRequest == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetRequest' when calling ScraperTargetsService->PostScrapers"); } var localVarPath = "/api/v2/scrapers"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (scraperTargetRequest != null && scraperTargetRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(scraperTargetRequest); // http body (model) parameter } else { localVarPostBody = scraperTargetRequest; // 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("PostScrapers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// LabelResponse public LabelResponse PostScrapersIDLabels(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null) { var localVarResponse = PostScrapersIDLabelsWithHttpInfo(scraperTargetID, labelMapping, zapTraceSpan); return localVarResponse.Data; } /// /// Add a label to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public ApiResponse PostScrapersIDLabelsWithHttpInfo(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ScraperTargetsService->PostScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("PostScrapersIDLabels", 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 scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of LabelResponse public async System.Threading.Tasks.Task PostScrapersIDLabelsWithIRestResponseAsync( string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ScraperTargetsService->PostScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("PostScrapersIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public RestResponse PostScrapersIDLabelsWithIRestResponse(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ScraperTargetsService->PostScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("PostScrapersIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a label to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// ApiResponse of LabelResponse public RestRequest PostScrapersIDLabelsWithRestRequest(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ScraperTargetsService->PostScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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 scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of LabelResponse public async System.Threading.Tasks.Task PostScrapersIDLabelsAsync(string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostScrapersIDLabelsAsyncWithHttpInfo(scraperTargetID, labelMapping, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Add a label to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (LabelResponse) public async System.Threading.Tasks.Task> PostScrapersIDLabelsAsyncWithHttpInfo( string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostScrapersIDLabelsAsyncWithIRestResponse(scraperTargetID, labelMapping, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDLabels", 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 scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// Label to add /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (LabelResponse) public async System.Threading.Tasks.Task PostScrapersIDLabelsAsyncWithIRestResponse( string scraperTargetID, LabelMapping labelMapping, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDLabels"); } // verify the required parameter 'labelMapping' is set if (labelMapping == null) { throw new ApiException(400, "Missing required parameter 'labelMapping' when calling ScraperTargetsService->PostScrapersIDLabels"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/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 (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // 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("PostScrapersIDLabels", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// ResourceMember public ResourceMember PostScrapersIDMembers(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { var localVarResponse = PostScrapersIDMembersWithHttpInfo(scraperTargetID, addResourceMemberRequestBody, zapTraceSpan); return localVarResponse.Data; } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// ApiResponse of ResourceMember public ApiResponse PostScrapersIDMembersWithHttpInfo(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMember)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMember))); } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ResourceMember public async System.Threading.Tasks.Task PostScrapersIDMembersWithIRestResponseAsync( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// ApiResponse of ResourceMember public RestResponse PostScrapersIDMembersWithIRestResponse(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// ApiResponse of ResourceMember public RestRequest PostScrapersIDMembersWithRestRequest(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceMember public async System.Threading.Tasks.Task PostScrapersIDMembersAsync(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostScrapersIDMembersAsyncWithHttpInfo(scraperTargetID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceMember) public async System.Threading.Tasks.Task> PostScrapersIDMembersAsyncWithHttpInfo( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostScrapersIDMembersAsyncWithIRestResponse(scraperTargetID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceMember)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceMember))); } /// /// Add a member to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as member /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ResourceMember) public async System.Threading.Tasks.Task PostScrapersIDMembersAsyncWithIRestResponse( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDMembers"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDMembers"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/members"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDMembers", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// ResourceOwner public ResourceOwner PostScrapersIDOwners(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { var localVarResponse = PostScrapersIDOwnersWithHttpInfo(scraperTargetID, addResourceMemberRequestBody, zapTraceSpan); return localVarResponse.Data; } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// ApiResponse of ResourceOwner public ApiResponse PostScrapersIDOwnersWithHttpInfo(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwner)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwner))); } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// Cancellation token /// ApiResponse of ResourceOwner public async System.Threading.Tasks.Task PostScrapersIDOwnersWithIRestResponseAsync( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// ApiResponse of ResourceOwner public RestResponse PostScrapersIDOwnersWithIRestResponse(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// ApiResponse of ResourceOwner public RestRequest PostScrapersIDOwnersWithRestRequest(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } return Configuration.ApiClient.PrepareRequest(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// Cancellation token /// Task of ResourceOwner public async System.Threading.Tasks.Task PostScrapersIDOwnersAsync(string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { var localVarResponse = await PostScrapersIDOwnersAsyncWithHttpInfo(scraperTargetID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// Cancellation token /// Task of ApiResponse (ResourceOwner) public async System.Threading.Tasks.Task> PostScrapersIDOwnersAsyncWithHttpInfo( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // make the HTTP request var localVarResponse = await PostScrapersIDOwnersAsyncWithIRestResponse(scraperTargetID, addResourceMemberRequestBody, zapTraceSpan, cancellationToken).ConfigureAwait(false); var localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.Select(h => (h.Name, h.Value)), (ResourceOwner)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceOwner))); } /// /// Add an owner to a scraper target /// /// Thrown when fails to make API call /// The scraper target ID. /// User to add as owner /// OpenTracing span context (optional) /// Cancellation token /// Task of RestResponse (ResourceOwner) public async System.Threading.Tasks.Task PostScrapersIDOwnersAsyncWithIRestResponse( string scraperTargetID, AddResourceMemberRequestBody addResourceMemberRequestBody, string zapTraceSpan = null, CancellationToken cancellationToken = default) { // verify the required parameter 'scraperTargetID' is set if (scraperTargetID == null) { throw new ApiException(400, "Missing required parameter 'scraperTargetID' when calling ScraperTargetsService->PostScrapersIDOwners"); } // verify the required parameter 'addResourceMemberRequestBody' is set if (addResourceMemberRequestBody == null) { throw new ApiException(400, "Missing required parameter 'addResourceMemberRequestBody' when calling ScraperTargetsService->PostScrapersIDOwners"); } var localVarPath = "/api/v2/scrapers/{scraperTargetID}/owners"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); object localVarPostBody = null; // to determine the Content-Type header var localVarHttpContentTypes = new string[] { "application/json" }; var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); if (scraperTargetID != null) { localVarPathParams.Add("scraperTargetID", Configuration.ApiClient.ParameterToString(scraperTargetID)); // path parameter } if (zapTraceSpan != null) { localVarHeaderParams.Add("Zap-Trace-Span", Configuration.ApiClient.ParameterToString(zapTraceSpan)); // header parameter } if (addResourceMemberRequestBody != null && addResourceMemberRequestBody.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(addResourceMemberRequestBody); // http body (model) parameter } else { localVarPostBody = addResourceMemberRequestBody; // byte array } // to determine the Accept header var localVarHttpHeaderAccepts = new string[] { "application/json" }; var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept")) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } // make the HTTP request var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false); if (ExceptionFactory != null) { var exception = ExceptionFactory("PostScrapersIDOwners", localVarResponse); if (exception != null) { throw exception; } } return localVarResponse; } } }