/* * 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 ITreeApiSync : 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="projectId"></param> /// <param name="resourceId"></param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> void ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions(string projectId, string resourceId, 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="projectId"></param> /// <param name="resourceId"></param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfo(string projectId, string resourceId, int operationIndex = 0); /// <summary> /// Creates a new extracted metadata tree for a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> MetadataTreeDtoResponse CreateExtractedMetadataTree(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0); /// <summary> /// Creates a new extracted metadata tree for a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> ApiResponse<MetadataTreeDtoResponse> CreateExtractedMetadataTreeWithHttpInfo(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0); /// <summary> /// Creates a new metadata tree for a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> MetadataTreeDtoResponse CreateMetadataTree(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0); /// <summary> /// Creates a new metadata tree for a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> ApiResponse<MetadataTreeDtoResponse> CreateMetadataTreeWithHttpInfo(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0); /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> void DeleteMetadataTree(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0); /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> DeleteMetadataTreeWithHttpInfo(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0); /// <summary> /// Retrieves the file tree associated with a resource. /// </summary> /// <remarks> /// The `OrderBy` query is currently not supported. /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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>FileTreeDtoPagedResponse</returns> FileTreeDtoPagedResponse GetFileTree(string projectId, Guid resourceId, string? path = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves the file tree associated with a resource. /// </summary> /// <remarks> /// The `OrderBy` query is currently not supported. /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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 FileTreeDtoPagedResponse</returns> ApiResponse<FileTreeDtoPagedResponse> GetFileTreeWithHttpInfo(string projectId, Guid resourceId, string? path = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves the metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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>MetadataTreeDtoPagedResponse</returns> MetadataTreeDtoPagedResponse GetMetadataTree(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves the metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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 MetadataTreeDtoPagedResponse</returns> ApiResponse<MetadataTreeDtoPagedResponse> GetMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves the specific metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> MetadataTreeDtoResponse GetSpecificMetadataTree(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0); /// <summary> /// Retrieves the specific metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> ApiResponse<MetadataTreeDtoResponse> GetSpecificMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0); /// <summary> /// Updates an existing metadata tree of a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> void UpdateExtractedMetadataTree(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0); /// <summary> /// Updates an existing metadata tree of a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> UpdateExtractedMetadataTreeWithHttpInfo(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0); /// <summary> /// Updates an existing metadata tree of a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> void UpdateMetadataTree(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), int operationIndex = 0); /// <summary> /// Updates an existing metadata tree of a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> UpdateMetadataTreeWithHttpInfo(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), int operationIndex = 0); #endregion Synchronous Operations } /// <summary> /// Represents a collection of functions to interact with the API endpoints /// </summary> public interface ITreeApiAsync : 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="projectId"></param> /// <param name="resourceId"></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 ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsAsync(string projectId, string resourceId, 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="projectId"></param> /// <param name="resourceId"></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>> ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfoAsync(string projectId, string resourceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Creates a new extracted metadata tree for a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> System.Threading.Tasks.Task<MetadataTreeDtoResponse> CreateExtractedMetadataTreeAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Creates a new extracted metadata tree for a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (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 (MetadataTreeDtoResponse)</returns> System.Threading.Tasks.Task<ApiResponse<MetadataTreeDtoResponse>> CreateExtractedMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Creates a new metadata tree for a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> System.Threading.Tasks.Task<MetadataTreeDtoResponse> CreateMetadataTreeAsync(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Creates a new metadata tree for a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (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 (MetadataTreeDtoResponse)</returns> System.Threading.Tasks.Task<ApiResponse<MetadataTreeDtoResponse>> CreateMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (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 DeleteMetadataTreeAsync(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (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>> DeleteMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Retrieves the file tree associated with a resource. /// </summary> /// <remarks> /// The `OrderBy` query is currently not supported. /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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 FileTreeDtoPagedResponse</returns> System.Threading.Tasks.Task<FileTreeDtoPagedResponse> GetFileTreeAsync(string projectId, Guid resourceId, string? path = default(string?), 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 the file tree associated with a resource. /// </summary> /// <remarks> /// The `OrderBy` query is currently not supported. /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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 (FileTreeDtoPagedResponse)</returns> System.Threading.Tasks.Task<ApiResponse<FileTreeDtoPagedResponse>> GetFileTreeWithHttpInfoAsync(string projectId, Guid resourceId, string? path = default(string?), 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 the metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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 MetadataTreeDtoPagedResponse</returns> System.Threading.Tasks.Task<MetadataTreeDtoPagedResponse> GetMetadataTreeAsync(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), 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 the metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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 (MetadataTreeDtoPagedResponse)</returns> System.Threading.Tasks.Task<ApiResponse<MetadataTreeDtoPagedResponse>> GetMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), 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 the specific metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> System.Threading.Tasks.Task<MetadataTreeDtoResponse> GetSpecificMetadataTreeAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Retrieves the specific metadata tree associated with a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (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 (MetadataTreeDtoResponse)</returns> System.Threading.Tasks.Task<ApiResponse<MetadataTreeDtoResponse>> GetSpecificMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Updates an existing metadata tree of a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (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 UpdateExtractedMetadataTreeAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Updates an existing metadata tree of a resource. /// </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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (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>> UpdateExtractedMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Updates an existing metadata tree of a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (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 UpdateMetadataTreeAsync(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Updates an existing metadata tree of a resource. /// </summary> /// <remarks> /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (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>> UpdateMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), 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 ITreeApi : ITreeApiSync, ITreeApiAsync { } /// <summary> /// Represents a collection of functions to interact with the API endpoints /// </summary> public partial class TreeApi : ITreeApi { private Coscine.ApiClient.Core.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// <summary> /// Initializes a new instance of the <see cref="TreeApi"/> class. /// </summary> /// <returns></returns> public TreeApi() : this((string)null) { } /// <summary> /// Initializes a new instance of the <see cref="TreeApi"/> class. /// </summary> /// <returns></returns> public TreeApi(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="TreeApi"/> class /// using Configuration object /// </summary> /// <param name="configuration">An instance of Configuration</param> /// <returns></returns> public TreeApi(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="TreeApi"/> 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 TreeApi(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="projectId"></param> /// <param name="resourceId"></param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> public void ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions(string projectId, string resourceId, int operationIndex = 0) { ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfo(projectId, resourceId); } /// <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="projectId"></param> /// <param name="resourceId"></param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> public Coscine.ApiClient.Core.Client.ApiResponse<Object> ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfo(string projectId, string resourceId, int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions"); } // verify the required parameter 'resourceId' is set if (resourceId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'resourceId' when calling TreeApi->ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions"); } 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.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Operation = "TreeApi.ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions"; 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/projects/{projectId}/resources/{resourceId}/trees", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions", 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="projectId"></param> /// <param name="resourceId"></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 ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsAsync(string projectId, string resourceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfoAsync(projectId, resourceId, 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="projectId"></param> /// <param name="resourceId"></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>> ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfoAsync(string projectId, string resourceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions"); } // verify the required parameter 'resourceId' is set if (resourceId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'resourceId' when calling TreeApi->ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions"); } 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.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Operation = "TreeApi.ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions"; 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/projects/{projectId}/resources/{resourceId}/trees", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Creates a new extracted metadata tree for a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> public MetadataTreeDtoResponse CreateExtractedMetadataTree(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0) { Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = CreateExtractedMetadataTreeWithHttpInfo(projectId, resourceId, extractedMetadataTreeForCreationDto); return localVarResponse.Data; } /// <summary> /// Creates a new extracted metadata tree for a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> public Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> CreateExtractedMetadataTreeWithHttpInfo(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->CreateExtractedMetadataTree"); } 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[] { "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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = extractedMetadataTreeForCreationDto; localVarRequestOptions.Operation = "TreeApi.CreateExtractedMetadataTree"; 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.Post<MetadataTreeDtoResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateExtractedMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Creates a new extracted metadata tree for a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> public async System.Threading.Tasks.Task<MetadataTreeDtoResponse> CreateExtractedMetadataTreeAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = await CreateExtractedMetadataTreeWithHttpInfoAsync(projectId, resourceId, extractedMetadataTreeForCreationDto, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// <summary> /// Creates a new extracted metadata tree for a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForCreationDto">The metadata tree data for creation. (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 (MetadataTreeDtoResponse)</returns> public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse>> CreateExtractedMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = default(ExtractedMetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->CreateExtractedMetadataTree"); } 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[] { "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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = extractedMetadataTreeForCreationDto; localVarRequestOptions.Operation = "TreeApi.CreateExtractedMetadataTree"; 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.PostAsync<MetadataTreeDtoResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateExtractedMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Creates a new metadata tree for a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> public MetadataTreeDtoResponse CreateMetadataTree(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0) { Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = CreateMetadataTreeWithHttpInfo(projectId, resourceId, metadataTreeForCreationDto); return localVarResponse.Data; } /// <summary> /// Creates a new metadata tree for a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> public Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> CreateMetadataTreeWithHttpInfo(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->CreateMetadataTree"); } 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[] { "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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = metadataTreeForCreationDto; localVarRequestOptions.Operation = "TreeApi.CreateMetadataTree"; 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.Post<MetadataTreeDtoResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Creates a new metadata tree for a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> public async System.Threading.Tasks.Task<MetadataTreeDtoResponse> CreateMetadataTreeAsync(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = await CreateMetadataTreeWithHttpInfoAsync(projectId, resourceId, metadataTreeForCreationDto, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// <summary> /// Creates a new metadata tree for a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForCreationDto">The metadata tree data for creation. (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 (MetadataTreeDtoResponse)</returns> public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse>> CreateMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = default(MetadataTreeForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->CreateMetadataTree"); } 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[] { "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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = metadataTreeForCreationDto; localVarRequestOptions.Operation = "TreeApi.CreateMetadataTree"; 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.PostAsync<MetadataTreeDtoResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> public void DeleteMetadataTree(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0) { DeleteMetadataTreeWithHttpInfo(projectId, resourceId, metadataTreeForDeletionDto); } /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> public Coscine.ApiClient.Core.Client.ApiResponse<Object> DeleteMetadataTreeWithHttpInfo(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->DeleteMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = metadataTreeForDeletionDto; localVarRequestOptions.Operation = "TreeApi.DeleteMetadataTree"; 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.Delete<Object>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (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 DeleteMetadataTreeAsync(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeleteMetadataTreeWithHttpInfoAsync(projectId, resourceId, metadataTreeForDeletionDto, operationIndex, cancellationToken).ConfigureAwait(false); } /// <summary> /// Deletes (invalidates) a metadata tree associated with a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForDeletionDto">The dto for the deletion. (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>> DeleteMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = default(MetadataTreeForDeletionDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->DeleteMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = metadataTreeForDeletionDto; localVarRequestOptions.Operation = "TreeApi.DeleteMetadataTree"; 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.DeleteAsync<Object>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Retrieves the file tree associated with a resource. The `OrderBy` query is currently not supported. /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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>FileTreeDtoPagedResponse</returns> public FileTreeDtoPagedResponse GetFileTree(string projectId, Guid resourceId, string? path = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) { Coscine.ApiClient.Core.Client.ApiResponse<FileTreeDtoPagedResponse> localVarResponse = GetFileTreeWithHttpInfo(projectId, resourceId, path, pageNumber, pageSize, orderBy); return localVarResponse.Data; } /// <summary> /// Retrieves the file tree associated with a resource. The `OrderBy` query is currently not supported. /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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 FileTreeDtoPagedResponse</returns> public Coscine.ApiClient.Core.Client.ApiResponse<FileTreeDtoPagedResponse> GetFileTreeWithHttpInfo(string projectId, Guid resourceId, string? path = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->GetFileTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter if (path != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); } 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 = "TreeApi.GetFileTree"; 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<FileTreeDtoPagedResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/files", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFileTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Retrieves the file tree associated with a resource. The `OrderBy` query is currently not supported. /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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 FileTreeDtoPagedResponse</returns> public async System.Threading.Tasks.Task<FileTreeDtoPagedResponse> GetFileTreeAsync(string projectId, Guid resourceId, string? path = default(string?), 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<FileTreeDtoPagedResponse> localVarResponse = await GetFileTreeWithHttpInfoAsync(projectId, resourceId, path, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// <summary> /// Retrieves the file tree associated with a resource. The `OrderBy` query is currently not supported. /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the file tree. (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 (FileTreeDtoPagedResponse)</returns> public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<FileTreeDtoPagedResponse>> GetFileTreeWithHttpInfoAsync(string projectId, Guid resourceId, string? path = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->GetFileTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter if (path != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); } 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 = "TreeApi.GetFileTree"; 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<FileTreeDtoPagedResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/files", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFileTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Retrieves the metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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>MetadataTreeDtoPagedResponse</returns> public MetadataTreeDtoPagedResponse GetMetadataTree(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) { Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoPagedResponse> localVarResponse = GetMetadataTreeWithHttpInfo(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, pageNumber, pageSize, orderBy); return localVarResponse.Data; } /// <summary> /// Retrieves the metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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 MetadataTreeDtoPagedResponse</returns> public Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoPagedResponse> GetMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->GetMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter if (path != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); } if (format != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Format", format)); } if (includeExtractedMetadata != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeExtractedMetadata", includeExtractedMetadata)); } if (includeProvenance != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeProvenance", includeProvenance)); } 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 = "TreeApi.GetMetadataTree"; 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<MetadataTreeDtoPagedResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Retrieves the metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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 MetadataTreeDtoPagedResponse</returns> public async System.Threading.Tasks.Task<MetadataTreeDtoPagedResponse> GetMetadataTreeAsync(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), 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<MetadataTreeDtoPagedResponse> localVarResponse = await GetMetadataTreeWithHttpInfoAsync(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// <summary> /// Retrieves the metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree. (optional)</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance metadata should be included. (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 (MetadataTreeDtoPagedResponse)</returns> public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoPagedResponse>> GetMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string? path = default(string?), RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->GetMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter if (path != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); } if (format != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Format", format)); } if (includeExtractedMetadata != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeExtractedMetadata", includeExtractedMetadata)); } if (includeProvenance != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeProvenance", includeProvenance)); } 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 = "TreeApi.GetMetadataTree"; 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<MetadataTreeDtoPagedResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Retrieves the specific metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> public MetadataTreeDtoResponse GetSpecificMetadataTree(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0) { Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = GetSpecificMetadataTreeWithHttpInfo(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, varVersion); return localVarResponse.Data; } /// <summary> /// Retrieves the specific metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> public Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> GetSpecificMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->GetSpecificMetadataTree"); } // verify the required parameter 'path' is set if (path == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'path' when calling TreeApi->GetSpecificMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); if (format != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Format", format)); } if (includeExtractedMetadata != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeExtractedMetadata", includeExtractedMetadata)); } if (includeProvenance != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeProvenance", includeProvenance)); } if (varVersion != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", varVersion)); } localVarRequestOptions.Operation = "TreeApi.GetSpecificMetadataTree"; 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<MetadataTreeDtoResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/specific", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSpecificMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Retrieves the specific metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> public async System.Threading.Tasks.Task<MetadataTreeDtoResponse> GetSpecificMetadataTreeAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = await GetSpecificMetadataTreeWithHttpInfoAsync(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, varVersion, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// <summary> /// Retrieves the specific metadata tree associated with a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (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 (MetadataTreeDtoResponse)</returns> public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse>> GetSpecificMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->GetSpecificMetadataTree"); } // verify the required parameter 'path' is set if (path == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'path' when calling TreeApi->GetSpecificMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); if (format != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Format", format)); } if (includeExtractedMetadata != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeExtractedMetadata", includeExtractedMetadata)); } if (includeProvenance != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeProvenance", includeProvenance)); } if (varVersion != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", varVersion)); } localVarRequestOptions.Operation = "TreeApi.GetSpecificMetadataTree"; 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<MetadataTreeDtoResponse>("/api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/specific", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSpecificMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Updates an existing metadata tree of a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> public void UpdateExtractedMetadataTree(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0) { UpdateExtractedMetadataTreeWithHttpInfo(projectId, resourceId, extractedMetadataTreeForUpdateDto); } /// <summary> /// Updates an existing metadata tree of a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> public Coscine.ApiClient.Core.Client.ApiResponse<Object> UpdateExtractedMetadataTreeWithHttpInfo(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->UpdateExtractedMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = extractedMetadataTreeForUpdateDto; localVarRequestOptions.Operation = "TreeApi.UpdateExtractedMetadataTree"; 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/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateExtractedMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Updates an existing metadata tree of a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (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 UpdateExtractedMetadataTreeAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdateExtractedMetadataTreeWithHttpInfoAsync(projectId, resourceId, extractedMetadataTreeForUpdateDto, operationIndex, cancellationToken).ConfigureAwait(false); } /// <summary> /// Updates an existing metadata tree of a resource. <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="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="extractedMetadataTreeForUpdateDto">The updated metadata tree data. (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>> UpdateExtractedMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = default(ExtractedMetadataTreeForUpdateDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->UpdateExtractedMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = extractedMetadataTreeForUpdateDto; localVarRequestOptions.Operation = "TreeApi.UpdateExtractedMetadataTree"; 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/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateExtractedMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Updates an existing metadata tree of a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns></returns> public void UpdateMetadataTree(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), int operationIndex = 0) { UpdateMetadataTreeWithHttpInfo(projectId, resourceId, metadataTreeForUpdateDto); } /// <summary> /// Updates an existing metadata tree of a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of Object(void)</returns> public Coscine.ApiClient.Core.Client.ApiResponse<Object> UpdateMetadataTreeWithHttpInfo(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->UpdateMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = metadataTreeForUpdateDto; localVarRequestOptions.Operation = "TreeApi.UpdateMetadataTree"; 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/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } /// <summary> /// Updates an existing metadata tree of a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (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 UpdateMetadataTreeAsync(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdateMetadataTreeWithHttpInfoAsync(projectId, resourceId, metadataTreeForUpdateDto, operationIndex, cancellationToken).ConfigureAwait(false); } /// <summary> /// Updates an existing metadata tree of a resource. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="metadataTreeForUpdateDto">The updated metadata tree data. (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>> UpdateMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = default(MetadataTreeForUpdateDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) { throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling TreeApi->UpdateMetadataTree"); } 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("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.Data = metadataTreeForUpdateDto; localVarRequestOptions.Operation = "TreeApi.UpdateMetadataTree"; 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/projects/{projectId}/resources/{resourceId}/trees/metadata", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateMetadataTree", localVarResponse); if (_exception != null) { throw _exception; } } return localVarResponse; } } }