diff --git a/README.md b/README.md index ae01c957cbc9a3a87e4dede367eab5ad85e429f6..79968c9b16d9d41dea286daa1a16932ce68247a3 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,7 @@ Class | Method | HTTP request | Description *ProjectMemberApi* | [**UpdateMembership**](docs/ProjectMemberApi.md#updatemembership) | **PUT** /api/v2/projects/{projectId}/members/{membershipId} | Updates a project membership for a specified project. *ProjectPublicationRequestApi* | [**ApiV2ProjectsProjectIdPublicationsRequestsOptions**](docs/ProjectPublicationRequestApi.md#apiv2projectsprojectidpublicationsrequestsoptions) | **OPTIONS** /api/v2/projects/{projectId}/publications/requests | Responds with the HTTP methods allowed for the endpoint. *ProjectPublicationRequestApi* | [**CreatePublicationRequest**](docs/ProjectPublicationRequestApi.md#createpublicationrequest) | **POST** /api/v2/projects/{projectId}/publications/requests | Creates a new publication request. +*ProjectPublicationRequestApi* | [**GetPublicationRequest**](docs/ProjectPublicationRequestApi.md#getpublicationrequest) | **GET** /api/v2/projects/{projectId}/publications/requests/{publicationRequestId} | Retrieves a publication request. *ProjectQuotaApi* | [**ApiV2ProjectsProjectIdQuotasOptions**](docs/ProjectQuotaApi.md#apiv2projectsprojectidquotasoptions) | **OPTIONS** /api/v2/projects/{projectId}/quotas | Responds with the HTTP methods allowed for the endpoint. *ProjectQuotaApi* | [**GetProjectQuota**](docs/ProjectQuotaApi.md#getprojectquota) | **GET** /api/v2/projects/{projectId}/quotas/{resourceTypeId} | Retrieves a project quota for a specified project and resource type. *ProjectQuotaApi* | [**GetProjectQuotas**](docs/ProjectQuotaApi.md#getprojectquotas) | **GET** /api/v2/projects/{projectId}/quotas | Retrieves all project quotas for a specified project. @@ -223,9 +224,6 @@ Class | Method | HTTP request | Description *SelfSessionApi* | [**Login**](docs/SelfSessionApi.md#login) | **GET** /api/v2/self/session | Initiate the login workflow with the default (NFDI4Ing AAI) provider. *SelfSessionApi* | [**LoginWithProvider**](docs/SelfSessionApi.md#loginwithprovider) | **GET** /api/v2/self/session/{externalAuthenticatorId} | Initiate the login workflow with specific provider. *SelfSessionApi* | [**Merge**](docs/SelfSessionApi.md#merge) | **GET** /api/v2/self/session/merge/{externalAuthenticatorId} | Initiate the merge workflow with specific provider. -*SystemStatusApi* | [**ApiV2SystemStatusOptions**](docs/SystemStatusApi.md#apiv2systemstatusoptions) | **OPTIONS** /api/v2/system/status | Responds with the HTTP methods allowed for the endpoint. -*SystemStatusApi* | [**GetInternalMessages**](docs/SystemStatusApi.md#getinternalmessages) | **GET** /api/v2/system/status/internal | Retrieves the internal messages. -*SystemStatusApi* | [**GetNocMessages**](docs/SystemStatusApi.md#getnocmessages) | **GET** /api/v2/system/status/noc | Retrieves the NOC messages. *TitleApi* | [**ApiV2TitlesOptions**](docs/TitleApi.md#apiv2titlesoptions) | **OPTIONS** /api/v2/titles | Responds with the HTTP methods allowed for the endpoint. *TitleApi* | [**GetTitle**](docs/TitleApi.md#gettitle) | **GET** /api/v2/titles/{titleId} | Retrieves a title by ID. *TitleApi* | [**GetTitles**](docs/TitleApi.md#gettitles) | **GET** /api/v2/titles | Retrieves all titles. @@ -311,9 +309,6 @@ Class | Method | HTTP request | Description - [Model.LicenseForResourceManipulationDto](docs/LicenseForResourceManipulationDto.md) - [Model.MaintenanceDto](docs/MaintenanceDto.md) - [Model.MaintenanceDtoPagedResponse](docs/MaintenanceDtoPagedResponse.md) - - [Model.MessageDto](docs/MessageDto.md) - - [Model.MessageDtoPagedResponse](docs/MessageDtoPagedResponse.md) - - [Model.MessageType](docs/MessageType.md) - [Model.MetadataTreeDto](docs/MetadataTreeDto.md) - [Model.MetadataTreeDtoPagedResponse](docs/MetadataTreeDtoPagedResponse.md) - [Model.MetadataTreeDtoResponse](docs/MetadataTreeDtoResponse.md) @@ -345,6 +340,8 @@ Class | Method | HTTP request | Description - [Model.ProjectInvitationForProjectManipulationDto](docs/ProjectInvitationForProjectManipulationDto.md) - [Model.ProjectInvitationResolveDto](docs/ProjectInvitationResolveDto.md) - [Model.ProjectMinimalDto](docs/ProjectMinimalDto.md) + - [Model.ProjectPublicationRequestDto](docs/ProjectPublicationRequestDto.md) + - [Model.ProjectPublicationRequestDtoResponse](docs/ProjectPublicationRequestDtoResponse.md) - [Model.ProjectQuotaDto](docs/ProjectQuotaDto.md) - [Model.ProjectQuotaDtoPagedResponse](docs/ProjectQuotaDtoPagedResponse.md) - [Model.ProjectQuotaDtoResponse](docs/ProjectQuotaDtoResponse.md) @@ -364,7 +361,6 @@ Class | Method | HTTP request | Description - [Model.PublicUserDtoIEnumerableResponse](docs/PublicUserDtoIEnumerableResponse.md) - [Model.PublicationAdvisoryServiceDto](docs/PublicationAdvisoryServiceDto.md) - [Model.PublicationRequestForCreationDto](docs/PublicationRequestForCreationDto.md) - - [Model.PublicationRequestForCreationDtoResponse](docs/PublicationRequestForCreationDtoResponse.md) - [Model.QuotaDto](docs/QuotaDto.md) - [Model.QuotaForManipulationDto](docs/QuotaForManipulationDto.md) - [Model.QuotaUnit](docs/QuotaUnit.md) diff --git a/docs/AdminApi.md b/docs/AdminApi.md index 94616bbb6921520bf811b048861c755138db266b..c570df3a3539ea39a90c6a5df9c2850eea77afec 100644 --- a/docs/AdminApi.md +++ b/docs/AdminApi.md @@ -213,7 +213,7 @@ catch (ApiException e) <a id="getallprojects"></a> # **GetAllProjects** -> ProjectAdminDtoPagedResponse GetAllProjects (bool? topLevel = null, bool? includeDeleted = null, bool? includeQuotas = null, int? pageSize = null, int? pageNumber = null, string? orderBy = null) +> ProjectAdminDtoPagedResponse GetAllProjects (bool? topLevel = null, bool? includeDeleted = null, bool? includeQuotas = null, bool? includePublicationRequests = null, int? pageSize = null, int? pageNumber = null, string? orderBy = null) Retrieves all projects. @@ -244,6 +244,7 @@ namespace Example var topLevel = true; // bool? | Gets or sets a value indicating whether to filter top-level projects. (optional) var includeDeleted = true; // bool? | Gets or sets a value indicating whether to include deleted projects in the results. (optional) var includeQuotas = true; // bool? | Gets or sets a value indicating whether to include quotas in the results. (optional) + var includePublicationRequests = true; // bool? | Gets or sets a value indicating whether to include project publication requests in the results. (optional) var pageSize = 56; // int? | Number of items per page. The maximum number of items per page is `250`. (optional) var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) var orderBy = "orderBy_example"; // string? | 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) @@ -251,7 +252,7 @@ namespace Example try { // Retrieves all projects. - ProjectAdminDtoPagedResponse result = apiInstance.GetAllProjects(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy); + ProjectAdminDtoPagedResponse result = apiInstance.GetAllProjects(topLevel, includeDeleted, includeQuotas, includePublicationRequests, pageSize, pageNumber, orderBy); Debug.WriteLine(result); } catch (ApiException e) @@ -272,7 +273,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Retrieves all projects. - ApiResponse<ProjectAdminDtoPagedResponse> response = apiInstance.GetAllProjectsWithHttpInfo(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy); + ApiResponse<ProjectAdminDtoPagedResponse> response = apiInstance.GetAllProjectsWithHttpInfo(topLevel, includeDeleted, includeQuotas, includePublicationRequests, pageSize, pageNumber, orderBy); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -292,6 +293,7 @@ catch (ApiException e) | **topLevel** | **bool?** | Gets or sets a value indicating whether to filter top-level projects. | [optional] | | **includeDeleted** | **bool?** | Gets or sets a value indicating whether to include deleted projects in the results. | [optional] | | **includeQuotas** | **bool?** | Gets or sets a value indicating whether to include quotas in the results. | [optional] | +| **includePublicationRequests** | **bool?** | Gets or sets a value indicating whether to include project publication requests in the results. | [optional] | | **pageSize** | **int?** | Number of items per page. The maximum number of items per page is `250`. | [optional] | | **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | | **orderBy** | **string?** | 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] | diff --git a/docs/ProjectAdminDto.md b/docs/ProjectAdminDto.md index feaac099bfe93f7b46a7c872605a005a23837556..c7d05411b5f2e0bc90adc4308378f981f920ac64 100644 --- a/docs/ProjectAdminDto.md +++ b/docs/ProjectAdminDto.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **ProjectResources** | [**List<ProjectResourceMinimalDto>**](ProjectResourceMinimalDto.md) | Collection of minimal project resource details associated with the project. | [optional] **ProjectRoles** | [**List<ProjectRoleMinimalDto>**](ProjectRoleMinimalDto.md) | Collection of minimal project role details associated with the project. | [optional] **ProjectQuota** | [**List<ProjectQuotaDto>**](ProjectQuotaDto.md) | Collection of project quotas associated with the project. | [optional] +**PublicationRequests** | [**List<ProjectPublicationRequestDto>**](ProjectPublicationRequestDto.md) | Collection of project publication requests associated with the project. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectPublicationRequestApi.md b/docs/ProjectPublicationRequestApi.md index 1900659251dc2ccd202b195d3f53348324232ff8..16425184edfe769a6d7d6705a4cb5a091d4308cc 100644 --- a/docs/ProjectPublicationRequestApi.md +++ b/docs/ProjectPublicationRequestApi.md @@ -6,6 +6,7 @@ All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.d |--------|--------------|-------------| | [**ApiV2ProjectsProjectIdPublicationsRequestsOptions**](ProjectPublicationRequestApi.md#apiv2projectsprojectidpublicationsrequestsoptions) | **OPTIONS** /api/v2/projects/{projectId}/publications/requests | Responds with the HTTP methods allowed for the endpoint. | | [**CreatePublicationRequest**](ProjectPublicationRequestApi.md#createpublicationrequest) | **POST** /api/v2/projects/{projectId}/publications/requests | Creates a new publication request. | +| [**GetPublicationRequest**](ProjectPublicationRequestApi.md#getpublicationrequest) | **GET** /api/v2/projects/{projectId}/publications/requests/{publicationRequestId} | Retrieves a publication request. | <a id="apiv2projectsprojectidpublicationsrequestsoptions"></a> # **ApiV2ProjectsProjectIdPublicationsRequestsOptions** @@ -99,7 +100,7 @@ void (empty response body) <a id="createpublicationrequest"></a> # **CreatePublicationRequest** -> PublicationRequestForCreationDtoResponse CreatePublicationRequest (string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = null) +> ProjectPublicationRequestDtoResponse CreatePublicationRequest (string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = null) Creates a new publication request. @@ -131,7 +132,7 @@ namespace Example try { // Creates a new publication request. - PublicationRequestForCreationDtoResponse result = apiInstance.CreatePublicationRequest(projectId, publicationRequestForCreationDto); + ProjectPublicationRequestDtoResponse result = apiInstance.CreatePublicationRequest(projectId, publicationRequestForCreationDto); Debug.WriteLine(result); } catch (ApiException e) @@ -152,7 +153,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Creates a new publication request. - ApiResponse<PublicationRequestForCreationDtoResponse> response = apiInstance.CreatePublicationRequestWithHttpInfo(projectId, publicationRequestForCreationDto); + ApiResponse<ProjectPublicationRequestDtoResponse> response = apiInstance.CreatePublicationRequestWithHttpInfo(projectId, publicationRequestForCreationDto); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -174,7 +175,7 @@ catch (ApiException e) ### Return type -[**PublicationRequestForCreationDtoResponse**](PublicationRequestForCreationDtoResponse.md) +[**ProjectPublicationRequestDtoResponse**](ProjectPublicationRequestDtoResponse.md) ### Authorization @@ -196,3 +197,102 @@ catch (ApiException e) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +<a id="getpublicationrequest"></a> +# **GetPublicationRequest** +> ProjectPublicationRequestDtoResponse GetPublicationRequest (string projectId, Guid publicationRequestId) + +Retrieves a publication request. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class GetPublicationRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new ProjectPublicationRequestApi(config); + var projectId = "projectId_example"; // string | The ID of the project. + var publicationRequestId = "publicationRequestId_example"; // Guid | The ID of the publication request. + + try + { + // Retrieves a publication request. + ProjectPublicationRequestDtoResponse result = apiInstance.GetPublicationRequest(projectId, publicationRequestId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectPublicationRequestApi.GetPublicationRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPublicationRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a publication request. + ApiResponse<ProjectPublicationRequestDtoResponse> response = apiInstance.GetPublicationRequestWithHttpInfo(projectId, publicationRequestId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectPublicationRequestApi.GetPublicationRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The ID of the project. | | +| **publicationRequestId** | **Guid** | The ID of the publication request. | | + +### Return type + +[**ProjectPublicationRequestDtoResponse**](ProjectPublicationRequestDtoResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns the publication request. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Publication request does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectPublicationRequestDto.md b/docs/ProjectPublicationRequestDto.md new file mode 100644 index 0000000000000000000000000000000000000000..706933017ab4ae2325dfee53ee6980780207c8e6 --- /dev/null +++ b/docs/ProjectPublicationRequestDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.ProjectPublicationRequestDto +Represents a data transfer object (DTO) for a project publication request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the project publication request. | [optional] +**Project** | [**ProjectMinimalDto**](ProjectMinimalDto.md) | | [optional] +**PublicationServiceRorId** | **string** | Identifier for the publication service used for this request. | [optional] +**Creator** | [**UserMinimalDto**](UserMinimalDto.md) | | [optional] +**DateCreated** | **DateTime** | The date and time when the request was created. | [optional] +**Message** | **string** | Optional message associated with the publication request. | [optional] +**Resources** | [**List<ResourceMinimalDto>**](ResourceMinimalDto.md) | Collection of the resources involved in the publication request. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PublicationRequestForCreationDtoResponse.md b/docs/ProjectPublicationRequestDtoResponse.md similarity index 70% rename from docs/PublicationRequestForCreationDtoResponse.md rename to docs/ProjectPublicationRequestDtoResponse.md index 7430a9096b055d3e20de512ef01b3c05e0f00e98..109e7c488f11dcdaf497a93c2941bbdfbce60a79 100644 --- a/docs/PublicationRequestForCreationDtoResponse.md +++ b/docs/ProjectPublicationRequestDtoResponse.md @@ -1,10 +1,10 @@ -# Coscine.ApiClient.Core.Model.PublicationRequestForCreationDtoResponse +# Coscine.ApiClient.Core.Model.ProjectPublicationRequestDtoResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**PublicationRequestForCreationDto**](PublicationRequestForCreationDto.md) | | [optional] +**Data** | [**ProjectPublicationRequestDto**](ProjectPublicationRequestDto.md) | | [optional] **IsSuccess** | **bool** | | [optional] [readonly] **StatusCode** | **int?** | | [optional] **TraceId** | **string** | | [optional] diff --git a/docs/PublicationAdvisoryServiceDto.md b/docs/PublicationAdvisoryServiceDto.md index 2e976fa4a9c6bcd81ab05e724a996e87fe841320..f40fee8f6eb8d25635b3d206ab3e295600cc9732 100644 --- a/docs/PublicationAdvisoryServiceDto.md +++ b/docs/PublicationAdvisoryServiceDto.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **DisplayName** | **string** | The data publication service's display name. | **Email** | **string** | The data publication service's email address. | -**Text** | **string** | The data publication service's info text. | [optional] +**Description** | **string** | The data publication service's description. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PublicationRequestForCreationDto.md b/docs/PublicationRequestForCreationDto.md index 372f5c8001d535f792dc46134cbc961e7838a731..e66e7ca21ad0ed1a4dfbac6e25e31847a4c6248b 100644 --- a/docs/PublicationRequestForCreationDto.md +++ b/docs/PublicationRequestForCreationDto.md @@ -5,7 +5,7 @@ Data transfer object (DTO) representing the creation of a publication request. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DataPublicationServiceRorId** | **string** | The data publication service's ror id. | +**PublicationServiceRorId** | **string** | The data publication service's ror id. | **ResourceIds** | **List<Guid>** | The resource guids. | **Message** | **string** | A message of the requester. | [optional] diff --git a/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs index 9ea490573adc2226834bdde163088881fe6ad8a4..d385916ab56a7653c8460bcf1453dd01ed849991 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs @@ -95,10 +95,11 @@ namespace Coscine.ApiClient.Core.Test.Api //bool? topLevel = null; //bool? includeDeleted = null; //bool? includeQuotas = null; + //bool? includePublicationRequests = null; //int? pageSize = null; //int? pageNumber = null; //string? orderBy = null; - //var response = instance.GetAllProjects(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy); + //var response = instance.GetAllProjects(topLevel, includeDeleted, includeQuotas, includePublicationRequests, pageSize, pageNumber, orderBy); //Assert.IsType<ProjectAdminDtoPagedResponse>(response); } diff --git a/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs index 7226d44f344c5cc8c9eb3687bf613818c87c0b78..ffcae9bea1dd43f7626b18b18a613fe4120133e9 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs @@ -76,7 +76,20 @@ namespace Coscine.ApiClient.Core.Test.Api //string projectId = null; //PublicationRequestForCreationDto? publicationRequestForCreationDto = null; //var response = instance.CreatePublicationRequest(projectId, publicationRequestForCreationDto); - //Assert.IsType<PublicationRequestForCreationDtoResponse>(response); + //Assert.IsType<ProjectPublicationRequestDtoResponse>(response); + } + + /// <summary> + /// Test GetPublicationRequest + /// </summary> + [Fact] + public void GetPublicationRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string projectId = null; + //Guid publicationRequestId = null; + //var response = instance.GetPublicationRequest(projectId, publicationRequestId); + //Assert.IsType<ProjectPublicationRequestDtoResponse>(response); } } } diff --git a/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj b/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj index 964069d2937a95a3603283e0f02bc41ca579d4c4..4f5781e92c5d4e3b2b83d7d65070a60de9fe2fb3 100644 --- a/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj +++ b/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj @@ -6,7 +6,7 @@ <TargetFramework>net8.0</TargetFramework> <IsPackable>false</IsPackable> <Nullable>annotations</Nullable> - <Version>1.9.2</Version></PropertyGroup> + </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> diff --git a/src/Coscine.ApiClient.Core.Test/Model/ProjectAdminDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/ProjectAdminDtoTests.cs index 7a9f91c9bee2eb119f148ed83fd1a06effc03c0d..d6837f9efbfb27494220b6257c0c4cd3876e714b 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/ProjectAdminDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/ProjectAdminDtoTests.cs @@ -252,5 +252,14 @@ namespace Coscine.ApiClient.Core.Test.Model { // TODO unit test for the property 'ProjectQuota' } + + /// <summary> + /// Test the property 'PublicationRequests' + /// </summary> + [Fact] + public void PublicationRequestsTest() + { + // TODO unit test for the property 'PublicationRequests' + } } } diff --git a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs b/src/Coscine.ApiClient.Core.Test/Model/ProjectPublicationRequestDtoResponseTests.cs similarity index 70% rename from src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs rename to src/Coscine.ApiClient.Core.Test/Model/ProjectPublicationRequestDtoResponseTests.cs index c70a604f816b26741a9604f7441c98357a90ba81..b476b0d6413bb4a205792aec43d525b390100fe7 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/ProjectPublicationRequestDtoResponseTests.cs @@ -23,21 +23,21 @@ using Newtonsoft.Json; namespace Coscine.ApiClient.Core.Test.Model { /// <summary> - /// Class for testing PublicationRequestForCreationDtoResponse + /// Class for testing ProjectPublicationRequestDtoResponse /// </summary> /// <remarks> /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// </remarks> - public class PublicationRequestForCreationDtoResponseTests : IDisposable + public class ProjectPublicationRequestDtoResponseTests : IDisposable { - // TODO uncomment below to declare an instance variable for PublicationRequestForCreationDtoResponse - //private PublicationRequestForCreationDtoResponse instance; + // TODO uncomment below to declare an instance variable for ProjectPublicationRequestDtoResponse + //private ProjectPublicationRequestDtoResponse instance; - public PublicationRequestForCreationDtoResponseTests() + public ProjectPublicationRequestDtoResponseTests() { - // TODO uncomment below to create an instance of PublicationRequestForCreationDtoResponse - //instance = new PublicationRequestForCreationDtoResponse(); + // TODO uncomment below to create an instance of ProjectPublicationRequestDtoResponse + //instance = new ProjectPublicationRequestDtoResponse(); } public void Dispose() @@ -46,13 +46,13 @@ namespace Coscine.ApiClient.Core.Test.Model } /// <summary> - /// Test an instance of PublicationRequestForCreationDtoResponse + /// Test an instance of ProjectPublicationRequestDtoResponse /// </summary> [Fact] - public void PublicationRequestForCreationDtoResponseInstanceTest() + public void ProjectPublicationRequestDtoResponseInstanceTest() { - // TODO uncomment below to test "IsType" PublicationRequestForCreationDtoResponse - //Assert.IsType<PublicationRequestForCreationDtoResponse>(instance); + // TODO uncomment below to test "IsType" ProjectPublicationRequestDtoResponse + //Assert.IsType<ProjectPublicationRequestDtoResponse>(instance); } /// <summary> diff --git a/src/Coscine.ApiClient.Core.Test/Model/ProjectPublicationRequestDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/ProjectPublicationRequestDtoTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..e1c279c9ac9663c99aca8b75a78aab43dd77eeec --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/ProjectPublicationRequestDtoTests.cs @@ -0,0 +1,121 @@ +/* + * 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 Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Coscine.ApiClient.Core.Model; +using Coscine.ApiClient.Core.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Coscine.ApiClient.Core.Test.Model +{ + /// <summary> + /// Class for testing ProjectPublicationRequestDto + /// </summary> + /// <remarks> + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// </remarks> + public class ProjectPublicationRequestDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ProjectPublicationRequestDto + //private ProjectPublicationRequestDto instance; + + public ProjectPublicationRequestDtoTests() + { + // TODO uncomment below to create an instance of ProjectPublicationRequestDto + //instance = new ProjectPublicationRequestDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of ProjectPublicationRequestDto + /// </summary> + [Fact] + public void ProjectPublicationRequestDtoInstanceTest() + { + // TODO uncomment below to test "IsType" ProjectPublicationRequestDto + //Assert.IsType<ProjectPublicationRequestDto>(instance); + } + + /// <summary> + /// Test the property 'Id' + /// </summary> + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + + /// <summary> + /// Test the property 'Project' + /// </summary> + [Fact] + public void ProjectTest() + { + // TODO unit test for the property 'Project' + } + + /// <summary> + /// Test the property 'PublicationServiceRorId' + /// </summary> + [Fact] + public void PublicationServiceRorIdTest() + { + // TODO unit test for the property 'PublicationServiceRorId' + } + + /// <summary> + /// Test the property 'Creator' + /// </summary> + [Fact] + public void CreatorTest() + { + // TODO unit test for the property 'Creator' + } + + /// <summary> + /// Test the property 'DateCreated' + /// </summary> + [Fact] + public void DateCreatedTest() + { + // TODO unit test for the property 'DateCreated' + } + + /// <summary> + /// Test the property 'Message' + /// </summary> + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + /// <summary> + /// Test the property 'Resources' + /// </summary> + [Fact] + public void ResourcesTest() + { + // TODO unit test for the property 'Resources' + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs index b7dd626bd5b16209b5d2964414e123462ad4e581..e65eb44f2f561fa235fe4e167a5f8a41e1259e04 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs @@ -74,12 +74,12 @@ namespace Coscine.ApiClient.Core.Test.Model } /// <summary> - /// Test the property 'Text' + /// Test the property 'Description' /// </summary> [Fact] - public void TextTest() + public void DescriptionTest() { - // TODO unit test for the property 'Text' + // TODO unit test for the property 'Description' } } } diff --git a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs index bb74e10decd7bb512bb52687046a4b44a7409b35..4eb5090399c13669a78649374d95b9b8bb1d8014 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs @@ -56,12 +56,12 @@ namespace Coscine.ApiClient.Core.Test.Model } /// <summary> - /// Test the property 'DataPublicationServiceRorId' + /// Test the property 'PublicationServiceRorId' /// </summary> [Fact] - public void DataPublicationServiceRorIdTest() + public void PublicationServiceRorIdTest() { - // TODO unit test for the property 'DataPublicationServiceRorId' + // TODO unit test for the property 'PublicationServiceRorId' } /// <summary> diff --git a/src/Coscine.ApiClient.Core/Api/AdminApi.cs b/src/Coscine.ApiClient.Core/Api/AdminApi.cs index 543f0386b944216a4483268c5e4456f487f09715..c29e65580f748e2b56435071c956a643773e6a98 100644 --- a/src/Coscine.ApiClient.Core/Api/AdminApi.cs +++ b/src/Coscine.ApiClient.Core/Api/AdminApi.cs @@ -94,12 +94,13 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ProjectAdminDtoPagedResponse</returns> - ProjectAdminDtoPagedResponse GetAllProjects(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0); + ProjectAdminDtoPagedResponse GetAllProjects(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves all projects. @@ -111,12 +112,13 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of ProjectAdminDtoPagedResponse</returns> - ApiResponse<ProjectAdminDtoPagedResponse> GetAllProjectsWithHttpInfo(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0); + ApiResponse<ProjectAdminDtoPagedResponse> GetAllProjectsWithHttpInfo(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves all resources. /// </summary> @@ -362,13 +364,14 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ProjectAdminDtoPagedResponse</returns> - System.Threading.Tasks.Task<ProjectAdminDtoPagedResponse> GetAllProjectsAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ProjectAdminDtoPagedResponse> GetAllProjectsAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Retrieves all projects. @@ -380,13 +383,14 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (ProjectAdminDtoPagedResponse)</returns> - System.Threading.Tasks.Task<ApiResponse<ProjectAdminDtoPagedResponse>> GetAllProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ApiResponse<ProjectAdminDtoPagedResponse>> GetAllProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Retrieves all resources. /// </summary> @@ -1066,14 +1070,15 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ProjectAdminDtoPagedResponse</returns> - public ProjectAdminDtoPagedResponse GetAllProjects(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0) + public ProjectAdminDtoPagedResponse GetAllProjects(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0) { - Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> localVarResponse = GetAllProjectsWithHttpInfo(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy); + Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> localVarResponse = GetAllProjectsWithHttpInfo(topLevel, includeDeleted, includeQuotas, includePublicationRequests, pageSize, pageNumber, orderBy); return localVarResponse.Data; } @@ -1084,12 +1089,13 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of ProjectAdminDtoPagedResponse</returns> - public Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> GetAllProjectsWithHttpInfo(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0) + public Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> GetAllProjectsWithHttpInfo(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0) { Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); @@ -1126,6 +1132,10 @@ namespace Coscine.ApiClient.Core.Api { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeQuotas", includeQuotas)); } + if (includePublicationRequests != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludePublicationRequests", includePublicationRequests)); + } if (pageSize != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize)); @@ -1169,15 +1179,16 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ProjectAdminDtoPagedResponse</returns> - public async System.Threading.Tasks.Task<ProjectAdminDtoPagedResponse> GetAllProjectsAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<ProjectAdminDtoPagedResponse> GetAllProjectsAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> localVarResponse = await GetAllProjectsWithHttpInfoAsync(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); + Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse> localVarResponse = await GetAllProjectsWithHttpInfoAsync(topLevel, includeDeleted, includeQuotas, includePublicationRequests, pageSize, pageNumber, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1188,13 +1199,14 @@ namespace Coscine.ApiClient.Core.Api /// <param name="topLevel">Gets or sets a value indicating whether to filter top-level projects. (optional)</param> /// <param name="includeDeleted">Gets or sets a value indicating whether to include deleted projects in the results. (optional)</param> /// <param name="includeQuotas">Gets or sets a value indicating whether to include quotas in the results. (optional)</param> + /// <param name="includePublicationRequests">Gets or sets a value indicating whether to include project publication requests in the results. (optional)</param> /// <param name="pageSize">Number of items per page. The maximum number of items per page is `250`. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (ProjectAdminDtoPagedResponse)</returns> - public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse>> GetAllProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProjectAdminDtoPagedResponse>> GetAllProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), bool? includeDeleted = default(bool?), bool? includeQuotas = default(bool?), bool? includePublicationRequests = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); @@ -1232,6 +1244,10 @@ namespace Coscine.ApiClient.Core.Api { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeQuotas", includeQuotas)); } + if (includePublicationRequests != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludePublicationRequests", includePublicationRequests)); + } if (pageSize != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize)); diff --git a/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs b/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs index 3b6f1fc34e7708de7ccb13ba1be476b5947db8df..7a8f19a0ab568a991eb8bd799ca39b842c5764f3 100644 --- a/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs +++ b/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs @@ -54,8 +54,8 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The Id or slug of the project.</param> /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> - /// <returns>PublicationRequestForCreationDtoResponse</returns> - PublicationRequestForCreationDtoResponse CreatePublicationRequest(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0); + /// <returns>ProjectPublicationRequestDtoResponse</returns> + ProjectPublicationRequestDtoResponse CreatePublicationRequest(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0); /// <summary> /// Creates a new publication request. @@ -67,8 +67,30 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The Id or slug of the project.</param> /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> - /// <returns>ApiResponse of PublicationRequestForCreationDtoResponse</returns> - ApiResponse<PublicationRequestForCreationDtoResponse> CreatePublicationRequestWithHttpInfo(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0); + /// <returns>ApiResponse of ProjectPublicationRequestDtoResponse</returns> + ApiResponse<ProjectPublicationRequestDtoResponse> CreatePublicationRequestWithHttpInfo(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0); + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ProjectPublicationRequestDtoResponse</returns> + ProjectPublicationRequestDtoResponse GetPublicationRequest(string projectId, Guid publicationRequestId, int operationIndex = 0); + + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of ProjectPublicationRequestDtoResponse</returns> + ApiResponse<ProjectPublicationRequestDtoResponse> GetPublicationRequestWithHttpInfo(string projectId, Guid publicationRequestId, int operationIndex = 0); #endregion Synchronous Operations } @@ -114,8 +136,8 @@ namespace Coscine.ApiClient.Core.Api /// <param name="publicationRequestForCreationDto">The publication request 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 PublicationRequestForCreationDtoResponse</returns> - System.Threading.Tasks.Task<PublicationRequestForCreationDtoResponse> CreatePublicationRequestAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <returns>Task of ProjectPublicationRequestDtoResponse</returns> + System.Threading.Tasks.Task<ProjectPublicationRequestDtoResponse> CreatePublicationRequestAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Creates a new publication request. @@ -128,8 +150,35 @@ namespace Coscine.ApiClient.Core.Api /// <param name="publicationRequestForCreationDto">The publication request 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 (PublicationRequestForCreationDtoResponse)</returns> - System.Threading.Tasks.Task<ApiResponse<PublicationRequestForCreationDtoResponse>> CreatePublicationRequestWithHttpInfoAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <returns>Task of ApiResponse (ProjectPublicationRequestDtoResponse)</returns> + System.Threading.Tasks.Task<ApiResponse<ProjectPublicationRequestDtoResponse>> CreatePublicationRequestWithHttpInfoAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ProjectPublicationRequestDtoResponse</returns> + System.Threading.Tasks.Task<ProjectPublicationRequestDtoResponse> GetPublicationRequestAsync(string projectId, Guid publicationRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (ProjectPublicationRequestDtoResponse)</returns> + System.Threading.Tasks.Task<ApiResponse<ProjectPublicationRequestDtoResponse>> GetPublicationRequestWithHttpInfoAsync(string projectId, Guid publicationRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -407,10 +456,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The Id or slug of the project.</param> /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> - /// <returns>PublicationRequestForCreationDtoResponse</returns> - public PublicationRequestForCreationDtoResponse CreatePublicationRequest(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0) + /// <returns>ProjectPublicationRequestDtoResponse</returns> + public ProjectPublicationRequestDtoResponse CreatePublicationRequest(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0) { - Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse> localVarResponse = CreatePublicationRequestWithHttpInfo(projectId, publicationRequestForCreationDto); + Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse> localVarResponse = CreatePublicationRequestWithHttpInfo(projectId, publicationRequestForCreationDto); return localVarResponse.Data; } @@ -421,8 +470,8 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The Id or slug of the project.</param> /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> - /// <returns>ApiResponse of PublicationRequestForCreationDtoResponse</returns> - public Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse> CreatePublicationRequestWithHttpInfo(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0) + /// <returns>ApiResponse of ProjectPublicationRequestDtoResponse</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse> CreatePublicationRequestWithHttpInfo(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) @@ -469,7 +518,7 @@ namespace Coscine.ApiClient.Core.Api } // make the HTTP request - var localVarResponse = this.Client.Post<PublicationRequestForCreationDtoResponse>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post<ProjectPublicationRequestDtoResponse>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreatePublicationRequest", localVarResponse); @@ -490,10 +539,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="publicationRequestForCreationDto">The publication request 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 PublicationRequestForCreationDtoResponse</returns> - public async System.Threading.Tasks.Task<PublicationRequestForCreationDtoResponse> CreatePublicationRequestAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// <returns>Task of ProjectPublicationRequestDtoResponse</returns> + public async System.Threading.Tasks.Task<ProjectPublicationRequestDtoResponse> CreatePublicationRequestAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse> localVarResponse = await CreatePublicationRequestWithHttpInfoAsync(projectId, publicationRequestForCreationDto, operationIndex, cancellationToken).ConfigureAwait(false); + Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse> localVarResponse = await CreatePublicationRequestWithHttpInfoAsync(projectId, publicationRequestForCreationDto, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -505,8 +554,8 @@ namespace Coscine.ApiClient.Core.Api /// <param name="publicationRequestForCreationDto">The publication request 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 (PublicationRequestForCreationDtoResponse)</returns> - public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse>> CreatePublicationRequestWithHttpInfoAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// <returns>Task of ApiResponse (ProjectPublicationRequestDtoResponse)</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse>> CreatePublicationRequestWithHttpInfoAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) @@ -554,7 +603,7 @@ namespace Coscine.ApiClient.Core.Api } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync<PublicationRequestForCreationDtoResponse>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync<ProjectPublicationRequestDtoResponse>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -568,5 +617,167 @@ namespace Coscine.ApiClient.Core.Api return localVarResponse; } + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ProjectPublicationRequestDtoResponse</returns> + public ProjectPublicationRequestDtoResponse GetPublicationRequest(string projectId, Guid publicationRequestId, int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse> localVarResponse = GetPublicationRequestWithHttpInfo(projectId, publicationRequestId); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of ProjectPublicationRequestDtoResponse</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse> GetPublicationRequestWithHttpInfo(string projectId, Guid publicationRequestId, 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 ProjectPublicationRequestApi->GetPublicationRequest"); + } + + 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("publicationRequestId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(publicationRequestId)); // path parameter + + localVarRequestOptions.Operation = "ProjectPublicationRequestApi.GetPublicationRequest"; + 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<ProjectPublicationRequestDtoResponse>("/api/v2/projects/{projectId}/publications/requests/{publicationRequestId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPublicationRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ProjectPublicationRequestDtoResponse</returns> + public async System.Threading.Tasks.Task<ProjectPublicationRequestDtoResponse> GetPublicationRequestAsync(string projectId, Guid publicationRequestId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse> localVarResponse = await GetPublicationRequestWithHttpInfoAsync(projectId, publicationRequestId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves a publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The ID of the project.</param> + /// <param name="publicationRequestId">The ID of the publication request.</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (ProjectPublicationRequestDtoResponse)</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProjectPublicationRequestDtoResponse>> GetPublicationRequestWithHttpInfoAsync(string projectId, Guid publicationRequestId, 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 ProjectPublicationRequestApi->GetPublicationRequest"); + } + + + 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("publicationRequestId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(publicationRequestId)); // path parameter + + localVarRequestOptions.Operation = "ProjectPublicationRequestApi.GetPublicationRequest"; + 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<ProjectPublicationRequestDtoResponse>("/api/v2/projects/{projectId}/publications/requests/{publicationRequestId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPublicationRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + } } diff --git a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj index 7be97be8c7c357664811cba1dfe1d5375004ce0f..d95edf2ca80568e9c968c8ce97ff606524cee21e 100644 --- a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj +++ b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj @@ -12,7 +12,7 @@ <Description>A library generated from a OpenAPI doc</Description> <Copyright>No Copyright</Copyright> <RootNamespace>Coscine.ApiClient.Core</RootNamespace> - <Version>1.9.2</Version> + <Version>1.0.0</Version> <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Coscine.ApiClient.Core.xml</DocumentationFile> <RepositoryUrl>https://github.com/GIT_USER_ID/GIT_REPO_ID.git</RepositoryUrl> <RepositoryType>git</RepositoryType> diff --git a/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs index 01c8a1f924dffa0a7d554b10c9a2468dc2b20c39..8f7bb8b9725f8ac79d54644650fd5b2107677f5e 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs @@ -57,7 +57,8 @@ namespace Coscine.ApiClient.Core.Model /// <param name="projectResources">Collection of minimal project resource details associated with the project..</param> /// <param name="projectRoles">Collection of minimal project role details associated with the project..</param> /// <param name="projectQuota">Collection of project quotas associated with the project..</param> - public ProjectAdminDto(Guid id = default(Guid), string pid = default(string), string name = default(string), string description = default(string), DateTime startDate = default(DateTime), DateTime endDate = default(DateTime), List<string> keywords = default(List<string>), string displayName = default(string), string principleInvestigators = default(string), string grantId = default(string), VisibilityDto visibility = default(VisibilityDto), List<DisciplineDto> disciplines = default(List<DisciplineDto>), List<OrganizationDto> organizations = default(List<OrganizationDto>), string slug = default(string), UserMinimalDto creator = default(UserMinimalDto), DateTime? creationDate = default(DateTime?), List<ProjectDto> subProjects = default(List<ProjectDto>), ProjectMinimalDto parent = default(ProjectMinimalDto), bool deleted = default(bool), List<ProjectResourceMinimalDto> projectResources = default(List<ProjectResourceMinimalDto>), List<ProjectRoleMinimalDto> projectRoles = default(List<ProjectRoleMinimalDto>), List<ProjectQuotaDto> projectQuota = default(List<ProjectQuotaDto>)) + /// <param name="publicationRequests">Collection of project publication requests associated with the project..</param> + public ProjectAdminDto(Guid id = default(Guid), string pid = default(string), string name = default(string), string description = default(string), DateTime startDate = default(DateTime), DateTime endDate = default(DateTime), List<string> keywords = default(List<string>), string displayName = default(string), string principleInvestigators = default(string), string grantId = default(string), VisibilityDto visibility = default(VisibilityDto), List<DisciplineDto> disciplines = default(List<DisciplineDto>), List<OrganizationDto> organizations = default(List<OrganizationDto>), string slug = default(string), UserMinimalDto creator = default(UserMinimalDto), DateTime? creationDate = default(DateTime?), List<ProjectDto> subProjects = default(List<ProjectDto>), ProjectMinimalDto parent = default(ProjectMinimalDto), bool deleted = default(bool), List<ProjectResourceMinimalDto> projectResources = default(List<ProjectResourceMinimalDto>), List<ProjectRoleMinimalDto> projectRoles = default(List<ProjectRoleMinimalDto>), List<ProjectQuotaDto> projectQuota = default(List<ProjectQuotaDto>), List<ProjectPublicationRequestDto> publicationRequests = default(List<ProjectPublicationRequestDto>)) { this.Id = id; this.Pid = pid; @@ -81,6 +82,7 @@ namespace Coscine.ApiClient.Core.Model this.ProjectResources = projectResources; this.ProjectRoles = projectRoles; this.ProjectQuota = projectQuota; + this.PublicationRequests = publicationRequests; } /// <summary> @@ -234,6 +236,13 @@ namespace Coscine.ApiClient.Core.Model [DataMember(Name = "projectQuota", EmitDefaultValue = false)] public List<ProjectQuotaDto> ProjectQuota { get; set; } + /// <summary> + /// Collection of project publication requests associated with the project. + /// </summary> + /// <value>Collection of project publication requests associated with the project.</value> + [DataMember(Name = "publicationRequests", EmitDefaultValue = false)] + public List<ProjectPublicationRequestDto> PublicationRequests { get; set; } + /// <summary> /// Returns the string presentation of the object /// </summary> @@ -264,6 +273,7 @@ namespace Coscine.ApiClient.Core.Model sb.Append(" ProjectResources: ").Append(ProjectResources).Append("\n"); sb.Append(" ProjectRoles: ").Append(ProjectRoles).Append("\n"); sb.Append(" ProjectQuota: ").Append(ProjectQuota).Append("\n"); + sb.Append(" PublicationRequests: ").Append(PublicationRequests).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectPublicationRequestDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectPublicationRequestDto.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e5c8d3532a430732574d15a33153119b6fae3d8 --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/ProjectPublicationRequestDto.cs @@ -0,0 +1,142 @@ +/* + * 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; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Coscine.ApiClient.Core.Client.OpenAPIDateConverter; + +namespace Coscine.ApiClient.Core.Model +{ + /// <summary> + /// Represents a data transfer object (DTO) for a project publication request. + /// </summary> + [DataContract(Name = "ProjectPublicationRequestDto")] + public partial class ProjectPublicationRequestDto : IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="ProjectPublicationRequestDto" /> class. + /// </summary> + /// <param name="id">Unique identifier for the project publication request..</param> + /// <param name="project">project.</param> + /// <param name="publicationServiceRorId">Identifier for the publication service used for this request..</param> + /// <param name="creator">creator.</param> + /// <param name="dateCreated">The date and time when the request was created..</param> + /// <param name="message">Optional message associated with the publication request..</param> + /// <param name="resources">Collection of the resources involved in the publication request..</param> + public ProjectPublicationRequestDto(Guid id = default(Guid), ProjectMinimalDto project = default(ProjectMinimalDto), string publicationServiceRorId = default(string), UserMinimalDto creator = default(UserMinimalDto), DateTime dateCreated = default(DateTime), string message = default(string), List<ResourceMinimalDto> resources = default(List<ResourceMinimalDto>)) + { + this.Id = id; + this.Project = project; + this.PublicationServiceRorId = publicationServiceRorId; + this.Creator = creator; + this.DateCreated = dateCreated; + this.Message = message; + this.Resources = resources; + } + + /// <summary> + /// Unique identifier for the project publication request. + /// </summary> + /// <value>Unique identifier for the project publication request.</value> + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + + /// <summary> + /// Gets or Sets Project + /// </summary> + [DataMember(Name = "project", EmitDefaultValue = false)] + public ProjectMinimalDto Project { get; set; } + + /// <summary> + /// Identifier for the publication service used for this request. + /// </summary> + /// <value>Identifier for the publication service used for this request.</value> + [DataMember(Name = "publicationServiceRorId", EmitDefaultValue = false)] + public string PublicationServiceRorId { get; set; } + + /// <summary> + /// Gets or Sets Creator + /// </summary> + [DataMember(Name = "creator", EmitDefaultValue = false)] + public UserMinimalDto Creator { get; set; } + + /// <summary> + /// The date and time when the request was created. + /// </summary> + /// <value>The date and time when the request was created.</value> + [DataMember(Name = "dateCreated", EmitDefaultValue = false)] + public DateTime DateCreated { get; set; } + + /// <summary> + /// Optional message associated with the publication request. + /// </summary> + /// <value>Optional message associated with the publication request.</value> + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// <summary> + /// Collection of the resources involved in the publication request. + /// </summary> + /// <value>Collection of the resources involved in the publication request.</value> + [DataMember(Name = "resources", EmitDefaultValue = false)] + public List<ResourceMinimalDto> Resources { get; set; } + + /// <summary> + /// Returns the string presentation of the object + /// </summary> + /// <returns>String presentation of the object</returns> + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ProjectPublicationRequestDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Project: ").Append(Project).Append("\n"); + sb.Append(" PublicationServiceRorId: ").Append(PublicationServiceRorId).Append("\n"); + sb.Append(" Creator: ").Append(Creator).Append("\n"); + sb.Append(" DateCreated: ").Append(DateCreated).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Resources: ").Append(Resources).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// <summary> + /// Returns the JSON string presentation of the object + /// </summary> + /// <returns>JSON string presentation of the object</returns> + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// <summary> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/ProjectPublicationRequestDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectPublicationRequestDtoResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..75bc849da4cad3d8ec59743338be458789f4224f --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/ProjectPublicationRequestDtoResponse.cs @@ -0,0 +1,116 @@ +/* + * 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; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Coscine.ApiClient.Core.Client.OpenAPIDateConverter; + +namespace Coscine.ApiClient.Core.Model +{ + /// <summary> + /// ProjectPublicationRequestDtoResponse + /// </summary> + [DataContract(Name = "ProjectPublicationRequestDtoResponse")] + public partial class ProjectPublicationRequestDtoResponse : IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="ProjectPublicationRequestDtoResponse" /> class. + /// </summary> + /// <param name="data">data.</param> + /// <param name="statusCode">statusCode.</param> + /// <param name="traceId">traceId.</param> + public ProjectPublicationRequestDtoResponse(ProjectPublicationRequestDto data = default(ProjectPublicationRequestDto), int? statusCode = default(int?), string traceId = default(string)) + { + this.Data = data; + this.StatusCode = statusCode; + this.TraceId = traceId; + } + + /// <summary> + /// Gets or Sets Data + /// </summary> + [DataMember(Name = "data", EmitDefaultValue = false)] + public ProjectPublicationRequestDto Data { get; set; } + + /// <summary> + /// Gets or Sets IsSuccess + /// </summary> + [DataMember(Name = "isSuccess", EmitDefaultValue = true)] + public bool IsSuccess { get; private set; } + + /// <summary> + /// Returns false as IsSuccess should not be serialized given that it's read-only. + /// </summary> + /// <returns>false (boolean)</returns> + public bool ShouldSerializeIsSuccess() + { + return false; + } + /// <summary> + /// Gets or Sets StatusCode + /// </summary> + [DataMember(Name = "statusCode", EmitDefaultValue = true)] + public int? StatusCode { get; set; } + + /// <summary> + /// Gets or Sets TraceId + /// </summary> + [DataMember(Name = "traceId", EmitDefaultValue = true)] + public string TraceId { get; set; } + + /// <summary> + /// Returns the string presentation of the object + /// </summary> + /// <returns>String presentation of the object</returns> + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ProjectPublicationRequestDtoResponse {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" IsSuccess: ").Append(IsSuccess).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" TraceId: ").Append(TraceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// <summary> + /// Returns the JSON string presentation of the object + /// </summary> + /// <returns>JSON string presentation of the object</returns> + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// <summary> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs b/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs index b9c370bba2f4072580af90d2564af406ffe75086..e77d12ba6f01634b2b3c33d7cacb26c839c4efbf 100644 --- a/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs @@ -42,8 +42,8 @@ namespace Coscine.ApiClient.Core.Model /// </summary> /// <param name="displayName">The data publication service's display name. (required).</param> /// <param name="email">The data publication service's email address. (required).</param> - /// <param name="text">The data publication service's info text..</param> - public PublicationAdvisoryServiceDto(string displayName = default(string), string email = default(string), string text = default(string)) + /// <param name="description">The data publication service's description..</param> + public PublicationAdvisoryServiceDto(string displayName = default(string), string email = default(string), string description = default(string)) { // to ensure "displayName" is required (not null) if (displayName == null) @@ -57,7 +57,7 @@ namespace Coscine.ApiClient.Core.Model throw new ArgumentNullException("email is a required property for PublicationAdvisoryServiceDto and cannot be null"); } this.Email = email; - this.Text = text; + this.Description = description; } /// <summary> @@ -75,11 +75,11 @@ namespace Coscine.ApiClient.Core.Model public string Email { get; set; } /// <summary> - /// The data publication service's info text. + /// The data publication service's description. /// </summary> - /// <value>The data publication service's info text.</value> - [DataMember(Name = "text", EmitDefaultValue = false)] - public string Text { get; set; } + /// <value>The data publication service's description.</value> + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } /// <summary> /// Returns the string presentation of the object @@ -91,7 +91,7 @@ namespace Coscine.ApiClient.Core.Model sb.Append("class PublicationAdvisoryServiceDto {\n"); sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs index 3f7e13507fde1e2677828ba1ed7375bb3fda3a8d..d86b4d1c74b56f087d470a8bf2d3ee9326e8bb62 100644 --- a/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs @@ -40,17 +40,17 @@ namespace Coscine.ApiClient.Core.Model /// <summary> /// Initializes a new instance of the <see cref="PublicationRequestForCreationDto" /> class. /// </summary> - /// <param name="dataPublicationServiceRorId">The data publication service's ror id. (required).</param> + /// <param name="publicationServiceRorId">The data publication service's ror id. (required).</param> /// <param name="resourceIds">The resource guids. (required).</param> /// <param name="message">A message of the requester..</param> - public PublicationRequestForCreationDto(string dataPublicationServiceRorId = default(string), List<Guid> resourceIds = default(List<Guid>), string message = default(string)) + public PublicationRequestForCreationDto(string publicationServiceRorId = default(string), List<Guid> resourceIds = default(List<Guid>), string message = default(string)) { - // to ensure "dataPublicationServiceRorId" is required (not null) - if (dataPublicationServiceRorId == null) + // to ensure "publicationServiceRorId" is required (not null) + if (publicationServiceRorId == null) { - throw new ArgumentNullException("dataPublicationServiceRorId is a required property for PublicationRequestForCreationDto and cannot be null"); + throw new ArgumentNullException("publicationServiceRorId is a required property for PublicationRequestForCreationDto and cannot be null"); } - this.DataPublicationServiceRorId = dataPublicationServiceRorId; + this.PublicationServiceRorId = publicationServiceRorId; // to ensure "resourceIds" is required (not null) if (resourceIds == null) { @@ -64,8 +64,8 @@ namespace Coscine.ApiClient.Core.Model /// The data publication service's ror id. /// </summary> /// <value>The data publication service's ror id.</value> - [DataMember(Name = "dataPublicationServiceRorId", IsRequired = true, EmitDefaultValue = true)] - public string DataPublicationServiceRorId { get; set; } + [DataMember(Name = "publicationServiceRorId", IsRequired = true, EmitDefaultValue = true)] + public string PublicationServiceRorId { get; set; } /// <summary> /// The resource guids. @@ -89,7 +89,7 @@ namespace Coscine.ApiClient.Core.Model { StringBuilder sb = new StringBuilder(); sb.Append("class PublicationRequestForCreationDto {\n"); - sb.Append(" DataPublicationServiceRorId: ").Append(DataPublicationServiceRorId).Append("\n"); + sb.Append(" PublicationServiceRorId: ").Append(PublicationServiceRorId).Append("\n"); sb.Append(" ResourceIds: ").Append(ResourceIds).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append("}\n"); @@ -112,10 +112,10 @@ namespace Coscine.ApiClient.Core.Model /// <returns>Validation Result</returns> IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { - // DataPublicationServiceRorId (string) minLength - if (this.DataPublicationServiceRorId != null && this.DataPublicationServiceRorId.Length < 1) + // PublicationServiceRorId (string) minLength + if (this.PublicationServiceRorId != null && this.PublicationServiceRorId.Length < 1) { - yield return new ValidationResult("Invalid value for DataPublicationServiceRorId, length must be greater than 1.", new [] { "DataPublicationServiceRorId" }); + yield return new ValidationResult("Invalid value for PublicationServiceRorId, length must be greater than 1.", new [] { "PublicationServiceRorId" }); } yield break;