diff --git a/.devcontainer/.vscode-server/.gitkeep b/.devcontainer/.vscode-server/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f22718318525e0a372ff92264a4f731beb9d658b --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,5 @@ +# Development container for dotnet + +FROM mcr.microsoft.com/devcontainers/dotnet:8.0 as develop + +USER vscode \ No newline at end of file diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d383f23b38b17347b21f7eb75ada9c6e05e44975 --- /dev/null +++ b/.devcontainer/compose.yml @@ -0,0 +1,22 @@ +version: "3.9" + +services: + + app: + build: + target: develop + user: vscode + userns_mode: keep-id:uid=1000,gid=1000 + environment: + SSH_AUTH_SOCK: /.ssh/ssh-agent.sock + command: /bin/sh -c "while sleep 2s; do :; done" + volumes: + - ..:/workspace/api-client:cached + - ./.vscode-server:/home/vscode/.vscode-server/:cached + - ${SSH_AUTH_SOCK}:/.ssh/ssh-agent.sock + networks: + - default + +networks: + default: + driver: bridge diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000000000000000000000000000000..ff22045a38a09ecdb1cfe2116d84c6373b884c4f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,31 @@ +{ + "name": "C# API-Client Devcontainer", + "dockerComposeFile": [ + "compose.yml" + ], + "service": "app", + "workspaceFolder": "/workspace/api-client", + "updateRemoteUserUID": false, + "remoteUser": "vscode", + "containerUser": "vscode", + "customizations": { + "vscode": { + "settings": { + "NugetGallery.sources": [ + "{\"name\":\"nuget.org\",\"url\":\"https://api.nuget.org/v3/index.json\"}", + "{\"name\":\"api-client\",\"url\":\"https://git.rwth-aachen.de/api/v4/projects/88930/packages/nuget/index.json\"}" + ], + "nuget.includePrereleasePackageVersions": true + }, + "extensions": [ + "ms-dotnettools.csdevkit", + "ms-azuretools.vscode-docker", + "ms-dotnettools.csharp", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "patcx.vscode-nuget-gallery" + ] + } + }, + "forwardPorts": [] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1e37c670db43e61a219f17d4bf6d84188d182082..0103a271330530a16c89b491897294e934f7d602 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,18 @@ +/.devcontainer/.vscode-server/* +!/.devcontainer/.vscode-server/.gitkeep + +/.devcontainer/.data/* +!/.devcontainer/.data/.gitkeep + +.logs/ +Output/* +internallog.txt + +## Ignore the secrets settings +appsettings.Development.json +appsettings.Staging.json +appsettings.Production.json + ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. @@ -24,6 +39,7 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +[Pp]roperties/ # Visual Studio 2015 cache/options directory .vs/ @@ -271,4 +287,3 @@ dist/ # Dotnet Tool Manifest .config/* -/openapi-generator-cli.jar diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..52d60ac162dbd17bd742e9afb6971dd93df10426 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "workbench.colorCustomizations": { + "activityBar.background": "#213647", + "activityBar.foreground": "#F7F7F7", + "activityBar.inactiveForeground": "#B3C7D6", + "activityBar.activeBorder": "#416B8B", + "activityBarBadge.background": "#B3C7D6", + "activityBarBadge.foreground": "#416B8B" + }, +} \ No newline at end of file diff --git a/README.md b/README.md index 2ffc1bbce3a43f8aa911878daf5c274718fa8742..ae01c957cbc9a3a87e4dede367eab5ad85e429f6 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,8 @@ Class | Method | HTTP request | Description *ProjectMemberApi* | [**GetMembership**](docs/ProjectMemberApi.md#getmembership) | **GET** /api/v2/projects/{projectId}/members/{membershipId} | Retrieves a project membership for a specified project. *ProjectMemberApi* | [**GetMemberships**](docs/ProjectMemberApi.md#getmemberships) | **GET** /api/v2/projects/{projectId}/members | Retrieves all project memberships for a specified project. *ProjectMemberApi* | [**UpdateMembership**](docs/ProjectMemberApi.md#updatemembership) | **PUT** /api/v2/projects/{projectId}/members/{membershipId} | Updates a project membership for a specified project. +*ProjectPublicationRequestApi* | [**ApiV2ProjectsProjectIdPublicationsRequestsOptions**](docs/ProjectPublicationRequestApi.md#apiv2projectsprojectidpublicationsrequestsoptions) | **OPTIONS** /api/v2/projects/{projectId}/publications/requests | Responds with the HTTP methods allowed for the endpoint. +*ProjectPublicationRequestApi* | [**CreatePublicationRequest**](docs/ProjectPublicationRequestApi.md#createpublicationrequest) | **POST** /api/v2/projects/{projectId}/publications/requests | Creates a new publication request. *ProjectQuotaApi* | [**ApiV2ProjectsProjectIdQuotasOptions**](docs/ProjectQuotaApi.md#apiv2projectsprojectidquotasoptions) | **OPTIONS** /api/v2/projects/{projectId}/quotas | Responds with the HTTP methods allowed for the endpoint. *ProjectQuotaApi* | [**GetProjectQuota**](docs/ProjectQuotaApi.md#getprojectquota) | **GET** /api/v2/projects/{projectId}/quotas/{resourceTypeId} | Retrieves a project quota for a specified project and resource type. *ProjectQuotaApi* | [**GetProjectQuotas**](docs/ProjectQuotaApi.md#getprojectquotas) | **GET** /api/v2/projects/{projectId}/quotas | Retrieves all project quotas for a specified project. @@ -216,6 +218,14 @@ Class | Method | HTTP request | Description *SelfApiTokenApi* | [**GetAllApiTokens**](docs/SelfApiTokenApi.md#getallapitokens) | **GET** /api/v2/self/api-tokens | Retrieves all API tokens for the current authenticated user. *SelfApiTokenApi* | [**GetApiToken**](docs/SelfApiTokenApi.md#getapitoken) | **GET** /api/v2/self/api-tokens/{apiTokenId} | Retrieves an API token for the current authenticated user. *SelfApiTokenApi* | [**RevokeToken**](docs/SelfApiTokenApi.md#revoketoken) | **DELETE** /api/v2/self/api-tokens/{apiTokenId} | Revokes an API token for the current authenticated user. +*SelfSessionApi* | [**ApiV2SelfSessionLogoutPost**](docs/SelfSessionApi.md#apiv2selfsessionlogoutpost) | **POST** /api/v2/self/session/logout | Initiate the Log out workflow. +*SelfSessionApi* | [**ApiV2SelfSessionOptions**](docs/SelfSessionApi.md#apiv2selfsessionoptions) | **OPTIONS** /api/v2/self/session | Responds with the HTTP methods allowed for the endpoint. +*SelfSessionApi* | [**Login**](docs/SelfSessionApi.md#login) | **GET** /api/v2/self/session | Initiate the login workflow with the default (NFDI4Ing AAI) provider. +*SelfSessionApi* | [**LoginWithProvider**](docs/SelfSessionApi.md#loginwithprovider) | **GET** /api/v2/self/session/{externalAuthenticatorId} | Initiate the login workflow with specific provider. +*SelfSessionApi* | [**Merge**](docs/SelfSessionApi.md#merge) | **GET** /api/v2/self/session/merge/{externalAuthenticatorId} | Initiate the merge workflow with specific provider. +*SystemStatusApi* | [**ApiV2SystemStatusOptions**](docs/SystemStatusApi.md#apiv2systemstatusoptions) | **OPTIONS** /api/v2/system/status | Responds with the HTTP methods allowed for the endpoint. +*SystemStatusApi* | [**GetInternalMessages**](docs/SystemStatusApi.md#getinternalmessages) | **GET** /api/v2/system/status/internal | Retrieves the internal messages. +*SystemStatusApi* | [**GetNocMessages**](docs/SystemStatusApi.md#getnocmessages) | **GET** /api/v2/system/status/noc | Retrieves the NOC messages. *TitleApi* | [**ApiV2TitlesOptions**](docs/TitleApi.md#apiv2titlesoptions) | **OPTIONS** /api/v2/titles | Responds with the HTTP methods allowed for the endpoint. *TitleApi* | [**GetTitle**](docs/TitleApi.md#gettitle) | **GET** /api/v2/titles/{titleId} | Retrieves a title by ID. *TitleApi* | [**GetTitles**](docs/TitleApi.md#gettitles) | **GET** /api/v2/titles | Retrieves all titles. @@ -301,6 +311,9 @@ Class | Method | HTTP request | Description - [Model.LicenseForResourceManipulationDto](docs/LicenseForResourceManipulationDto.md) - [Model.MaintenanceDto](docs/MaintenanceDto.md) - [Model.MaintenanceDtoPagedResponse](docs/MaintenanceDtoPagedResponse.md) + - [Model.MessageDto](docs/MessageDto.md) + - [Model.MessageDtoPagedResponse](docs/MessageDtoPagedResponse.md) + - [Model.MessageType](docs/MessageType.md) - [Model.MetadataTreeDto](docs/MetadataTreeDto.md) - [Model.MetadataTreeDtoPagedResponse](docs/MetadataTreeDtoPagedResponse.md) - [Model.MetadataTreeDtoResponse](docs/MetadataTreeDtoResponse.md) @@ -350,6 +363,8 @@ Class | Method | HTTP request | Description - [Model.PublicUserDto](docs/PublicUserDto.md) - [Model.PublicUserDtoIEnumerableResponse](docs/PublicUserDtoIEnumerableResponse.md) - [Model.PublicationAdvisoryServiceDto](docs/PublicationAdvisoryServiceDto.md) + - [Model.PublicationRequestForCreationDto](docs/PublicationRequestForCreationDto.md) + - [Model.PublicationRequestForCreationDtoResponse](docs/PublicationRequestForCreationDtoResponse.md) - [Model.QuotaDto](docs/QuotaDto.md) - [Model.QuotaForManipulationDto](docs/QuotaForManipulationDto.md) - [Model.QuotaUnit](docs/QuotaUnit.md) diff --git a/docs/MessageDto.md b/docs/MessageDto.md new file mode 100644 index 0000000000000000000000000000000000000000..fa575a1a8600b54e450fd0517d81db3154cbc3ac --- /dev/null +++ b/docs/MessageDto.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.MessageDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the message. | [optional] +**Body** | **Dictionary<string, string>** | Message body in multiple languages as key-value pairs. The key is the ISO 639-1 Alpha-2 two-letter language code, and the value is the message in that language. | [optional] +**Type** | **MessageType** | | [optional] +**Title** | **string** | Title of the message. | [optional] +**Href** | **string** | URL related to the message. | [optional] +**StartDate** | **DateTime?** | Start date of the message. | [optional] +**EndDate** | **DateTime?** | End date of the message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/MessageDtoPagedResponse.md b/docs/MessageDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..bdbcd0940086c62a6e667b313b5259330252f5b5 --- /dev/null +++ b/docs/MessageDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.MessageDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<MessageDto>**](MessageDto.md) | | [optional] +**IsSuccess** | **bool** | | [optional] [readonly] +**StatusCode** | **int?** | | [optional] +**TraceId** | **string** | | [optional] +**Pagination** | [**Pagination**](Pagination.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/MessageType.md b/docs/MessageType.md new file mode 100644 index 0000000000000000000000000000000000000000..2d32bd70ab0f0a3b5a77475e8ad109d60aee94e3 --- /dev/null +++ b/docs/MessageType.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.MessageType +Defines the various types of messages. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index e7a7c286300112cbd34561847c491db155fd77ad..1d16ea1c12266871565d5d2306102d89831dca46 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -189,7 +189,7 @@ catch (ApiException e) <a id="getorganizations"></a> # **GetOrganizations** -> OrganizationDtoPagedResponse GetOrganizations (string? searchTerm = null, bool? filterByPublicationService = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) +> OrganizationDtoPagedResponse GetOrganizations (string? searchTerm = null, AcceptedLanguage? language = null, bool? filterByPublicationService = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) Retrieves all organizations. @@ -216,6 +216,7 @@ namespace Example var apiInstance = new OrganizationApi(config); var searchTerm = "searchTerm_example"; // string? | Gets or sets the search term used to filter organizations. (optional) + var language = new AcceptedLanguage?(); // AcceptedLanguage? | Language of name or text (dataPublicationService) (optional) var filterByPublicationService = true; // bool? | Gets or sets the option to find only organizations having the publication service set. (optional) var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) var pageSize = 56; // int? | The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional) @@ -224,7 +225,7 @@ namespace Example try { // Retrieves all organizations. - OrganizationDtoPagedResponse result = apiInstance.GetOrganizations(searchTerm, filterByPublicationService, pageNumber, pageSize, orderBy); + OrganizationDtoPagedResponse result = apiInstance.GetOrganizations(searchTerm, language, filterByPublicationService, pageNumber, pageSize, orderBy); Debug.WriteLine(result); } catch (ApiException e) @@ -245,7 +246,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Retrieves all organizations. - ApiResponse<OrganizationDtoPagedResponse> response = apiInstance.GetOrganizationsWithHttpInfo(searchTerm, filterByPublicationService, pageNumber, pageSize, orderBy); + ApiResponse<OrganizationDtoPagedResponse> response = apiInstance.GetOrganizationsWithHttpInfo(searchTerm, language, filterByPublicationService, pageNumber, pageSize, orderBy); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -263,6 +264,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **searchTerm** | **string?** | Gets or sets the search term used to filter organizations. | [optional] | +| **language** | [**AcceptedLanguage?**](AcceptedLanguage?.md) | Language of name or text (dataPublicationService) | [optional] | | **filterByPublicationService** | **bool?** | Gets or sets the option to find only organizations having the publication service set. | [optional] | | **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | | **pageSize** | **int?** | The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. | [optional] | diff --git a/docs/ProjectPublicationRequestApi.md b/docs/ProjectPublicationRequestApi.md new file mode 100644 index 0000000000000000000000000000000000000000..1900659251dc2ccd202b195d3f53348324232ff8 --- /dev/null +++ b/docs/ProjectPublicationRequestApi.md @@ -0,0 +1,198 @@ +# Coscine.ApiClient.Core.Api.ProjectPublicationRequestApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdPublicationsRequestsOptions**](ProjectPublicationRequestApi.md#apiv2projectsprojectidpublicationsrequestsoptions) | **OPTIONS** /api/v2/projects/{projectId}/publications/requests | Responds with the HTTP methods allowed for the endpoint. | +| [**CreatePublicationRequest**](ProjectPublicationRequestApi.md#createpublicationrequest) | **POST** /api/v2/projects/{projectId}/publications/requests | Creates a new publication request. | + +<a id="apiv2projectsprojectidpublicationsrequestsoptions"></a> +# **ApiV2ProjectsProjectIdPublicationsRequestsOptions** +> void ApiV2ProjectsProjectIdPublicationsRequestsOptions (string projectId) + +Responds with the HTTP methods allowed for the endpoint. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class ApiV2ProjectsProjectIdPublicationsRequestsOptionsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new ProjectPublicationRequestApi(config); + var projectId = "projectId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdPublicationsRequestsOptions(projectId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectPublicationRequestApi.ApiV2ProjectsProjectIdPublicationsRequestsOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfo(projectId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectPublicationRequestApi.ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | | | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="createpublicationrequest"></a> +# **CreatePublicationRequest** +> PublicationRequestForCreationDtoResponse CreatePublicationRequest (string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = null) + +Creates a new publication request. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class CreatePublicationRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new ProjectPublicationRequestApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var publicationRequestForCreationDto = new PublicationRequestForCreationDto?(); // PublicationRequestForCreationDto? | The publication request data for creation. (optional) + + try + { + // Creates a new publication request. + PublicationRequestForCreationDtoResponse result = apiInstance.CreatePublicationRequest(projectId, publicationRequestForCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectPublicationRequestApi.CreatePublicationRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreatePublicationRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a new publication request. + ApiResponse<PublicationRequestForCreationDtoResponse> response = apiInstance.CreatePublicationRequestWithHttpInfo(projectId, publicationRequestForCreationDto); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectPublicationRequestApi.CreatePublicationRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The Id or slug of the project. | | +| **publicationRequestForCreationDto** | [**PublicationRequestForCreationDto?**](PublicationRequestForCreationDto?.md) | The publication request data for creation. | [optional] | + +### Return type + +[**PublicationRequestForCreationDtoResponse**](PublicationRequestForCreationDtoResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Publication request created. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Provided input refers to entries that do not exist or have been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/PublicationAdvisoryServiceDto.md b/docs/PublicationAdvisoryServiceDto.md index 3583ac5104605b266cb0f7b2017b90cae13d10a2..2e976fa4a9c6bcd81ab05e724a996e87fe841320 100644 --- a/docs/PublicationAdvisoryServiceDto.md +++ b/docs/PublicationAdvisoryServiceDto.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **DisplayName** | **string** | The data publication service's display name. | **Email** | **string** | The data publication service's email address. | +**Text** | **string** | The data publication service's info text. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PublicationRequestForCreationDto.md b/docs/PublicationRequestForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..372f5c8001d535f792dc46134cbc961e7838a731 --- /dev/null +++ b/docs/PublicationRequestForCreationDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.PublicationRequestForCreationDto +Data transfer object (DTO) representing the creation of a publication request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DataPublicationServiceRorId** | **string** | The data publication service's ror id. | +**ResourceIds** | **List<Guid>** | The resource guids. | +**Message** | **string** | A message of the requester. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PublicationRequestForCreationDtoResponse.md b/docs/PublicationRequestForCreationDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..7430a9096b055d3e20de512ef01b3c05e0f00e98 --- /dev/null +++ b/docs/PublicationRequestForCreationDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.PublicationRequestForCreationDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**PublicationRequestForCreationDto**](PublicationRequestForCreationDto.md) | | [optional] +**IsSuccess** | **bool** | | [optional] [readonly] +**StatusCode** | **int?** | | [optional] +**TraceId** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SelfSessionApi.md b/docs/SelfSessionApi.md new file mode 100644 index 0000000000000000000000000000000000000000..d1f5e0bc0be4a2e6c353f86433c37bf47460aa4e --- /dev/null +++ b/docs/SelfSessionApi.md @@ -0,0 +1,447 @@ +# Coscine.ApiClient.Core.Api.SelfSessionApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2SelfSessionLogoutPost**](SelfSessionApi.md#apiv2selfsessionlogoutpost) | **POST** /api/v2/self/session/logout | Initiate the Log out workflow. | +| [**ApiV2SelfSessionOptions**](SelfSessionApi.md#apiv2selfsessionoptions) | **OPTIONS** /api/v2/self/session | Responds with the HTTP methods allowed for the endpoint. | +| [**Login**](SelfSessionApi.md#login) | **GET** /api/v2/self/session | Initiate the login workflow with the default (NFDI4Ing AAI) provider. | +| [**LoginWithProvider**](SelfSessionApi.md#loginwithprovider) | **GET** /api/v2/self/session/{externalAuthenticatorId} | Initiate the login workflow with specific provider. | +| [**Merge**](SelfSessionApi.md#merge) | **GET** /api/v2/self/session/merge/{externalAuthenticatorId} | Initiate the merge workflow with specific provider. | + +<a id="apiv2selfsessionlogoutpost"></a> +# **ApiV2SelfSessionLogoutPost** +> void ApiV2SelfSessionLogoutPost () + +Initiate the Log out workflow. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class ApiV2SelfSessionLogoutPostExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SelfSessionApi(config); + + try + { + // Initiate the Log out workflow. + apiInstance.ApiV2SelfSessionLogoutPost(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfSessionApi.ApiV2SelfSessionLogoutPost: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2SelfSessionLogoutPostWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Initiate the Log out workflow. + apiInstance.ApiV2SelfSessionLogoutPostWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfSessionApi.ApiV2SelfSessionLogoutPostWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="apiv2selfsessionoptions"></a> +# **ApiV2SelfSessionOptions** +> void ApiV2SelfSessionOptions () + +Responds with the HTTP methods allowed for the endpoint. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class ApiV2SelfSessionOptionsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SelfSessionApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2SelfSessionOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfSessionApi.ApiV2SelfSessionOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2SelfSessionOptionsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2SelfSessionOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfSessionApi.ApiV2SelfSessionOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="login"></a> +# **Login** +> void Login () + +Initiate the login workflow with the default (NFDI4Ing AAI) provider. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class LoginExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SelfSessionApi(config); + + try + { + // Initiate the login workflow with the default (NFDI4Ing AAI) provider. + apiInstance.Login(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfSessionApi.Login: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the LoginWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Initiate the login workflow with the default (NFDI4Ing AAI) provider. + apiInstance.LoginWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfSessionApi.LoginWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="loginwithprovider"></a> +# **LoginWithProvider** +> void LoginWithProvider (Guid externalAuthenticatorId) + +Initiate the login workflow with specific provider. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class LoginWithProviderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SelfSessionApi(config); + var externalAuthenticatorId = "externalAuthenticatorId_example"; // Guid | + + try + { + // Initiate the login workflow with specific provider. + apiInstance.LoginWithProvider(externalAuthenticatorId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfSessionApi.LoginWithProvider: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the LoginWithProviderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Initiate the login workflow with specific provider. + apiInstance.LoginWithProviderWithHttpInfo(externalAuthenticatorId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfSessionApi.LoginWithProviderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **externalAuthenticatorId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="merge"></a> +# **Merge** +> void Merge (Guid externalAuthenticatorId) + +Initiate the merge workflow with specific provider. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class MergeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SelfSessionApi(config); + var externalAuthenticatorId = "externalAuthenticatorId_example"; // Guid | + + try + { + // Initiate the merge workflow with specific provider. + apiInstance.Merge(externalAuthenticatorId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfSessionApi.Merge: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the MergeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Initiate the merge workflow with specific provider. + apiInstance.MergeWithHttpInfo(externalAuthenticatorId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfSessionApi.MergeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **externalAuthenticatorId** | **Guid** | | | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SystemStatusApi.md b/docs/SystemStatusApi.md new file mode 100644 index 0000000000000000000000000000000000000000..9fd1d2753c651466213afeda4168ee2251542f6a --- /dev/null +++ b/docs/SystemStatusApi.md @@ -0,0 +1,315 @@ +# Coscine.ApiClient.Core.Api.SystemStatusApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2SystemStatusOptions**](SystemStatusApi.md#apiv2systemstatusoptions) | **OPTIONS** /api/v2/system/status | Responds with the HTTP methods allowed for the endpoint. | +| [**GetInternalMessages**](SystemStatusApi.md#getinternalmessages) | **GET** /api/v2/system/status/internal | Retrieves the internal messages. | +| [**GetNocMessages**](SystemStatusApi.md#getnocmessages) | **GET** /api/v2/system/status/noc | Retrieves the NOC messages. | + +<a id="apiv2systemstatusoptions"></a> +# **ApiV2SystemStatusOptions** +> void ApiV2SystemStatusOptions () + +Responds with the HTTP methods allowed for the endpoint. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class ApiV2SystemStatusOptionsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SystemStatusApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2SystemStatusOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SystemStatusApi.ApiV2SystemStatusOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2SystemStatusOptionsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2SystemStatusOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SystemStatusApi.ApiV2SystemStatusOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="getinternalmessages"></a> +# **GetInternalMessages** +> MessageDtoPagedResponse GetInternalMessages (DateTime? startDateAfter = null, DateTime? startDateBefore = null, DateTime? endDateAfter = null, DateTime? endDateBefore = null, MessageType? type = null, string? searchTerm = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves the internal messages. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class GetInternalMessagesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SystemStatusApi(config); + var startDateAfter = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their start date after this date. (optional) + var startDateBefore = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their start date before this date. (optional) + var endDateAfter = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their end date after this date. (optional) + var endDateBefore = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their end date before this date. (optional) + var type = new MessageType?(); // MessageType? | Filter messages by their type (e.g. information, warning, error). (optional) + var searchTerm = "searchTerm_example"; // string? | Filter messages by text contained in the messages or title. (optional) + var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) + var pageSize = 56; // int? | The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional) + var orderBy = "orderBy_example"; // string? | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional) + + try + { + // Retrieves the internal messages. + MessageDtoPagedResponse result = apiInstance.GetInternalMessages(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SystemStatusApi.GetInternalMessages: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetInternalMessagesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the internal messages. + ApiResponse<MessageDtoPagedResponse> response = apiInstance.GetInternalMessagesWithHttpInfo(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SystemStatusApi.GetInternalMessagesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **startDateAfter** | **DateTime?** | Will only return messages that have their start date after this date. | [optional] | +| **startDateBefore** | **DateTime?** | Will only return messages that have their start date before this date. | [optional] | +| **endDateAfter** | **DateTime?** | Will only return messages that have their end date after this date. | [optional] | +| **endDateBefore** | **DateTime?** | Will only return messages that have their end date before this date. | [optional] | +| **type** | [**MessageType?**](MessageType?.md) | Filter messages by their type (e.g. information, warning, error). | [optional] | +| **searchTerm** | **string?** | Filter messages by text contained in the messages or title. | [optional] | +| **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | +| **pageSize** | **int?** | The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. | [optional] | +| **orderBy** | **string?** | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. | [optional] | + +### Return type + +[**MessageDtoPagedResponse**](MessageDtoPagedResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns the internal message. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="getnocmessages"></a> +# **GetNocMessages** +> MessageDtoPagedResponse GetNocMessages (DateTime? startDateAfter = null, DateTime? startDateBefore = null, DateTime? endDateAfter = null, DateTime? endDateBefore = null, MessageType? type = null, string? searchTerm = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves the NOC messages. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Coscine.ApiClient.Core.Api; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Example +{ + public class GetNocMessagesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; + // Configure API key authorization: Bearer + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new SystemStatusApi(config); + var startDateAfter = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their start date after this date. (optional) + var startDateBefore = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their start date before this date. (optional) + var endDateAfter = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their end date after this date. (optional) + var endDateBefore = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Will only return messages that have their end date before this date. (optional) + var type = new MessageType?(); // MessageType? | Filter messages by their type (e.g. information, warning, error). (optional) + var searchTerm = "searchTerm_example"; // string? | Filter messages by text contained in the messages or title. (optional) + var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) + var pageSize = 56; // int? | The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. (optional) + var orderBy = "orderBy_example"; // string? | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional) + + try + { + // Retrieves the NOC messages. + MessageDtoPagedResponse result = apiInstance.GetNocMessages(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SystemStatusApi.GetNocMessages: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetNocMessagesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the NOC messages. + ApiResponse<MessageDtoPagedResponse> response = apiInstance.GetNocMessagesWithHttpInfo(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SystemStatusApi.GetNocMessagesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **startDateAfter** | **DateTime?** | Will only return messages that have their start date after this date. | [optional] | +| **startDateBefore** | **DateTime?** | Will only return messages that have their start date before this date. | [optional] | +| **endDateAfter** | **DateTime?** | Will only return messages that have their end date after this date. | [optional] | +| **endDateBefore** | **DateTime?** | Will only return messages that have their end date before this date. | [optional] | +| **type** | [**MessageType?**](MessageType?.md) | Filter messages by their type (e.g. information, warning, error). | [optional] | +| **searchTerm** | **string?** | Filter messages by text contained in the messages or title. | [optional] | +| **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | +| **pageSize** | **int?** | The desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10. | [optional] | +| **orderBy** | **string?** | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. | [optional] | + +### Return type + +[**MessageDtoPagedResponse**](MessageDtoPagedResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns the NOC messages. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/generate-api-client.sh b/generate-api-client.sh index 0db451546ceafb348a9b6be42dc5a42c1ac86abc..db39a9f2b982b4c10003dd66c911f11bcb6bacbe 100644 --- a/generate-api-client.sh +++ b/generate-api-client.sh @@ -11,7 +11,7 @@ # - Copying the newly generated API client source to the project directory. # - Updating the docs. # - Replacing the README.md file. -# - Cleaning up temporary files and the downloaded tool. +# - Cleaning up temporary files. # # Defined variables: OUTPUT_DIR="temp" # The temporary directory for generated files @@ -62,7 +62,7 @@ cp -R "$OUTPUT_DIR/docs" "docs" echo -e "\n${CYAN}Replacing README.md file...${NC}" cp "$OUTPUT_DIR/README.md" "README.md" -# Remove the temp directory and the generator JAR file +# Remove the temp directory echo -e "${YELLOW}Cleaning up...${NC}" rm -rf "$OUTPUT_DIR" diff --git a/src/Coscine.ApiClient.Core.Test/Api/OrganizationApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/OrganizationApiTests.cs index 3246ec9c33243b3857f6dd9766dc7f92d4268186..989aae6f1010455aee1cf01ae69866d8cf14356c 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/OrganizationApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/OrganizationApiTests.cs @@ -85,11 +85,12 @@ namespace Coscine.ApiClient.Core.Test.Api { // TODO uncomment below to test the method and replace null with proper value //string? searchTerm = null; + //AcceptedLanguage? language = null; //bool? filterByPublicationService = null; //int? pageNumber = null; //int? pageSize = null; //string? orderBy = null; - //var response = instance.GetOrganizations(searchTerm, filterByPublicationService, pageNumber, pageSize, orderBy); + //var response = instance.GetOrganizations(searchTerm, language, filterByPublicationService, pageNumber, pageSize, orderBy); //Assert.IsType<OrganizationDtoPagedResponse>(response); } } diff --git a/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..7226d44f344c5cc8c9eb3687bf613818c87c0b78 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs @@ -0,0 +1,82 @@ +/* + * 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.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Api; +// uncomment below to import models +//using Coscine.ApiClient.Core.Model; + +namespace Coscine.ApiClient.Core.Test.Api +{ + /// <summary> + /// Class for testing ProjectPublicationRequestApi + /// </summary> + /// <remarks> + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// </remarks> + public class ProjectPublicationRequestApiTests : IDisposable + { + private ProjectPublicationRequestApi instance; + + public ProjectPublicationRequestApiTests() + { + instance = new ProjectPublicationRequestApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of ProjectPublicationRequestApi + /// </summary> + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' ProjectPublicationRequestApi + //Assert.IsType<ProjectPublicationRequestApi>(instance); + } + + /// <summary> + /// Test ApiV2ProjectsProjectIdPublicationsRequestsOptions + /// </summary> + [Fact] + public void ApiV2ProjectsProjectIdPublicationsRequestsOptionsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string projectId = null; + //instance.ApiV2ProjectsProjectIdPublicationsRequestsOptions(projectId); + } + + /// <summary> + /// Test CreatePublicationRequest + /// </summary> + [Fact] + public void CreatePublicationRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string projectId = null; + //PublicationRequestForCreationDto? publicationRequestForCreationDto = null; + //var response = instance.CreatePublicationRequest(projectId, publicationRequestForCreationDto); + //Assert.IsType<PublicationRequestForCreationDtoResponse>(response); + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Api/SelfSessionApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/SelfSessionApiTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..1d10f2cd1e9d79cad34916118ee55ac40d639b9f --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Api/SelfSessionApiTests.cs @@ -0,0 +1,108 @@ +/* + * 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.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Api; + +namespace Coscine.ApiClient.Core.Test.Api +{ + /// <summary> + /// Class for testing SelfSessionApi + /// </summary> + /// <remarks> + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// </remarks> + public class SelfSessionApiTests : IDisposable + { + private SelfSessionApi instance; + + public SelfSessionApiTests() + { + instance = new SelfSessionApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of SelfSessionApi + /// </summary> + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' SelfSessionApi + //Assert.IsType<SelfSessionApi>(instance); + } + + /// <summary> + /// Test ApiV2SelfSessionLogoutPost + /// </summary> + [Fact] + public void ApiV2SelfSessionLogoutPostTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.ApiV2SelfSessionLogoutPost(); + } + + /// <summary> + /// Test ApiV2SelfSessionOptions + /// </summary> + [Fact] + public void ApiV2SelfSessionOptionsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.ApiV2SelfSessionOptions(); + } + + /// <summary> + /// Test Login + /// </summary> + [Fact] + public void LoginTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.Login(); + } + + /// <summary> + /// Test LoginWithProvider + /// </summary> + [Fact] + public void LoginWithProviderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid externalAuthenticatorId = null; + //instance.LoginWithProvider(externalAuthenticatorId); + } + + /// <summary> + /// Test Merge + /// </summary> + [Fact] + public void MergeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Guid externalAuthenticatorId = null; + //instance.Merge(externalAuthenticatorId); + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Api/SystemStatusApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/SystemStatusApiTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..fb857b4de2663818a16ba395b781060e2c99595a --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Api/SystemStatusApiTests.cs @@ -0,0 +1,108 @@ +/* + * 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.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Api; +// uncomment below to import models +//using Coscine.ApiClient.Core.Model; + +namespace Coscine.ApiClient.Core.Test.Api +{ + /// <summary> + /// Class for testing SystemStatusApi + /// </summary> + /// <remarks> + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// </remarks> + public class SystemStatusApiTests : IDisposable + { + private SystemStatusApi instance; + + public SystemStatusApiTests() + { + instance = new SystemStatusApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of SystemStatusApi + /// </summary> + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' SystemStatusApi + //Assert.IsType<SystemStatusApi>(instance); + } + + /// <summary> + /// Test ApiV2SystemStatusOptions + /// </summary> + [Fact] + public void ApiV2SystemStatusOptionsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.ApiV2SystemStatusOptions(); + } + + /// <summary> + /// Test GetInternalMessages + /// </summary> + [Fact] + public void GetInternalMessagesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DateTime? startDateAfter = null; + //DateTime? startDateBefore = null; + //DateTime? endDateAfter = null; + //DateTime? endDateBefore = null; + //MessageType? type = null; + //string? searchTerm = null; + //int? pageNumber = null; + //int? pageSize = null; + //string? orderBy = null; + //var response = instance.GetInternalMessages(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + //Assert.IsType<MessageDtoPagedResponse>(response); + } + + /// <summary> + /// Test GetNocMessages + /// </summary> + [Fact] + public void GetNocMessagesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DateTime? startDateAfter = null; + //DateTime? startDateBefore = null; + //DateTime? endDateAfter = null; + //DateTime? endDateBefore = null; + //MessageType? type = null; + //string? searchTerm = null; + //int? pageNumber = null; + //int? pageSize = null; + //string? orderBy = null; + //var response = instance.GetNocMessages(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + //Assert.IsType<MessageDtoPagedResponse>(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 6446a5557b7f246e44aa5abf77d8153ca73552da..4f5781e92c5d4e3b2b83d7d65070a60de9fe2fb3 100644 --- a/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj +++ b/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj @@ -6,7 +6,7 @@ <TargetFramework>net8.0</TargetFramework> <IsPackable>false</IsPackable> <Nullable>annotations</Nullable> - <Version>1.9.1</Version></PropertyGroup> + </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> diff --git a/src/Coscine.ApiClient.Core.Test/Model/MessageDtoPagedResponseTests.cs b/src/Coscine.ApiClient.Core.Test/Model/MessageDtoPagedResponseTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..7e60ccec78918695e80bd08bbc4a588946ddd909 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/MessageDtoPagedResponseTests.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 MessageDtoPagedResponse + /// </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 MessageDtoPagedResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MessageDtoPagedResponse + //private MessageDtoPagedResponse instance; + + public MessageDtoPagedResponseTests() + { + // TODO uncomment below to create an instance of MessageDtoPagedResponse + //instance = new MessageDtoPagedResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of MessageDtoPagedResponse + /// </summary> + [Fact] + public void MessageDtoPagedResponseInstanceTest() + { + // TODO uncomment below to test "IsType" MessageDtoPagedResponse + //Assert.IsType<MessageDtoPagedResponse>(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/MessageDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/MessageDtoTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..11b0a7af64109e51d85413e236b337745c0770b4 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/MessageDtoTests.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 MessageDto + /// </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 MessageDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MessageDto + //private MessageDto instance; + + public MessageDtoTests() + { + // TODO uncomment below to create an instance of MessageDto + //instance = new MessageDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of MessageDto + /// </summary> + [Fact] + public void MessageDtoInstanceTest() + { + // TODO uncomment below to test "IsType" MessageDto + //Assert.IsType<MessageDto>(instance); + } + + /// <summary> + /// Test the property 'Id' + /// </summary> + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + + /// <summary> + /// Test the property 'Body' + /// </summary> + [Fact] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + + /// <summary> + /// Test the property 'Type' + /// </summary> + [Fact] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + + /// <summary> + /// Test the property 'Title' + /// </summary> + [Fact] + public void TitleTest() + { + // TODO unit test for the property 'Title' + } + + /// <summary> + /// Test the property 'Href' + /// </summary> + [Fact] + public void HrefTest() + { + // TODO unit test for the property 'Href' + } + + /// <summary> + /// Test the property 'StartDate' + /// </summary> + [Fact] + public void StartDateTest() + { + // TODO unit test for the property 'StartDate' + } + + /// <summary> + /// Test the property 'EndDate' + /// </summary> + [Fact] + public void EndDateTest() + { + // TODO unit test for the property 'EndDate' + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Model/MessageTypeTests.cs b/src/Coscine.ApiClient.Core.Test/Model/MessageTypeTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..b9566c0f82d8a91e9d393f777e4c4ff9898f670a --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/MessageTypeTests.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 MessageType + /// </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 MessageTypeTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MessageType + //private MessageType instance; + + public MessageTypeTests() + { + // TODO uncomment below to create an instance of MessageType + //instance = new MessageType(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of MessageType + /// </summary> + [Fact] + public void MessageTypeInstanceTest() + { + // TODO uncomment below to test "IsType" MessageType + //Assert.IsType<MessageType>(instance); + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs index 948b9e06b182cb8ee5d68d6357453f761ea2717f..b7dd626bd5b16209b5d2964414e123462ad4e581 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/PublicationAdvisoryServiceDtoTests.cs @@ -72,5 +72,14 @@ namespace Coscine.ApiClient.Core.Test.Model { // TODO unit test for the property 'Email' } + + /// <summary> + /// Test the property 'Text' + /// </summary> + [Fact] + public void TextTest() + { + // TODO unit test for the property 'Text' + } } } diff --git a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs b/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..c70a604f816b26741a9604f7441c98357a90ba81 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs @@ -0,0 +1,94 @@ +/* + * 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 PublicationRequestForCreationDtoResponse + /// </summary> + /// <remarks> + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// </remarks> + public class PublicationRequestForCreationDtoResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PublicationRequestForCreationDtoResponse + //private PublicationRequestForCreationDtoResponse instance; + + public PublicationRequestForCreationDtoResponseTests() + { + // TODO uncomment below to create an instance of PublicationRequestForCreationDtoResponse + //instance = new PublicationRequestForCreationDtoResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of PublicationRequestForCreationDtoResponse + /// </summary> + [Fact] + public void PublicationRequestForCreationDtoResponseInstanceTest() + { + // TODO uncomment below to test "IsType" PublicationRequestForCreationDtoResponse + //Assert.IsType<PublicationRequestForCreationDtoResponse>(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' + } + } +} diff --git a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..bb74e10decd7bb512bb52687046a4b44a7409b35 --- /dev/null +++ b/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs @@ -0,0 +1,85 @@ +/* + * 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 PublicationRequestForCreationDto + /// </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 PublicationRequestForCreationDtoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PublicationRequestForCreationDto + //private PublicationRequestForCreationDto instance; + + public PublicationRequestForCreationDtoTests() + { + // TODO uncomment below to create an instance of PublicationRequestForCreationDto + //instance = new PublicationRequestForCreationDto(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// <summary> + /// Test an instance of PublicationRequestForCreationDto + /// </summary> + [Fact] + public void PublicationRequestForCreationDtoInstanceTest() + { + // TODO uncomment below to test "IsType" PublicationRequestForCreationDto + //Assert.IsType<PublicationRequestForCreationDto>(instance); + } + + /// <summary> + /// Test the property 'DataPublicationServiceRorId' + /// </summary> + [Fact] + public void DataPublicationServiceRorIdTest() + { + // TODO unit test for the property 'DataPublicationServiceRorId' + } + + /// <summary> + /// Test the property 'ResourceIds' + /// </summary> + [Fact] + public void ResourceIdsTest() + { + // TODO unit test for the property 'ResourceIds' + } + + /// <summary> + /// Test the property 'Message' + /// </summary> + [Fact] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + } +} diff --git a/src/Coscine.ApiClient.Core/Api/MaintenanceApi.cs b/src/Coscine.ApiClient.Core/Api/MaintenanceApi.cs index 7c1268b3b4cb8a56e060263c7cade180049e5557..4239cf479e774c74a27418e2f1447431b3b17eb1 100644 --- a/src/Coscine.ApiClient.Core/Api/MaintenanceApi.cs +++ b/src/Coscine.ApiClient.Core/Api/MaintenanceApi.cs @@ -51,6 +51,7 @@ namespace Coscine.ApiClient.Core.Api /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MaintenanceDtoPagedResponse</returns> + [Obsolete] MaintenanceDtoPagedResponse GetCurrentMaintenances(int operationIndex = 0); /// <summary> @@ -62,6 +63,7 @@ namespace Coscine.ApiClient.Core.Api /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MaintenanceDtoPagedResponse</returns> + [Obsolete] ApiResponse<MaintenanceDtoPagedResponse> GetCurrentMaintenancesWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -105,6 +107,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 MaintenanceDtoPagedResponse</returns> + [Obsolete] System.Threading.Tasks.Task<MaintenanceDtoPagedResponse> GetCurrentMaintenancesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> @@ -117,6 +120,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 (MaintenanceDtoPagedResponse)</returns> + [Obsolete] System.Threading.Tasks.Task<ApiResponse<MaintenanceDtoPagedResponse>> GetCurrentMaintenancesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -376,6 +380,7 @@ namespace Coscine.ApiClient.Core.Api /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MaintenanceDtoPagedResponse</returns> + [Obsolete] public MaintenanceDtoPagedResponse GetCurrentMaintenances(int operationIndex = 0) { Coscine.ApiClient.Core.Client.ApiResponse<MaintenanceDtoPagedResponse> localVarResponse = GetCurrentMaintenancesWithHttpInfo(); @@ -388,6 +393,7 @@ namespace Coscine.ApiClient.Core.Api /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MaintenanceDtoPagedResponse</returns> + [Obsolete] public Coscine.ApiClient.Core.Client.ApiResponse<MaintenanceDtoPagedResponse> GetCurrentMaintenancesWithHttpInfo(int operationIndex = 0) { Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); @@ -444,6 +450,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 MaintenanceDtoPagedResponse</returns> + [Obsolete] public async System.Threading.Tasks.Task<MaintenanceDtoPagedResponse> GetCurrentMaintenancesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Coscine.ApiClient.Core.Client.ApiResponse<MaintenanceDtoPagedResponse> localVarResponse = await GetCurrentMaintenancesWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); @@ -457,6 +464,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 (MaintenanceDtoPagedResponse)</returns> + [Obsolete] public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MaintenanceDtoPagedResponse>> GetCurrentMaintenancesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { diff --git a/src/Coscine.ApiClient.Core/Api/OrganizationApi.cs b/src/Coscine.ApiClient.Core/Api/OrganizationApi.cs index f641028acb5243acaa20360bb232edaaaa3f6b86..8d1b6a7902a26e865e80eb792e9dc9402bbe9349 100644 --- a/src/Coscine.ApiClient.Core/Api/OrganizationApi.cs +++ b/src/Coscine.ApiClient.Core/Api/OrganizationApi.cs @@ -70,13 +70,14 @@ namespace Coscine.ApiClient.Core.Api /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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>OrganizationDtoPagedResponse</returns> - OrganizationDtoPagedResponse GetOrganizations(string? searchTerm = default(string?), bool? filterByPublicationService = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + OrganizationDtoPagedResponse GetOrganizations(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); /// <summary> /// Retrieves all organizations. @@ -86,13 +87,14 @@ namespace Coscine.ApiClient.Core.Api /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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 OrganizationDtoPagedResponse</returns> - ApiResponse<OrganizationDtoPagedResponse> GetOrganizationsWithHttpInfo(string? searchTerm = default(string?), bool? filterByPublicationService = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + ApiResponse<OrganizationDtoPagedResponse> GetOrganizationsWithHttpInfo(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); #endregion Synchronous Operations } @@ -158,6 +160,7 @@ namespace Coscine.ApiClient.Core.Api /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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> @@ -165,7 +168,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 OrganizationDtoPagedResponse</returns> - System.Threading.Tasks.Task<OrganizationDtoPagedResponse> GetOrganizationsAsync(string? searchTerm = default(string?), bool? filterByPublicationService = 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<OrganizationDtoPagedResponse> GetOrganizationsAsync(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = 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 organizations. @@ -175,6 +178,7 @@ namespace Coscine.ApiClient.Core.Api /// </remarks> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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> @@ -182,7 +186,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 (OrganizationDtoPagedResponse)</returns> - System.Threading.Tasks.Task<ApiResponse<OrganizationDtoPagedResponse>> GetOrganizationsWithHttpInfoAsync(string? searchTerm = default(string?), bool? filterByPublicationService = 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<OrganizationDtoPagedResponse>> GetOrganizationsWithHttpInfoAsync(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = 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)); #endregion Asynchronous Operations } @@ -596,15 +600,16 @@ namespace Coscine.ApiClient.Core.Api /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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>OrganizationDtoPagedResponse</returns> - public OrganizationDtoPagedResponse GetOrganizations(string? searchTerm = default(string?), bool? filterByPublicationService = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + public OrganizationDtoPagedResponse GetOrganizations(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) { - Coscine.ApiClient.Core.Client.ApiResponse<OrganizationDtoPagedResponse> localVarResponse = GetOrganizationsWithHttpInfo(searchTerm, filterByPublicationService, pageNumber, pageSize, orderBy); + Coscine.ApiClient.Core.Client.ApiResponse<OrganizationDtoPagedResponse> localVarResponse = GetOrganizationsWithHttpInfo(searchTerm, language, filterByPublicationService, pageNumber, pageSize, orderBy); return localVarResponse.Data; } @@ -613,13 +618,14 @@ namespace Coscine.ApiClient.Core.Api /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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 OrganizationDtoPagedResponse</returns> - public Coscine.ApiClient.Core.Client.ApiResponse<OrganizationDtoPagedResponse> GetOrganizationsWithHttpInfo(string? searchTerm = default(string?), bool? filterByPublicationService = default(bool?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + public Coscine.ApiClient.Core.Client.ApiResponse<OrganizationDtoPagedResponse> GetOrganizationsWithHttpInfo(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = 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(); @@ -648,6 +654,10 @@ namespace Coscine.ApiClient.Core.Api { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "SearchTerm", searchTerm)); } + if (language != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Language", language)); + } if (filterByPublicationService != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "FilterByPublicationService", filterByPublicationService)); @@ -693,6 +703,7 @@ namespace Coscine.ApiClient.Core.Api /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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> @@ -700,9 +711,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 OrganizationDtoPagedResponse</returns> - public async System.Threading.Tasks.Task<OrganizationDtoPagedResponse> GetOrganizationsAsync(string? searchTerm = default(string?), bool? filterByPublicationService = 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<OrganizationDtoPagedResponse> GetOrganizationsAsync(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = 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<OrganizationDtoPagedResponse> localVarResponse = await GetOrganizationsWithHttpInfoAsync(searchTerm, filterByPublicationService, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); + Coscine.ApiClient.Core.Client.ApiResponse<OrganizationDtoPagedResponse> localVarResponse = await GetOrganizationsWithHttpInfoAsync(searchTerm, language, filterByPublicationService, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -711,6 +722,7 @@ namespace Coscine.ApiClient.Core.Api /// </summary> /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="searchTerm">Gets or sets the search term used to filter organizations. (optional)</param> + /// <param name="language">Language of name or text (dataPublicationService) (optional)</param> /// <param name="filterByPublicationService">Gets or sets the option to find only organizations having the publication service set. (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> @@ -718,7 +730,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 (OrganizationDtoPagedResponse)</returns> - public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<OrganizationDtoPagedResponse>> GetOrganizationsWithHttpInfoAsync(string? searchTerm = default(string?), bool? filterByPublicationService = 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<OrganizationDtoPagedResponse>> GetOrganizationsWithHttpInfoAsync(string? searchTerm = default(string?), AcceptedLanguage? language = default(AcceptedLanguage?), bool? filterByPublicationService = 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(); @@ -748,6 +760,10 @@ namespace Coscine.ApiClient.Core.Api { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "SearchTerm", searchTerm)); } + if (language != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Language", language)); + } if (filterByPublicationService != null) { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "FilterByPublicationService", filterByPublicationService)); diff --git a/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs b/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs new file mode 100644 index 0000000000000000000000000000000000000000..3b6f1fc34e7708de7ccb13ba1be476b5947db8df --- /dev/null +++ b/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs @@ -0,0 +1,572 @@ +/* + * Coscine Web API + * + * Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project. + * + * The version of the OpenAPI document: 2.0 + * Contact: servicedesk@itc.rwth-aachen.de + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Coscine.ApiClient.Core.Api +{ + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface IProjectPublicationRequestApiSync : IApiAccessor + { + #region Synchronous Operations + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + void ApiV2ProjectsProjectIdPublicationsRequestsOptions(string projectId, int operationIndex = 0); + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + ApiResponse<Object> ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfo(string projectId, int operationIndex = 0); + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>PublicationRequestForCreationDtoResponse</returns> + PublicationRequestForCreationDtoResponse CreatePublicationRequest(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0); + + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of PublicationRequestForCreationDtoResponse</returns> + ApiResponse<PublicationRequestForCreationDtoResponse> CreatePublicationRequestWithHttpInfo(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface IProjectPublicationRequestApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + System.Threading.Tasks.Task ApiV2ProjectsProjectIdPublicationsRequestsOptionsAsync(string projectId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + System.Threading.Tasks.Task<ApiResponse<Object>> ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfoAsync(string projectId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of PublicationRequestForCreationDtoResponse</returns> + System.Threading.Tasks.Task<PublicationRequestForCreationDtoResponse> CreatePublicationRequestAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (PublicationRequestForCreationDtoResponse)</returns> + System.Threading.Tasks.Task<ApiResponse<PublicationRequestForCreationDtoResponse>> CreatePublicationRequestWithHttpInfoAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface IProjectPublicationRequestApi : IProjectPublicationRequestApiSync, IProjectPublicationRequestApiAsync + { + + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public partial class ProjectPublicationRequestApi : IProjectPublicationRequestApi + { + private Coscine.ApiClient.Core.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// <summary> + /// Initializes a new instance of the <see cref="ProjectPublicationRequestApi"/> class. + /// </summary> + /// <returns></returns> + public ProjectPublicationRequestApi() : this((string)null) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="ProjectPublicationRequestApi"/> class. + /// </summary> + /// <returns></returns> + public ProjectPublicationRequestApi(string basePath) + { + this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations( + Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance, + new Coscine.ApiClient.Core.Client.Configuration { BasePath = basePath } + ); + this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// Initializes a new instance of the <see cref="ProjectPublicationRequestApi"/> class + /// using Configuration object + /// </summary> + /// <param name="configuration">An instance of Configuration</param> + /// <returns></returns> + public ProjectPublicationRequestApi(Coscine.ApiClient.Core.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations( + Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// Initializes a new instance of the <see cref="ProjectPublicationRequestApi"/> class + /// using a Configuration object and client instance. + /// </summary> + /// <param name="client">The client interface for synchronous API access.</param> + /// <param name="asyncClient">The client interface for asynchronous API access.</param> + /// <param name="configuration">The configuration object.</param> + public ProjectPublicationRequestApi(Coscine.ApiClient.Core.Client.ISynchronousClient client, Coscine.ApiClient.Core.Client.IAsynchronousClient asyncClient, Coscine.ApiClient.Core.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// The client for accessing this underlying API asynchronously. + /// </summary> + public Coscine.ApiClient.Core.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// <summary> + /// The client for accessing this underlying API synchronously. + /// </summary> + public Coscine.ApiClient.Core.Client.ISynchronousClient Client { get; set; } + + /// <summary> + /// Gets the base path of the API client. + /// </summary> + /// <value>The base path</value> + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// <summary> + /// Gets or sets the configuration object + /// </summary> + /// <value>An instance of the Configuration</value> + public Coscine.ApiClient.Core.Client.IReadableConfiguration Configuration { get; set; } + + /// <summary> + /// Provides a factory method hook for the creation of exceptions. + /// </summary> + public Coscine.ApiClient.Core.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + public void ApiV2ProjectsProjectIdPublicationsRequestsOptions(string projectId, int operationIndex = 0) + { + ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfo(projectId); + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<Object> ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfo(string projectId, int operationIndex = 0) + { + // verify the required parameter 'projectId' is set + if (projectId == null) + { + throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling ProjectPublicationRequestApi->ApiV2ProjectsProjectIdPublicationsRequestsOptions"); + } + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter + + localVarRequestOptions.Operation = "ProjectPublicationRequestApi.ApiV2ProjectsProjectIdPublicationsRequestsOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Options<Object>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2ProjectsProjectIdPublicationsRequestsOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + public async System.Threading.Tasks.Task ApiV2ProjectsProjectIdPublicationsRequestsOptionsAsync(string projectId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfoAsync(projectId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> ApiV2ProjectsProjectIdPublicationsRequestsOptionsWithHttpInfoAsync(string projectId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'projectId' is set + if (projectId == null) + { + throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling ProjectPublicationRequestApi->ApiV2ProjectsProjectIdPublicationsRequestsOptions"); + } + + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter + + localVarRequestOptions.Operation = "ProjectPublicationRequestApi.ApiV2ProjectsProjectIdPublicationsRequestsOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.OptionsAsync<Object>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2ProjectsProjectIdPublicationsRequestsOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>PublicationRequestForCreationDtoResponse</returns> + public PublicationRequestForCreationDtoResponse CreatePublicationRequest(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse> localVarResponse = CreatePublicationRequestWithHttpInfo(projectId, publicationRequestForCreationDto); + return localVarResponse.Data; + } + + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of PublicationRequestForCreationDtoResponse</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse> CreatePublicationRequestWithHttpInfo(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0) + { + // verify the required parameter 'projectId' is set + if (projectId == null) + { + throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling ProjectPublicationRequestApi->CreatePublicationRequest"); + } + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json", + "text/json", + "application/*+json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json", + "text/json" + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter + localVarRequestOptions.Data = publicationRequestForCreationDto; + + localVarRequestOptions.Operation = "ProjectPublicationRequestApi.CreatePublicationRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post<PublicationRequestForCreationDtoResponse>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePublicationRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of PublicationRequestForCreationDtoResponse</returns> + public async System.Threading.Tasks.Task<PublicationRequestForCreationDtoResponse> CreatePublicationRequestAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse> localVarResponse = await CreatePublicationRequestWithHttpInfoAsync(projectId, publicationRequestForCreationDto, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// <summary> + /// Creates a new publication request. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="projectId">The Id or slug of the project.</param> + /// <param name="publicationRequestForCreationDto">The publication request data for creation. (optional)</param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse (PublicationRequestForCreationDtoResponse)</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<PublicationRequestForCreationDtoResponse>> CreatePublicationRequestWithHttpInfoAsync(string projectId, PublicationRequestForCreationDto? publicationRequestForCreationDto = default(PublicationRequestForCreationDto?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'projectId' is set + if (projectId == null) + { + throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'projectId' when calling ProjectPublicationRequestApi->CreatePublicationRequest"); + } + + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json", + "text/json", + "application/*+json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json", + "text/json" + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter + localVarRequestOptions.Data = publicationRequestForCreationDto; + + localVarRequestOptions.Operation = "ProjectPublicationRequestApi.CreatePublicationRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync<PublicationRequestForCreationDtoResponse>("/api/v2/projects/{projectId}/publications/requests", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePublicationRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Coscine.ApiClient.Core/Api/SelfSessionApi.cs b/src/Coscine.ApiClient.Core/Api/SelfSessionApi.cs new file mode 100644 index 0000000000000000000000000000000000000000..80f62fd5cf06d78b67eaf5165f6a966c5ce76098 --- /dev/null +++ b/src/Coscine.ApiClient.Core/Api/SelfSessionApi.cs @@ -0,0 +1,1044 @@ +/* + * Coscine Web API + * + * Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project. + * + * The version of the OpenAPI document: 2.0 + * Contact: servicedesk@itc.rwth-aachen.de + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Coscine.ApiClient.Core.Client; + +namespace Coscine.ApiClient.Core.Api +{ + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface ISelfSessionApiSync : IApiAccessor + { + #region Synchronous Operations + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + void ApiV2SelfSessionLogoutPost(int operationIndex = 0); + + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + ApiResponse<Object> ApiV2SelfSessionLogoutPostWithHttpInfo(int operationIndex = 0); + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + void ApiV2SelfSessionOptions(int operationIndex = 0); + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + ApiResponse<Object> ApiV2SelfSessionOptionsWithHttpInfo(int operationIndex = 0); + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + void Login(int operationIndex = 0); + + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + ApiResponse<Object> LoginWithHttpInfo(int operationIndex = 0); + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + void LoginWithProvider(Guid externalAuthenticatorId, int operationIndex = 0); + + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + ApiResponse<Object> LoginWithProviderWithHttpInfo(Guid externalAuthenticatorId, int operationIndex = 0); + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + void Merge(Guid externalAuthenticatorId, int operationIndex = 0); + + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + ApiResponse<Object> MergeWithHttpInfo(Guid externalAuthenticatorId, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface ISelfSessionApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + System.Threading.Tasks.Task ApiV2SelfSessionLogoutPostAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + System.Threading.Tasks.Task<ApiResponse<Object>> ApiV2SelfSessionLogoutPostWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + System.Threading.Tasks.Task ApiV2SelfSessionOptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + System.Threading.Tasks.Task<ApiResponse<Object>> ApiV2SelfSessionOptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + System.Threading.Tasks.Task LoginAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + System.Threading.Tasks.Task<ApiResponse<Object>> LoginWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + System.Threading.Tasks.Task LoginWithProviderAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + System.Threading.Tasks.Task<ApiResponse<Object>> LoginWithProviderWithHttpInfoAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + System.Threading.Tasks.Task MergeAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + System.Threading.Tasks.Task<ApiResponse<Object>> MergeWithHttpInfoAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface ISelfSessionApi : ISelfSessionApiSync, ISelfSessionApiAsync + { + + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public partial class SelfSessionApi : ISelfSessionApi + { + private Coscine.ApiClient.Core.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// <summary> + /// Initializes a new instance of the <see cref="SelfSessionApi"/> class. + /// </summary> + /// <returns></returns> + public SelfSessionApi() : this((string)null) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="SelfSessionApi"/> class. + /// </summary> + /// <returns></returns> + public SelfSessionApi(string basePath) + { + this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations( + Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance, + new Coscine.ApiClient.Core.Client.Configuration { BasePath = basePath } + ); + this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// Initializes a new instance of the <see cref="SelfSessionApi"/> class + /// using Configuration object + /// </summary> + /// <param name="configuration">An instance of Configuration</param> + /// <returns></returns> + public SelfSessionApi(Coscine.ApiClient.Core.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations( + Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// Initializes a new instance of the <see cref="SelfSessionApi"/> class + /// using a Configuration object and client instance. + /// </summary> + /// <param name="client">The client interface for synchronous API access.</param> + /// <param name="asyncClient">The client interface for asynchronous API access.</param> + /// <param name="configuration">The configuration object.</param> + public SelfSessionApi(Coscine.ApiClient.Core.Client.ISynchronousClient client, Coscine.ApiClient.Core.Client.IAsynchronousClient asyncClient, Coscine.ApiClient.Core.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// The client for accessing this underlying API asynchronously. + /// </summary> + public Coscine.ApiClient.Core.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// <summary> + /// The client for accessing this underlying API synchronously. + /// </summary> + public Coscine.ApiClient.Core.Client.ISynchronousClient Client { get; set; } + + /// <summary> + /// Gets the base path of the API client. + /// </summary> + /// <value>The base path</value> + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// <summary> + /// Gets or sets the configuration object + /// </summary> + /// <value>An instance of the Configuration</value> + public Coscine.ApiClient.Core.Client.IReadableConfiguration Configuration { get; set; } + + /// <summary> + /// Provides a factory method hook for the creation of exceptions. + /// </summary> + public Coscine.ApiClient.Core.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + public void ApiV2SelfSessionLogoutPost(int operationIndex = 0) + { + ApiV2SelfSessionLogoutPostWithHttpInfo(); + } + + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<Object> ApiV2SelfSessionLogoutPostWithHttpInfo(int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SelfSessionApi.ApiV2SelfSessionLogoutPost"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post<Object>("/api/v2/self/session/logout", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2SelfSessionLogoutPost", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + public async System.Threading.Tasks.Task ApiV2SelfSessionLogoutPostAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await ApiV2SelfSessionLogoutPostWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// <summary> + /// Initiate the Log out workflow. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> ApiV2SelfSessionLogoutPostWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SelfSessionApi.ApiV2SelfSessionLogoutPost"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/api/v2/self/session/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2SelfSessionLogoutPost", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + public void ApiV2SelfSessionOptions(int operationIndex = 0) + { + ApiV2SelfSessionOptionsWithHttpInfo(); + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<Object> ApiV2SelfSessionOptionsWithHttpInfo(int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SelfSessionApi.ApiV2SelfSessionOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Options<Object>("/api/v2/self/session", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2SelfSessionOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + public async System.Threading.Tasks.Task ApiV2SelfSessionOptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await ApiV2SelfSessionOptionsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> ApiV2SelfSessionOptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SelfSessionApi.ApiV2SelfSessionOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.OptionsAsync<Object>("/api/v2/self/session", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2SelfSessionOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + public void Login(int operationIndex = 0) + { + LoginWithHttpInfo(); + } + + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<Object> LoginWithHttpInfo(int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SelfSessionApi.Login"; + 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<Object>("/api/v2/self/session", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Login", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + public async System.Threading.Tasks.Task LoginAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await LoginWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// <summary> + /// Initiate the login workflow with the default (NFDI4Ing AAI) provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> LoginWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SelfSessionApi.Login"; + 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<Object>("/api/v2/self/session", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Login", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + public void LoginWithProvider(Guid externalAuthenticatorId, int operationIndex = 0) + { + LoginWithProviderWithHttpInfo(externalAuthenticatorId); + } + + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<Object> LoginWithProviderWithHttpInfo(Guid externalAuthenticatorId, int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("externalAuthenticatorId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(externalAuthenticatorId)); // path parameter + + localVarRequestOptions.Operation = "SelfSessionApi.LoginWithProvider"; + 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<Object>("/api/v2/self/session/{externalAuthenticatorId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("LoginWithProvider", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + public async System.Threading.Tasks.Task LoginWithProviderAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await LoginWithProviderWithHttpInfoAsync(externalAuthenticatorId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// <summary> + /// Initiate the login workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> LoginWithProviderWithHttpInfoAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("externalAuthenticatorId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(externalAuthenticatorId)); // path parameter + + localVarRequestOptions.Operation = "SelfSessionApi.LoginWithProvider"; + 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<Object>("/api/v2/self/session/{externalAuthenticatorId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("LoginWithProvider", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + public void Merge(Guid externalAuthenticatorId, int operationIndex = 0) + { + MergeWithHttpInfo(externalAuthenticatorId); + } + + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<Object> MergeWithHttpInfo(Guid externalAuthenticatorId, int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("externalAuthenticatorId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(externalAuthenticatorId)); // path parameter + + localVarRequestOptions.Operation = "SelfSessionApi.Merge"; + 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<Object>("/api/v2/self/session/merge/{externalAuthenticatorId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Merge", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + public async System.Threading.Tasks.Task MergeAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await MergeWithHttpInfoAsync(externalAuthenticatorId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// <summary> + /// Initiate the merge workflow with specific provider. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="externalAuthenticatorId"></param> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> MergeWithHttpInfoAsync(Guid externalAuthenticatorId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("externalAuthenticatorId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(externalAuthenticatorId)); // path parameter + + localVarRequestOptions.Operation = "SelfSessionApi.Merge"; + 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<Object>("/api/v2/self/session/merge/{externalAuthenticatorId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Merge", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Coscine.ApiClient.Core/Api/SystemStatusApi.cs b/src/Coscine.ApiClient.Core/Api/SystemStatusApi.cs new file mode 100644 index 0000000000000000000000000000000000000000..8dd35a26c85e8e6633b447a7e9d392d2ae6baa8f --- /dev/null +++ b/src/Coscine.ApiClient.Core/Api/SystemStatusApi.cs @@ -0,0 +1,979 @@ +/* + * Coscine Web API + * + * Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project. + * + * The version of the OpenAPI document: 2.0 + * Contact: servicedesk@itc.rwth-aachen.de + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Coscine.ApiClient.Core.Client; +using Coscine.ApiClient.Core.Model; + +namespace Coscine.ApiClient.Core.Api +{ + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface ISystemStatusApiSync : IApiAccessor + { + #region Synchronous Operations + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + void ApiV2SystemStatusOptions(int operationIndex = 0); + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + ApiResponse<Object> ApiV2SystemStatusOptionsWithHttpInfo(int operationIndex = 0); + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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>MessageDtoPagedResponse</returns> + MessageDtoPagedResponse GetInternalMessages(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + ApiResponse<MessageDtoPagedResponse> GetInternalMessagesWithHttpInfo(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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>MessageDtoPagedResponse</returns> + MessageDtoPagedResponse GetNocMessages(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + ApiResponse<MessageDtoPagedResponse> GetNocMessagesWithHttpInfo(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface ISystemStatusApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + System.Threading.Tasks.Task ApiV2SystemStatusOptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + System.Threading.Tasks.Task<ApiResponse<Object>> ApiV2SystemStatusOptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + System.Threading.Tasks.Task<MessageDtoPagedResponse> GetInternalMessagesAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 (MessageDtoPagedResponse)</returns> + System.Threading.Tasks.Task<ApiResponse<MessageDtoPagedResponse>> GetInternalMessagesWithHttpInfoAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + System.Threading.Tasks.Task<MessageDtoPagedResponse> GetNocMessagesAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <remarks> + /// + /// </remarks> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 (MessageDtoPagedResponse)</returns> + System.Threading.Tasks.Task<ApiResponse<MessageDtoPagedResponse>> GetNocMessagesWithHttpInfoAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public interface ISystemStatusApi : ISystemStatusApiSync, ISystemStatusApiAsync + { + + } + + /// <summary> + /// Represents a collection of functions to interact with the API endpoints + /// </summary> + public partial class SystemStatusApi : ISystemStatusApi + { + private Coscine.ApiClient.Core.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// <summary> + /// Initializes a new instance of the <see cref="SystemStatusApi"/> class. + /// </summary> + /// <returns></returns> + public SystemStatusApi() : this((string)null) + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="SystemStatusApi"/> class. + /// </summary> + /// <returns></returns> + public SystemStatusApi(string basePath) + { + this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations( + Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance, + new Coscine.ApiClient.Core.Client.Configuration { BasePath = basePath } + ); + this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// Initializes a new instance of the <see cref="SystemStatusApi"/> class + /// using Configuration object + /// </summary> + /// <param name="configuration">An instance of Configuration</param> + /// <returns></returns> + public SystemStatusApi(Coscine.ApiClient.Core.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Coscine.ApiClient.Core.Client.Configuration.MergeConfigurations( + Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Coscine.ApiClient.Core.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// Initializes a new instance of the <see cref="SystemStatusApi"/> class + /// using a Configuration object and client instance. + /// </summary> + /// <param name="client">The client interface for synchronous API access.</param> + /// <param name="asyncClient">The client interface for asynchronous API access.</param> + /// <param name="configuration">The configuration object.</param> + public SystemStatusApi(Coscine.ApiClient.Core.Client.ISynchronousClient client, Coscine.ApiClient.Core.Client.IAsynchronousClient asyncClient, Coscine.ApiClient.Core.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Coscine.ApiClient.Core.Client.Configuration.DefaultExceptionFactory; + } + + /// <summary> + /// The client for accessing this underlying API asynchronously. + /// </summary> + public Coscine.ApiClient.Core.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// <summary> + /// The client for accessing this underlying API synchronously. + /// </summary> + public Coscine.ApiClient.Core.Client.ISynchronousClient Client { get; set; } + + /// <summary> + /// Gets the base path of the API client. + /// </summary> + /// <value>The base path</value> + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// <summary> + /// Gets or sets the configuration object + /// </summary> + /// <value>An instance of the Configuration</value> + public Coscine.ApiClient.Core.Client.IReadableConfiguration Configuration { get; set; } + + /// <summary> + /// Provides a factory method hook for the creation of exceptions. + /// </summary> + public Coscine.ApiClient.Core.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns></returns> + public void ApiV2SystemStatusOptions(int operationIndex = 0) + { + ApiV2SystemStatusOptionsWithHttpInfo(); + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <returns>ApiResponse of Object(void)</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<Object> ApiV2SystemStatusOptionsWithHttpInfo(int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SystemStatusApi.ApiV2SystemStatusOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Options<Object>("/api/v2/system/status", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2SystemStatusOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of void</returns> + public async System.Threading.Tasks.Task ApiV2SystemStatusOptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await ApiV2SystemStatusOptionsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// <summary> + /// Responds with the HTTP methods allowed for the endpoint. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="operationIndex">Index associated with the operation.</param> + /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> + /// <returns>Task of ApiResponse</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<Object>> ApiV2SystemStatusOptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Coscine.ApiClient.Core.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "SystemStatusApi.ApiV2SystemStatusOptions"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Bearer) required + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.OptionsAsync<Object>("/api/v2/system/status", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2SystemStatusOptions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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>MessageDtoPagedResponse</returns> + public MessageDtoPagedResponse GetInternalMessages(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse> localVarResponse = GetInternalMessagesWithHttpInfo(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse> GetInternalMessagesWithHttpInfo(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), 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 (startDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateAfter", startDateAfter)); + } + if (startDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateBefore", startDateBefore)); + } + if (endDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateAfter", endDateAfter)); + } + if (endDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateBefore", endDateBefore)); + } + if (type != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Type", type)); + } + if (searchTerm != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "SearchTerm", searchTerm)); + } + 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 = "SystemStatusApi.GetInternalMessages"; + 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<MessageDtoPagedResponse>("/api/v2/system/status/internal", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInternalMessages", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + public async System.Threading.Tasks.Task<MessageDtoPagedResponse> GetInternalMessagesAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse> localVarResponse = await GetInternalMessagesWithHttpInfoAsync(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves the internal messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 (MessageDtoPagedResponse)</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse>> GetInternalMessagesWithHttpInfoAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.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 (startDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateAfter", startDateAfter)); + } + if (startDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateBefore", startDateBefore)); + } + if (endDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateAfter", endDateAfter)); + } + if (endDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateBefore", endDateBefore)); + } + if (type != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Type", type)); + } + if (searchTerm != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "SearchTerm", searchTerm)); + } + 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 = "SystemStatusApi.GetInternalMessages"; + 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<MessageDtoPagedResponse>("/api/v2/system/status/internal", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetInternalMessages", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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>MessageDtoPagedResponse</returns> + public MessageDtoPagedResponse GetNocMessages(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0) + { + Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse> localVarResponse = GetNocMessagesWithHttpInfo(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + public Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse> GetNocMessagesWithHttpInfo(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), 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 (startDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateAfter", startDateAfter)); + } + if (startDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateBefore", startDateBefore)); + } + if (endDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateAfter", endDateAfter)); + } + if (endDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateBefore", endDateBefore)); + } + if (type != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Type", type)); + } + if (searchTerm != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "SearchTerm", searchTerm)); + } + 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 = "SystemStatusApi.GetNocMessages"; + 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<MessageDtoPagedResponse>("/api/v2/system/status/noc", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNocMessages", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 MessageDtoPagedResponse</returns> + public async System.Threading.Tasks.Task<MessageDtoPagedResponse> GetNocMessagesAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse> localVarResponse = await GetNocMessagesWithHttpInfoAsync(startDateAfter, startDateBefore, endDateAfter, endDateBefore, type, searchTerm, pageNumber, pageSize, orderBy, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// <summary> + /// Retrieves the NOC messages. + /// </summary> + /// <exception cref="Coscine.ApiClient.Core.Client.ApiException">Thrown when fails to make API call</exception> + /// <param name="startDateAfter">Will only return messages that have their start date after this date. (optional)</param> + /// <param name="startDateBefore">Will only return messages that have their start date before this date. (optional)</param> + /// <param name="endDateAfter">Will only return messages that have their end date after this date. (optional)</param> + /// <param name="endDateBefore">Will only return messages that have their end date before this date. (optional)</param> + /// <param name="type">Filter messages by their type (e.g. information, warning, error). (optional)</param> + /// <param name="searchTerm">Filter messages by text contained in the messages or title. (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 (MessageDtoPagedResponse)</returns> + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MessageDtoPagedResponse>> GetNocMessagesWithHttpInfoAsync(DateTime? startDateAfter = default(DateTime?), DateTime? startDateBefore = default(DateTime?), DateTime? endDateAfter = default(DateTime?), DateTime? endDateBefore = default(DateTime?), MessageType? type = default(MessageType?), string? searchTerm = default(string?), int? pageNumber = default(int?), int? pageSize = default(int?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Coscine.ApiClient.Core.Client.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 (startDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateAfter", startDateAfter)); + } + if (startDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "StartDateBefore", startDateBefore)); + } + if (endDateAfter != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateAfter", endDateAfter)); + } + if (endDateBefore != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "EndDateBefore", endDateBefore)); + } + if (type != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Type", type)); + } + if (searchTerm != null) + { + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "SearchTerm", searchTerm)); + } + 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 = "SystemStatusApi.GetNocMessages"; + 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<MessageDtoPagedResponse>("/api/v2/system/status/noc", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNocMessages", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj index b72a0f4425f5e912b54c287d2c5f4b07e432464e..d95edf2ca80568e9c968c8ce97ff606524cee21e 100644 --- a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj +++ b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj @@ -12,7 +12,7 @@ <Description>A library generated from a OpenAPI doc</Description> <Copyright>No Copyright</Copyright> <RootNamespace>Coscine.ApiClient.Core</RootNamespace> - <Version>1.9.1</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/MessageDto.cs b/src/Coscine.ApiClient.Core/Model/MessageDto.cs new file mode 100644 index 0000000000000000000000000000000000000000..35006fa7e2d9b62c18db08b6d2a887058cf327e9 --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/MessageDto.cs @@ -0,0 +1,143 @@ +/* + * 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> + /// MessageDto + /// </summary> + [DataContract(Name = "MessageDto")] + public partial class MessageDto : IValidatableObject + { + + /// <summary> + /// Gets or Sets Type + /// </summary> + [DataMember(Name = "type", EmitDefaultValue = false)] + public MessageType? Type { get; set; } + /// <summary> + /// Initializes a new instance of the <see cref="MessageDto" /> class. + /// </summary> + /// <param name="id">ID of the message..</param> + /// <param name="body">Message body in multiple languages as key-value pairs. The key is the ISO 639-1 Alpha-2 two-letter language code, and the value is the message in that language..</param> + /// <param name="type">type.</param> + /// <param name="title">Title of the message..</param> + /// <param name="href">URL related to the message..</param> + /// <param name="startDate">Start date of the message..</param> + /// <param name="endDate">End date of the message..</param> + public MessageDto(string id = default(string), Dictionary<string, string> body = default(Dictionary<string, string>), MessageType? type = default(MessageType?), string title = default(string), string href = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?)) + { + this.Id = id; + this.Body = body; + this.Type = type; + this.Title = title; + this.Href = href; + this.StartDate = startDate; + this.EndDate = endDate; + } + + /// <summary> + /// ID of the message. + /// </summary> + /// <value>ID of the message.</value> + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// <summary> + /// Message body in multiple languages as key-value pairs. The key is the ISO 639-1 Alpha-2 two-letter language code, and the value is the message in that language. + /// </summary> + /// <value>Message body in multiple languages as key-value pairs. The key is the ISO 639-1 Alpha-2 two-letter language code, and the value is the message in that language.</value> + [DataMember(Name = "body", EmitDefaultValue = true)] + public Dictionary<string, string> Body { get; set; } + + /// <summary> + /// Title of the message. + /// </summary> + /// <value>Title of the message.</value> + [DataMember(Name = "title", EmitDefaultValue = true)] + public string Title { get; set; } + + /// <summary> + /// URL related to the message. + /// </summary> + /// <value>URL related to the message.</value> + [DataMember(Name = "href", EmitDefaultValue = true)] + public string Href { get; set; } + + /// <summary> + /// Start date of the message. + /// </summary> + /// <value>Start date of the message.</value> + [DataMember(Name = "startDate", EmitDefaultValue = true)] + public DateTime? StartDate { get; set; } + + /// <summary> + /// End date of the message. + /// </summary> + /// <value>End date of the message.</value> + [DataMember(Name = "endDate", EmitDefaultValue = true)] + public DateTime? EndDate { 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 MessageDto {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" StartDate: ").Append(StartDate).Append("\n"); + sb.Append(" EndDate: ").Append(EndDate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// <summary> + /// Returns the JSON string presentation of the object + /// </summary> + /// <returns>JSON string presentation of the object</returns> + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// <summary> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/MessageDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/MessageDtoPagedResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..46a91a6aff8f67326b82131274e190f28a87fa9e --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/MessageDtoPagedResponse.cs @@ -0,0 +1,125 @@ +/* + * 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> + /// MessageDtoPagedResponse + /// </summary> + [DataContract(Name = "MessageDtoPagedResponse")] + public partial class MessageDtoPagedResponse : IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="MessageDtoPagedResponse" /> class. + /// </summary> + /// <param name="data">data.</param> + /// <param name="statusCode">statusCode.</param> + /// <param name="traceId">traceId.</param> + /// <param name="pagination">pagination.</param> + public MessageDtoPagedResponse(List<MessageDto> data = default(List<MessageDto>), 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<MessageDto> 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 MessageDtoPagedResponse {\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> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/MessageType.cs b/src/Coscine.ApiClient.Core/Model/MessageType.cs new file mode 100644 index 0000000000000000000000000000000000000000..20a9fc84e2fc10e7b4f0d0661ed6f8185706097c --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/MessageType.cs @@ -0,0 +1,97 @@ +/* + * 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> + /// Defines the various types of messages. + /// </summary> + /// <value>Defines the various types of messages.</value> + [JsonConverter(typeof(StringEnumConverter))] + public enum MessageType + { + /// <summary> + /// Enum Disturbance for value: Disturbance + /// </summary> + [EnumMember(Value = "Disturbance")] + Disturbance = 1, + + /// <summary> + /// Enum PartialDisturbance for value: PartialDisturbance + /// </summary> + [EnumMember(Value = "PartialDisturbance")] + PartialDisturbance = 2, + + /// <summary> + /// Enum Maintenance for value: Maintenance + /// </summary> + [EnumMember(Value = "Maintenance")] + Maintenance = 3, + + /// <summary> + /// Enum PartialMaintenance for value: PartialMaintenance + /// </summary> + [EnumMember(Value = "PartialMaintenance")] + PartialMaintenance = 4, + + /// <summary> + /// Enum LimitedOperation for value: LimitedOperation + /// </summary> + [EnumMember(Value = "LimitedOperation")] + LimitedOperation = 5, + + /// <summary> + /// Enum Interruption for value: Interruption + /// </summary> + [EnumMember(Value = "Interruption")] + Interruption = 6, + + /// <summary> + /// Enum Change for value: Change + /// </summary> + [EnumMember(Value = "Change")] + Change = 7, + + /// <summary> + /// Enum Hint for value: Hint + /// </summary> + [EnumMember(Value = "Hint")] + Hint = 8, + + /// <summary> + /// Enum Warning for value: Warning + /// </summary> + [EnumMember(Value = "Warning")] + Warning = 9, + + /// <summary> + /// Enum Information for value: Information + /// </summary> + [EnumMember(Value = "Information")] + Information = 10 + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs b/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs index dff1af9ab1aea01c2c9958bf02fc813ce38b204a..b9c370bba2f4072580af90d2564af406ffe75086 100644 --- a/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs @@ -42,7 +42,8 @@ namespace Coscine.ApiClient.Core.Model /// </summary> /// <param name="displayName">The data publication service's display name. (required).</param> /// <param name="email">The data publication service's email address. (required).</param> - public PublicationAdvisoryServiceDto(string displayName = default(string), string email = default(string)) + /// <param name="text">The data publication service's info text..</param> + public PublicationAdvisoryServiceDto(string displayName = default(string), string email = default(string), string text = default(string)) { // to ensure "displayName" is required (not null) if (displayName == null) @@ -56,6 +57,7 @@ namespace Coscine.ApiClient.Core.Model throw new ArgumentNullException("email is a required property for PublicationAdvisoryServiceDto and cannot be null"); } this.Email = email; + this.Text = text; } /// <summary> @@ -72,6 +74,13 @@ namespace Coscine.ApiClient.Core.Model [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = true)] public string Email { get; set; } + /// <summary> + /// The data publication service's info text. + /// </summary> + /// <value>The data publication service's info text.</value> + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + /// <summary> /// Returns the string presentation of the object /// </summary> @@ -82,6 +91,7 @@ namespace Coscine.ApiClient.Core.Model sb.Append("class PublicationAdvisoryServiceDto {\n"); sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs new file mode 100644 index 0000000000000000000000000000000000000000..3f7e13507fde1e2677828ba1ed7375bb3fda3a8d --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs @@ -0,0 +1,125 @@ +/* + * 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> + /// Data transfer object (DTO) representing the creation of a publication request. + /// </summary> + [DataContract(Name = "PublicationRequestForCreationDto")] + public partial class PublicationRequestForCreationDto : IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="PublicationRequestForCreationDto" /> class. + /// </summary> + [JsonConstructorAttribute] + protected PublicationRequestForCreationDto() { } + /// <summary> + /// Initializes a new instance of the <see cref="PublicationRequestForCreationDto" /> class. + /// </summary> + /// <param name="dataPublicationServiceRorId">The data publication service's ror id. (required).</param> + /// <param name="resourceIds">The resource guids. (required).</param> + /// <param name="message">A message of the requester..</param> + public PublicationRequestForCreationDto(string dataPublicationServiceRorId = default(string), List<Guid> resourceIds = default(List<Guid>), string message = default(string)) + { + // to ensure "dataPublicationServiceRorId" is required (not null) + if (dataPublicationServiceRorId == null) + { + throw new ArgumentNullException("dataPublicationServiceRorId is a required property for PublicationRequestForCreationDto and cannot be null"); + } + this.DataPublicationServiceRorId = dataPublicationServiceRorId; + // to ensure "resourceIds" is required (not null) + if (resourceIds == null) + { + throw new ArgumentNullException("resourceIds is a required property for PublicationRequestForCreationDto and cannot be null"); + } + this.ResourceIds = resourceIds; + this.Message = message; + } + + /// <summary> + /// The data publication service's ror id. + /// </summary> + /// <value>The data publication service's ror id.</value> + [DataMember(Name = "dataPublicationServiceRorId", IsRequired = true, EmitDefaultValue = true)] + public string DataPublicationServiceRorId { get; set; } + + /// <summary> + /// The resource guids. + /// </summary> + /// <value>The resource guids.</value> + [DataMember(Name = "resourceIds", IsRequired = true, EmitDefaultValue = true)] + public List<Guid> ResourceIds { get; set; } + + /// <summary> + /// A message of the requester. + /// </summary> + /// <value>A message of the requester.</value> + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { 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 PublicationRequestForCreationDto {\n"); + sb.Append(" DataPublicationServiceRorId: ").Append(DataPublicationServiceRorId).Append("\n"); + sb.Append(" ResourceIds: ").Append(ResourceIds).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// <summary> + /// Returns the JSON string presentation of the object + /// </summary> + /// <returns>JSON string presentation of the object</returns> + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// <summary> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + // DataPublicationServiceRorId (string) minLength + if (this.DataPublicationServiceRorId != null && this.DataPublicationServiceRorId.Length < 1) + { + yield return new ValidationResult("Invalid value for DataPublicationServiceRorId, length must be greater than 1.", new [] { "DataPublicationServiceRorId" }); + } + + yield break; + } + } + +} diff --git a/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDtoResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..32b40512bb2eaa0c4e5fc7697bf39543d6ed9261 --- /dev/null +++ b/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDtoResponse.cs @@ -0,0 +1,116 @@ +/* + * Coscine Web API + * + * Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project. + * + * The version of the OpenAPI document: 2.0 + * Contact: servicedesk@itc.rwth-aachen.de + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Coscine.ApiClient.Core.Client.OpenAPIDateConverter; + +namespace Coscine.ApiClient.Core.Model +{ + /// <summary> + /// PublicationRequestForCreationDtoResponse + /// </summary> + [DataContract(Name = "PublicationRequestForCreationDtoResponse")] + public partial class PublicationRequestForCreationDtoResponse : IValidatableObject + { + /// <summary> + /// Initializes a new instance of the <see cref="PublicationRequestForCreationDtoResponse" /> class. + /// </summary> + /// <param name="data">data.</param> + /// <param name="statusCode">statusCode.</param> + /// <param name="traceId">traceId.</param> + public PublicationRequestForCreationDtoResponse(PublicationRequestForCreationDto data = default(PublicationRequestForCreationDto), int? statusCode = default(int?), string traceId = default(string)) + { + this.Data = data; + this.StatusCode = statusCode; + this.TraceId = traceId; + } + + /// <summary> + /// Gets or Sets Data + /// </summary> + [DataMember(Name = "data", EmitDefaultValue = false)] + public PublicationRequestForCreationDto Data { get; set; } + + /// <summary> + /// Gets or Sets IsSuccess + /// </summary> + [DataMember(Name = "isSuccess", EmitDefaultValue = true)] + public bool IsSuccess { get; private set; } + + /// <summary> + /// Returns false as IsSuccess should not be serialized given that it's read-only. + /// </summary> + /// <returns>false (boolean)</returns> + public bool ShouldSerializeIsSuccess() + { + return false; + } + /// <summary> + /// Gets or Sets StatusCode + /// </summary> + [DataMember(Name = "statusCode", EmitDefaultValue = true)] + public int? StatusCode { get; set; } + + /// <summary> + /// Gets or Sets TraceId + /// </summary> + [DataMember(Name = "traceId", EmitDefaultValue = true)] + public string TraceId { get; set; } + + /// <summary> + /// Returns the string presentation of the object + /// </summary> + /// <returns>String presentation of the object</returns> + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PublicationRequestForCreationDtoResponse {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" IsSuccess: ").Append(IsSuccess).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" TraceId: ").Append(TraceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// <summary> + /// Returns the JSON string presentation of the object + /// </summary> + /// <returns>JSON string presentation of the object</returns> + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// <summary> + /// To validate all properties of the instance + /// </summary> + /// <param name="validationContext">Validation context</param> + /// <returns>Validation Result</returns> + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +}