diff --git a/README.md b/README.md index f3271bd130bea6dc7946f420f3037d2643e66deb..f3f78450930e9c737c1026faeb2e0a38c5f13367 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,7 @@ Class | Method | HTTP request | Description *AdminApi* | [**GetAllProjects**](docs/AdminApi.md#getallprojects) | **GET** /api/v2/admin/projects | Retrieves all projects. *AdminApi* | [**GetAllResources**](docs/AdminApi.md#getallresources) | **GET** /api/v2/admin/resources | Retrieves all resources. *AdminApi* | [**GetAllUsers**](docs/AdminApi.md#getallusers) | **GET** /api/v2/admin/users | Retrieves all users. +*AdminApi* | [**GetDeployedGraphs**](docs/AdminApi.md#getdeployedgraphs) | **GET** /api/v2/admin/graphs | Gets all deployed graphs. *AdminApi* | [**GetMetadataGraph**](docs/AdminApi.md#getmetadatagraph) | **GET** /api/v2/admin/metadata/{graph} | Gets a metadata graph. *AdminApi* | [**PatchMetadata**](docs/AdminApi.md#patchmetadata) | **PATCH** /api/v2/admin/metadata/{graph} | Patches a metadata graph. *AdminApi* | [**UpdateMetadataGraph**](docs/AdminApi.md#updatemetadatagraph) | **PUT** /api/v2/admin/metadata/{graph} | Updates a metadata graph. @@ -253,6 +254,8 @@ Class | Method | HTTP request | Description - [Model.ApplicationProfileForResourceCreationDto](docs/ApplicationProfileForResourceCreationDto.md) - [Model.ApplicationProfileMinimalDto](docs/ApplicationProfileMinimalDto.md) - [Model.CoscineHttpMethod](docs/CoscineHttpMethod.md) + - [Model.DeployedGraphDto](docs/DeployedGraphDto.md) + - [Model.DeployedGraphDtoPagedResponse](docs/DeployedGraphDtoPagedResponse.md) - [Model.DisciplineDto](docs/DisciplineDto.md) - [Model.DisciplineDtoPagedResponse](docs/DisciplineDtoPagedResponse.md) - [Model.DisciplineDtoResponse](docs/DisciplineDtoResponse.md) diff --git a/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs index 80404314058816ded784b485a3c4f4269bad8488..9ea490573adc2226834bdde163088881fe6ad8a4 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs @@ -133,6 +133,20 @@ namespace Coscine.ApiClient.Core.Test.Api //Assert.IsType<UserDtoPagedResponse>(response); } + /// <summary> + /// Test GetDeployedGraphs + /// </summary> + [Fact] + public void GetDeployedGraphsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int? pageNumber = null; + //int? pageSize = null; + //string? orderBy = null; + //var response = instance.GetDeployedGraphs(pageNumber, pageSize, orderBy); + //Assert.IsType<DeployedGraphDtoPagedResponse>(response); + } + /// <summary> /// Test GetMetadataGraph /// </summary> diff --git a/src/Coscine.ApiClient.Core.Test/Api/ProjectApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/ProjectApiTests.cs index 8fb93226ef77c64f43bbdf1170af568606ef696c..2d0a14b0de1b68b8bdd803d29a91a14f4c78a64a 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/ProjectApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/ProjectApiTests.cs @@ -108,11 +108,12 @@ namespace Coscine.ApiClient.Core.Test.Api public void GetProjectsTest() { // TODO uncomment below to test the method and replace null with proper value + //bool? includeOrganizations = null; //bool? topLevel = null; //int? pageNumber = null; //int? pageSize = null; //string? orderBy = null; - //var response = instance.GetProjects(topLevel, pageNumber, pageSize, orderBy); + //var response = instance.GetProjects(includeOrganizations, topLevel, pageNumber, pageSize, orderBy); //Assert.IsType<ProjectDtoPagedResponse>(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 13c6cbf80722a55e46fa27e20f159ad7f9020073..d3e4cae52fec45fa81432c7886c77d455cda9f50 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>net7.0</TargetFramework> <IsPackable>false</IsPackable> <Nullable>annotations</Nullable> - <Version>1.6.0</Version></PropertyGroup> + </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" /> diff --git a/src/Coscine.ApiClient.Core.Test/Model/DeployedGraphDtoPagedResponseTests.cs b/src/Coscine.ApiClient.Core.Test/Model/DeployedGraphDtoPagedResponseTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..f34f43018d98e14540e87f3eb283871536476080 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/DeployedGraphDtoPagedResponseTests.cs @@ -0,0 +1,103 @@ +/* + * 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 DeployedGraphDtoPagedResponse + /// </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 DeployedGraphDtoPagedResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DeployedGraphDtoPagedResponse + //private DeployedGraphDtoPagedResponse instance; + + public DeployedGraphDtoPagedResponseTests() + { + // TODO uncomment below to create an instance of DeployedGraphDtoPagedResponse + //instance = new DeployedGraphDtoPagedResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of DeployedGraphDtoPagedResponse + /// </summary> + [Fact] + public void DeployedGraphDtoPagedResponseInstanceTest() + { + // TODO uncomment below to test "IsType" DeployedGraphDtoPagedResponse + //Assert.IsType<DeployedGraphDtoPagedResponse>(instance); + } + + /// <summary> + /// Test the property 'Data' + /// </summary> + [Fact] + public void DataTest() + { + // TODO unit test for the property 'Data' + } + + /// <summary> + /// Test the property 'IsSuccess' + /// </summary> + [Fact] + public void IsSuccessTest() + { + // TODO unit test for the property 'IsSuccess' + } + + /// <summary> + /// Test the property 'StatusCode' + /// </summary> + [Fact] + public void StatusCodeTest() + { + // TODO unit test for the property 'StatusCode' + } + + /// <summary> + /// Test the property 'TraceId' + /// </summary> + [Fact] + public void TraceIdTest() + { + // TODO unit test for the property 'TraceId' + } + + /// <summary> + /// Test the property 'Pagination' + /// </summary> + [Fact] + public void PaginationTest() + { + // TODO unit test for the property 'Pagination' + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Model/DeployedGraphDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/DeployedGraphDtoTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..e0c6632028e886b435232c8aa5cb9d70113b7c1d --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/DeployedGraphDtoTests.cs @@ -0,0 +1,76 @@ +/* + * 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 DeployedGraphDto + /// </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 DeployedGraphDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DeployedGraphDto + //private DeployedGraphDto instance; + + public DeployedGraphDtoTests() + { + // TODO uncomment below to create an instance of DeployedGraphDto + //instance = new DeployedGraphDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of DeployedGraphDto + /// </summary> + [Fact] + public void DeployedGraphDtoInstanceTest() + { + // TODO uncomment below to test "IsType" DeployedGraphDto + //Assert.IsType<DeployedGraphDto>(instance); + } + + /// <summary> + /// Test the property 'Uri' + /// </summary> + [Fact] + public void UriTest() + { + // TODO unit test for the property 'Uri' + } + + /// <summary> + /// Test the property 'FileHashes' + /// </summary> + [Fact] + public void FileHashesTest() + { + // TODO unit test for the property 'FileHashes' + } + } +} diff --git a/src/Coscine.ApiClient.Core/Api/AdminApi.cs b/src/Coscine.ApiClient.Core/Api/AdminApi.cs index 6bc10ed091b2acf00b812d53069b3008d58baca6..543f0386b944216a4483268c5e4456f487f09715 100644 --- a/src/Coscine.ApiClient.Core/Api/AdminApi.cs +++ b/src/Coscine.ApiClient.Core/Api/AdminApi.cs @@ -178,6 +178,33 @@ namespace Coscine.ApiClient.Core.Api /// <returns>ApiResponse of UserDtoPagedResponse</returns> ApiResponse<UserDtoPagedResponse> GetAllUsersWithHttpInfo(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> + /// Gets all deployed graphs. + /// </summary> + /// <remarks> + /// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>DeployedGraphDtoPagedResponse</returns> + DeployedGraphDtoPagedResponse GetDeployedGraphs(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + + /// <summary> + /// Gets all deployed graphs. + /// </summary> + /// <remarks> + /// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of DeployedGraphDtoPagedResponse</returns> + ApiResponse<DeployedGraphDtoPagedResponse> GetDeployedGraphsWithHttpInfo(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + /// <summary> /// Gets a metadata graph. /// </summary> /// <remarks> @@ -425,6 +452,35 @@ namespace Coscine.ApiClient.Core.Api /// <returns>Task of ApiResponse (UserDtoPagedResponse)</returns> System.Threading.Tasks.Task<ApiResponse<UserDtoPagedResponse>> GetAllUsersWithHttpInfoAsync(bool? tosAccepted = default(bool?), int? pageSize = default(int?), int? pageNumber = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> + /// Gets all deployed graphs. + /// </summary> + /// <remarks> + /// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of DeployedGraphDtoPagedResponse</returns> + System.Threading.Tasks.Task<DeployedGraphDtoPagedResponse> GetDeployedGraphsAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Gets all deployed graphs. + /// </summary> + /// <remarks> + /// <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (DeployedGraphDtoPagedResponse)</returns> + System.Threading.Tasks.Task<ApiResponse<DeployedGraphDtoPagedResponse>> GetDeployedGraphsWithHttpInfoAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> /// Gets a metadata graph. /// </summary> /// <remarks> @@ -1597,6 +1653,180 @@ namespace Coscine.ApiClient.Core.Api return localVarResponse; } + /// <summary> + /// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>DeployedGraphDtoPagedResponse</returns> + public DeployedGraphDtoPagedResponse GetDeployedGraphs(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse> localVarResponse = GetDeployedGraphsWithHttpInfo(pageNumber, pageSize, orderBy); + return localVarResponse.Data; + } + + /// <summary> + /// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of DeployedGraphDtoPagedResponse</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse> GetDeployedGraphsWithHttpInfo(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json", + "text/json" + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageNumber != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize)); + } + if (orderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy)); + } + + localVarRequestOptions.Operation = "AdminApi.GetDeployedGraphs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get<DeployedGraphDtoPagedResponse>("/api/v2/admin/graphs", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeployedGraphs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of DeployedGraphDtoPagedResponse</returns> + public async System.Threading.Tasks.Task<DeployedGraphDtoPagedResponse> GetDeployedGraphsAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse> localVarResponse = await GetDeployedGraphsWithHttpInfoAsync(pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// <summary> + /// Gets all deployed graphs. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (DeployedGraphDtoPagedResponse)</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<DeployedGraphDtoPagedResponse>> GetDeployedGraphsWithHttpInfoAsync(int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json", + "text/json" + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageNumber != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize)); + } + if (orderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy)); + } + + localVarRequestOptions.Operation = "AdminApi.GetDeployedGraphs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync<DeployedGraphDtoPagedResponse>("/api/v2/admin/graphs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeployedGraphs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// <summary> /// Gets a metadata graph. <p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> /// </summary> diff --git a/src/Coscine.ApiClient.Core/Api/ProjectApi.cs b/src/Coscine.ApiClient.Core/Api/ProjectApi.cs index 53383edec856f2367e3362f2654373282de96f22..646567dfba74f2d180a946e077c458cb486c153e 100644 --- a/src/Coscine.ApiClient.Core/Api/ProjectApi.cs +++ b/src/Coscine.ApiClient.Core/Api/ProjectApi.cs @@ -123,13 +123,14 @@ namespace Coscine.ApiClient.Core.Api /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ProjectDtoPagedResponse</returns> - ProjectDtoPagedResponse GetProjects(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + ProjectDtoPagedResponse GetProjects(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves all projects. @@ -138,13 +139,14 @@ namespace Coscine.ApiClient.Core.Api /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of ProjectDtoPagedResponse</returns> - ApiResponse<ProjectDtoPagedResponse> GetProjectsWithHttpInfo(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + ApiResponse<ProjectDtoPagedResponse> GetProjectsWithHttpInfo(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Updates a project. /// </summary> @@ -286,6 +288,7 @@ namespace Coscine.ApiClient.Core.Api /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> @@ -293,7 +296,7 @@ namespace Coscine.ApiClient.Core.Api /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ProjectDtoPagedResponse</returns> - System.Threading.Tasks.Task<ProjectDtoPagedResponse> GetProjectsAsync(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ProjectDtoPagedResponse> GetProjectsAsync(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Retrieves all projects. @@ -302,6 +305,7 @@ namespace Coscine.ApiClient.Core.Api /// <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> @@ -309,7 +313,7 @@ namespace Coscine.ApiClient.Core.Api /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (ProjectDtoPagedResponse)</returns> - System.Threading.Tasks.Task<ApiResponse<ProjectDtoPagedResponse>> GetProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ApiResponse<ProjectDtoPagedResponse>> GetProjectsWithHttpInfoAsync(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Updates a project. /// </summary> @@ -1061,15 +1065,16 @@ namespace Coscine.ApiClient.Core.Api /// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ProjectDtoPagedResponse</returns> - public ProjectDtoPagedResponse GetProjects(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + public ProjectDtoPagedResponse GetProjects(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) { - Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse> localVarResponse = GetProjectsWithHttpInfo(topLevel, pageNumber, pageSize, orderBy); + Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse> localVarResponse = GetProjectsWithHttpInfo(includeOrganizations, topLevel, pageNumber, pageSize, orderBy); return localVarResponse.Data; } @@ -1077,13 +1082,14 @@ namespace Coscine.ApiClient.Core.Api /// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of ProjectDtoPagedResponse</returns> - public Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse> GetProjectsWithHttpInfo(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + public Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse> GetProjectsWithHttpInfo(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) { Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); @@ -1108,6 +1114,10 @@ namespace Coscine.ApiClient.Core.Api localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + if (includeOrganizations != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeOrganizations", includeOrganizations)); + } if (topLevel != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "TopLevel", topLevel)); @@ -1152,6 +1162,7 @@ namespace Coscine.ApiClient.Core.Api /// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> @@ -1159,9 +1170,9 @@ namespace Coscine.ApiClient.Core.Api /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ProjectDtoPagedResponse</returns> - public async System.Threading.Tasks.Task<ProjectDtoPagedResponse> GetProjectsAsync(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<ProjectDtoPagedResponse> GetProjectsAsync(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse> localVarResponse = await GetProjectsWithHttpInfoAsync(topLevel, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); + Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse> localVarResponse = await GetProjectsWithHttpInfoAsync(includeOrganizations, topLevel, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1169,6 +1180,7 @@ namespace Coscine.ApiClient.Core.Api /// Retrieves all projects. <p><strong>Required JWT roles for access:</strong> <code></code>.</p> /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="includeOrganizations">Gets or sets a value indicating whether to retrieve the organizations. (optional)</param> /// <param name="topLevel">Gets or sets a value indicating whether to retrieve only top-level projects. (optional)</param> /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> @@ -1176,7 +1188,7 @@ namespace Coscine.ApiClient.Core.Api /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (ProjectDtoPagedResponse)</returns> - public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse>> GetProjectsWithHttpInfoAsync(bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProjectDtoPagedResponse>> GetProjectsWithHttpInfoAsync(bool? includeOrganizations = default(bool?), bool? topLevel = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); @@ -1202,6 +1214,10 @@ namespace Coscine.ApiClient.Core.Api localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + if (includeOrganizations != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeOrganizations", includeOrganizations)); + } if (topLevel != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "TopLevel", topLevel)); diff --git a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj index 9a8c4949eed7c0c1284780f60797dcc1e0a19c10..221fa5d3f4664458b82e3031568b3817b994ac62 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.6.0</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/DeployedGraphDto.cs b/src/Coscine.ApiClient.Core/Model/DeployedGraphDto.cs new file mode 100644 index 0000000000000000000000000000000000000000..91b8e76a06fce7431629828a67247a0aae98b27e --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/DeployedGraphDto.cs @@ -0,0 +1,150 @@ +/* + * 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 deployed graph details. + /// </summary> + [DataContract(Name = "DeployedGraphDto")] + public partial class DeployedGraphDto : IEquatable<DeployedGraphDto>, IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="DeployedGraphDto" /> class. + /// </summary> + /// <param name="uri">Graph URI and identifier..</param> + /// <param name="fileHashes">Collection of file hashes associated with the graph..</param> + public DeployedGraphDto(string uri = default(string), List<string> fileHashes = default(List<string>)) + { + this.Uri = uri; + this.FileHashes = fileHashes; + } + + /// <summary> + /// Graph URI and identifier. + /// </summary> + /// <value>Graph URI and identifier.</value> + [DataMember(Name = "uri", EmitDefaultValue = false)] + public string Uri { get; set; } + + /// <summary> + /// Collection of file hashes associated with the graph. + /// </summary> + /// <value>Collection of file hashes associated with the graph.</value> + [DataMember(Name = "fileHashes", EmitDefaultValue = false)] + public List<string> FileHashes { 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 DeployedGraphDto {\n"); + sb.Append(" Uri: ").Append(Uri).Append("\n"); + sb.Append(" FileHashes: ").Append(FileHashes).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> + /// Returns true if objects are equal + /// </summary> + /// <param name="input">Object to be compared</param> + /// <returns>Boolean</returns> + public override bool Equals(object input) + { + return this.Equals(input as DeployedGraphDto); + } + + /// <summary> + /// Returns true if DeployedGraphDto instances are equal + /// </summary> + /// <param name="input">Instance of DeployedGraphDto to be compared</param> + /// <returns>Boolean</returns> + public bool Equals(DeployedGraphDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Uri == input.Uri || + (this.Uri != null && + this.Uri.Equals(input.Uri)) + ) && + ( + this.FileHashes == input.FileHashes || + this.FileHashes != null && + input.FileHashes != null && + this.FileHashes.SequenceEqual(input.FileHashes) + ); + } + + /// <summary> + /// Gets the hash code + /// </summary> + /// <returns>Hash code</returns> + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uri != null) + { + hashCode = (hashCode * 59) + this.Uri.GetHashCode(); + } + if (this.FileHashes != null) + { + hashCode = (hashCode * 59) + this.FileHashes.GetHashCode(); + } + return hashCode; + } + } + + /// <summary> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/DeployedGraphDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/DeployedGraphDtoPagedResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..36033eda15d5a3c6b610fbbcd39864af3ac162fd --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/DeployedGraphDtoPagedResponse.cs @@ -0,0 +1,204 @@ +/* + * 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> + /// DeployedGraphDtoPagedResponse + /// </summary> + [DataContract(Name = "DeployedGraphDtoPagedResponse")] + public partial class DeployedGraphDtoPagedResponse : IEquatable<DeployedGraphDtoPagedResponse>, IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="DeployedGraphDtoPagedResponse" /> class. + /// </summary> + /// <param name="data">data.</param> + /// <param name="statusCode">statusCode.</param> + /// <param name="traceId">traceId.</param> + /// <param name="pagination">pagination.</param> + public DeployedGraphDtoPagedResponse(List<DeployedGraphDto> data = default(List<DeployedGraphDto>), int? statusCode = default(int?), string traceId = default(string), Pagination pagination = default(Pagination)) + { + this.Data = data; + this.StatusCode = statusCode; + this.TraceId = traceId; + this.Pagination = pagination; + } + + /// <summary> + /// Gets or Sets Data + /// </summary> + [DataMember(Name = "data", EmitDefaultValue = true)] + public List<DeployedGraphDto> 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> + /// Gets or Sets Pagination + /// </summary> + [DataMember(Name = "pagination", EmitDefaultValue = false)] + public Pagination Pagination { 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 DeployedGraphDtoPagedResponse {\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(" Pagination: ").Append(Pagination).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> + /// Returns true if objects are equal + /// </summary> + /// <param name="input">Object to be compared</param> + /// <returns>Boolean</returns> + public override bool Equals(object input) + { + return this.Equals(input as DeployedGraphDtoPagedResponse); + } + + /// <summary> + /// Returns true if DeployedGraphDtoPagedResponse instances are equal + /// </summary> + /// <param name="input">Instance of DeployedGraphDtoPagedResponse to be compared</param> + /// <returns>Boolean</returns> + public bool Equals(DeployedGraphDtoPagedResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Data == input.Data || + this.Data != null && + input.Data != null && + this.Data.SequenceEqual(input.Data) + ) && + ( + this.IsSuccess == input.IsSuccess || + this.IsSuccess.Equals(input.IsSuccess) + ) && + ( + this.StatusCode == input.StatusCode || + (this.StatusCode != null && + this.StatusCode.Equals(input.StatusCode)) + ) && + ( + this.TraceId == input.TraceId || + (this.TraceId != null && + this.TraceId.Equals(input.TraceId)) + ) && + ( + this.Pagination == input.Pagination || + (this.Pagination != null && + this.Pagination.Equals(input.Pagination)) + ); + } + + /// <summary> + /// Gets the hash code + /// </summary> + /// <returns>Hash code</returns> + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Data != null) + { + hashCode = (hashCode * 59) + this.Data.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); + if (this.StatusCode != null) + { + hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); + } + if (this.TraceId != null) + { + hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); + } + if (this.Pagination != null) + { + hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); + } + return hashCode; + } + } + + /// <summary> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +}