diff --git a/README.md b/README.md index 43462a876ecd4f4ae73671b3dca3796a74bbd054..289d95192e1af3398067a042fe2c4846903cfae0 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ All URIs are relative to *http://localhost:7206/coscine* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AdminApi* | [**ApiV2AdminOptions**](docs/AdminApi.md#apiv2adminoptions) | **OPTIONS** /api/v2/admin | Responds with the HTTP methods allowed for the endpoint. +*AdminApi* | [**GetAllActivityLogs**](docs/AdminApi.md#getallactivitylogs) | **GET** /api/v2/admin/activity-logs | Retrieves all activity logs. *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. @@ -231,6 +232,8 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Model.AcceptedLanguage](docs/AcceptedLanguage.md) + - [Model.ActivityLogDto](docs/ActivityLogDto.md) + - [Model.ActivityLogDtoPagedResponse](docs/ActivityLogDtoPagedResponse.md) - [Model.ApiTokenDto](docs/ApiTokenDto.md) - [Model.ApiTokenDtoPagedResponse](docs/ApiTokenDtoPagedResponse.md) - [Model.ApiTokenDtoResponse](docs/ApiTokenDtoResponse.md) @@ -242,6 +245,7 @@ Class | Method | HTTP request | Description - [Model.ApplicationProfileForCreationDtoResponse](docs/ApplicationProfileForCreationDtoResponse.md) - [Model.ApplicationProfileForResourceCreationDto](docs/ApplicationProfileForResourceCreationDto.md) - [Model.ApplicationProfileMinimalDto](docs/ApplicationProfileMinimalDto.md) + - [Model.CoscineHttpMethod](docs/CoscineHttpMethod.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 18e7619f92f176e8f3d7c9e222756a7a75893535..80404314058816ded784b485a3c4f4269bad8488 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/AdminApiTests.cs @@ -65,6 +65,26 @@ namespace Coscine.ApiClient.Core.Test.Api //instance.ApiV2AdminOptions(); } + /// <summary> + /// Test GetAllActivityLogs + /// </summary> + [Fact] + public void GetAllActivityLogsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DateTime? activityTimestampBefore = null; + //DateTime? activityTimestampAfter = null; + //Guid? guid = null; + //Guid? userId = null; + //string? regularExpression = null; + //CoscineHttpMethod? httpMethod = null; + //int? pageNumber = null; + //int? pageSize = null; + //string? orderBy = null; + //var response = instance.GetAllActivityLogs(activityTimestampBefore, activityTimestampAfter, guid, userId, regularExpression, httpMethod, pageNumber, pageSize, orderBy); + //Assert.IsType<ActivityLogDtoPagedResponse>(response); + } + /// <summary> /// Test GetAllProjects /// </summary> 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 339fe1509162e7f3909de9cbef6fa96b6fefca58..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.3.3</Version></PropertyGroup> + </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" /> diff --git a/src/Coscine.ApiClient.Core.Test/Model/ActivityLogDtoPagedResponseTests.cs b/src/Coscine.ApiClient.Core.Test/Model/ActivityLogDtoPagedResponseTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..ca75bebf199ef98dd0cf58105411d1742c06cf07 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/ActivityLogDtoPagedResponseTests.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 ActivityLogDtoPagedResponse + /// </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 ActivityLogDtoPagedResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityLogDtoPagedResponse + //private ActivityLogDtoPagedResponse instance; + + public ActivityLogDtoPagedResponseTests() + { + // TODO uncomment below to create an instance of ActivityLogDtoPagedResponse + //instance = new ActivityLogDtoPagedResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of ActivityLogDtoPagedResponse + /// </summary> + [Fact] + public void ActivityLogDtoPagedResponseInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityLogDtoPagedResponse + //Assert.IsType<ActivityLogDtoPagedResponse>(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/ActivityLogDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/ActivityLogDtoTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..a515e8fc5ac552b73ee41f3663fc5c88e2823ab4 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/ActivityLogDtoTests.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 ActivityLogDto + /// </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 ActivityLogDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivityLogDto + //private ActivityLogDto instance; + + public ActivityLogDtoTests() + { + // TODO uncomment below to create an instance of ActivityLogDto + //instance = new ActivityLogDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of ActivityLogDto + /// </summary> + [Fact] + public void ActivityLogDtoInstanceTest() + { + // TODO uncomment below to test "IsType" ActivityLogDto + //Assert.IsType<ActivityLogDto>(instance); + } + + /// <summary> + /// Test the property 'Id' + /// </summary> + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + + /// <summary> + /// Test the property 'ApiPath' + /// </summary> + [Fact] + public void ApiPathTest() + { + // TODO unit test for the property 'ApiPath' + } + + /// <summary> + /// Test the property 'HttpAction' + /// </summary> + [Fact] + public void HttpActionTest() + { + // TODO unit test for the property 'HttpAction' + } + + /// <summary> + /// Test the property 'ControllerName' + /// </summary> + [Fact] + public void ControllerNameTest() + { + // TODO unit test for the property 'ControllerName' + } + + /// <summary> + /// Test the property 'ActionName' + /// </summary> + [Fact] + public void ActionNameTest() + { + // TODO unit test for the property 'ActionName' + } + + /// <summary> + /// Test the property 'UserId' + /// </summary> + [Fact] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + + /// <summary> + /// Test the property 'ActivityTimestamp' + /// </summary> + [Fact] + public void ActivityTimestampTest() + { + // TODO unit test for the property 'ActivityTimestamp' + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Model/CoscineHttpMethodTests.cs b/src/Coscine.ApiClient.Core.Test/Model/CoscineHttpMethodTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..443b3915ea9dabbbf76dbfb37e274edd6d10aa3c --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/CoscineHttpMethodTests.cs @@ -0,0 +1,58 @@ +/* + * 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 CoscineHttpMethod + /// </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 CoscineHttpMethodTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CoscineHttpMethod + //private CoscineHttpMethod instance; + + public CoscineHttpMethodTests() + { + // TODO uncomment below to create an instance of CoscineHttpMethod + //instance = new CoscineHttpMethod(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of CoscineHttpMethod + /// </summary> + [Fact] + public void CoscineHttpMethodInstanceTest() + { + // TODO uncomment below to test "IsType" CoscineHttpMethod + //Assert.IsType<CoscineHttpMethod>(instance); + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Model/FileTreeDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/FileTreeDtoTests.cs index a870ec8552b5a35168db5025ff522e9f04a9ebfb..b6b858099fe3bba96928317c967d8bd02652a23c 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/FileTreeDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/FileTreeDtoTests.cs @@ -135,5 +135,14 @@ namespace Coscine.ApiClient.Core.Test.Model { // TODO unit test for the property 'Actions' } + + /// <summary> + /// Test the property 'Hidden' + /// </summary> + [Fact] + public void HiddenTest() + { + // TODO unit test for the property 'Hidden' + } } } diff --git a/src/Coscine.ApiClient.Core/Api/AdminApi.cs b/src/Coscine.ApiClient.Core/Api/AdminApi.cs index e53754bd726de8cf71018e288a31cc8c49e0a7e1..654088db75c4e5aa9984ab6bc2ce9dd2da709b98 100644 --- a/src/Coscine.ApiClient.Core/Api/AdminApi.cs +++ b/src/Coscine.ApiClient.Core/Api/AdminApi.cs @@ -46,6 +46,42 @@ namespace Coscine.ApiClient.Core.Api /// <returns>ApiResponse of Object(void)</returns> ApiResponse<Object> ApiV2AdminOptionsWithHttpInfo(int operationIndex = 0); /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ActivityLogDtoPagedResponse</returns> + ActivityLogDtoPagedResponse GetAllActivityLogs(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + + /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of ActivityLogDtoPagedResponse</returns> + ApiResponse<ActivityLogDtoPagedResponse> GetAllActivityLogsWithHttpInfo(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + /// <summary> /// Retrieves all projects. /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> @@ -228,6 +264,47 @@ namespace Coscine.ApiClient.Core.Api /// <returns>Task of ApiResponse</returns> System.Threading.Tasks.Task<ApiResponse<Object>> ApiV2AdminOptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ActivityLogDtoPagedResponse</returns> + System.Threading.Tasks.Task<ActivityLogDtoPagedResponse> GetAllActivityLogsAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (ActivityLogDtoPagedResponse)</returns> + System.Threading.Tasks.Task<ApiResponse<ActivityLogDtoPagedResponse>> GetAllActivityLogsWithHttpInfoAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> /// Retrieves all projects. /// </summary> /// <remarks> @@ -659,6 +736,252 @@ namespace Coscine.ApiClient.Core.Api return localVarResponse; } + /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ActivityLogDtoPagedResponse</returns> + public ActivityLogDtoPagedResponse GetAllActivityLogs(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse> localVarResponse = GetAllActivityLogsWithHttpInfo(activityTimestampBefore, activityTimestampAfter, guid, userId, regularExpression, httpMethod, pageNumber, pageSize, orderBy); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of ActivityLogDtoPagedResponse</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse> GetAllActivityLogsWithHttpInfo(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json", + "text/json" + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (activityTimestampBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampBefore", activityTimestampBefore)); + } + if (activityTimestampAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampAfter", activityTimestampAfter)); + } + if (guid != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Guid", guid)); + } + if (userId != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "UserId", userId)); + } + if (regularExpression != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "RegularExpression", regularExpression)); + } + if (httpMethod != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "HttpMethod", httpMethod)); + } + if (pageNumber != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize)); + } + if (orderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy)); + } + + localVarRequestOptions.Operation = "AdminApi.GetAllActivityLogs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get<ActivityLogDtoPagedResponse>("/api/v2/admin/activity-logs", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllActivityLogs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ActivityLogDtoPagedResponse</returns> + public async System.Threading.Tasks.Task<ActivityLogDtoPagedResponse> GetAllActivityLogsAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse> localVarResponse = await GetAllActivityLogsWithHttpInfoAsync(activityTimestampBefore, activityTimestampAfter, guid, userId, regularExpression, httpMethod, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves all activity logs. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="activityTimestampBefore">The activity timestamp date before which activity logs should be retrieved. (optional)</param> + /// <param name="activityTimestampAfter">The activity timestamp date after which activity logs should be retrieved. (optional)</param> + /// <param name="guid">The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional)</param> + /// <param name="userId">The user ID for which activity logs should be retrieved. (optional)</param> + /// <param name="regularExpression">The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional)</param> + /// <param name="httpMethod">The http method to filter activity logs by. (optional)</param> + /// <param name="pageNumber">The desired page number. Should be greater than or equal to 1. Default is 1. (optional)</param> + /// <param name="pageSize">The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional)</param> + /// <param name="orderBy">Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (ActivityLogDtoPagedResponse)</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ActivityLogDtoPagedResponse>> GetAllActivityLogsWithHttpInfoAsync(DateTime? activityTimestampBefore = default(DateTime?), DateTime? activityTimestampAfter = default(DateTime?), Guid? guid = default(Guid?), Guid? userId = default(Guid?), string? regularExpression = default(string?), CoscineHttpMethod? httpMethod = default(CoscineHttpMethod?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json", + "text/json" + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (activityTimestampBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampBefore", activityTimestampBefore)); + } + if (activityTimestampAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "ActivityTimestampAfter", activityTimestampAfter)); + } + if (guid != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Guid", guid)); + } + if (userId != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "UserId", userId)); + } + if (regularExpression != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "RegularExpression", regularExpression)); + } + if (httpMethod != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "HttpMethod", httpMethod)); + } + if (pageNumber != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageNumber", pageNumber)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "PageSize", pageSize)); + } + if (orderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "OrderBy", orderBy)); + } + + localVarRequestOptions.Operation = "AdminApi.GetAllActivityLogs"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync<ActivityLogDtoPagedResponse>("/api/v2/admin/activity-logs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetAllActivityLogs", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// <summary> /// Retrieves all projects. /// </summary> diff --git a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj index 594c9fa1ef7aca43c3a84c51f4cd39ecd4de9594..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.3.3</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/ActivityLogDto.cs b/src/Coscine.ApiClient.Core/Model/ActivityLogDto.cs new file mode 100644 index 0000000000000000000000000000000000000000..bdf3af4c8966df8f43798d8b68ca1afcc7ff051e --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/ActivityLogDto.cs @@ -0,0 +1,237 @@ +/* + * 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 an activity log. + /// </summary> + [DataContract(Name = "ActivityLogDto")] + public partial class ActivityLogDto : IEquatable<ActivityLogDto>, IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="ActivityLogDto" /> class. + /// </summary> + /// <param name="id">id.</param> + /// <param name="apiPath">apiPath.</param> + /// <param name="httpAction">httpAction.</param> + /// <param name="controllerName">controllerName.</param> + /// <param name="actionName">actionName.</param> + /// <param name="userId">userId.</param> + /// <param name="activityTimestamp">activityTimestamp.</param> + public ActivityLogDto(Guid id = default(Guid), string apiPath = default(string), string httpAction = default(string), string controllerName = default(string), string actionName = default(string), Guid userId = default(Guid), DateTime activityTimestamp = default(DateTime)) + { + this.Id = id; + this.ApiPath = apiPath; + this.HttpAction = httpAction; + this.ControllerName = controllerName; + this.ActionName = actionName; + this.UserId = userId; + this.ActivityTimestamp = activityTimestamp; + } + + /// <summary> + /// Gets or Sets Id + /// </summary> + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + + /// <summary> + /// Gets or Sets ApiPath + /// </summary> + [DataMember(Name = "apiPath", EmitDefaultValue = false)] + public string ApiPath { get; set; } + + /// <summary> + /// Gets or Sets HttpAction + /// </summary> + [DataMember(Name = "httpAction", EmitDefaultValue = false)] + public string HttpAction { get; set; } + + /// <summary> + /// Gets or Sets ControllerName + /// </summary> + [DataMember(Name = "controllerName", EmitDefaultValue = true)] + public string ControllerName { get; set; } + + /// <summary> + /// Gets or Sets ActionName + /// </summary> + [DataMember(Name = "actionName", EmitDefaultValue = true)] + public string ActionName { get; set; } + + /// <summary> + /// Gets or Sets UserId + /// </summary> + [DataMember(Name = "userId", EmitDefaultValue = false)] + public Guid UserId { get; set; } + + /// <summary> + /// Gets or Sets ActivityTimestamp + /// </summary> + [DataMember(Name = "activityTimestamp", EmitDefaultValue = false)] + public DateTime ActivityTimestamp { 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 ActivityLogDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ApiPath: ").Append(ApiPath).Append("\n"); + sb.Append(" HttpAction: ").Append(HttpAction).Append("\n"); + sb.Append(" ControllerName: ").Append(ControllerName).Append("\n"); + sb.Append(" ActionName: ").Append(ActionName).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ActivityTimestamp: ").Append(ActivityTimestamp).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 ActivityLogDto); + } + + /// <summary> + /// Returns true if ActivityLogDto instances are equal + /// </summary> + /// <param name="input">Instance of ActivityLogDto to be compared</param> + /// <returns>Boolean</returns> + public bool Equals(ActivityLogDto input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.ApiPath == input.ApiPath || + (this.ApiPath != null && + this.ApiPath.Equals(input.ApiPath)) + ) && + ( + this.HttpAction == input.HttpAction || + (this.HttpAction != null && + this.HttpAction.Equals(input.HttpAction)) + ) && + ( + this.ControllerName == input.ControllerName || + (this.ControllerName != null && + this.ControllerName.Equals(input.ControllerName)) + ) && + ( + this.ActionName == input.ActionName || + (this.ActionName != null && + this.ActionName.Equals(input.ActionName)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.ActivityTimestamp == input.ActivityTimestamp || + (this.ActivityTimestamp != null && + this.ActivityTimestamp.Equals(input.ActivityTimestamp)) + ); + } + + /// <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.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.ApiPath != null) + { + hashCode = (hashCode * 59) + this.ApiPath.GetHashCode(); + } + if (this.HttpAction != null) + { + hashCode = (hashCode * 59) + this.HttpAction.GetHashCode(); + } + if (this.ControllerName != null) + { + hashCode = (hashCode * 59) + this.ControllerName.GetHashCode(); + } + if (this.ActionName != null) + { + hashCode = (hashCode * 59) + this.ActionName.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.ActivityTimestamp != null) + { + hashCode = (hashCode * 59) + this.ActivityTimestamp.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/ActivityLogDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ActivityLogDtoPagedResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d8e436a70de55384a537141c567562afa33ee06e --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/ActivityLogDtoPagedResponse.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> + /// ActivityLogDtoPagedResponse + /// </summary> + [DataContract(Name = "ActivityLogDtoPagedResponse")] + public partial class ActivityLogDtoPagedResponse : IEquatable<ActivityLogDtoPagedResponse>, IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="ActivityLogDtoPagedResponse" /> class. + /// </summary> + /// <param name="data">data.</param> + /// <param name="statusCode">statusCode.</param> + /// <param name="traceId">traceId.</param> + /// <param name="pagination">pagination.</param> + public ActivityLogDtoPagedResponse(List<ActivityLogDto> data = default(List<ActivityLogDto>), 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<ActivityLogDto> 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 ActivityLogDtoPagedResponse {\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 ActivityLogDtoPagedResponse); + } + + /// <summary> + /// Returns true if ActivityLogDtoPagedResponse instances are equal + /// </summary> + /// <param name="input">Instance of ActivityLogDtoPagedResponse to be compared</param> + /// <returns>Boolean</returns> + public bool Equals(ActivityLogDtoPagedResponse 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; + } + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/CoscineHttpMethod.cs b/src/Coscine.ApiClient.Core/Model/CoscineHttpMethod.cs new file mode 100644 index 0000000000000000000000000000000000000000..395cc15e0c2c4325338d4235cc6c9c73d542ccba --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/CoscineHttpMethod.cs @@ -0,0 +1,67 @@ +/* + * 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> + /// An enumeration representing the supported HTTP verbs. + /// </summary> + /// <value>An enumeration representing the supported HTTP verbs.</value> + [JsonConverter(typeof(StringEnumConverter))] + public enum CoscineHttpMethod + { + /// <summary> + /// Enum GET for value: GET + /// </summary> + [EnumMember(Value = "GET")] + GET = 1, + + /// <summary> + /// Enum HEAD for value: HEAD + /// </summary> + [EnumMember(Value = "HEAD")] + HEAD = 2, + + /// <summary> + /// Enum POST for value: POST + /// </summary> + [EnumMember(Value = "POST")] + POST = 3, + + /// <summary> + /// Enum PUT for value: PUT + /// </summary> + [EnumMember(Value = "PUT")] + PUT = 4, + + /// <summary> + /// Enum DELETE for value: DELETE + /// </summary> + [EnumMember(Value = "DELETE")] + DELETE = 5 + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs b/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs index 52e8ab8e47b4397fb2e25d9433f1e4f988c4fb54..9d74a3a778f6d4a03db5269369b8604997059843 100644 --- a/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs +++ b/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs @@ -50,7 +50,8 @@ namespace Coscine.ApiClient.Core.Model /// <param name="creationDate">Gets or sets the creation date of the file..</param> /// <param name="changeDate">Gets or sets the last change date of the file..</param> /// <param name="actions">actions.</param> - public FileTreeDto(string path = default(string), TreeDataType? type = default(TreeDataType?), string directory = default(string), string name = default(string), string extension = default(string), long size = default(long), DateTime? creationDate = default(DateTime?), DateTime? changeDate = default(DateTime?), FileActionsDto actions = default(FileActionsDto)) + /// <param name="hidden">Determines if the specific tree entry is hidden..</param> + public FileTreeDto(string path = default(string), TreeDataType? type = default(TreeDataType?), string directory = default(string), string name = default(string), string extension = default(string), long size = default(long), DateTime? creationDate = default(DateTime?), DateTime? changeDate = default(DateTime?), FileActionsDto actions = default(FileActionsDto), bool hidden = default(bool)) { this.Path = path; this.Type = type; @@ -61,6 +62,7 @@ namespace Coscine.ApiClient.Core.Model this.CreationDate = creationDate; this.ChangeDate = changeDate; this.Actions = actions; + this.Hidden = hidden; } /// <summary> @@ -118,6 +120,13 @@ namespace Coscine.ApiClient.Core.Model [DataMember(Name = "actions", EmitDefaultValue = false)] public FileActionsDto Actions { get; set; } + /// <summary> + /// Determines if the specific tree entry is hidden. + /// </summary> + /// <value>Determines if the specific tree entry is hidden.</value> + [DataMember(Name = "hidden", EmitDefaultValue = true)] + public bool Hidden { get; set; } + /// <summary> /// Returns the string presentation of the object /// </summary> @@ -135,6 +144,7 @@ namespace Coscine.ApiClient.Core.Model sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); sb.Append(" ChangeDate: ").Append(ChangeDate).Append("\n"); sb.Append(" Actions: ").Append(Actions).Append("\n"); + sb.Append(" Hidden: ").Append(Hidden).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -212,6 +222,10 @@ namespace Coscine.ApiClient.Core.Model this.Actions == input.Actions || (this.Actions != null && this.Actions.Equals(input.Actions)) + ) && + ( + this.Hidden == input.Hidden || + this.Hidden.Equals(input.Hidden) ); } @@ -254,6 +268,7 @@ namespace Coscine.ApiClient.Core.Model { hashCode = (hashCode * 59) + this.Actions.GetHashCode(); } + hashCode = (hashCode * 59) + this.Hidden.GetHashCode(); return hashCode; } } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs index 9958153e470e21a5ed8de2da698074f618091d34..edd708a5865df7acdf926924fcba4c8a3f58ee3c 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs @@ -56,7 +56,7 @@ namespace Coscine.ApiClient.Core.Model /// <param name="deleted">Indicates whether the project is marked as deleted..</param> /// <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">projectQuota.</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>)) { this.Id = id; @@ -228,8 +228,9 @@ namespace Coscine.ApiClient.Core.Model public List<ProjectRoleMinimalDto> ProjectRoles { get; set; } /// <summary> - /// Gets or Sets ProjectQuota + /// Collection of project quotas associated with the project. /// </summary> + /// <value>Collection of project quotas associated with the project.</value> [DataMember(Name = "projectQuota", EmitDefaultValue = false)] public List<ProjectQuotaDto> ProjectQuota { get; set; }