Select Git revision
xml_deserialization.py
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
AdminApi.cs 156.71 KiB
/*
* Coscine Web API
*
* Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project.
*
* The version of the OpenAPI document: 2.0
* Contact: servicedesk@itc.rwth-aachen.de
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using System.Net.Mime;
using Coscine.ApiClient.Core.Client;
using Coscine.ApiClient.Core.Model;
namespace Coscine.ApiClient.Core.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IAdminApiSync : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
void ApiV2AdminOptions(int operationIndex = 0);
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> ApiV2AdminOptionsWithHttpInfo(int operationIndex = 0);
/// <summary>
/// Retrieves all activity logs.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ActivityLogDtoPagedResponse</returns>
ActivityLogDtoPagedResponse GetAllActivityLogs(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Retrieves all activity logs.
/// </summary> /// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ActivityLogDtoPagedResponse</returns>
ApiResponse<ActivityLogDtoPagedResponse> GetAllActivityLogsWithHttpInfo(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Retrieves all projects.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ProjectAdminDtoPagedResponse</returns>
ProjectAdminDtoPagedResponse GetAllProjects(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Retrieves all projects.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ProjectAdminDtoPagedResponse</returns>
ApiResponse<ProjectAdminDtoPagedResponse> GetAllProjectsWithHttpInfo(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Retrieves all resources.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ResourceAdminDtoPagedResponse</returns>
ResourceAdminDtoPagedResponse GetAllResources(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Retrieves all resources.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> /// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ResourceAdminDtoPagedResponse</returns>
ApiResponse<ResourceAdminDtoPagedResponse> GetAllResourcesWithHttpInfo(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Retrieves all users.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>UserDtoPagedResponse</returns>
UserDtoPagedResponse GetAllUsers(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Retrieves all users.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of UserDtoPagedResponse</returns>
ApiResponse<UserDtoPagedResponse> GetAllUsersWithHttpInfo(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Gets all deployed graphs.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>DeployedGraphDtoPagedResponse</returns>
DeployedGraphDtoPagedResponse GetDeployedGraphs(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Gets all deployed graphs.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of DeployedGraphDtoPagedResponse</returns>
ApiResponse<DeployedGraphDtoPagedResponse> GetDeployedGraphsWithHttpInfo(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// Gets a metadata graph.
/// </summary>
/// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param>
/// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>RdfDefinitionDtoResponse</returns>
RdfDefinitionDtoResponse GetMetadataGraph(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0);
/// <summary>
/// Gets a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param>
/// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of RdfDefinitionDtoResponse</returns>
ApiResponse<RdfDefinitionDtoResponse> GetMetadataGraphWithHttpInfo(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0);
/// <summary>
/// Patches a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
void PatchMetadata(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0);
/// <summary>
/// Patches a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> PatchMetadataWithHttpInfo(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0);
/// <summary>
/// Updates a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
void UpdateMetadataGraph(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0);
/// <summary>
/// Updates a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> UpdateMetadataGraphWithHttpInfo(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0);
#endregion Synchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IAdminApiAsync : IApiAccessor
{
#region Asynchronous Operations
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task ApiV2AdminOptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> ApiV2AdminOptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all activity logs.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ActivityLogDtoPagedResponse</returns>
System.Threading.Tasks.Task<ActivityLogDtoPagedResponse> GetAllActivityLogsAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all activity logs.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ActivityLogDtoPagedResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ActivityLogDtoPagedResponse>> GetAllActivityLogsWithHttpInfoAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all projects.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ProjectAdminDtoPagedResponse</returns>
System.Threading.Tasks.Task<ProjectAdminDtoPagedResponse> GetAllProjectsAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all projects.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ProjectAdminDtoPagedResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ProjectAdminDtoPagedResponse>> GetAllProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all resources.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ResourceAdminDtoPagedResponse</returns>
System.Threading.Tasks.Task<ResourceAdminDtoPagedResponse> GetAllResourcesAsync(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all resources.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (ResourceAdminDtoPagedResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ResourceAdminDtoPagedResponse>> GetAllResourcesWithHttpInfoAsync(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all users.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of UserDtoPagedResponse</returns>
System.Threading.Tasks.Task<UserDtoPagedResponse> GetAllUsersAsync(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Retrieves all users.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (UserDtoPagedResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<UserDtoPagedResponse>> GetAllUsersWithHttpInfoAsync(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Gets all deployed graphs.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of DeployedGraphDtoPagedResponse</returns>
System.Threading.Tasks.Task<DeployedGraphDtoPagedResponse> GetDeployedGraphsAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Gets all deployed graphs.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (DeployedGraphDtoPagedResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<DeployedGraphDtoPagedResponse>> GetDeployedGraphsWithHttpInfoAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Gets a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param> /// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of RdfDefinitionDtoResponse</returns>
System.Threading.Tasks.Task<RdfDefinitionDtoResponse> GetMetadataGraphAsync(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Gets a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param>
/// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (RdfDefinitionDtoResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<RdfDefinitionDtoResponse>> GetMetadataGraphWithHttpInfoAsync(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Patches a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task PatchMetadataAsync(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Patches a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> PatchMetadataWithHttpInfoAsync(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updates a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task UpdateMetadataGraphAsync(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// Updates a metadata graph.
/// </summary>
/// <remarks>
/// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </remarks>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> UpdateMetadataGraphWithHttpInfoAsync(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IAdminApi : IAdminApiSync, IAdminApiAsync
{
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class AdminApi : IAdminApi
{
private Coscine.ApiClient.Core.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="AdminApi"/> class.
/// </summary>
/// <returns></returns>
public AdminApi() : this((string)null)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AdminApi"/> class.
/// </summary>
/// <returns></returns>
public AdminApi(string basePath)
{
this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations(
Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance,
new Coscine.ApiClient.Core.Client.Configuration { BasePath = basePath }
);
this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath);
this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath);
this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="AdminApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public AdminApi(Coscine.ApiClient.Core.Client.Configuration configuration)
{
if (configuration == null) throw new ArgumentNullException("configuration");
this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations(
Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance,
configuration
);
this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath);
this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath);
ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="AdminApi"/> class
/// using a Configuration object and client instance.
/// </summary>
/// <param name="client">The client interface for synchronous API access.</param>
/// <param name="asyncClient">The client interface for asynchronous API access.</param>
/// <param name="configuration">The configuration object.</param> public AdminApi(Coscine.ApiClient.Core.Client.ISynchronousClient client, Coscine.ApiClient.Core.Client.IAsynchronousClient asyncClient, Coscine.ApiClient.Core.Client.IReadableConfiguration configuration)
{
if (client == null) throw new ArgumentNullException("client");
if (asyncClient == null) throw new ArgumentNullException("asyncClient");
if (configuration == null) throw new ArgumentNullException("configuration");
this.Client = client;
this.AsynchronousClient = asyncClient;
this.Configuration = configuration;
this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// The client for accessing this underlying API asynchronously.
/// </summary>
public Coscine.ApiClient.Core.Client.IAsynchronousClient AsynchronousClient { get; set; }
/// <summary>
/// The client for accessing this underlying API synchronously.
/// </summary>
public Coscine.ApiClient.Core.Client.ISynchronousClient Client { get; set; }
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public string GetBasePath()
{
return this.Configuration.BasePath;
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public Coscine.ApiClient.Core.Client.IReadableConfiguration Configuration { get; set; }
/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
public Coscine.ApiClient.Core.Client.ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set { _exceptionFactory = value; }
}
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
public void ApiV2AdminOptions(int operationIndex = 0)
{
ApiV2AdminOptionsWithHttpInfo();
}
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns> public Coscine.ApiClient.Core.Client.ApiResponse<Object> ApiV2AdminOptionsWithHttpInfo(int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "AdminApi.ApiV2AdminOptions";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Options<Object>("/api/v2/admin", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("ApiV2AdminOptions", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task ApiV2AdminOptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await ApiV2AdminOptionsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Responds with the HTTP methods allowed for the endpoint.
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> ApiV2AdminOptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.Operation = "AdminApi.ApiV2AdminOptions";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.OptionsAsync<Object>("/api/v2/admin", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("ApiV2AdminOptions", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Retrieves all activity logs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ActivityLogDtoPagedResponse</returns>
public ActivityLogDtoPagedResponse GetAllActivityLogs(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse> localVarResponse = GetAllActivityLogsWithHttpInfo(activityTimestampBefore, activityTimestampAfter, guid, userId, regularExpression, httpMethod, pageNumber, pageSize, orderBy);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all activity logs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ActivityLogDtoPagedResponse</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse> GetAllActivityLogsWithHttpInfo(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (activityTimestampBefore != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampBefore", activityTimestampBefore));
}
if (activityTimestampAfter != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampAfter", activityTimestampAfter));
}
if (guid != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Guid", guid));
}
if (userId != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "UserId", userId));
}
if (regularExpression != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "RegularExpression", regularExpression));
}
if (httpMethod != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "HttpMethod", httpMethod));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (orderBy != null)
{ localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllActivityLogs";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<ActivityLogDtoPagedResponse>("/api/v2/admin/activity-logs", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetAllActivityLogs", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Retrieves all activity logs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ActivityLogDtoPagedResponse</returns>
public async System.Threading.Tasks.Task<ActivityLogDtoPagedResponse> GetAllActivityLogsAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse> localVarResponse = await GetAllActivityLogsWithHttpInfoAsync(activityTimestampBefore, activityTimestampAfter, guid, userId, regularExpression, httpMethod, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all activity logs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param>
/// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param>
/// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param>
/// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param>
/// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param>
/// <param name="httpMethod">The http method to filter activity logs by. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ActivityLogDtoPagedResponse)</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse>> GetAllActivityLogsWithHttpInfoAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] { };
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (activityTimestampBefore != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampBefore", activityTimestampBefore));
}
if (activityTimestampAfter != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampAfter", activityTimestampAfter));
}
if (guid != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Guid", guid));
}
if (userId != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "UserId", userId));
}
if (regularExpression != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "RegularExpression", regularExpression));
}
if (httpMethod != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "HttpMethod", httpMethod));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllActivityLogs";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<ActivityLogDtoPagedResponse>("/api/v2/admin/activity-logs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null) {
Exception _exception = this.ExceptionFactory("GetAllActivityLogs", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ProjectAdminDtoPagedResponse</returns>
public ProjectAdminDtoPagedResponse GetAllProjects(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> localVarResponse = GetAllProjectsWithHttpInfo(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ProjectAdminDtoPagedResponse</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> GetAllProjectsWithHttpInfo(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (topLevel != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "TopLevel", topLevel));
} if (includeDeleted != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeDeleted", includeDeleted));
}
if (includeQuotas != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeQuotas", includeQuotas));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllProjects";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<ProjectAdminDtoPagedResponse>("/api/v2/admin/projects", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetAllProjects", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ProjectAdminDtoPagedResponse</returns>
public async System.Threading.Tasks.Task<ProjectAdminDtoPagedResponse> GetAllProjectsAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> localVarResponse = await GetAllProjectsWithHttpInfoAsync(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param>
/// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param>
/// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ProjectAdminDtoPagedResponse)</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse>> GetAllProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (topLevel != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "TopLevel", topLevel));
}
if (includeDeleted != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeDeleted", includeDeleted));
}
if (includeQuotas != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeQuotas", includeQuotas));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllProjects";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<ProjectAdminDtoPagedResponse>("/api/v2/admin/projects", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null) {
Exception _exception = this.ExceptionFactory("GetAllProjects", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Retrieves all resources. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ResourceAdminDtoPagedResponse</returns>
public ResourceAdminDtoPagedResponse GetAllResources(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.ApiResponse<ResourceAdminDtoPagedResponse> localVarResponse = GetAllResourcesWithHttpInfo(includeDeleted, includeQuotas, pageSize, pageNumber, orderBy);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all resources. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ResourceAdminDtoPagedResponse</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<ResourceAdminDtoPagedResponse> GetAllResourcesWithHttpInfo(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (includeDeleted != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeDeleted", includeDeleted));
}
if (includeQuotas != null)
{ localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeQuotas", includeQuotas));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllResources";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<ResourceAdminDtoPagedResponse>("/api/v2/admin/resources", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetAllResources", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Retrieves all resources. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ResourceAdminDtoPagedResponse</returns>
public async System.Threading.Tasks.Task<ResourceAdminDtoPagedResponse> GetAllResourcesAsync(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.ApiResponse<ResourceAdminDtoPagedResponse> localVarResponse = await GetAllResourcesWithHttpInfoAsync(includeDeleted, includeQuotas, pageSize, pageNumber, orderBy, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all resources. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="includeDeleted">Value indicating whether to include deleted resources. (optional)</param>
/// <param name="includeQuotas">Value indicating whether to include individual resource quotas. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ResourceAdminDtoPagedResponse)</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ResourceAdminDtoPagedResponse>> GetAllResourcesWithHttpInfoAsync(bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (includeDeleted != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeDeleted", includeDeleted));
}
if (includeQuotas != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeQuotas", includeQuotas));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllResources";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<ResourceAdminDtoPagedResponse>("/api/v2/admin/resources", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetAllResources", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary> /// Retrieves all users. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>UserDtoPagedResponse</returns>
public UserDtoPagedResponse GetAllUsers(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.ApiResponse<UserDtoPagedResponse> localVarResponse = GetAllUsersWithHttpInfo(tosAccepted, pageSize, pageNumber, orderBy);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all users. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of UserDtoPagedResponse</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<UserDtoPagedResponse> GetAllUsersWithHttpInfo(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (tosAccepted != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "TosAccepted", tosAccepted));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllUsers";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<UserDtoPagedResponse>("/api/v2/admin/users", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetAllUsers", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Retrieves all users. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of UserDtoPagedResponse</returns>
public async System.Threading.Tasks.Task<UserDtoPagedResponse> GetAllUsersAsync(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.ApiResponse<UserDtoPagedResponse> localVarResponse = await GetAllUsersWithHttpInfoAsync(tosAccepted, pageSize, pageNumber, orderBy, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
/// Retrieves all users. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tosAccepted">Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional)</param>
/// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (UserDtoPagedResponse)</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<UserDtoPagedResponse>> GetAllUsersWithHttpInfoAsync(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null) {
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (tosAccepted != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "TosAccepted", tosAccepted));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetAllUsers";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<UserDtoPagedResponse>("/api/v2/admin/users", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetAllUsers", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>DeployedGraphDtoPagedResponse</returns>
public DeployedGraphDtoPagedResponse GetDeployedGraphs(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse> localVarResponse = GetDeployedGraphsWithHttpInfo(pageNumber, pageSize, orderBy);
return localVarResponse.Data;
}
/// <summary>
/// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of DeployedGraphDtoPagedResponse</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse> GetDeployedGraphsWithHttpInfo(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) {
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetDeployedGraphs";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<DeployedGraphDtoPagedResponse>("/api/v2/admin/graphs", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetDeployedGraphs", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of DeployedGraphDtoPagedResponse</returns> public async System.Threading.Tasks.Task<DeployedGraphDtoPagedResponse> GetDeployedGraphsAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse> localVarResponse = await GetDeployedGraphsWithHttpInfoAsync(pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
/// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param>
/// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param>
/// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (DeployedGraphDtoPagedResponse)</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse>> GetDeployedGraphsWithHttpInfoAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
if (pageNumber != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber));
}
if (pageSize != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize));
}
if (orderBy != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy));
}
localVarRequestOptions.Operation = "AdminApi.GetDeployedGraphs";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<DeployedGraphDtoPagedResponse>("/api/v2/admin/graphs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetDeployedGraphs", localVarResponse); if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Gets a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param>
/// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>RdfDefinitionDtoResponse</returns>
public RdfDefinitionDtoResponse GetMetadataGraph(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0)
{
Coscine.ApiClient.Core.Client.ApiResponse<RdfDefinitionDtoResponse> localVarResponse = GetMetadataGraphWithHttpInfo(graph, format);
return localVarResponse.Data;
}
/// <summary>
/// Gets a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param>
/// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of RdfDefinitionDtoResponse</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<RdfDefinitionDtoResponse> GetMetadataGraphWithHttpInfo(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0)
{
// verify the required parameter 'graph' is set
if (graph == null)
{
throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'graph' when calling AdminApi->GetMetadataGraph");
}
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.PathParameters.Add("graph", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(graph)); // path parameter
if (format != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Format", format));
}
localVarRequestOptions.Operation = "AdminApi.GetMetadataGraph";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Get<RdfDefinitionDtoResponse>("/api/v2/admin/metadata/{graph}", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetMetadataGraph", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Gets a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param>
/// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of RdfDefinitionDtoResponse</returns>
public async System.Threading.Tasks.Task<RdfDefinitionDtoResponse> GetMetadataGraphAsync(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
Coscine.ApiClient.Core.Client.ApiResponse<RdfDefinitionDtoResponse> localVarResponse = await GetMetadataGraphWithHttpInfoAsync(graph, format, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
/// <summary>
/// Gets a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to get.</param>
/// <param name="format">Gets or sets the RDF format. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (RdfDefinitionDtoResponse)</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<RdfDefinitionDtoResponse>> GetMetadataGraphWithHttpInfoAsync(string graph, RdfFormat? format = default(RdfFormat?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'graph' is set
if (graph == null)
{
throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'graph' when calling AdminApi->GetMetadataGraph");
}
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
};
// to determine the Accept header
string[] _accepts = new string[] {
"application/json",
"text/json"
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.PathParameters.Add("graph", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(graph)); // path parameter
if (format != null)
{
localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Format", format));
}
localVarRequestOptions.Operation = "AdminApi.GetMetadataGraph";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync<RdfDefinitionDtoResponse>("/api/v2/admin/metadata/{graph}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("GetMetadataGraph", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Patches a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
public void PatchMetadata(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0)
{
PatchMetadataWithHttpInfo(graph, rdfPatchDocumentDto);
}
/// <summary>
/// Patches a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<Object> PatchMetadataWithHttpInfo(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0)
{
// verify the required parameter 'graph' is set
if (graph == null)
{
throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'graph' when calling AdminApi->PatchMetadata");
}
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
"application/json", "text/json",
"application/*+json"
};
// to determine the Accept header
string[] _accepts = new string[] {
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.PathParameters.Add("graph", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(graph)); // path parameter
localVarRequestOptions.Data = rdfPatchDocumentDto;
localVarRequestOptions.Operation = "AdminApi.PatchMetadata";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Patch<Object>("/api/v2/admin/metadata/{graph}", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("PatchMetadata", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Patches a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task PatchMetadataAsync(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await PatchMetadataWithHttpInfoAsync(graph, rdfPatchDocumentDto, operationIndex, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Patches a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to patch.</param>
/// <param name="rdfPatchDocumentDto">The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> PatchMetadataWithHttpInfoAsync(string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = default(RdfPatchDocumentDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) {
// verify the required parameter 'graph' is set
if (graph == null)
{
throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'graph' when calling AdminApi->PatchMetadata");
}
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
"application/json",
"text/json",
"application/*+json"
};
// to determine the Accept header
string[] _accepts = new string[] {
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.PathParameters.Add("graph", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(graph)); // path parameter
localVarRequestOptions.Data = rdfPatchDocumentDto;
localVarRequestOptions.Operation = "AdminApi.PatchMetadata";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PatchAsync<Object>("/api/v2/admin/metadata/{graph}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("PatchMetadata", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Updates a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns></returns>
public void UpdateMetadataGraph(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0)
{
UpdateMetadataGraphWithHttpInfo(graph, metadataUpdateAdminParameters); }
/// <summary>
/// Updates a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of Object(void)</returns>
public Coscine.ApiClient.Core.Client.ApiResponse<Object> UpdateMetadataGraphWithHttpInfo(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0)
{
// verify the required parameter 'graph' is set
if (graph == null)
{
throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'graph' when calling AdminApi->UpdateMetadataGraph");
}
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
"application/json",
"text/json",
"application/*+json"
};
// to determine the Accept header
string[] _accepts = new string[] {
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.PathParameters.Add("graph", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(graph)); // path parameter
localVarRequestOptions.Data = metadataUpdateAdminParameters;
localVarRequestOptions.Operation = "AdminApi.UpdateMetadataGraph";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = this.Client.Put<Object>("/api/v2/admin/metadata/{graph}", localVarRequestOptions, this.Configuration);
if (this.ExceptionFactory != null)
{
Exception _exception = this.ExceptionFactory("UpdateMetadataGraph", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
/// <summary>
/// Updates a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> /// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task UpdateMetadataGraphAsync(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
await UpdateMetadataGraphWithHttpInfoAsync(graph, metadataUpdateAdminParameters, operationIndex, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Updates a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p>
/// </summary>
/// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="graph">The absolute URI of the graph to update.</param>
/// <param name="metadataUpdateAdminParameters">The metadata update admin parameters. (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> UpdateMetadataGraphWithHttpInfoAsync(string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = default(MetadataUpdateAdminParameters?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// verify the required parameter 'graph' is set
if (graph == null)
{
throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'graph' when calling AdminApi->UpdateMetadataGraph");
}
Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions();
string[] _contentTypes = new string[] {
"application/json",
"text/json",
"application/*+json"
};
// to determine the Accept header
string[] _accepts = new string[] {
};
var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
if (localVarContentType != null)
{
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
}
var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts);
if (localVarAccept != null)
{
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
}
localVarRequestOptions.PathParameters.Add("graph", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(graph)); // path parameter
localVarRequestOptions.Data = metadataUpdateAdminParameters;
localVarRequestOptions.Operation = "AdminApi.UpdateMetadataGraph";
localVarRequestOptions.OperationIndex = operationIndex;
// authentication (Bearer) required
if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization"));
}
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PutAsync<Object>("/api/v2/admin/metadata/{graph}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
if (this.ExceptionFactory != null) {
Exception _exception = this.ExceptionFactory("UpdateMetadataGraph", localVarResponse);
if (_exception != null)
{
throw _exception;
}
}
return localVarResponse;
}
}
}