diff --git a/README.md b/README.md index bf13483a46811cf8e8d5d8e2499c20a75f561275..2ffc1bbce3a43f8aa911878daf5c274718fa8742 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap - API version: 2.0 - SDK version: 1.0.0 +- Generator version: 7.8.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.CSharpClientCodegen <a id="frameworks-supported"></a> @@ -84,7 +85,7 @@ namespace Example { Configuration config = new Configuration(); - config.BasePath = "http://localhost:7206/coscine"; + config.BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; // Configure API key authorization: Bearer config.ApiKey.Add("Authorization", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -112,7 +113,7 @@ namespace Example <a id="documentation-for-api-endpoints"></a> ## Documentation for API Endpoints -All URIs are relative to *http://localhost:7206/coscine* +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -173,8 +174,6 @@ 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. @@ -351,8 +350,6 @@ 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/AcceptedLanguage.md b/docs/AcceptedLanguage.md new file mode 100644 index 0000000000000000000000000000000000000000..2c2f5fa1810aea79fc3a8d03b6fe8dfdceab04d2 --- /dev/null +++ b/docs/AcceptedLanguage.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.AcceptedLanguage +Accepted languages by the API. + +## 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/ActivityLogDto.md b/docs/ActivityLogDto.md new file mode 100644 index 0000000000000000000000000000000000000000..708a34f08b64dc3d1162ef8cedcca9f22dd777a0 --- /dev/null +++ b/docs/ActivityLogDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.ActivityLogDto +Represents a data transfer object (DTO) for an activity log. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | | [optional] +**ApiPath** | **string** | | [optional] +**HttpAction** | **string** | | [optional] +**ControllerName** | **string** | | [optional] +**ActionName** | **string** | | [optional] +**UserId** | **Guid** | | [optional] +**ActivityTimestamp** | **DateTime** | | [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/ActivityLogDtoPagedResponse.md b/docs/ActivityLogDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..a134ca85f8942fec8e371bbcafcbec5773c2cb0f --- /dev/null +++ b/docs/ActivityLogDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ActivityLogDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ActivityLogDto>**](ActivityLogDto.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/AdminApi.md b/docs/AdminApi.md new file mode 100644 index 0000000000000000000000000000000000000000..94616bbb6921520bf811b048861c755138db266b --- /dev/null +++ b/docs/AdminApi.md @@ -0,0 +1,918 @@ +# Coscine.ApiClient.Core.Api.AdminApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2AdminOptions**](AdminApi.md#apiv2adminoptions) | **OPTIONS** /api/v2/admin | Responds with the HTTP methods allowed for the endpoint. | +| [**GetAllActivityLogs**](AdminApi.md#getallactivitylogs) | **GET** /api/v2/admin/activity-logs | Retrieves all activity logs. | +| [**GetAllProjects**](AdminApi.md#getallprojects) | **GET** /api/v2/admin/projects | Retrieves all projects. | +| [**GetAllResources**](AdminApi.md#getallresources) | **GET** /api/v2/admin/resources | Retrieves all resources. | +| [**GetAllUsers**](AdminApi.md#getallusers) | **GET** /api/v2/admin/users | Retrieves all users. | +| [**GetDeployedGraphs**](AdminApi.md#getdeployedgraphs) | **GET** /api/v2/admin/graphs | Gets all deployed graphs. | +| [**GetMetadataGraph**](AdminApi.md#getmetadatagraph) | **GET** /api/v2/admin/metadata/{graph} | Gets a metadata graph. | +| [**PatchMetadata**](AdminApi.md#patchmetadata) | **PATCH** /api/v2/admin/metadata/{graph} | Patches a metadata graph. | +| [**UpdateMetadataGraph**](AdminApi.md#updatemetadatagraph) | **PUT** /api/v2/admin/metadata/{graph} | Updates a metadata graph. | + +<a id="apiv2adminoptions"></a> +# **ApiV2AdminOptions** +> void ApiV2AdminOptions () + +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 ApiV2AdminOptionsExample + { + 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 AdminApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2AdminOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.ApiV2AdminOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2AdminOptionsWithHttpInfo 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.ApiV2AdminOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AdminApi.ApiV2AdminOptionsWithHttpInfo: " + 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="getallactivitylogs"></a> +# **GetAllActivityLogs** +> ActivityLogDtoPagedResponse GetAllActivityLogs (DateTime? activityTimestampBefore = null, DateTime? activityTimestampAfter = null, Guid? guid = null, Guid? userId = null, string? regularExpression = null, CoscineHttpMethod? httpMethod = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all activity logs. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 GetAllActivityLogsExample + { + 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 AdminApi(config); + var activityTimestampBefore = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | The activity timestamp date before which activity logs should be retrieved. (optional) + var activityTimestampAfter = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | The activity timestamp date after which activity logs should be retrieved. (optional) + var guid = "guid_example"; // Guid? | The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. (optional) + var userId = "userId_example"; // Guid? | The user ID for which activity logs should be retrieved. (optional) + var regularExpression = "regularExpression_example"; // string? | The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. (optional) + var httpMethod = new CoscineHttpMethod?(); // CoscineHttpMethod? | The http method to filter activity logs by. (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 all activity logs. + ActivityLogDtoPagedResponse result = apiInstance.GetAllActivityLogs(activityTimestampBefore, activityTimestampAfter, guid, userId, regularExpression, httpMethod, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.GetAllActivityLogs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllActivityLogsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all activity logs. + ApiResponse<ActivityLogDtoPagedResponse> response = apiInstance.GetAllActivityLogsWithHttpInfo(activityTimestampBefore, activityTimestampAfter, guid, userId, regularExpression, httpMethod, 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 AdminApi.GetAllActivityLogsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **activityTimestampBefore** | **DateTime?** | The activity timestamp date before which activity logs should be retrieved. | [optional] | +| **activityTimestampAfter** | **DateTime?** | The activity timestamp date after which activity logs should be retrieved. | [optional] | +| **guid** | **Guid?** | The GUID for which activity logs should be retrieved. Can be a project, resource or other ID. | [optional] | +| **userId** | **Guid?** | The user ID for which activity logs should be retrieved. | [optional] | +| **regularExpression** | **string?** | The regular expression to filter activity logs' API path by. The regex must be a valid, already escaped string. | [optional] | +| **httpMethod** | [**CoscineHttpMethod?**](CoscineHttpMethod?.md) | The http method to filter activity logs by. | [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 + +[**ActivityLogDtoPagedResponse**](ActivityLogDtoPagedResponse.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 activity logs. | - | + +[[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="getallprojects"></a> +# **GetAllProjects** +> ProjectAdminDtoPagedResponse GetAllProjects (bool? topLevel = null, bool? includeDeleted = null, bool? includeQuotas = null, int? pageSize = null, int? pageNumber = null, string? orderBy = null) + +Retrieves all projects. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 GetAllProjectsExample + { + 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 AdminApi(config); + var topLevel = true; // bool? | Gets or sets a value indicating whether to filter top-level projects. (optional) + var includeDeleted = true; // bool? | Gets or sets a value indicating whether to include deleted projects in the results. (optional) + var includeQuotas = true; // bool? | Gets or sets a value indicating whether to include quotas in the results. (optional) + var pageSize = 56; // int? | Number of items per page. The maximum number of items per page is `250`. (optional) + var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) + var orderBy = "orderBy_example"; // string? | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional) + + try + { + // Retrieves all projects. + ProjectAdminDtoPagedResponse result = apiInstance.GetAllProjects(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.GetAllProjects: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllProjectsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all projects. + ApiResponse<ProjectAdminDtoPagedResponse> response = apiInstance.GetAllProjectsWithHttpInfo(topLevel, includeDeleted, includeQuotas, pageSize, pageNumber, 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 AdminApi.GetAllProjectsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **topLevel** | **bool?** | Gets or sets a value indicating whether to filter top-level projects. | [optional] | +| **includeDeleted** | **bool?** | Gets or sets a value indicating whether to include deleted projects in the results. | [optional] | +| **includeQuotas** | **bool?** | Gets or sets a value indicating whether to include quotas in the results. | [optional] | +| **pageSize** | **int?** | Number of items per page. The maximum number of items per page is `250`. | [optional] | +| **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | +| **orderBy** | **string?** | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. | [optional] | + +### Return type + +[**ProjectAdminDtoPagedResponse**](ProjectAdminDtoPagedResponse.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 projects. | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | + +[[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="getallresources"></a> +# **GetAllResources** +> ResourceAdminDtoPagedResponse GetAllResources (bool? includeDeleted = null, bool? includeQuotas = null, int? pageSize = null, int? pageNumber = null, string? orderBy = null) + +Retrieves all resources. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 GetAllResourcesExample + { + 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 AdminApi(config); + var includeDeleted = true; // bool? | Value indicating whether to include deleted resources. (optional) + var includeQuotas = true; // bool? | Value indicating whether to include individual resource quotas. (optional) + var pageSize = 56; // int? | Number of items per page. The maximum number of items per page is `250`. (optional) + var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) + var orderBy = "orderBy_example"; // string? | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional) + + try + { + // Retrieves all resources. + ResourceAdminDtoPagedResponse result = apiInstance.GetAllResources(includeDeleted, includeQuotas, pageSize, pageNumber, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.GetAllResources: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllResourcesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all resources. + ApiResponse<ResourceAdminDtoPagedResponse> response = apiInstance.GetAllResourcesWithHttpInfo(includeDeleted, includeQuotas, pageSize, pageNumber, 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 AdminApi.GetAllResourcesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **includeDeleted** | **bool?** | Value indicating whether to include deleted resources. | [optional] | +| **includeQuotas** | **bool?** | Value indicating whether to include individual resource quotas. | [optional] | +| **pageSize** | **int?** | Number of items per page. The maximum number of items per page is `250`. | [optional] | +| **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | +| **orderBy** | **string?** | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. | [optional] | + +### Return type + +[**ResourceAdminDtoPagedResponse**](ResourceAdminDtoPagedResponse.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 resources. | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | + +[[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="getallusers"></a> +# **GetAllUsers** +> UserDtoPagedResponse GetAllUsers (bool? tosAccepted = null, int? pageSize = null, int? pageNumber = null, string? orderBy = null) + +Retrieves all users. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 GetAllUsersExample + { + 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 AdminApi(config); + var tosAccepted = true; // bool? | Gets or sets a value indicating whether the terms of service have been accepted by the user. (optional) + var pageSize = 56; // int? | Number of items per page. The maximum number of items per page is `250`. (optional) + var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) + var orderBy = "orderBy_example"; // string? | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional) + + try + { + // Retrieves all users. + UserDtoPagedResponse result = apiInstance.GetAllUsers(tosAccepted, pageSize, pageNumber, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.GetAllUsers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllUsersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all users. + ApiResponse<UserDtoPagedResponse> response = apiInstance.GetAllUsersWithHttpInfo(tosAccepted, pageSize, pageNumber, 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 AdminApi.GetAllUsersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **tosAccepted** | **bool?** | Gets or sets a value indicating whether the terms of service have been accepted by the user. | [optional] | +| **pageSize** | **int?** | Number of items per page. The maximum number of items per page is `250`. | [optional] | +| **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | +| **orderBy** | **string?** | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. | [optional] | + +### Return type + +[**UserDtoPagedResponse**](UserDtoPagedResponse.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 users. | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | + +[[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="getdeployedgraphs"></a> +# **GetDeployedGraphs** +> DeployedGraphDtoPagedResponse GetDeployedGraphs (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Gets all deployed graphs. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 GetDeployedGraphsExample + { + 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 AdminApi(config); + 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 + { + // Gets all deployed graphs. + DeployedGraphDtoPagedResponse result = apiInstance.GetDeployedGraphs(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.GetDeployedGraphs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDeployedGraphsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Gets all deployed graphs. + ApiResponse<DeployedGraphDtoPagedResponse> response = apiInstance.GetDeployedGraphsWithHttpInfo(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 AdminApi.GetDeployedGraphsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**DeployedGraphDtoPagedResponse**](DeployedGraphDtoPagedResponse.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 metadata. | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | + +[[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="getmetadatagraph"></a> +# **GetMetadataGraph** +> RdfDefinitionDtoResponse GetMetadataGraph (string graph, RdfFormat? format = null) + +Gets a metadata graph. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 GetMetadataGraphExample + { + 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 AdminApi(config); + var graph = "graph_example"; // string | The absolute URI of the graph to get. + var format = new RdfFormat?(); // RdfFormat? | Gets or sets the RDF format. (optional) + + try + { + // Gets a metadata graph. + RdfDefinitionDtoResponse result = apiInstance.GetMetadataGraph(graph, format); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.GetMetadataGraph: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetMetadataGraphWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Gets a metadata graph. + ApiResponse<RdfDefinitionDtoResponse> response = apiInstance.GetMetadataGraphWithHttpInfo(graph, format); + 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 AdminApi.GetMetadataGraphWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **graph** | **string** | The absolute URI of the graph to get. | | +| **format** | [**RdfFormat?**](RdfFormat?.md) | Gets or sets the RDF format. | [optional] | + +### Return type + +[**RdfDefinitionDtoResponse**](RdfDefinitionDtoResponse.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 metadata. | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | + +[[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="patchmetadata"></a> +# **PatchMetadata** +> void PatchMetadata (string graph, RdfPatchDocumentDto? rdfPatchDocumentDto = null) + +Patches a metadata graph. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 PatchMetadataExample + { + 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 AdminApi(config); + var graph = "graph_example"; // string | The absolute URI of the graph to patch. + var rdfPatchDocumentDto = new RdfPatchDocumentDto?(); // RdfPatchDocumentDto? | The well-formed RDF patch document containing the changes as operations to be applied to the graph. (optional) + + try + { + // Patches a metadata graph. + apiInstance.PatchMetadata(graph, rdfPatchDocumentDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.PatchMetadata: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the PatchMetadataWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Patches a metadata graph. + apiInstance.PatchMetadataWithHttpInfo(graph, rdfPatchDocumentDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AdminApi.PatchMetadataWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **graph** | **string** | The absolute URI of the graph to patch. | | +| **rdfPatchDocumentDto** | [**RdfPatchDocumentDto?**](RdfPatchDocumentDto?.md) | The well-formed RDF patch document containing the changes as operations to be applied to the graph. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Metadata graph patched | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | + +[[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="updatemetadatagraph"></a> +# **UpdateMetadataGraph** +> void UpdateMetadataGraph (string graph, MetadataUpdateAdminParameters? metadataUpdateAdminParameters = null) + +Updates a metadata graph. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 UpdateMetadataGraphExample + { + 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 AdminApi(config); + var graph = "graph_example"; // string | The absolute URI of the graph to update. + var metadataUpdateAdminParameters = new MetadataUpdateAdminParameters?(); // MetadataUpdateAdminParameters? | The metadata update admin parameters. (optional) + + try + { + // Updates a metadata graph. + apiInstance.UpdateMetadataGraph(graph, metadataUpdateAdminParameters); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AdminApi.UpdateMetadataGraph: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateMetadataGraphWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates a metadata graph. + apiInstance.UpdateMetadataGraphWithHttpInfo(graph, metadataUpdateAdminParameters); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AdminApi.UpdateMetadataGraphWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **graph** | **string** | The absolute URI of the graph to update. | | +| **metadataUpdateAdminParameters** | [**MetadataUpdateAdminParameters?**](MetadataUpdateAdminParameters?.md) | The metadata update admin parameters. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Metadata graph updated | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | + +[[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/ApiTokenDto.md b/docs/ApiTokenDto.md new file mode 100644 index 0000000000000000000000000000000000000000..b1e37aa4500175826d684001a2c005eaaac2d8c4 --- /dev/null +++ b/docs/ApiTokenDto.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.ApiTokenDto +Represents an API token used for authentication. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the API token. | [optional] +**Name** | **string** | The name associated with the API token. | [optional] +**CreationDate** | **DateTime** | The date when the API token was created. | [optional] +**ExpiryDate** | **DateTime** | The expiry date of the API token. | [optional] +**Token** | **string** | The actual token used for authentication. | [optional] +**Owner** | [**UserMinimalDto**](UserMinimalDto.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/ApiTokenDtoPagedResponse.md b/docs/ApiTokenDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..66ec6f918f44a08dd394c62e1271edb1e2a699bb --- /dev/null +++ b/docs/ApiTokenDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ApiTokenDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ApiTokenDto>**](ApiTokenDto.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/ApiTokenDtoResponse.md b/docs/ApiTokenDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..89106d4dc4068b2c5adc7006d8908b515a5140ef --- /dev/null +++ b/docs/ApiTokenDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ApiTokenDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ApiTokenDto**](ApiTokenDto.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/ApiTokenForCreationDto.md b/docs/ApiTokenForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..6bfd0a2129a9a2a4a6bade8f24e62f151eb9ce35 --- /dev/null +++ b/docs/ApiTokenForCreationDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.ApiTokenForCreationDto +Data transfer object (DTO) representing the creation of an API token. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Gets or sets the name of the API token. | +**ExpiresInDays** | **int** | Gets or sets the expiration duration of the token in days. | + +[[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/ApplicationProfileApi.md b/docs/ApplicationProfileApi.md new file mode 100644 index 0000000000000000000000000000000000000000..f7020a57e38e5d17c81a8625d0ce675a48d9d727 --- /dev/null +++ b/docs/ApplicationProfileApi.md @@ -0,0 +1,492 @@ +# Coscine.ApiClient.Core.Api.ApplicationProfileApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ApplicationProfilesOptions**](ApplicationProfileApi.md#apiv2applicationprofilesoptions) | **OPTIONS** /api/v2/application-profiles | Responds with the HTTP methods allowed for the endpoint. | +| [**CreateApplicationProfileRequest**](ApplicationProfileApi.md#createapplicationprofilerequest) | **POST** /api/v2/application-profiles/requests | Submits a request to create a new application profile. | +| [**GetApplicationProfile**](ApplicationProfileApi.md#getapplicationprofile) | **GET** /api/v2/application-profiles/profiles/{profile} | Retrieves an application profile by its URI. | +| [**GetApplicationProfiles**](ApplicationProfileApi.md#getapplicationprofiles) | **GET** /api/v2/application-profiles/profiles | Retrieves all application profiles. | +| [**GetRawApplicationProfile**](ApplicationProfileApi.md#getrawapplicationprofile) | **GET** /api/v2/application-profiles/profiles/{profile}/raw | Retrieves the `raw` application profile definition by its URI. | + +<a id="apiv2applicationprofilesoptions"></a> +# **ApiV2ApplicationProfilesOptions** +> void ApiV2ApplicationProfilesOptions () + +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 ApiV2ApplicationProfilesOptionsExample + { + 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 ApplicationProfileApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ApplicationProfilesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ApplicationProfileApi.ApiV2ApplicationProfilesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ApplicationProfilesOptionsWithHttpInfo 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.ApiV2ApplicationProfilesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ApplicationProfileApi.ApiV2ApplicationProfilesOptionsWithHttpInfo: " + 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="createapplicationprofilerequest"></a> +# **CreateApplicationProfileRequest** +> ApplicationProfileForCreationDtoResponse CreateApplicationProfileRequest (ApplicationProfileForCreationDto? applicationProfileForCreationDto = null) + +Submits a request to create a new application profile. + +### 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 CreateApplicationProfileRequestExample + { + 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 ApplicationProfileApi(config); + var applicationProfileForCreationDto = new ApplicationProfileForCreationDto?(); // ApplicationProfileForCreationDto? | The details required to create a new application profile. (optional) + + try + { + // Submits a request to create a new application profile. + ApplicationProfileForCreationDtoResponse result = apiInstance.CreateApplicationProfileRequest(applicationProfileForCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ApplicationProfileApi.CreateApplicationProfileRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateApplicationProfileRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Submits a request to create a new application profile. + ApiResponse<ApplicationProfileForCreationDtoResponse> response = apiInstance.CreateApplicationProfileRequestWithHttpInfo(applicationProfileForCreationDto); + 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 ApplicationProfileApi.CreateApplicationProfileRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **applicationProfileForCreationDto** | [**ApplicationProfileForCreationDto?**](ApplicationProfileForCreationDto?.md) | The details required to create a new application profile. | [optional] | + +### Return type + +[**ApplicationProfileForCreationDtoResponse**](ApplicationProfileForCreationDtoResponse.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** | Application profile 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) + +<a id="getapplicationprofile"></a> +# **GetApplicationProfile** +> ApplicationProfileDtoResponse GetApplicationProfile (string profile, RdfFormat? format = null, AcceptedLanguage? acceptLanguage = null) + +Retrieves an application profile by its URI. + +### 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 GetApplicationProfileExample + { + 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 ApplicationProfileApi(config); + var profile = "profile_example"; // string | The URI of the application profile to retrieve. + var format = new RdfFormat?(); // RdfFormat? | The desired data format for the returned application profile. (optional) + var acceptLanguage = new AcceptedLanguage?(); // AcceptedLanguage? | The preferred language for the application profile data. (optional) + + try + { + // Retrieves an application profile by its URI. + ApplicationProfileDtoResponse result = apiInstance.GetApplicationProfile(profile, format, acceptLanguage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ApplicationProfileApi.GetApplicationProfile: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetApplicationProfileWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves an application profile by its URI. + ApiResponse<ApplicationProfileDtoResponse> response = apiInstance.GetApplicationProfileWithHttpInfo(profile, format, acceptLanguage); + 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 ApplicationProfileApi.GetApplicationProfileWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **profile** | **string** | The URI of the application profile to retrieve. | | +| **format** | [**RdfFormat?**](RdfFormat?.md) | The desired data format for the returned application profile. | [optional] | +| **acceptLanguage** | [**AcceptedLanguage?**](AcceptedLanguage?.md) | The preferred language for the application profile data. | [optional] | + +### Return type + +[**ApplicationProfileDtoResponse**](ApplicationProfileDtoResponse.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 application profile. | - | +| **404** | Application profile does not exist. | - | + +[[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="getapplicationprofiles"></a> +# **GetApplicationProfiles** +> ApplicationProfileDtoPagedResponse GetApplicationProfiles (string? searchTerm = null, AcceptedLanguage? language = null, bool? modules = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all application profiles. + +### 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 GetApplicationProfilesExample + { + 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 ApplicationProfileApi(config); + var searchTerm = "searchTerm_example"; // string? | Gets or sets the search term used to filter application profiles. (optional) + var language = new AcceptedLanguage?(); // AcceptedLanguage? | Gets or sets the language for which the application profiles are requested. (optional) + var modules = true; // bool? | Gets or sets a value indicating whether to include modules in the application profiles. (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 all application profiles. + ApplicationProfileDtoPagedResponse result = apiInstance.GetApplicationProfiles(searchTerm, language, modules, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ApplicationProfileApi.GetApplicationProfiles: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetApplicationProfilesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all application profiles. + ApiResponse<ApplicationProfileDtoPagedResponse> response = apiInstance.GetApplicationProfilesWithHttpInfo(searchTerm, language, modules, 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 ApplicationProfileApi.GetApplicationProfilesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **searchTerm** | **string?** | Gets or sets the search term used to filter application profiles. | [optional] | +| **language** | [**AcceptedLanguage?**](AcceptedLanguage?.md) | Gets or sets the language for which the application profiles are requested. | [optional] | +| **modules** | **bool?** | Gets or sets a value indicating whether to include modules in the application profiles. | [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 + +[**ApplicationProfileDtoPagedResponse**](ApplicationProfileDtoPagedResponse.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 application profiles. | - | + +[[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="getrawapplicationprofile"></a> +# **GetRawApplicationProfile** +> string GetRawApplicationProfile (string profile) + +Retrieves the `raw` application profile definition by its URI. + +### 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 GetRawApplicationProfileExample + { + 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 ApplicationProfileApi(config); + var profile = "profile_example"; // string | The URI of the application profile. + + try + { + // Retrieves the `raw` application profile definition by its URI. + string result = apiInstance.GetRawApplicationProfile(profile); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ApplicationProfileApi.GetRawApplicationProfile: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetRawApplicationProfileWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the `raw` application profile definition by its URI. + ApiResponse<string> response = apiInstance.GetRawApplicationProfileWithHttpInfo(profile); + 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 ApplicationProfileApi.GetRawApplicationProfileWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **profile** | **string** | The URI of the application profile. | | + +### Return type + +**string** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/turtle, application/ld+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns the raw application profile. | - | +| **404** | Application profile does not exist. | - | + +[[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/ApplicationProfileDto.md b/docs/ApplicationProfileDto.md new file mode 100644 index 0000000000000000000000000000000000000000..0005a75c01ab348040d70810fd9fdc9ad0e40663 --- /dev/null +++ b/docs/ApplicationProfileDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ApplicationProfileDto +Represents an application profile data transfer object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | The URI associated with the application profile. | [optional] +**DisplayName** | **string** | The display name for the application profile. | [optional] +**Description** | **string** | The description of the application profile. | [optional] +**Definition** | [**RdfDefinitionDto**](RdfDefinitionDto.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/ApplicationProfileDtoPagedResponse.md b/docs/ApplicationProfileDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..0bc45e8a341b4058130fe7805acf3f0750bfa766 --- /dev/null +++ b/docs/ApplicationProfileDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ApplicationProfileDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ApplicationProfileDto>**](ApplicationProfileDto.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/ApplicationProfileDtoResponse.md b/docs/ApplicationProfileDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..f775c270d4ef884de7c0704f64735b0a3bac9f18 --- /dev/null +++ b/docs/ApplicationProfileDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ApplicationProfileDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ApplicationProfileDto**](ApplicationProfileDto.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/ApplicationProfileForCreationDto.md b/docs/ApplicationProfileForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..fc38b85c0a7b3ea879814394bb249ef7a2acf41b --- /dev/null +++ b/docs/ApplicationProfileForCreationDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ApplicationProfileForCreationDto +Data transfer object (DTO) representing the creation of an application profile. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Gets or initializes the name of the application profile. | +**Uri** | **string** | Gets or initializes the URI of the application profile. | +**Definition** | [**RdfDefinitionForManipulationDto**](RdfDefinitionForManipulationDto.md) | | + +[[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/ApplicationProfileForCreationDtoResponse.md b/docs/ApplicationProfileForCreationDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..cd9fc1e896d547e1d3d5b91ee9e5ddfd0da3b232 --- /dev/null +++ b/docs/ApplicationProfileForCreationDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ApplicationProfileForCreationDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ApplicationProfileForCreationDto**](ApplicationProfileForCreationDto.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/ApplicationProfileForResourceCreationDto.md b/docs/ApplicationProfileForResourceCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..78b132563f57520719e9483e6c2686ab3ef23310 --- /dev/null +++ b/docs/ApplicationProfileForResourceCreationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ApplicationProfileForResourceCreationDto +Data transfer object (DTO) representing the creation of an application profile for a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | Gets or initializes the URI of the resource for the application profile. | + +[[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/ApplicationProfileMinimalDto.md b/docs/ApplicationProfileMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..42775e29a108bc5b7499d8cd4c8aadac75310856 --- /dev/null +++ b/docs/ApplicationProfileMinimalDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ApplicationProfileMinimalDto +Represents a minimalistic application profile data transfer object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | The URI associated with the application profile. | [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/BlobApi.md b/docs/BlobApi.md new file mode 100644 index 0000000000000000000000000000000000000000..35e4fb80a325e82cb97da0534402afc0c3d017a1 --- /dev/null +++ b/docs/BlobApi.md @@ -0,0 +1,494 @@ +# Coscine.ApiClient.Core.Api.BlobApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptions**](BlobApi.md#apiv2projectsprojectidresourcesresourceidblobsoptions) | **OPTIONS** /api/v2/projects/{projectId}/resources/{resourceId}/blobs | Responds with the HTTP methods allowed for the endpoint. | +| [**CreateBlob**](BlobApi.md#createblob) | **POST** /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} | Creates a new blob for a resource. | +| [**DeleteBlob**](BlobApi.md#deleteblob) | **DELETE** /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} | Deletes a blob from a resource. | +| [**GetBlob**](BlobApi.md#getblob) | **GET** /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} | Download a blob from a resource. | +| [**UpdateBlob**](BlobApi.md#updateblob) | **PUT** /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} | Updates an existing blob of a resource. | + +<a id="apiv2projectsprojectidresourcesresourceidblobsoptions"></a> +# **ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptions** +> void ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptions (string projectId, string resourceId) + +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 ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptionsExample + { + 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 BlobApi(config); + var projectId = "projectId_example"; // string | + var resourceId = "resourceId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptions(projectId, resourceId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BlobApi.ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptionsWithHttpInfo(projectId, resourceId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BlobApi.ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | | | +| **resourceId** | **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="createblob"></a> +# **CreateBlob** +> void CreateBlob (string projectId, Guid resourceId, string key, System.IO.Stream? file = null) + +Creates a new blob for a resource. + +### 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 CreateBlobExample + { + 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 BlobApi(config); + var projectId = "projectId_example"; // string | The identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The identifier of the resource. + var key = "key_example"; // string | The key for the new blob. + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | (optional) + + try + { + // Creates a new blob for a resource. + apiInstance.CreateBlob(projectId, resourceId, key, file); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BlobApi.CreateBlob: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateBlobWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a new blob for a resource. + apiInstance.CreateBlobWithHttpInfo(projectId, resourceId, key, file); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BlobApi.CreateBlobWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The identifier or slug of the project. | | +| **resourceId** | **Guid** | The identifier of the resource. | | +| **key** | **string** | The key for the new blob. | | +| **file** | **System.IO.Stream?****System.IO.Stream?** | | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Blob created. | - | +| **400** | Blob already exists. | - | +| **415** | Blob is not of the type \"multipart/form-data\" | - | + +[[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="deleteblob"></a> +# **DeleteBlob** +> void DeleteBlob (string projectId, Guid resourceId, string key) + +Deletes a blob from a resource. + +### 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 DeleteBlobExample + { + 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 BlobApi(config); + var projectId = "projectId_example"; // string | The identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The identifier of the resource. + var key = "key_example"; // string | The key associated with the blob to delete. + + try + { + // Deletes a blob from a resource. + apiInstance.DeleteBlob(projectId, resourceId, key); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BlobApi.DeleteBlob: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteBlobWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Deletes a blob from a resource. + apiInstance.DeleteBlobWithHttpInfo(projectId, resourceId, key); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BlobApi.DeleteBlobWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The identifier or slug of the project. | | +| **resourceId** | **Guid** | The identifier of the resource. | | +| **key** | **string** | The key associated with the blob to delete. | | + +### 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 | +|-------------|-------------|------------------| +| **204** | Blob deleted. | - | +| **404** | Blob does not exist. | - | + +[[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="getblob"></a> +# **GetBlob** +> System.IO.Stream GetBlob (string projectId, Guid resourceId, string key) + +Download a blob from a resource. + +### 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 GetBlobExample + { + 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 BlobApi(config); + var projectId = "projectId_example"; // string | The identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The identifier of the resource. + var key = "key_example"; // string | The key associated with the blob. + + try + { + // Download a blob from a resource. + System.IO.Stream result = apiInstance.GetBlob(projectId, resourceId, key); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BlobApi.GetBlob: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetBlobWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Download a blob from a resource. + ApiResponse<System.IO.Stream> response = apiInstance.GetBlobWithHttpInfo(projectId, resourceId, key); + 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 BlobApi.GetBlobWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The identifier or slug of the project. | | +| **resourceId** | **Guid** | The identifier of the resource. | | +| **key** | **string** | The key associated with the blob. | | + +### Return type + +**System.IO.Stream** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns the blob. | - | +| **404** | Blob does not exist. | - | + +[[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="updateblob"></a> +# **UpdateBlob** +> void UpdateBlob (string projectId, Guid resourceId, string key, System.IO.Stream? file = null) + +Updates an existing blob of a resource. + +### 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 UpdateBlobExample + { + 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 BlobApi(config); + var projectId = "projectId_example"; // string | The identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The identifier of the resource. + var key = "key_example"; // string | The key associated with the blob to update. + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | (optional) + + try + { + // Updates an existing blob of a resource. + apiInstance.UpdateBlob(projectId, resourceId, key, file); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BlobApi.UpdateBlob: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateBlobWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates an existing blob of a resource. + apiInstance.UpdateBlobWithHttpInfo(projectId, resourceId, key, file); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BlobApi.UpdateBlobWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The identifier or slug of the project. | | +| **resourceId** | **Guid** | The identifier of the resource. | | +| **key** | **string** | The key associated with the blob to update. | | +| **file** | **System.IO.Stream?****System.IO.Stream?** | | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Blob updated. | - | +| **400** | Blob already exists. | - | +| **415** | Blob is not of the type \"multipart/form-data\" | - | + +[[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/CoscineHttpMethod.md b/docs/CoscineHttpMethod.md new file mode 100644 index 0000000000000000000000000000000000000000..a7d64f1d07d5ae70da3bc4f7e9752b25502aa485 --- /dev/null +++ b/docs/CoscineHttpMethod.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.CoscineHttpMethod +An enumeration representing the supported HTTP verbs. + +## 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/DeployedGraphDto.md b/docs/DeployedGraphDto.md new file mode 100644 index 0000000000000000000000000000000000000000..de4f350ae3315c0a77e68afccbfddbb2fcd23dd4 --- /dev/null +++ b/docs/DeployedGraphDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.DeployedGraphDto +Represents a Data Transfer Object (DTO) for deployed graph details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | Graph URI and identifier. | [optional] +**FileHashes** | **List<string>** | Collection of file hashes associated with the graph. | [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/DeployedGraphDtoPagedResponse.md b/docs/DeployedGraphDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..29542e1b013b2c2ca2aaf5a2ba483be0b0c75f3e --- /dev/null +++ b/docs/DeployedGraphDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.DeployedGraphDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<DeployedGraphDto>**](DeployedGraphDto.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/DisciplineApi.md b/docs/DisciplineApi.md new file mode 100644 index 0000000000000000000000000000000000000000..d3b431ece3c61866fe8add0a0e6ae33d95f45f4e --- /dev/null +++ b/docs/DisciplineApi.md @@ -0,0 +1,288 @@ +# Coscine.ApiClient.Core.Api.DisciplineApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2DisciplinesOptions**](DisciplineApi.md#apiv2disciplinesoptions) | **OPTIONS** /api/v2/disciplines | Responds with the HTTP methods allowed for the endpoint. | +| [**GetDiscipline**](DisciplineApi.md#getdiscipline) | **GET** /api/v2/disciplines/{disciplineId} | Retrieves a discipline with the specified ID. | +| [**GetDisciplines**](DisciplineApi.md#getdisciplines) | **GET** /api/v2/disciplines | Retrieves all disciplines. | + +<a id="apiv2disciplinesoptions"></a> +# **ApiV2DisciplinesOptions** +> void ApiV2DisciplinesOptions () + +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 ApiV2DisciplinesOptionsExample + { + 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 DisciplineApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2DisciplinesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DisciplineApi.ApiV2DisciplinesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2DisciplinesOptionsWithHttpInfo 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.ApiV2DisciplinesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DisciplineApi.ApiV2DisciplinesOptionsWithHttpInfo: " + 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="getdiscipline"></a> +# **GetDiscipline** +> DisciplineDtoResponse GetDiscipline (Guid disciplineId) + +Retrieves a discipline with the specified ID. + +### 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 GetDisciplineExample + { + 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 DisciplineApi(config); + var disciplineId = "disciplineId_example"; // Guid | The ID of the discipline. + + try + { + // Retrieves a discipline with the specified ID. + DisciplineDtoResponse result = apiInstance.GetDiscipline(disciplineId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DisciplineApi.GetDiscipline: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDisciplineWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a discipline with the specified ID. + ApiResponse<DisciplineDtoResponse> response = apiInstance.GetDisciplineWithHttpInfo(disciplineId); + 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 DisciplineApi.GetDisciplineWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **disciplineId** | **Guid** | The ID of the discipline. | | + +### Return type + +[**DisciplineDtoResponse**](DisciplineDtoResponse.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 discipline. | - | +| **404** | Discipline does not exist. | - | + +[[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="getdisciplines"></a> +# **GetDisciplines** +> DisciplineDtoPagedResponse GetDisciplines (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all disciplines. + +### 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 GetDisciplinesExample + { + 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 DisciplineApi(config); + 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 all disciplines. + DisciplineDtoPagedResponse result = apiInstance.GetDisciplines(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DisciplineApi.GetDisciplines: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDisciplinesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all disciplines. + ApiResponse<DisciplineDtoPagedResponse> response = apiInstance.GetDisciplinesWithHttpInfo(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 DisciplineApi.GetDisciplinesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**DisciplineDtoPagedResponse**](DisciplineDtoPagedResponse.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 disciplines. | - | + +[[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/DisciplineDto.md b/docs/DisciplineDto.md new file mode 100644 index 0000000000000000000000000000000000000000..cdee4ecf89de2bdf2d4f8ff06c94a3686d604244 --- /dev/null +++ b/docs/DisciplineDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.DisciplineDto +Represents the data transfer object for a discipline. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier for the discipline. | [optional] +**Uri** | **string** | The URI associated with the discipline. | [optional] +**DisplayNameDe** | **string** | The display name of the discipline in German. | [optional] +**DisplayNameEn** | **string** | The display name of the discipline in English. | [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/DisciplineDtoPagedResponse.md b/docs/DisciplineDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..7867d24b20ae1669ae20fc9a09486b8de7dc84f8 --- /dev/null +++ b/docs/DisciplineDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.DisciplineDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<DisciplineDto>**](DisciplineDto.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/DisciplineDtoResponse.md b/docs/DisciplineDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a6acae491a882ba5359a44cd8eca691795c467 --- /dev/null +++ b/docs/DisciplineDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.DisciplineDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**DisciplineDto**](DisciplineDto.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/DisciplineForProjectManipulationDto.md b/docs/DisciplineForProjectManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..392e3fdb7782bf98fbfa2cefd0a4cc304229812c --- /dev/null +++ b/docs/DisciplineForProjectManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.DisciplineForProjectManipulationDto +Data transfer object (DTO) representing a discipline for project manipulation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or initializes the identifier of the discipline. | + +[[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/DisciplineForResourceManipulationDto.md b/docs/DisciplineForResourceManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..37835a7a7d55e06010f04f020b295a80c01ba833 --- /dev/null +++ b/docs/DisciplineForResourceManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.DisciplineForResourceManipulationDto +Data transfer object (DTO) representing a discipline for resource manipulation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or initializes the identifier of the discipline. | + +[[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/DisciplineForUserManipulationDto.md b/docs/DisciplineForUserManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..c7fe76105f76f351204fc04e5f59b9c15f445504 --- /dev/null +++ b/docs/DisciplineForUserManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.DisciplineForUserManipulationDto +Data transfer object (DTO) representing a discipline for user manipulation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or initializes the identifier of the discipline. | + +[[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/ExtractedMetadataTreeForCreationDto.md b/docs/ExtractedMetadataTreeForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..5930423fa2a64fb553e690461bc566c82aee5680 --- /dev/null +++ b/docs/ExtractedMetadataTreeForCreationDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ExtractedMetadataTreeForCreationDto +Data transfer object (DTO) representing the creation of a metadata tree. Extends the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Gets or initializes the path of the metadata tree. | +**Id** | **string** | Gets or sets the id of the new metadata tree. | +**Definition** | [**RdfDefinitionForManipulationDto**](RdfDefinitionForManipulationDto.md) | | +**Provenance** | [**ProvenanceParametersDto**](ProvenanceParametersDto.md) | | + +[[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/ExtractedMetadataTreeForUpdateDto.md b/docs/ExtractedMetadataTreeForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..61ab9a7386a9923bb127128f190f7f09b525bdf6 --- /dev/null +++ b/docs/ExtractedMetadataTreeForUpdateDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.ExtractedMetadataTreeForUpdateDto +Data transfer object (DTO) representing the update of a metadata tree. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Gets or initializes the path of the metadata tree. | +**Id** | **string** | Gets or sets the id of the to update metadata tree. | +**Definition** | [**RdfDefinitionForManipulationDto**](RdfDefinitionForManipulationDto.md) | | +**Provenance** | [**ProvenanceParametersDto**](ProvenanceParametersDto.md) | | +**ForceNewMetadataVersion** | **bool** | Gets or initializes a flag for creating a new metadata version. | [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/FileActionDto.md b/docs/FileActionDto.md new file mode 100644 index 0000000000000000000000000000000000000000..ab525f7222406c61fe1acf3e9921e56912a33e82 --- /dev/null +++ b/docs/FileActionDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.FileActionDto +Represents a Data Transfer Object (DTO) for file actions, including the URL and HTTP method. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | Gets or sets the presigned URL associated with the file action. | [optional] +**Method** | **FileActionHttpMethod** | | [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/FileActionHttpMethod.md b/docs/FileActionHttpMethod.md new file mode 100644 index 0000000000000000000000000000000000000000..f980a24a540dd24ba73db21dad96798e0a8fe97c --- /dev/null +++ b/docs/FileActionHttpMethod.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.FileActionHttpMethod +Represents the possible HTTP methods associated with file actions. + +## 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/FileActionsDto.md b/docs/FileActionsDto.md new file mode 100644 index 0000000000000000000000000000000000000000..cba017a1b31bf7bfefd51bdf9a5660db72128de6 --- /dev/null +++ b/docs/FileActionsDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.FileActionsDto +Represents a Data Transfer Object (DTO) for a collection of file actions, including download action details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Download** | [**FileActionDto**](FileActionDto.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/FileTreeDto.md b/docs/FileTreeDto.md new file mode 100644 index 0000000000000000000000000000000000000000..f939d4af4165563e6595dd4e71af83dbde3e15d7 --- /dev/null +++ b/docs/FileTreeDto.md @@ -0,0 +1,20 @@ +# Coscine.ApiClient.Core.Model.FileTreeDto +Represents a Data Transfer Object (DTO) for a file within a tree structure, extending the base TreeDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | The path of the tree item. | [optional] +**Type** | **TreeDataType** | | [optional] +**Directory** | **string** | Gets or sets the directory of the file. | [optional] +**Name** | **string** | Gets or sets the name of the file. | [optional] +**Extension** | **string** | Gets or sets the extension of the file. | [optional] +**Size** | **long** | Gets or sets the size of the file in bytes. | [optional] +**CreationDate** | **DateTime?** | Gets or sets the creation date of the file. | [optional] +**ChangeDate** | **DateTime?** | Gets or sets the last change date of the file. | [optional] +**Actions** | [**FileActionsDto**](FileActionsDto.md) | | [optional] +**Hidden** | **bool** | Determines if the specific tree entry is hidden. | [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/FileTreeDtoPagedResponse.md b/docs/FileTreeDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..f735d238248b57af70e0f93386450af59b5b194c --- /dev/null +++ b/docs/FileTreeDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.FileTreeDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<FileTreeDto>**](FileTreeDto.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/FixedValueForResourceManipulationDto.md b/docs/FixedValueForResourceManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..ded1a09d5cf69224d1be354fda94afa11b57c5c9 --- /dev/null +++ b/docs/FixedValueForResourceManipulationDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.FixedValueForResourceManipulationDto +Data transfer object (DTO) representing the manipulation of a fixed value associated with a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | Gets or initializes the value of the fixed resource value. | [optional] +**Type** | **string** | Gets or initializes the type of the fixed resource value. | [optional] +**Datatype** | **string** | Gets or initializes the data type URI of the fixed resource value. | [optional] +**TargetClass** | **string** | The target class of the provided value (e.g., \"https://purl.org/coscine/ap/base/\") | [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/GitLabOptionsDto.md b/docs/GitLabOptionsDto.md new file mode 100644 index 0000000000000000000000000000000000000000..5eaa8c93093c24798acdb9dce0f7d0b0ef15df6b --- /dev/null +++ b/docs/GitLabOptionsDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.GitLabOptionsDto +Represents the data transfer object (DTO) for GitLab options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProjectId** | **int** | The project ID associated with GitLab. | [optional] +**RepoUrl** | **string** | The repository URL for GitLab. | [optional] +**AccessToken** | **string** | The access token for GitLab. | [optional] +**Branch** | **string** | The branch for GitLab. | [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/GitlabBranchDto.md b/docs/GitlabBranchDto.md new file mode 100644 index 0000000000000000000000000000000000000000..5888dc4fbed4c2d4cffa5ee6d2db6c82249759d2 --- /dev/null +++ b/docs/GitlabBranchDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.GitlabBranchDto +Represents a GitLab branch data transfer object (DTO). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the GitLab branch. | [optional] +**Merged** | **bool** | Indicates if the branch is merged. | [optional] +**Protected** | **bool** | Indicates if the branch is protected. | [optional] +**Default** | **bool** | Indicates if the branch is set as default. | [optional] +**DevelopersCanPush** | **bool** | Indicates if developers can push changes to the branch. | [optional] +**DevelopersCanMerge** | **bool** | Indicates if developers can merge changes into the branch. | [optional] +**CanPush** | **bool** | Indicates if the user can push changes to the branch. | [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/GitlabBranchDtoIEnumerableResponse.md b/docs/GitlabBranchDtoIEnumerableResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..aa3622220bccdc2474f082aa9e84425c425a1f13 --- /dev/null +++ b/docs/GitlabBranchDtoIEnumerableResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.GitlabBranchDtoIEnumerableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<GitlabBranchDto>**](GitlabBranchDto.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/GitlabProjectDto.md b/docs/GitlabProjectDto.md new file mode 100644 index 0000000000000000000000000000000000000000..307e8c597eaa3468c1050ea4bd5a8d0f0f944c72 --- /dev/null +++ b/docs/GitlabProjectDto.md @@ -0,0 +1,23 @@ +# Coscine.ApiClient.Core.Model.GitlabProjectDto +Represents a GitLab project data transfer object (DTO). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int** | The unique identifier for the GitLab project. | [optional] +**Archived** | **bool** | Indicates if the GitLab project is archived. | [optional] +**Name** | **string** | The name of the GitLab project. | [optional] +**NameWithNamespace** | **string** | The full name of the GitLab project including namespace. | [optional] +**Description** | **string** | A brief description of the GitLab project. | [optional] +**DefaultBranch** | **string** | The default branch of the GitLab project. | [optional] +**Path** | **string** | The path of the GitLab project. | [optional] +**PathWithNamespace** | **string** | The path of the GitLab project including namespace. | [optional] +**LastActivityAt** | **string** | The timestamp of the last activity related to the GitLab project. | [optional] +**CreatedAt** | **string** | The creation timestamp of the GitLab project. | [optional] +**WebUrl** | **string** | The URL to view the GitLab project in a web browser. | [optional] +**HttpUrlToRepo** | **string** | The HTTP URL to access the GitLab project repository. | [optional] +**SshUrlToRepo** | **string** | The SSH URL to access the GitLab project repository. | [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/GitlabProjectDtoIEnumerableResponse.md b/docs/GitlabProjectDtoIEnumerableResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..baf1a34c8964c431b9a4fec78faa5501422cc96c --- /dev/null +++ b/docs/GitlabProjectDtoIEnumerableResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.GitlabProjectDtoIEnumerableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<GitlabProjectDto>**](GitlabProjectDto.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/GitlabProjectDtoResponse.md b/docs/GitlabProjectDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..74976373b5c7b6823ccaef7b508f40c9886da0ff --- /dev/null +++ b/docs/GitlabProjectDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.GitlabProjectDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**GitlabProjectDto**](GitlabProjectDto.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/GitlabResourceTypeOptionsForCreationDto.md b/docs/GitlabResourceTypeOptionsForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e5f149ad04b9a649512a19623b6755a5aba1fef0 --- /dev/null +++ b/docs/GitlabResourceTypeOptionsForCreationDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.GitlabResourceTypeOptionsForCreationDto +Represents the data transfer object (DTO) for creating GitLab resource type options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Branch** | **string** | The branch associated with the GitLab resource. | +**AccessToken** | **string** | The access token for authentication with GitLab. | +**RepoUrl** | **string** | The repository URL for the GitLab resource. | +**ProjectId** | **int** | The project ID associated with the GitLab resource. | +**TosAccepted** | **bool** | Indicates whether the terms of service for the GitLab resource are accepted. | + +[[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/GitlabResourceTypeOptionsForUpdateDto.md b/docs/GitlabResourceTypeOptionsForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..60f61916218400ea320a4b55722a1d3b866640c4 --- /dev/null +++ b/docs/GitlabResourceTypeOptionsForUpdateDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.GitlabResourceTypeOptionsForUpdateDto +Represents the data transfer object (DTO) for updating GitLab resource type options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Branch** | **string** | The branch associated with the GitLab resource. | +**AccessToken** | **string** | The access token for authentication with GitLab. | + +[[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/HandleApi.md b/docs/HandleApi.md new file mode 100644 index 0000000000000000000000000000000000000000..3b8cce40a80375771b2e019e8805450d66037b92 --- /dev/null +++ b/docs/HandleApi.md @@ -0,0 +1,291 @@ +# Coscine.ApiClient.Core.Api.HandleApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2HandlesOptions**](HandleApi.md#apiv2handlesoptions) | **OPTIONS** /api/v2/handles | Responds with the HTTP methods allowed for the endpoint. | +| [**GetHandle**](HandleApi.md#gethandle) | **GET** /api/v2/handles/{prefix}/{suffix} | Retrieves all values of a handle by its PID. | +| [**UpdateHandle**](HandleApi.md#updatehandle) | **PUT** /api/v2/handles/{prefix}/{suffix} | Updates a handle. | + +<a id="apiv2handlesoptions"></a> +# **ApiV2HandlesOptions** +> void ApiV2HandlesOptions () + +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 ApiV2HandlesOptionsExample + { + 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 HandleApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2HandlesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling HandleApi.ApiV2HandlesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2HandlesOptionsWithHttpInfo 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.ApiV2HandlesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling HandleApi.ApiV2HandlesOptionsWithHttpInfo: " + 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="gethandle"></a> +# **GetHandle** +> HandleDtoResponse GetHandle (string prefix, string suffix) + +Retrieves all values of a handle by its PID. + +### 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 GetHandleExample + { + 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 HandleApi(config); + var prefix = "prefix_example"; // string | The prefix of the PID + var suffix = "suffix_example"; // string | The suffix of the PID + + try + { + // Retrieves all values of a handle by its PID. + HandleDtoResponse result = apiInstance.GetHandle(prefix, suffix); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling HandleApi.GetHandle: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetHandleWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all values of a handle by its PID. + ApiResponse<HandleDtoResponse> response = apiInstance.GetHandleWithHttpInfo(prefix, suffix); + 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 HandleApi.GetHandleWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **prefix** | **string** | The prefix of the PID | | +| **suffix** | **string** | The suffix of the PID | | + +### Return type + +[**HandleDtoResponse**](HandleDtoResponse.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 handles. | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | +| **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) + +<a id="updatehandle"></a> +# **UpdateHandle** +> void UpdateHandle (string prefix, string suffix, HandleForUpdateDto? handleForUpdateDto = null) + +Updates a handle. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 UpdateHandleExample + { + 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 HandleApi(config); + var prefix = "prefix_example"; // string | The prefix of the PID + var suffix = "suffix_example"; // string | The suffix of the PID + var handleForUpdateDto = new HandleForUpdateDto?(); // HandleForUpdateDto? | The handle for updating. (optional) + + try + { + // Updates a handle. + apiInstance.UpdateHandle(prefix, suffix, handleForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling HandleApi.UpdateHandle: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateHandleWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates a handle. + apiInstance.UpdateHandleWithHttpInfo(prefix, suffix, handleForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling HandleApi.UpdateHandleWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **prefix** | **string** | The prefix of the PID | | +| **suffix** | **string** | The suffix of the PID | | +| **handleForUpdateDto** | [**HandleForUpdateDto?**](HandleForUpdateDto?.md) | The handle for updating. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Handle updated. | - | +| **403** | User is missing authorization requirements. This endpoint is only available to Coscine Admin users. | - | +| **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/HandleDto.md b/docs/HandleDto.md new file mode 100644 index 0000000000000000000000000000000000000000..0ef54a73eac0d7d7e8070cfc87ca9854890c88f7 --- /dev/null +++ b/docs/HandleDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.HandleDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Pid** | [**PidDto**](PidDto.md) | | [optional] +**Values** | [**List<HandleValueDto>**](HandleValueDto.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/HandleDtoResponse.md b/docs/HandleDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..b6bb6b73a3978a7c5199ca6f271d4d6c17696d2f --- /dev/null +++ b/docs/HandleDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.HandleDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**HandleDto**](HandleDto.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/HandleForUpdateDto.md b/docs/HandleForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..546c33154be364d41affae7b40f77df1dea108c7 --- /dev/null +++ b/docs/HandleForUpdateDto.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.HandleForUpdateDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Values** | [**List<HandleValueForUpdateDto>**](HandleValueForUpdateDto.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/HandleValueDto.md b/docs/HandleValueDto.md new file mode 100644 index 0000000000000000000000000000000000000000..86603240b16f885b485fcb6acddcc1056af36117 --- /dev/null +++ b/docs/HandleValueDto.md @@ -0,0 +1,18 @@ +# Coscine.ApiClient.Core.Model.HandleValueDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Idx** | **int** | | [optional] +**Type** | **string** | | [optional] +**ParsedData** | **Object** | | [optional] +**Data** | **string** | | [optional] +**Timestamp** | **DateTime** | | [optional] +**TtlType** | **int** | | [optional] +**Ttl** | **int** | | [optional] +**Refs** | **List<Object>** | | [optional] +**Privs** | **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/HandleValueForUpdateDto.md b/docs/HandleValueForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..57ec5b9827982c28618e55e5ed76c54aa263eb8f --- /dev/null +++ b/docs/HandleValueForUpdateDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.HandleValueForUpdateDto +Data transfer object (DTO) representing updating a handle. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The data type of the handle. | [optional] +**ParsedData** | **Object** | The parsed data of the handle. | [optional] +**Idx** | **int** | The id of the handle. | [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/HashParametersDto.md b/docs/HashParametersDto.md new file mode 100644 index 0000000000000000000000000000000000000000..cd5efb440a12d0ddc39048fe948042fc206ac0fa --- /dev/null +++ b/docs/HashParametersDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.HashParametersDto +Data transfer object (DTO) representing Hash Parameters in a request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlgorithmName** | **string** | Gets or initializes the hash algorithm name. | +**Value** | **string** | Gets or initializes the hash value. | + +[[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/IdentityProviderDto.md b/docs/IdentityProviderDto.md new file mode 100644 index 0000000000000000000000000000000000000000..70e854086eca261eefa436b8cc030d271d02565c --- /dev/null +++ b/docs/IdentityProviderDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.IdentityProviderDto +Represents a Data Transfer Object (DTO) for an identity provider. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or sets the unique identifier for the identity provider. | [optional] +**DisplayName** | **string** | Gets or sets the display name of the identity provider. | [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/IdentityProviders.md b/docs/IdentityProviders.md new file mode 100644 index 0000000000000000000000000000000000000000..96456f7af69912e2f40639ec8ef82eed932e79e5 --- /dev/null +++ b/docs/IdentityProviders.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.IdentityProviders +Specifies the supported external authentication services. + +## 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/LanguageApi.md b/docs/LanguageApi.md new file mode 100644 index 0000000000000000000000000000000000000000..9336f05c75177388acf52463e69ba6bc7d2de741 --- /dev/null +++ b/docs/LanguageApi.md @@ -0,0 +1,288 @@ +# Coscine.ApiClient.Core.Api.LanguageApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2LanguagesOptions**](LanguageApi.md#apiv2languagesoptions) | **OPTIONS** /api/v2/languages | Responds with the HTTP methods allowed for the endpoint. | +| [**GetLanguage**](LanguageApi.md#getlanguage) | **GET** /api/v2/languages/{languageId} | Retrieves a language by ID. | +| [**GetLanguages**](LanguageApi.md#getlanguages) | **GET** /api/v2/languages | Retrieves all languages. | + +<a id="apiv2languagesoptions"></a> +# **ApiV2LanguagesOptions** +> void ApiV2LanguagesOptions () + +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 ApiV2LanguagesOptionsExample + { + 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 LanguageApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2LanguagesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LanguageApi.ApiV2LanguagesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2LanguagesOptionsWithHttpInfo 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.ApiV2LanguagesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling LanguageApi.ApiV2LanguagesOptionsWithHttpInfo: " + 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="getlanguage"></a> +# **GetLanguage** +> LanguageDtoResponse GetLanguage (Guid languageId) + +Retrieves a language by ID. + +### 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 GetLanguageExample + { + 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 LanguageApi(config); + var languageId = "languageId_example"; // Guid | The ID of the language. + + try + { + // Retrieves a language by ID. + LanguageDtoResponse result = apiInstance.GetLanguage(languageId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LanguageApi.GetLanguage: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLanguageWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a language by ID. + ApiResponse<LanguageDtoResponse> response = apiInstance.GetLanguageWithHttpInfo(languageId); + 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 LanguageApi.GetLanguageWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **languageId** | **Guid** | The ID of the language. | | + +### Return type + +[**LanguageDtoResponse**](LanguageDtoResponse.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 language. | - | +| **404** | Language does not exist. | - | + +[[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="getlanguages"></a> +# **GetLanguages** +> LanguageDtoIEnumerableResponse GetLanguages (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all languages. + +### 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 GetLanguagesExample + { + 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 LanguageApi(config); + 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 all languages. + LanguageDtoIEnumerableResponse result = apiInstance.GetLanguages(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LanguageApi.GetLanguages: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLanguagesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all languages. + ApiResponse<LanguageDtoIEnumerableResponse> response = apiInstance.GetLanguagesWithHttpInfo(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 LanguageApi.GetLanguagesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**LanguageDtoIEnumerableResponse**](LanguageDtoIEnumerableResponse.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 languages. | - | + +[[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/LanguageDto.md b/docs/LanguageDto.md new file mode 100644 index 0000000000000000000000000000000000000000..7118222c4b5f827b5ea69280b982bbf45e3616b5 --- /dev/null +++ b/docs/LanguageDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.LanguageDto +Represents a Data Transfer Object (DTO) for language details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or sets the unique identifier for the language. | [optional] +**DisplayName** | **string** | Gets or sets the display name of the language. | [optional] +**Abbreviation** | **string** | Gets or sets the abbreviation for the language. | [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/LanguageDtoIEnumerableResponse.md b/docs/LanguageDtoIEnumerableResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..ff3739efbaf2c47d88bffba0aefe0c7b4775d583 --- /dev/null +++ b/docs/LanguageDtoIEnumerableResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.LanguageDtoIEnumerableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<LanguageDto>**](LanguageDto.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/LanguageDtoResponse.md b/docs/LanguageDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..41b9df6d78f0c482dcac306a17be5ce2f14f9b87 --- /dev/null +++ b/docs/LanguageDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.LanguageDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**LanguageDto**](LanguageDto.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/LanguageForUserManipulationDto.md b/docs/LanguageForUserManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..411b8b965743079a87ab87720507f003f88a591b --- /dev/null +++ b/docs/LanguageForUserManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.LanguageForUserManipulationDto +Data transfer object (DTO) representing a language for user manipulation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or initializes the identifier of the language. | + +[[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/LicenseApi.md b/docs/LicenseApi.md new file mode 100644 index 0000000000000000000000000000000000000000..d9d6a5f82cfe148fc39ac60b6427bfe2d9f12806 --- /dev/null +++ b/docs/LicenseApi.md @@ -0,0 +1,288 @@ +# Coscine.ApiClient.Core.Api.LicenseApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2LicensesOptions**](LicenseApi.md#apiv2licensesoptions) | **OPTIONS** /api/v2/licenses | Responds with the HTTP methods allowed for the endpoint. | +| [**GetLicense**](LicenseApi.md#getlicense) | **GET** /api/v2/licenses/{licenseId} | Retrieves a license with the specified ID. | +| [**GetLicenses**](LicenseApi.md#getlicenses) | **GET** /api/v2/licenses | Retrieves all licenses. | + +<a id="apiv2licensesoptions"></a> +# **ApiV2LicensesOptions** +> void ApiV2LicensesOptions () + +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 ApiV2LicensesOptionsExample + { + 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 LicenseApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2LicensesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicenseApi.ApiV2LicensesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2LicensesOptionsWithHttpInfo 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.ApiV2LicensesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling LicenseApi.ApiV2LicensesOptionsWithHttpInfo: " + 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="getlicense"></a> +# **GetLicense** +> LicenseDtoResponse GetLicense (Guid licenseId) + +Retrieves a license with the specified ID. + +### 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 GetLicenseExample + { + 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 LicenseApi(config); + var licenseId = "licenseId_example"; // Guid | The ID of the license. + + try + { + // Retrieves a license with the specified ID. + LicenseDtoResponse result = apiInstance.GetLicense(licenseId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicenseApi.GetLicense: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLicenseWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a license with the specified ID. + ApiResponse<LicenseDtoResponse> response = apiInstance.GetLicenseWithHttpInfo(licenseId); + 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 LicenseApi.GetLicenseWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **licenseId** | **Guid** | The ID of the license. | | + +### Return type + +[**LicenseDtoResponse**](LicenseDtoResponse.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 license. | - | +| **404** | License does not exist. | - | + +[[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="getlicenses"></a> +# **GetLicenses** +> LicenseDtoPagedResponse GetLicenses (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all licenses. + +### 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 GetLicensesExample + { + 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 LicenseApi(config); + 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 all licenses. + LicenseDtoPagedResponse result = apiInstance.GetLicenses(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling LicenseApi.GetLicenses: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLicensesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all licenses. + ApiResponse<LicenseDtoPagedResponse> response = apiInstance.GetLicensesWithHttpInfo(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 LicenseApi.GetLicensesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**LicenseDtoPagedResponse**](LicenseDtoPagedResponse.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 licenses. | - | + +[[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/LicenseDto.md b/docs/LicenseDto.md new file mode 100644 index 0000000000000000000000000000000000000000..7fa63da55b8fb41ef0416a1c9925c18f8290b625 --- /dev/null +++ b/docs/LicenseDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.LicenseDto +Represents a Data Transfer Object (DTO) for license details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or sets the unique identifier for the license. | [optional] +**DisplayName** | **string** | Gets or sets the display name of the license. | [optional] +**Url** | **string** | Gets or sets the Uri of the license. | [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/LicenseDtoPagedResponse.md b/docs/LicenseDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..24345ea389509ed76d9229002cf9828d973c3db9 --- /dev/null +++ b/docs/LicenseDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.LicenseDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<LicenseDto>**](LicenseDto.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/LicenseDtoResponse.md b/docs/LicenseDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..36d5646847df5cdcf7e14d2bb22ddab73c91f35f --- /dev/null +++ b/docs/LicenseDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.LicenseDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**LicenseDto**](LicenseDto.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/LicenseForResourceManipulationDto.md b/docs/LicenseForResourceManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..19efea1fafd5dffce81e3b2f0cdcb8e66a0bb964 --- /dev/null +++ b/docs/LicenseForResourceManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.LicenseForResourceManipulationDto +Data transfer object (DTO) representing a license for resource manipulation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Gets or initializes the identifier of the license. | + +[[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/MaintenanceApi.md b/docs/MaintenanceApi.md new file mode 100644 index 0000000000000000000000000000000000000000..01ebe2e0ffdb1c2c3245b7ed656319ee4d0768cf --- /dev/null +++ b/docs/MaintenanceApi.md @@ -0,0 +1,183 @@ +# Coscine.ApiClient.Core.Api.MaintenanceApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2MaintenancesOptions**](MaintenanceApi.md#apiv2maintenancesoptions) | **OPTIONS** /api/v2/maintenances | Responds with the HTTP methods allowed for the endpoint. | +| [**GetCurrentMaintenances**](MaintenanceApi.md#getcurrentmaintenances) | **GET** /api/v2/maintenances | Retrieves the current maintenance messages. | + +<a id="apiv2maintenancesoptions"></a> +# **ApiV2MaintenancesOptions** +> void ApiV2MaintenancesOptions () + +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 ApiV2MaintenancesOptionsExample + { + 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 MaintenanceApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2MaintenancesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MaintenanceApi.ApiV2MaintenancesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2MaintenancesOptionsWithHttpInfo 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.ApiV2MaintenancesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MaintenanceApi.ApiV2MaintenancesOptionsWithHttpInfo: " + 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="getcurrentmaintenances"></a> +# **GetCurrentMaintenances** +> MaintenanceDtoPagedResponse GetCurrentMaintenances () + +Retrieves the current maintenance 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 GetCurrentMaintenancesExample + { + 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 MaintenanceApi(config); + + try + { + // Retrieves the current maintenance messages. + MaintenanceDtoPagedResponse result = apiInstance.GetCurrentMaintenances(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MaintenanceApi.GetCurrentMaintenances: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetCurrentMaintenancesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the current maintenance messages. + ApiResponse<MaintenanceDtoPagedResponse> response = apiInstance.GetCurrentMaintenancesWithHttpInfo(); + 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 MaintenanceApi.GetCurrentMaintenancesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**MaintenanceDtoPagedResponse**](MaintenanceDtoPagedResponse.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 maintenances. | - | + +[[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/MaintenanceDto.md b/docs/MaintenanceDto.md new file mode 100644 index 0000000000000000000000000000000000000000..1bbd08e91b3d2124b6a94d11ad6aef20665943df --- /dev/null +++ b/docs/MaintenanceDto.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.MaintenanceDto +This class represents a maintenance with its significant properties, which is returned from the API. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DisplayName** | **string** | Gets or sets the maintenance title. | [optional] +**Href** | **string** | Gets or sets the URL related to the maintenance. | [optional] +**Type** | **string** | Gets or sets the type of maintenance. | [optional] +**Body** | **string** | Gets or sets the description of the maintenance. | [optional] +**StartsDate** | **DateTime?** | Gets or sets the start date of the maintenance, if available. | [optional] +**EndsDate** | **DateTime?** | Gets or sets the end date of the maintenance, if available. | [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/MaintenanceDtoPagedResponse.md b/docs/MaintenanceDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..edaa23ffd2bde31127576094d4659b83601d198a --- /dev/null +++ b/docs/MaintenanceDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.MaintenanceDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<MaintenanceDto>**](MaintenanceDto.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/MetadataTreeDto.md b/docs/MetadataTreeDto.md new file mode 100644 index 0000000000000000000000000000000000000000..85f69756acfe87ffbcb42dcf003edee857e98386 --- /dev/null +++ b/docs/MetadataTreeDto.md @@ -0,0 +1,18 @@ +# Coscine.ApiClient.Core.Model.MetadataTreeDto +Represents a data transfer object (DTO) for metadata within a tree structure, extending the base TreeDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | The path of the tree item. | [optional] +**Type** | **TreeDataType** | | [optional] +**Id** | **string** | Gets or sets the id of the specific metadata tree. | [optional] +**VarVersion** | **string** | Gets or sets the version associated with the metadata. | [optional] +**AvailableVersions** | **List<string>** | Gets or sets the collection of available versions related to the metadata. | [optional] +**Definition** | [**RdfDefinitionDto**](RdfDefinitionDto.md) | | [optional] +**Extracted** | [**MetadataTreeExtractedDto**](MetadataTreeExtractedDto.md) | | [optional] +**Provenance** | [**ProvenanceDto**](ProvenanceDto.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/MetadataTreeDtoPagedResponse.md b/docs/MetadataTreeDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..ffbec0b7a3b8c4299d97442018b08f608f96de09 --- /dev/null +++ b/docs/MetadataTreeDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.MetadataTreeDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<MetadataTreeDto>**](MetadataTreeDto.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/MetadataTreeDtoResponse.md b/docs/MetadataTreeDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..eaca70c0a601913282ee3091cd786f0bc713c0e2 --- /dev/null +++ b/docs/MetadataTreeDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.MetadataTreeDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**MetadataTreeDto**](MetadataTreeDto.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/MetadataTreeExtractedDto.md b/docs/MetadataTreeExtractedDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e6461117245ae38f225da7cfc86744994fe7fd94 --- /dev/null +++ b/docs/MetadataTreeExtractedDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.MetadataTreeExtractedDto +Represents a data transfer object (DTO) for extracted metadata within a tree structure, extending the base TreeDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | The path of the tree item. | [optional] +**Type** | **TreeDataType** | | [optional] +**MetadataId** | **string** | Gets the identifier of the metadata extraction graph. | [optional] +**RawDataId** | **string** | Gets the identifier of the raw data extraction graph. | [optional] +**Definition** | [**RdfDefinitionDto**](RdfDefinitionDto.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/MetadataTreeForCreationDto.md b/docs/MetadataTreeForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..3cc66d32124ff1cdaf62e536f0891d9a8bded41c --- /dev/null +++ b/docs/MetadataTreeForCreationDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.MetadataTreeForCreationDto +Data transfer object (DTO) representing the creation of a metadata tree. Extends the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Gets or initializes the path of the metadata tree. | +**Definition** | [**RdfDefinitionForManipulationDto**](RdfDefinitionForManipulationDto.md) | | + +[[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/MetadataTreeForDeletionDto.md b/docs/MetadataTreeForDeletionDto.md new file mode 100644 index 0000000000000000000000000000000000000000..6ebdb4d531f6535c9890e3bfa75a359c2b2d26c5 --- /dev/null +++ b/docs/MetadataTreeForDeletionDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.MetadataTreeForDeletionDto +Data transfer object (DTO) for deleting a specific version of metadata. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Gets or initializes the path of the metadata tree. | +**VarVersion** | **long** | Gets or initializes the version of the metadata tree to be deleted. | +**InvalidatedBy** | **string** | Gets or initializes the invalidation entity. | + +[[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/MetadataTreeForUpdateDto.md b/docs/MetadataTreeForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e8e8cdb3348cd7260a37ca1097cd2159926ebf50 --- /dev/null +++ b/docs/MetadataTreeForUpdateDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.MetadataTreeForUpdateDto +Data transfer object (DTO) representing the update of a metadata tree. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | **string** | Gets or initializes the path of the metadata tree. | +**Definition** | [**RdfDefinitionForManipulationDto**](RdfDefinitionForManipulationDto.md) | | + +[[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/MetadataUpdateAdminParameters.md b/docs/MetadataUpdateAdminParameters.md new file mode 100644 index 0000000000000000000000000000000000000000..b7f3da62cc5cefbc2b9c0da9b78b78733de02fca --- /dev/null +++ b/docs/MetadataUpdateAdminParameters.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.MetadataUpdateAdminParameters +Represents parameters for updating metadata in an administrative context. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Definition** | [**RdfDefinitionForManipulationDto**](RdfDefinitionForManipulationDto.md) | | + +[[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 new file mode 100644 index 0000000000000000000000000000000000000000..e7a7c286300112cbd34561847c491db155fd77ad --- /dev/null +++ b/docs/OrganizationApi.md @@ -0,0 +1,291 @@ +# Coscine.ApiClient.Core.Api.OrganizationApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2OrganizationsOptions**](OrganizationApi.md#apiv2organizationsoptions) | **OPTIONS** /api/v2/organizations | Responds with the HTTP methods allowed for the endpoint. | +| [**GetOrganization**](OrganizationApi.md#getorganization) | **GET** /api/v2/organizations/{organizationRorUri} | Retrieves an organization. | +| [**GetOrganizations**](OrganizationApi.md#getorganizations) | **GET** /api/v2/organizations | Retrieves all organizations. | + +<a id="apiv2organizationsoptions"></a> +# **ApiV2OrganizationsOptions** +> void ApiV2OrganizationsOptions () + +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 ApiV2OrganizationsOptionsExample + { + 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 OrganizationApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2OrganizationsOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationApi.ApiV2OrganizationsOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2OrganizationsOptionsWithHttpInfo 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.ApiV2OrganizationsOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OrganizationApi.ApiV2OrganizationsOptionsWithHttpInfo: " + 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="getorganization"></a> +# **GetOrganization** +> OrganizationDtoResponse GetOrganization (string organizationRorUri) + +Retrieves an organization. + +### 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 GetOrganizationExample + { + 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 OrganizationApi(config); + var organizationRorUri = "organizationRorUri_example"; // string | The parameters for organization filtering and pagination. + + try + { + // Retrieves an organization. + OrganizationDtoResponse result = apiInstance.GetOrganization(organizationRorUri); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationApi.GetOrganization: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetOrganizationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves an organization. + ApiResponse<OrganizationDtoResponse> response = apiInstance.GetOrganizationWithHttpInfo(organizationRorUri); + 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 OrganizationApi.GetOrganizationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **organizationRorUri** | **string** | The parameters for organization filtering and pagination. | | + +### Return type + +[**OrganizationDtoResponse**](OrganizationDtoResponse.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 organizations. | - | + +[[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="getorganizations"></a> +# **GetOrganizations** +> OrganizationDtoPagedResponse GetOrganizations (string? searchTerm = null, bool? filterByPublicationService = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all organizations. + +### 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 GetOrganizationsExample + { + 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 OrganizationApi(config); + var searchTerm = "searchTerm_example"; // string? | Gets or sets the search term used to filter organizations. (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) + 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 all organizations. + OrganizationDtoPagedResponse result = apiInstance.GetOrganizations(searchTerm, filterByPublicationService, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationApi.GetOrganizations: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetOrganizationsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all organizations. + ApiResponse<OrganizationDtoPagedResponse> response = apiInstance.GetOrganizationsWithHttpInfo(searchTerm, filterByPublicationService, 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 OrganizationApi.GetOrganizationsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **searchTerm** | **string?** | Gets or sets the search term used to filter organizations. | [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] | +| **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 + +[**OrganizationDtoPagedResponse**](OrganizationDtoPagedResponse.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 organizations. | - | + +[[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/OrganizationDto.md b/docs/OrganizationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..0d8363803c3a468f81166a592028145d041c1d8c --- /dev/null +++ b/docs/OrganizationDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.OrganizationDto +Represents a data transfer object (DTO) for an organization, including its ROR (Research Organization Registry) ID, display name, and email address. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | The ROR (Research Organization Registry) ID of the organization. | [optional] +**DisplayName** | **string** | The display name of the organization. | [optional] +**Email** | **string** | The email address of the organization. | [optional] +**PublicationAdvisoryService** | [**PublicationAdvisoryServiceDto**](PublicationAdvisoryServiceDto.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/OrganizationDtoPagedResponse.md b/docs/OrganizationDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..854189d71d4f9471486419a2ef9f754eab6d3c32 --- /dev/null +++ b/docs/OrganizationDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.OrganizationDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<OrganizationDto>**](OrganizationDto.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/OrganizationDtoResponse.md b/docs/OrganizationDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..ff45c61ef8888d1915d73a7565f0dbef5e0785c0 --- /dev/null +++ b/docs/OrganizationDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.OrganizationDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**OrganizationDto**](OrganizationDto.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/OrganizationForProjectManipulationDto.md b/docs/OrganizationForProjectManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..7266cd8f4cbbe4cc2e0111d558619794c4e46892 --- /dev/null +++ b/docs/OrganizationForProjectManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.OrganizationForProjectManipulationDto +Data transfer object (DTO) representing an organization for project manipulation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | Gets or initializes the URI of the organization. | + +[[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/Pagination.md b/docs/Pagination.md new file mode 100644 index 0000000000000000000000000000000000000000..d4f0dfb9e63fcb9a317c5a5a995fec468a2386a7 --- /dev/null +++ b/docs/Pagination.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.Pagination +Represents pagination information for a collection of items. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CurrentPage** | **int** | Gets or sets the current page number. | [optional] +**TotalPages** | **int** | Gets or sets the total number of pages. | [optional] +**PageSize** | **int** | Gets or sets the number of items per page. | [optional] +**TotalCount** | **long** | Gets or sets the total count of items across all pages. | [optional] +**HasPrevious** | **bool** | Gets a value indicating whether there is a previous page. | [optional] [readonly] +**HasNext** | **bool** | Gets a value indicating whether there is a next page. | [optional] [readonly] + +[[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/PidApi.md b/docs/PidApi.md new file mode 100644 index 0000000000000000000000000000000000000000..b530a9eee381d87873bd9172d1eedb334a8f3d4b --- /dev/null +++ b/docs/PidApi.md @@ -0,0 +1,397 @@ +# Coscine.ApiClient.Core.Api.PidApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2PidsOptions**](PidApi.md#apiv2pidsoptions) | **OPTIONS** /api/v2/pids | Responds with the HTTP methods allowed for the endpoint. | +| [**GetPid**](PidApi.md#getpid) | **GET** /api/v2/pids/{prefix}/{suffix} | Retrieves the Persistent Identifier (PID) for a given prefix and suffix. | +| [**GetPids**](PidApi.md#getpids) | **GET** /api/v2/pids | Retrieves all PIDs. | +| [**SendRequestToOwner**](PidApi.md#sendrequesttoowner) | **POST** /api/v2/pids/{prefix}/{suffix}/requests | Sends an inquiry to the owner of the given PID. | + +<a id="apiv2pidsoptions"></a> +# **ApiV2PidsOptions** +> void ApiV2PidsOptions () + +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 ApiV2PidsOptionsExample + { + 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 PidApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2PidsOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PidApi.ApiV2PidsOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2PidsOptionsWithHttpInfo 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.ApiV2PidsOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PidApi.ApiV2PidsOptionsWithHttpInfo: " + 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="getpid"></a> +# **GetPid** +> PidDtoResponse GetPid (string prefix, Guid suffix) + +Retrieves the Persistent Identifier (PID) for a given prefix and suffix. + +### 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 GetPidExample + { + 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 PidApi(config); + var prefix = "prefix_example"; // string | The PID prefix. Limited to the values provided by the API. + var suffix = "suffix_example"; // Guid | The PID suffix of a project or a resource, represented as a GUID. + + try + { + // Retrieves the Persistent Identifier (PID) for a given prefix and suffix. + PidDtoResponse result = apiInstance.GetPid(prefix, suffix); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PidApi.GetPid: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPidWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the Persistent Identifier (PID) for a given prefix and suffix. + ApiResponse<PidDtoResponse> response = apiInstance.GetPidWithHttpInfo(prefix, suffix); + 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 PidApi.GetPidWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **prefix** | **string** | The PID prefix. Limited to the values provided by the API. | | +| **suffix** | **Guid** | The PID suffix of a project or a resource, represented as a GUID. | | + +### Return type + +[**PidDtoResponse**](PidDtoResponse.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** | Successful response with the PID | - | +| **404** | The specified PID does not exist | - | +| **410** | The PID is no longer valid (e.g., resource 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) + +<a id="getpids"></a> +# **GetPids** +> PidDtoPagedResponse GetPids (bool? includeProjects = null, bool? includeResources = null, bool? includeDeleted = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all PIDs. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 GetPidsExample + { + 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 PidApi(config); + var includeProjects = true; // bool? | Gets or sets a value indicating whether to include projects when retrieving pid information. (optional) + var includeResources = true; // bool? | Gets or sets a value indicating whether to include resources when retrieving pid information. (optional) + var includeDeleted = true; // bool? | Gets or sets a value indicating whether to include deleted pid information. (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 all PIDs. + PidDtoPagedResponse result = apiInstance.GetPids(includeProjects, includeResources, includeDeleted, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PidApi.GetPids: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPidsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all PIDs. + ApiResponse<PidDtoPagedResponse> response = apiInstance.GetPidsWithHttpInfo(includeProjects, includeResources, includeDeleted, 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 PidApi.GetPidsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **includeProjects** | **bool?** | Gets or sets a value indicating whether to include projects when retrieving pid information. | [optional] | +| **includeResources** | **bool?** | Gets or sets a value indicating whether to include resources when retrieving pid information. | [optional] | +| **includeDeleted** | **bool?** | Gets or sets a value indicating whether to include deleted pid information. | [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 + +[**PidDtoPagedResponse**](PidDtoPagedResponse.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 PIDs. | - | +| **403** | User is missing authorization requirements. | - | + +[[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="sendrequesttoowner"></a> +# **SendRequestToOwner** +> void SendRequestToOwner (string prefix, Guid suffix, PidRequestDto? pidRequestDto = null) + +Sends an inquiry to the owner of the given PID. + +### 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 SendRequestToOwnerExample + { + 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 PidApi(config); + var prefix = "prefix_example"; // string | The PID prefix of a project or a resource to validate + var suffix = "suffix_example"; // Guid | The PID body of a project or a resource to validate + var pidRequestDto = new PidRequestDto?(); // PidRequestDto? | The data transfer object containing the inquiry details. (optional) + + try + { + // Sends an inquiry to the owner of the given PID. + apiInstance.SendRequestToOwner(prefix, suffix, pidRequestDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PidApi.SendRequestToOwner: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the SendRequestToOwnerWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Sends an inquiry to the owner of the given PID. + apiInstance.SendRequestToOwnerWithHttpInfo(prefix, suffix, pidRequestDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PidApi.SendRequestToOwnerWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **prefix** | **string** | The PID prefix of a project or a resource to validate | | +| **suffix** | **Guid** | The PID body of a project or a resource to validate | | +| **pidRequestDto** | [**PidRequestDto?**](PidRequestDto?.md) | The data transfer object containing the inquiry details. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Email sent successfully | - | +| **400** | PID has a bad format | - | +| **404** | PID does not exist or is invalid | - | + +[[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/PidDto.md b/docs/PidDto.md new file mode 100644 index 0000000000000000000000000000000000000000..203637775ea219b2a468098f36ee2d0afe22ed60 --- /dev/null +++ b/docs/PidDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.PidDto +Represents a data transfer object (DTO) for a PID (Persistent Identifier). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prefix** | **string** | Gets or sets the prefix of the PID. | [optional] +**Suffix** | **string** | Gets or sets the suffix of the PID. | [optional] +**Identifier** | **string** | Gets the constructed PID by combining the prefix and suffix (\"{Prefix}/{Suffix}\"). | [optional] [readonly] +**Type** | **PidType** | | [optional] +**IsEntityValid** | **bool** | Gets or sets a value indicating whether the linked entity is considered valid. | [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/PidDtoPagedResponse.md b/docs/PidDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..e56404f31ef541d8cc492901c6f38b6f284a3d99 --- /dev/null +++ b/docs/PidDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.PidDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<PidDto>**](PidDto.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/PidDtoResponse.md b/docs/PidDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..67b8407dff62f58a019cd44d0c72949fbf2eff79 --- /dev/null +++ b/docs/PidDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.PidDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**PidDto**](PidDto.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/PidRequestDto.md b/docs/PidRequestDto.md new file mode 100644 index 0000000000000000000000000000000000000000..6c266a08cf7e70eb39366fdd28f5f933c020d0a7 --- /dev/null +++ b/docs/PidRequestDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.PidRequestDto +Data transfer object (DTO) representing a PID request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Gets or initializes the name associated with the PID request. | +**Email** | **string** | Gets or initializes the email associated with the PID request. | +**Message** | **string** | Gets or initializes the message for the PID request. | +**SendConfirmationEmail** | **bool** | Gets or initializes whether to send a confirmation email for the PID request. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PidType.md b/docs/PidType.md new file mode 100644 index 0000000000000000000000000000000000000000..27f8134089089092fb97e30fa6e89f1148789145 --- /dev/null +++ b/docs/PidType.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.PidType +Specifies the type of PID. + +## 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/ProjectAdminDto.md b/docs/ProjectAdminDto.md new file mode 100644 index 0000000000000000000000000000000000000000..feaac099bfe93f7b46a7c872605a005a23837556 --- /dev/null +++ b/docs/ProjectAdminDto.md @@ -0,0 +1,32 @@ +# Coscine.ApiClient.Core.Model.ProjectAdminDto +Represents a data transfer object (DTO) for an administrative view of a project. Extends the base information in Coscine.Api.Core.Shared.DataTransferObjects.ReturnObjects.ProjectDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the project. | [optional] +**Pid** | **string** | Persistent identifier for the project. | [optional] +**Name** | **string** | Name of the project. | [optional] +**Description** | **string** | Description of the project. | [optional] +**StartDate** | **DateTime** | Start date of the project. | [optional] +**EndDate** | **DateTime** | End date of the project. | [optional] +**Keywords** | **List<string>** | Collection of keywords associated with the project. | [optional] +**DisplayName** | **string** | Display name of the project. | [optional] +**PrincipleInvestigators** | **string** | Principal investigators involved in the project. | [optional] +**GrantId** | **string** | Grant ID associated with the project. | [optional] +**Visibility** | [**VisibilityDto**](VisibilityDto.md) | | [optional] +**Disciplines** | [**List<DisciplineDto>**](DisciplineDto.md) | Disciplines related to the project. | [optional] +**Organizations** | [**List<OrganizationDto>**](OrganizationDto.md) | Organizations associated with the project. | [optional] +**Slug** | **string** | Slug for the project. | [optional] +**Creator** | [**UserMinimalDto**](UserMinimalDto.md) | | [optional] +**CreationDate** | **DateTime?** | Date of creation of the project. | [optional] +**SubProjects** | [**List<ProjectDto>**](ProjectDto.md) | Collection of sub-projects associated with this project. | [optional] +**Parent** | [**ProjectMinimalDto**](ProjectMinimalDto.md) | | [optional] +**Deleted** | **bool** | Indicates whether the project is marked as deleted. | [optional] +**ProjectResources** | [**List<ProjectResourceMinimalDto>**](ProjectResourceMinimalDto.md) | Collection of minimal project resource details associated with the project. | [optional] +**ProjectRoles** | [**List<ProjectRoleMinimalDto>**](ProjectRoleMinimalDto.md) | Collection of minimal project role details associated with the project. | [optional] +**ProjectQuota** | [**List<ProjectQuotaDto>**](ProjectQuotaDto.md) | Collection of project quotas associated with the project. | [optional] + +[[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/ProjectAdminDtoPagedResponse.md b/docs/ProjectAdminDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..a3d8f8bab2b98fdf42b542ee0ee630dd03cbb6a7 --- /dev/null +++ b/docs/ProjectAdminDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ProjectAdminDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ProjectAdminDto>**](ProjectAdminDto.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/ProjectApi.md b/docs/ProjectApi.md new file mode 100644 index 0000000000000000000000000000000000000000..bae3e2b09ccdd2f7da5220b18bb4584507a98b86 --- /dev/null +++ b/docs/ProjectApi.md @@ -0,0 +1,585 @@ +# Coscine.ApiClient.Core.Api.ProjectApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsOptions**](ProjectApi.md#apiv2projectsoptions) | **OPTIONS** /api/v2/projects | Responds with the HTTP methods allowed for the endpoint. | +| [**CreateProject**](ProjectApi.md#createproject) | **POST** /api/v2/projects | Creates a new project. | +| [**DeleteProject**](ProjectApi.md#deleteproject) | **DELETE** /api/v2/projects/{projectId} | Deletes a project. | +| [**GetProject**](ProjectApi.md#getproject) | **GET** /api/v2/projects/{projectId} | Retrieves a project. | +| [**GetProjects**](ProjectApi.md#getprojects) | **GET** /api/v2/projects | Retrieves all projects. | +| [**UpdateProject**](ProjectApi.md#updateproject) | **PUT** /api/v2/projects/{projectId} | Updates a project. | + +<a id="apiv2projectsoptions"></a> +# **ApiV2ProjectsOptions** +> void ApiV2ProjectsOptions () + +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 ApiV2ProjectsOptionsExample + { + 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 ProjectApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectApi.ApiV2ProjectsOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsOptionsWithHttpInfo 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.ApiV2ProjectsOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectApi.ApiV2ProjectsOptionsWithHttpInfo: " + 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="createproject"></a> +# **CreateProject** +> ProjectDtoResponse CreateProject (ProjectForCreationDto? projectForCreationDto = null) + +Creates a new project. + +### 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 CreateProjectExample + { + 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 ProjectApi(config); + var projectForCreationDto = new ProjectForCreationDto?(); // ProjectForCreationDto? | The project data for creation. (optional) + + try + { + // Creates a new project. + ProjectDtoResponse result = apiInstance.CreateProject(projectForCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectApi.CreateProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a new project. + ApiResponse<ProjectDtoResponse> response = apiInstance.CreateProjectWithHttpInfo(projectForCreationDto); + 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 ProjectApi.CreateProjectWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectForCreationDto** | [**ProjectForCreationDto?**](ProjectForCreationDto?.md) | The project data for creation. | [optional] | + +### Return type + +[**ProjectDtoResponse**](ProjectDtoResponse.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** | Project 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) + +<a id="deleteproject"></a> +# **DeleteProject** +> void DeleteProject (string projectId) + +Deletes a project. + +### 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 DeleteProjectExample + { + 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 ProjectApi(config); + var projectId = "projectId_example"; // string | The ID of the project. + + try + { + // Deletes a project. + apiInstance.DeleteProject(projectId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectApi.DeleteProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Deletes a project. + apiInstance.DeleteProjectWithHttpInfo(projectId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectApi.DeleteProjectWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The ID of the project. | | + +### 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 | +|-------------|-------------|------------------| +| **204** | Project deleted. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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) + +<a id="getproject"></a> +# **GetProject** +> ProjectDtoResponse GetProject (string projectId, bool? includeSubProjects = null) + +Retrieves a project. + +### 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 GetProjectExample + { + 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 ProjectApi(config); + var projectId = "projectId_example"; // string | The ID of the project. + var includeSubProjects = true; // bool? | Gets or sets a value indicating whether to include sub-projects in the retrieval. (optional) + + try + { + // Retrieves a project. + ProjectDtoResponse result = apiInstance.GetProject(projectId, includeSubProjects); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectApi.GetProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a project. + ApiResponse<ProjectDtoResponse> response = apiInstance.GetProjectWithHttpInfo(projectId, includeSubProjects); + 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 ProjectApi.GetProjectWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The ID of the project. | | +| **includeSubProjects** | **bool?** | Gets or sets a value indicating whether to include sub-projects in the retrieval. | [optional] | + +### Return type + +[**ProjectDtoResponse**](ProjectDtoResponse.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 project. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Project does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="getprojects"></a> +# **GetProjects** +> ProjectDtoPagedResponse GetProjects (bool? includeOrganizations = null, bool? topLevel = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all projects. + +### 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 GetProjectsExample + { + 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 ProjectApi(config); + var includeOrganizations = true; // bool? | Gets or sets a value indicating whether to retrieve the organizations. (optional) + var topLevel = true; // bool? | Gets or sets a value indicating whether to retrieve only top-level projects. (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 all projects. + ProjectDtoPagedResponse result = apiInstance.GetProjects(includeOrganizations, topLevel, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectApi.GetProjects: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetProjectsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all projects. + ApiResponse<ProjectDtoPagedResponse> response = apiInstance.GetProjectsWithHttpInfo(includeOrganizations, topLevel, 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 ProjectApi.GetProjectsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **includeOrganizations** | **bool?** | Gets or sets a value indicating whether to retrieve the organizations. | [optional] | +| **topLevel** | **bool?** | Gets or sets a value indicating whether to retrieve only top-level projects. | [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 + +[**ProjectDtoPagedResponse**](ProjectDtoPagedResponse.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 projects. | - | +| **403** | User is missing authorization requirements. | - | + +[[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="updateproject"></a> +# **UpdateProject** +> void UpdateProject (string projectId, ProjectForUpdateDto? projectForUpdateDto = null) + +Updates a project. + +### 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 UpdateProjectExample + { + 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 ProjectApi(config); + var projectId = "projectId_example"; // string | The ID of the project. + var projectForUpdateDto = new ProjectForUpdateDto?(); // ProjectForUpdateDto? | The updated project data. (optional) + + try + { + // Updates a project. + apiInstance.UpdateProject(projectId, projectForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectApi.UpdateProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates a project. + apiInstance.UpdateProjectWithHttpInfo(projectId, projectForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectApi.UpdateProjectWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The ID of the project. | | +| **projectForUpdateDto** | [**ProjectForUpdateDto?**](ProjectForUpdateDto?.md) | The updated project data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Project updated. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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/ProjectDto.md b/docs/ProjectDto.md new file mode 100644 index 0000000000000000000000000000000000000000..79457ef125e4009eda4e4bca833a8529cc074f95 --- /dev/null +++ b/docs/ProjectDto.md @@ -0,0 +1,28 @@ +# Coscine.ApiClient.Core.Model.ProjectDto +Represents a data transfer object (DTO) for project information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the project. | [optional] +**Pid** | **string** | Persistent identifier for the project. | [optional] +**Name** | **string** | Name of the project. | [optional] +**Description** | **string** | Description of the project. | [optional] +**StartDate** | **DateTime** | Start date of the project. | [optional] +**EndDate** | **DateTime** | End date of the project. | [optional] +**Keywords** | **List<string>** | Collection of keywords associated with the project. | [optional] +**DisplayName** | **string** | Display name of the project. | [optional] +**PrincipleInvestigators** | **string** | Principal investigators involved in the project. | [optional] +**GrantId** | **string** | Grant ID associated with the project. | [optional] +**Visibility** | [**VisibilityDto**](VisibilityDto.md) | | [optional] +**Disciplines** | [**List<DisciplineDto>**](DisciplineDto.md) | Disciplines related to the project. | [optional] +**Organizations** | [**List<OrganizationDto>**](OrganizationDto.md) | Organizations associated with the project. | [optional] +**Slug** | **string** | Slug for the project. | [optional] +**Creator** | [**UserMinimalDto**](UserMinimalDto.md) | | [optional] +**CreationDate** | **DateTime?** | Date of creation of the project. | [optional] +**SubProjects** | [**List<ProjectDto>**](ProjectDto.md) | Collection of sub-projects associated with this project. | [optional] +**Parent** | [**ProjectMinimalDto**](ProjectMinimalDto.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/ProjectDtoPagedResponse.md b/docs/ProjectDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..a3a67da8f981f508b89bba01059365e9dcd0b6f5 --- /dev/null +++ b/docs/ProjectDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ProjectDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ProjectDto>**](ProjectDto.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/ProjectDtoResponse.md b/docs/ProjectDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..5624b18efa7e61fd8f0ba773a9f07c4b76d1a8ca --- /dev/null +++ b/docs/ProjectDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ProjectDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ProjectDto**](ProjectDto.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/ProjectForCreationDto.md b/docs/ProjectForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d13c1ef27ad12b62a26f1c292fdd1e1284152110 --- /dev/null +++ b/docs/ProjectForCreationDto.md @@ -0,0 +1,22 @@ +# Coscine.ApiClient.Core.Model.ProjectForCreationDto +Data transfer object (DTO) representing the creation of a project. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProjectForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Gets or initializes the name of the project. | +**Description** | **string** | Gets or initializes the description of the project. | +**StartDate** | **DateTime** | Gets or initializes the start date of the project. | [optional] +**EndDate** | **DateTime** | Gets or initializes the end date of the project. | [optional] +**Keywords** | **List<string>** | Gets or initializes the keywords associated with the project. | [optional] +**DisplayName** | **string** | Gets or initializes the display name of the project. | [optional] +**PrincipleInvestigators** | **string** | Gets or initializes the principal investigators associated with the project. | [optional] +**GrantId** | **string** | Gets or initializes the grant ID associated with the project. | [optional] +**Visibility** | [**VisibilityForProjectManipulationDto**](VisibilityForProjectManipulationDto.md) | | +**Disciplines** | [**List<DisciplineForProjectManipulationDto>**](DisciplineForProjectManipulationDto.md) | Gets or initializes the disciplines associated with the project. | +**Organizations** | [**List<OrganizationForProjectManipulationDto>**](OrganizationForProjectManipulationDto.md) | Gets or initializes the organizations associated with the project. | +**ParentId** | **Guid?** | Gets or initializes the identifier of the parent project. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ProjectForUpdateDto.md b/docs/ProjectForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..51c8287bc263cf898068f4140062ec54a5af25b9 --- /dev/null +++ b/docs/ProjectForUpdateDto.md @@ -0,0 +1,22 @@ +# Coscine.ApiClient.Core.Model.ProjectForUpdateDto +Data transfer object (DTO) representing the update of a project. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProjectForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Gets or initializes the name of the project. | +**Description** | **string** | Gets or initializes the description of the project. | +**StartDate** | **DateTime** | Gets or initializes the start date of the project. | [optional] +**EndDate** | **DateTime** | Gets or initializes the end date of the project. | [optional] +**Keywords** | **List<string>** | Gets or initializes the keywords associated with the project. | [optional] +**DisplayName** | **string** | Gets or initializes the display name of the project. | [optional] +**PrincipleInvestigators** | **string** | Gets or initializes the principal investigators associated with the project. | [optional] +**GrantId** | **string** | Gets or initializes the grant ID associated with the project. | [optional] +**Visibility** | [**VisibilityForProjectManipulationDto**](VisibilityForProjectManipulationDto.md) | | +**Disciplines** | [**List<DisciplineForProjectManipulationDto>**](DisciplineForProjectManipulationDto.md) | Gets or initializes the disciplines associated with the project. | +**Organizations** | [**List<OrganizationForProjectManipulationDto>**](OrganizationForProjectManipulationDto.md) | Gets or initializes the organizations associated with the project. | +**Slug** | **string** | Gets or initializes the slug associated with the project for identification purposes. | + +[[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/ProjectInvitationApi.md b/docs/ProjectInvitationApi.md new file mode 100644 index 0000000000000000000000000000000000000000..a9fddec1d431a058e080c29bc4267301035ebaf9 --- /dev/null +++ b/docs/ProjectInvitationApi.md @@ -0,0 +1,492 @@ +# Coscine.ApiClient.Core.Api.ProjectInvitationApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdInvitationsOptions**](ProjectInvitationApi.md#apiv2projectsprojectidinvitationsoptions) | **OPTIONS** /api/v2/projects/{projectId}/invitations | Responds with the HTTP methods allowed for the endpoint. | +| [**CreateProjectInvitation**](ProjectInvitationApi.md#createprojectinvitation) | **POST** /api/v2/projects/{projectId}/invitations | Creates a project invitation for a specified project. | +| [**DeleteProjectInvitation**](ProjectInvitationApi.md#deleteprojectinvitation) | **DELETE** /api/v2/projects/{projectId}/invitations/{projectInvitationId} | Deletes a project invitation for a specified project. | +| [**GetProjectInvitation**](ProjectInvitationApi.md#getprojectinvitation) | **GET** /api/v2/projects/{projectId}/invitations/{projectInvitationId} | Retrieves a project invitation for a specified project. | +| [**GetProjectInvitations**](ProjectInvitationApi.md#getprojectinvitations) | **GET** /api/v2/projects/{projectId}/invitations | Retrieves all project invitations for a specified project. | + +<a id="apiv2projectsprojectidinvitationsoptions"></a> +# **ApiV2ProjectsProjectIdInvitationsOptions** +> void ApiV2ProjectsProjectIdInvitationsOptions (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 ApiV2ProjectsProjectIdInvitationsOptionsExample + { + 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 ProjectInvitationApi(config); + var projectId = "projectId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdInvitationsOptions(projectId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectInvitationApi.ApiV2ProjectsProjectIdInvitationsOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdInvitationsOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdInvitationsOptionsWithHttpInfo(projectId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectInvitationApi.ApiV2ProjectsProjectIdInvitationsOptionsWithHttpInfo: " + 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="createprojectinvitation"></a> +# **CreateProjectInvitation** +> ProjectInvitationDtoResponse CreateProjectInvitation (string projectId, ProjectInvitationForProjectManipulationDto? projectInvitationForProjectManipulationDto = null) + +Creates a project invitation for a specified project. + +### 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 CreateProjectInvitationExample + { + 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 ProjectInvitationApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var projectInvitationForProjectManipulationDto = new ProjectInvitationForProjectManipulationDto?(); // ProjectInvitationForProjectManipulationDto? | The project invitation data for creation. (optional) + + try + { + // Creates a project invitation for a specified project. + ProjectInvitationDtoResponse result = apiInstance.CreateProjectInvitation(projectId, projectInvitationForProjectManipulationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectInvitationApi.CreateProjectInvitation: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateProjectInvitationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a project invitation for a specified project. + ApiResponse<ProjectInvitationDtoResponse> response = apiInstance.CreateProjectInvitationWithHttpInfo(projectId, projectInvitationForProjectManipulationDto); + 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 ProjectInvitationApi.CreateProjectInvitationWithHttpInfo: " + 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. | | +| **projectInvitationForProjectManipulationDto** | [**ProjectInvitationForProjectManipulationDto?**](ProjectInvitationForProjectManipulationDto?.md) | The project invitation data for creation. | [optional] | + +### Return type + +[**ProjectInvitationDtoResponse**](ProjectInvitationDtoResponse.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** | Project invitation 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) + +<a id="deleteprojectinvitation"></a> +# **DeleteProjectInvitation** +> void DeleteProjectInvitation (string projectId, Guid projectInvitationId) + +Deletes a project invitation for a specified project. + +### 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 DeleteProjectInvitationExample + { + 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 ProjectInvitationApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var projectInvitationId = "projectInvitationId_example"; // Guid | The ID of the project invitation to delete. + + try + { + // Deletes a project invitation for a specified project. + apiInstance.DeleteProjectInvitation(projectId, projectInvitationId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectInvitationApi.DeleteProjectInvitation: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteProjectInvitationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Deletes a project invitation for a specified project. + apiInstance.DeleteProjectInvitationWithHttpInfo(projectId, projectInvitationId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectInvitationApi.DeleteProjectInvitationWithHttpInfo: " + 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. | | +| **projectInvitationId** | **Guid** | The ID of the project invitation to delete. | | + +### 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 | +|-------------|-------------|------------------| +| **204** | Project invitation deleted. | - | +| **403** | User is missing authorization requirements. | - | +| **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) + +<a id="getprojectinvitation"></a> +# **GetProjectInvitation** +> ProjectInvitationDtoResponse GetProjectInvitation (string projectId, Guid projectInvitationId) + +Retrieves a project invitation for a specified project. + +### 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 GetProjectInvitationExample + { + 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 ProjectInvitationApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var projectInvitationId = "projectInvitationId_example"; // Guid | The ID of the project invitation to retrieve. + + try + { + // Retrieves a project invitation for a specified project. + ProjectInvitationDtoResponse result = apiInstance.GetProjectInvitation(projectId, projectInvitationId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectInvitationApi.GetProjectInvitation: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetProjectInvitationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a project invitation for a specified project. + ApiResponse<ProjectInvitationDtoResponse> response = apiInstance.GetProjectInvitationWithHttpInfo(projectId, projectInvitationId); + 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 ProjectInvitationApi.GetProjectInvitationWithHttpInfo: " + 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. | | +| **projectInvitationId** | **Guid** | The ID of the project invitation to retrieve. | | + +### Return type + +[**ProjectInvitationDtoResponse**](ProjectInvitationDtoResponse.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 project invitation. | - | +| **404** | Project invitation does not exist. | - | + +[[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="getprojectinvitations"></a> +# **GetProjectInvitations** +> ProjectInvitationDtoPagedResponse GetProjectInvitations (string projectId, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all project invitations for a specified project. + +### 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 GetProjectInvitationsExample + { + 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 ProjectInvitationApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + 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 all project invitations for a specified project. + ProjectInvitationDtoPagedResponse result = apiInstance.GetProjectInvitations(projectId, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectInvitationApi.GetProjectInvitations: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetProjectInvitationsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all project invitations for a specified project. + ApiResponse<ProjectInvitationDtoPagedResponse> response = apiInstance.GetProjectInvitationsWithHttpInfo(projectId, 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 ProjectInvitationApi.GetProjectInvitationsWithHttpInfo: " + 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. | | +| **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 + +[**ProjectInvitationDtoPagedResponse**](ProjectInvitationDtoPagedResponse.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 project invitations. | - | + +[[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/ProjectInvitationDto.md b/docs/ProjectInvitationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..8e9307769c2474ecf556d7ee2ce35218dfa93920 --- /dev/null +++ b/docs/ProjectInvitationDto.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.ProjectInvitationDto +Represents a data transfer object (DTO) for project invitations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the invitation. | [optional] +**ExpirationDate** | **DateTime** | Expiration date of the invitation. | [optional] +**Email** | **string** | Email associated with the invitation. | [optional] +**Issuer** | [**PublicUserDto**](PublicUserDto.md) | | [optional] +**Project** | [**ProjectMinimalDto**](ProjectMinimalDto.md) | | [optional] +**Role** | [**RoleMinimalDto**](RoleMinimalDto.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/ProjectInvitationDtoPagedResponse.md b/docs/ProjectInvitationDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..4ff67ae2a5fb46a5f66ac2a8120426bfe7fcbe0a --- /dev/null +++ b/docs/ProjectInvitationDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ProjectInvitationDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ProjectInvitationDto>**](ProjectInvitationDto.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/ProjectInvitationDtoResponse.md b/docs/ProjectInvitationDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..ccae72c99d2fe322040685296b036ff53b574b14 --- /dev/null +++ b/docs/ProjectInvitationDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ProjectInvitationDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ProjectInvitationDto**](ProjectInvitationDto.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/ProjectInvitationForProjectManipulationDto.md b/docs/ProjectInvitationForProjectManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..01735d1f534b382416b13954e19f445f5a76ce7e --- /dev/null +++ b/docs/ProjectInvitationForProjectManipulationDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.ProjectInvitationForProjectManipulationDto +Data transfer object (DTO) representing an invitation for project manipulation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | **Guid** | Gets or initializes the identifier of the role associated with the invitation. | +**Email** | **string** | Gets or initializes the email address of the invited user. | + +[[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/ProjectInvitationResolveDto.md b/docs/ProjectInvitationResolveDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d71adfa5257e5208154967fcb61553ba0c19c179 --- /dev/null +++ b/docs/ProjectInvitationResolveDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ProjectInvitationResolveDto +Data transfer object (DTO) for resolving a project invitation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **Guid** | Gets or initializes the token associated with resolving the project invitation. | + +[[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/ProjectMemberApi.md b/docs/ProjectMemberApi.md new file mode 100644 index 0000000000000000000000000000000000000000..cae0e77a4e0dc5e2d499230af6f40bac20830f06 --- /dev/null +++ b/docs/ProjectMemberApi.md @@ -0,0 +1,590 @@ +# Coscine.ApiClient.Core.Api.ProjectMemberApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**AddMembership**](ProjectMemberApi.md#addmembership) | **POST** /api/v2/projects/{projectId}/members | Creates a project membership for a specified project. | +| [**ApiV2ProjectsProjectIdMembersOptions**](ProjectMemberApi.md#apiv2projectsprojectidmembersoptions) | **OPTIONS** /api/v2/projects/{projectId}/members | Responds with the HTTP methods allowed for the endpoint. | +| [**DeleteMembership**](ProjectMemberApi.md#deletemembership) | **DELETE** /api/v2/projects/{projectId}/members/{membershipId} | Deletes a project membership for a specified project. | +| [**GetMembership**](ProjectMemberApi.md#getmembership) | **GET** /api/v2/projects/{projectId}/members/{membershipId} | Retrieves a project membership for a specified project. | +| [**GetMemberships**](ProjectMemberApi.md#getmemberships) | **GET** /api/v2/projects/{projectId}/members | Retrieves all project memberships for a specified project. | +| [**UpdateMembership**](ProjectMemberApi.md#updatemembership) | **PUT** /api/v2/projects/{projectId}/members/{membershipId} | Updates a project membership for a specified project. | + +<a id="addmembership"></a> +# **AddMembership** +> ProjectRoleDtoResponse AddMembership (string projectId, ProjectRoleForProjectCreationDto? projectRoleForProjectCreationDto = null) + +Creates a project membership for a specified project. + +### 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 AddMembershipExample + { + 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 ProjectMemberApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var projectRoleForProjectCreationDto = new ProjectRoleForProjectCreationDto?(); // ProjectRoleForProjectCreationDto? | The project membership data for creation. (optional) + + try + { + // Creates a project membership for a specified project. + ProjectRoleDtoResponse result = apiInstance.AddMembership(projectId, projectRoleForProjectCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectMemberApi.AddMembership: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the AddMembershipWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a project membership for a specified project. + ApiResponse<ProjectRoleDtoResponse> response = apiInstance.AddMembershipWithHttpInfo(projectId, projectRoleForProjectCreationDto); + 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 ProjectMemberApi.AddMembershipWithHttpInfo: " + 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. | | +| **projectRoleForProjectCreationDto** | [**ProjectRoleForProjectCreationDto?**](ProjectRoleForProjectCreationDto?.md) | The project membership data for creation. | [optional] | + +### Return type + +[**ProjectRoleDtoResponse**](ProjectRoleDtoResponse.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** | Project membership 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) + +<a id="apiv2projectsprojectidmembersoptions"></a> +# **ApiV2ProjectsProjectIdMembersOptions** +> void ApiV2ProjectsProjectIdMembersOptions (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 ApiV2ProjectsProjectIdMembersOptionsExample + { + 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 ProjectMemberApi(config); + var projectId = "projectId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdMembersOptions(projectId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectMemberApi.ApiV2ProjectsProjectIdMembersOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdMembersOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdMembersOptionsWithHttpInfo(projectId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectMemberApi.ApiV2ProjectsProjectIdMembersOptionsWithHttpInfo: " + 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="deletemembership"></a> +# **DeleteMembership** +> void DeleteMembership (string projectId, Guid membershipId) + +Deletes a project membership for a specified project. + +### 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 DeleteMembershipExample + { + 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 ProjectMemberApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var membershipId = "membershipId_example"; // Guid | The ID of the project membership to delete. + + try + { + // Deletes a project membership for a specified project. + apiInstance.DeleteMembership(projectId, membershipId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectMemberApi.DeleteMembership: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteMembershipWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Deletes a project membership for a specified project. + apiInstance.DeleteMembershipWithHttpInfo(projectId, membershipId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectMemberApi.DeleteMembershipWithHttpInfo: " + 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. | | +| **membershipId** | **Guid** | The ID of the project membership to delete. | | + +### 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 | +|-------------|-------------|------------------| +| **204** | Project membership deleted. | - | +| **403** | User is missing authorization requirements. | - | +| **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) + +<a id="getmembership"></a> +# **GetMembership** +> ProjectRoleDtoResponse GetMembership (string projectId, Guid membershipId) + +Retrieves a project membership for a specified project. + +### 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 GetMembershipExample + { + 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 ProjectMemberApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var membershipId = "membershipId_example"; // Guid | The ID of the project membership to retrieve. + + try + { + // Retrieves a project membership for a specified project. + ProjectRoleDtoResponse result = apiInstance.GetMembership(projectId, membershipId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectMemberApi.GetMembership: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetMembershipWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a project membership for a specified project. + ApiResponse<ProjectRoleDtoResponse> response = apiInstance.GetMembershipWithHttpInfo(projectId, membershipId); + 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 ProjectMemberApi.GetMembershipWithHttpInfo: " + 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. | | +| **membershipId** | **Guid** | The ID of the project membership to retrieve. | | + +### Return type + +[**ProjectRoleDtoResponse**](ProjectRoleDtoResponse.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 project membership. | - | +| **404** | Project membership does not exist. | - | + +[[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="getmemberships"></a> +# **GetMemberships** +> ProjectRoleDtoPagedResponse GetMemberships (string projectId, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all project memberships for a specified project. + +### 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 GetMembershipsExample + { + 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 ProjectMemberApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + 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 all project memberships for a specified project. + ProjectRoleDtoPagedResponse result = apiInstance.GetMemberships(projectId, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectMemberApi.GetMemberships: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetMembershipsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all project memberships for a specified project. + ApiResponse<ProjectRoleDtoPagedResponse> response = apiInstance.GetMembershipsWithHttpInfo(projectId, 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 ProjectMemberApi.GetMembershipsWithHttpInfo: " + 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. | | +| **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 + +[**ProjectRoleDtoPagedResponse**](ProjectRoleDtoPagedResponse.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 project memberships. | - | + +[[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="updatemembership"></a> +# **UpdateMembership** +> void UpdateMembership (string projectId, Guid membershipId, ProjectRoleForProjectManipulationDto? projectRoleForProjectManipulationDto = null) + +Updates a project membership for a specified project. + +### 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 UpdateMembershipExample + { + 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 ProjectMemberApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var membershipId = "membershipId_example"; // Guid | The ID of the project membership to update. + var projectRoleForProjectManipulationDto = new ProjectRoleForProjectManipulationDto?(); // ProjectRoleForProjectManipulationDto? | The updated project membership data. (optional) + + try + { + // Updates a project membership for a specified project. + apiInstance.UpdateMembership(projectId, membershipId, projectRoleForProjectManipulationDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectMemberApi.UpdateMembership: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateMembershipWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates a project membership for a specified project. + apiInstance.UpdateMembershipWithHttpInfo(projectId, membershipId, projectRoleForProjectManipulationDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectMemberApi.UpdateMembershipWithHttpInfo: " + 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. | | +| **membershipId** | **Guid** | The ID of the project membership to update. | | +| **projectRoleForProjectManipulationDto** | [**ProjectRoleForProjectManipulationDto?**](ProjectRoleForProjectManipulationDto?.md) | The updated project membership data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Project membership updated. | - | +| **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/ProjectMinimalDto.md b/docs/ProjectMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..2bee62e11dc68e2674eb3c31e09818d0565b078f --- /dev/null +++ b/docs/ProjectMinimalDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ProjectMinimalDto +Represents a minimal data transfer object (DTO) for a project. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the project. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ProjectQuotaApi.md b/docs/ProjectQuotaApi.md new file mode 100644 index 0000000000000000000000000000000000000000..06eaf98c435b2997aabf87dac12e29d2c5fbf13a --- /dev/null +++ b/docs/ProjectQuotaApi.md @@ -0,0 +1,395 @@ +# Coscine.ApiClient.Core.Api.ProjectQuotaApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdQuotasOptions**](ProjectQuotaApi.md#apiv2projectsprojectidquotasoptions) | **OPTIONS** /api/v2/projects/{projectId}/quotas | Responds with the HTTP methods allowed for the endpoint. | +| [**GetProjectQuota**](ProjectQuotaApi.md#getprojectquota) | **GET** /api/v2/projects/{projectId}/quotas/{resourceTypeId} | Retrieves a project quota for a specified project and resource type. | +| [**GetProjectQuotas**](ProjectQuotaApi.md#getprojectquotas) | **GET** /api/v2/projects/{projectId}/quotas | Retrieves all project quotas for a specified project. | +| [**UpdateProjectQuota**](ProjectQuotaApi.md#updateprojectquota) | **PUT** /api/v2/projects/{projectId}/quotas/{resourceTypeId} | Updates a project quota for a specified project and resource type. | + +<a id="apiv2projectsprojectidquotasoptions"></a> +# **ApiV2ProjectsProjectIdQuotasOptions** +> void ApiV2ProjectsProjectIdQuotasOptions (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 ApiV2ProjectsProjectIdQuotasOptionsExample + { + 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 ProjectQuotaApi(config); + var projectId = "projectId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdQuotasOptions(projectId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectQuotaApi.ApiV2ProjectsProjectIdQuotasOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdQuotasOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdQuotasOptionsWithHttpInfo(projectId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectQuotaApi.ApiV2ProjectsProjectIdQuotasOptionsWithHttpInfo: " + 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="getprojectquota"></a> +# **GetProjectQuota** +> ProjectQuotaDtoResponse GetProjectQuota (string projectId, Guid resourceTypeId) + +Retrieves a project quota for a specified project and resource type. + +### 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 GetProjectQuotaExample + { + 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 ProjectQuotaApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var resourceTypeId = "resourceTypeId_example"; // Guid | The ID of the resource type. + + try + { + // Retrieves a project quota for a specified project and resource type. + ProjectQuotaDtoResponse result = apiInstance.GetProjectQuota(projectId, resourceTypeId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectQuotaApi.GetProjectQuota: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetProjectQuotaWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a project quota for a specified project and resource type. + ApiResponse<ProjectQuotaDtoResponse> response = apiInstance.GetProjectQuotaWithHttpInfo(projectId, resourceTypeId); + 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 ProjectQuotaApi.GetProjectQuotaWithHttpInfo: " + 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. | | +| **resourceTypeId** | **Guid** | The ID of the resource type. | | + +### Return type + +[**ProjectQuotaDtoResponse**](ProjectQuotaDtoResponse.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 project quota. | - | +| **404** | Project quota does not exist. | - | + +[[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="getprojectquotas"></a> +# **GetProjectQuotas** +> ProjectQuotaDtoPagedResponse GetProjectQuotas (string projectId, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all project quotas for a specified project. + +### 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 GetProjectQuotasExample + { + 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 ProjectQuotaApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + 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 all project quotas for a specified project. + ProjectQuotaDtoPagedResponse result = apiInstance.GetProjectQuotas(projectId, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectQuotaApi.GetProjectQuotas: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetProjectQuotasWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all project quotas for a specified project. + ApiResponse<ProjectQuotaDtoPagedResponse> response = apiInstance.GetProjectQuotasWithHttpInfo(projectId, 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 ProjectQuotaApi.GetProjectQuotasWithHttpInfo: " + 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. | | +| **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 + +[**ProjectQuotaDtoPagedResponse**](ProjectQuotaDtoPagedResponse.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 project quotas. | - | + +[[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="updateprojectquota"></a> +# **UpdateProjectQuota** +> void UpdateProjectQuota (string projectId, Guid resourceTypeId, ProjectQuotaForUpdateDto? projectQuotaForUpdateDto = null) + +Updates a project quota for a specified project and resource type. + +### 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 UpdateProjectQuotaExample + { + 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 ProjectQuotaApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var resourceTypeId = "resourceTypeId_example"; // Guid | The ID of the resource type. + var projectQuotaForUpdateDto = new ProjectQuotaForUpdateDto?(); // ProjectQuotaForUpdateDto? | The updated project quota data. (optional) + + try + { + // Updates a project quota for a specified project and resource type. + apiInstance.UpdateProjectQuota(projectId, resourceTypeId, projectQuotaForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectQuotaApi.UpdateProjectQuota: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateProjectQuotaWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates a project quota for a specified project and resource type. + apiInstance.UpdateProjectQuotaWithHttpInfo(projectId, resourceTypeId, projectQuotaForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectQuotaApi.UpdateProjectQuotaWithHttpInfo: " + 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. | | +| **resourceTypeId** | **Guid** | The ID of the resource type. | | +| **projectQuotaForUpdateDto** | [**ProjectQuotaForUpdateDto?**](ProjectQuotaForUpdateDto?.md) | The updated project quota data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Project quota updated. | - | +| **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/ProjectQuotaDto.md b/docs/ProjectQuotaDto.md new file mode 100644 index 0000000000000000000000000000000000000000..1fd08bebf11883a81653fbfea0c09cc8f115232d --- /dev/null +++ b/docs/ProjectQuotaDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.ProjectQuotaDto +Represents a data transfer object (DTO) containing quota information for a project. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProjectId** | **Guid** | Identifier of the project. | [optional] +**TotalUsed** | [**QuotaDto**](QuotaDto.md) | | [optional] +**TotalReserved** | [**QuotaDto**](QuotaDto.md) | | [optional] +**Allocated** | [**QuotaDto**](QuotaDto.md) | | [optional] +**Maximum** | [**QuotaDto**](QuotaDto.md) | | [optional] +**ResourceType** | [**ResourceTypeMinimalDto**](ResourceTypeMinimalDto.md) | | [optional] +**ResourceQuotas** | [**List<ResourceQuotaDto>**](ResourceQuotaDto.md) | Quota information for individual resources of the selected project's resource type. | [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/ProjectQuotaDtoPagedResponse.md b/docs/ProjectQuotaDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..5c9d54760aba0036d88f185d7a703221954d4708 --- /dev/null +++ b/docs/ProjectQuotaDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ProjectQuotaDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ProjectQuotaDto>**](ProjectQuotaDto.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/ProjectQuotaDtoResponse.md b/docs/ProjectQuotaDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..767a7eb41c7104e9976780a356812d8cf22fb563 --- /dev/null +++ b/docs/ProjectQuotaDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ProjectQuotaDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ProjectQuotaDto**](ProjectQuotaDto.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/ProjectQuotaForUpdateDto.md b/docs/ProjectQuotaForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d90b996c3aad513bef2c218cb111a1f8af5a24fc --- /dev/null +++ b/docs/ProjectQuotaForUpdateDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.ProjectQuotaForUpdateDto +Data transfer object (DTO) representing the update of project quotas. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Allocated** | [**QuotaForManipulationDto**](QuotaForManipulationDto.md) | | +**Maximum** | [**QuotaForManipulationDto**](QuotaForManipulationDto.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/ProjectResourceApi.md b/docs/ProjectResourceApi.md new file mode 100644 index 0000000000000000000000000000000000000000..dd2367a8c3758413e45b989a78a4589165d3f568 --- /dev/null +++ b/docs/ProjectResourceApi.md @@ -0,0 +1,594 @@ +# Coscine.ApiClient.Core.Api.ProjectResourceApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdResourcesOptions**](ProjectResourceApi.md#apiv2projectsprojectidresourcesoptions) | **OPTIONS** /api/v2/projects/{projectId}/resources | Responds with the HTTP methods allowed for the endpoint. | +| [**CreateResourceForProject**](ProjectResourceApi.md#createresourceforproject) | **POST** /api/v2/projects/{projectId}/resources | Creates a new resource for a specified project. | +| [**DeleteResourceForProject**](ProjectResourceApi.md#deleteresourceforproject) | **DELETE** /api/v2/projects/{projectId}/resources/{resourceId} | Deletes a resource for a specified project. | +| [**GetResourceForProject**](ProjectResourceApi.md#getresourceforproject) | **GET** /api/v2/projects/{projectId}/resources/{resourceId} | Retrieves a resource for a specified project. | +| [**GetResourcesForProject**](ProjectResourceApi.md#getresourcesforproject) | **GET** /api/v2/projects/{projectId}/resources | Retrieves all resources for a specified project. | +| [**UpdateResourceForProject**](ProjectResourceApi.md#updateresourceforproject) | **PUT** /api/v2/projects/{projectId}/resources/{resourceId} | Updates a resource for a specified project. | + +<a id="apiv2projectsprojectidresourcesoptions"></a> +# **ApiV2ProjectsProjectIdResourcesOptions** +> void ApiV2ProjectsProjectIdResourcesOptions (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 ApiV2ProjectsProjectIdResourcesOptionsExample + { + 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 ProjectResourceApi(config); + var projectId = "projectId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdResourcesOptions(projectId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceApi.ApiV2ProjectsProjectIdResourcesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdResourcesOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdResourcesOptionsWithHttpInfo(projectId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectResourceApi.ApiV2ProjectsProjectIdResourcesOptionsWithHttpInfo: " + 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="createresourceforproject"></a> +# **CreateResourceForProject** +> ResourceDtoResponse CreateResourceForProject (string projectId, ResourceForCreationDto? resourceForCreationDto = null) + +Creates a new resource for a specified project. + +### 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 CreateResourceForProjectExample + { + 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 ProjectResourceApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var resourceForCreationDto = new ResourceForCreationDto?(); // ResourceForCreationDto? | The resource data for creation. (optional) + + try + { + // Creates a new resource for a specified project. + ResourceDtoResponse result = apiInstance.CreateResourceForProject(projectId, resourceForCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceApi.CreateResourceForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateResourceForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a new resource for a specified project. + ApiResponse<ResourceDtoResponse> response = apiInstance.CreateResourceForProjectWithHttpInfo(projectId, resourceForCreationDto); + 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 ProjectResourceApi.CreateResourceForProjectWithHttpInfo: " + 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. | | +| **resourceForCreationDto** | [**ResourceForCreationDto?**](ResourceForCreationDto?.md) | The resource data for creation. | [optional] | + +### Return type + +[**ResourceDtoResponse**](ResourceDtoResponse.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** | Resource 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) + +<a id="deleteresourceforproject"></a> +# **DeleteResourceForProject** +> void DeleteResourceForProject (string projectId, Guid resourceId) + +Deletes a resource for a specified project. + +### 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 DeleteResourceForProjectExample + { + 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 ProjectResourceApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var resourceId = "resourceId_example"; // Guid | The ID of the resource to delete. + + try + { + // Deletes a resource for a specified project. + apiInstance.DeleteResourceForProject(projectId, resourceId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceApi.DeleteResourceForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteResourceForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Deletes a resource for a specified project. + apiInstance.DeleteResourceForProjectWithHttpInfo(projectId, resourceId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectResourceApi.DeleteResourceForProjectWithHttpInfo: " + 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. | | +| **resourceId** | **Guid** | The ID of the resource to delete. | | + +### 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 | +|-------------|-------------|------------------| +| **204** | Resource deleted. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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) + +<a id="getresourceforproject"></a> +# **GetResourceForProject** +> ResourceDtoResponse GetResourceForProject (string projectId, Guid resourceId) + +Retrieves a resource for a specified project. + +### 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 GetResourceForProjectExample + { + 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 ProjectResourceApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var resourceId = "resourceId_example"; // Guid | The ID of the resource to retrieve. + + try + { + // Retrieves a resource for a specified project. + ResourceDtoResponse result = apiInstance.GetResourceForProject(projectId, resourceId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceApi.GetResourceForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetResourceForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a resource for a specified project. + ApiResponse<ResourceDtoResponse> response = apiInstance.GetResourceForProjectWithHttpInfo(projectId, resourceId); + 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 ProjectResourceApi.GetResourceForProjectWithHttpInfo: " + 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. | | +| **resourceId** | **Guid** | The ID of the resource to retrieve. | | + +### Return type + +[**ResourceDtoResponse**](ResourceDtoResponse.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 resource. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Resource does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="getresourcesforproject"></a> +# **GetResourcesForProject** +> ResourceDtoPagedResponse GetResourcesForProject (string projectId, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all resources for a specified project. + +### 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 GetResourcesForProjectExample + { + 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 ProjectResourceApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + 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 all resources for a specified project. + ResourceDtoPagedResponse result = apiInstance.GetResourcesForProject(projectId, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceApi.GetResourcesForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetResourcesForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all resources for a specified project. + ApiResponse<ResourceDtoPagedResponse> response = apiInstance.GetResourcesForProjectWithHttpInfo(projectId, 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 ProjectResourceApi.GetResourcesForProjectWithHttpInfo: " + 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. | | +| **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 + +[**ResourceDtoPagedResponse**](ResourceDtoPagedResponse.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 resources. | - | +| **403** | User is missing authorization requirements. | - | + +[[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="updateresourceforproject"></a> +# **UpdateResourceForProject** +> void UpdateResourceForProject (string projectId, Guid resourceId, ResourceForUpdateDto? resourceForUpdateDto = null) + +Updates a resource for a specified project. + +### 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 UpdateResourceForProjectExample + { + 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 ProjectResourceApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var resourceId = "resourceId_example"; // Guid | The ID of the resource to update. + var resourceForUpdateDto = new ResourceForUpdateDto?(); // ResourceForUpdateDto? | The updated resource data. (optional) + + try + { + // Updates a resource for a specified project. + apiInstance.UpdateResourceForProject(projectId, resourceId, resourceForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceApi.UpdateResourceForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateResourceForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates a resource for a specified project. + apiInstance.UpdateResourceForProjectWithHttpInfo(projectId, resourceId, resourceForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectResourceApi.UpdateResourceForProjectWithHttpInfo: " + 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. | | +| **resourceId** | **Guid** | The ID of the resource to update. | | +| **resourceForUpdateDto** | [**ResourceForUpdateDto?**](ResourceForUpdateDto?.md) | The updated resource data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Resource updated. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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/ProjectResourceMinimalDto.md b/docs/ProjectResourceMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..c5c1a5fee9a3b47d7a569e1a5db4fdc3040bd4f3 --- /dev/null +++ b/docs/ProjectResourceMinimalDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.ProjectResourceMinimalDto +Represents a minimal data transfer object (DTO) for a project resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourceId** | **Guid** | Identifier of the resource. | [optional] +**ProjectId** | **Guid** | Identifier of the project associated with the resource. | [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/ProjectResourceQuotaApi.md b/docs/ProjectResourceQuotaApi.md new file mode 100644 index 0000000000000000000000000000000000000000..f3e6a29e9e74f998d4fa31ec0b3013f415c219c0 --- /dev/null +++ b/docs/ProjectResourceQuotaApi.md @@ -0,0 +1,198 @@ +# Coscine.ApiClient.Core.Api.ProjectResourceQuotaApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptions**](ProjectResourceQuotaApi.md#apiv2projectsprojectidresourcesresourceidquotaoptions) | **OPTIONS** /api/v2/projects/{projectId}/resources/{resourceId}/quota | Responds with the HTTP methods allowed for the endpoint. | +| [**GetQuotaForResourceForProject**](ProjectResourceQuotaApi.md#getquotaforresourceforproject) | **GET** /api/v2/projects/{projectId}/resources/{resourceId}/quota | Retrieves the resource quota for a specific resource in a project. | + +<a id="apiv2projectsprojectidresourcesresourceidquotaoptions"></a> +# **ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptions** +> void ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptions (string projectId, string resourceId) + +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 ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptionsExample + { + 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 ProjectResourceQuotaApi(config); + var projectId = "projectId_example"; // string | + var resourceId = "resourceId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptions(projectId, resourceId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceQuotaApi.ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptionsWithHttpInfo(projectId, resourceId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectResourceQuotaApi.ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | | | +| **resourceId** | **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="getquotaforresourceforproject"></a> +# **GetQuotaForResourceForProject** +> ResourceQuotaDtoResponse GetQuotaForResourceForProject (string projectId, Guid resourceId) + +Retrieves the resource quota for a specific resource in a project. + +### 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 GetQuotaForResourceForProjectExample + { + 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 ProjectResourceQuotaApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + var resourceId = "resourceId_example"; // Guid | The ID of the resource. + + try + { + // Retrieves the resource quota for a specific resource in a project. + ResourceQuotaDtoResponse result = apiInstance.GetQuotaForResourceForProject(projectId, resourceId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceQuotaApi.GetQuotaForResourceForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetQuotaForResourceForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the resource quota for a specific resource in a project. + ApiResponse<ResourceQuotaDtoResponse> response = apiInstance.GetQuotaForResourceForProjectWithHttpInfo(projectId, resourceId); + 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 ProjectResourceQuotaApi.GetQuotaForResourceForProjectWithHttpInfo: " + 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. | | +| **resourceId** | **Guid** | The ID of the resource. | | + +### Return type + +[**ResourceQuotaDtoResponse**](ResourceQuotaDtoResponse.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 resource quota. | - | +| **403** | User is missing authorization requirements. | - | + +[[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/ProjectResourceTypeApi.md b/docs/ProjectResourceTypeApi.md new file mode 100644 index 0000000000000000000000000000000000000000..255936a05bbc307f8c6018bde7f0efc01972782f --- /dev/null +++ b/docs/ProjectResourceTypeApi.md @@ -0,0 +1,195 @@ +# Coscine.ApiClient.Core.Api.ProjectResourceTypeApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdResourceTypesOptions**](ProjectResourceTypeApi.md#apiv2projectsprojectidresourcetypesoptions) | **OPTIONS** /api/v2/projects/{projectId}/resource-types | Responds with the HTTP methods allowed for the endpoint. | +| [**GetAvailableResourceTypesInformationForProject**](ProjectResourceTypeApi.md#getavailableresourcetypesinformationforproject) | **GET** /api/v2/projects/{projectId}/resource-types | Retrieves the available resource types information for a specific project. | + +<a id="apiv2projectsprojectidresourcetypesoptions"></a> +# **ApiV2ProjectsProjectIdResourceTypesOptions** +> void ApiV2ProjectsProjectIdResourceTypesOptions (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 ApiV2ProjectsProjectIdResourceTypesOptionsExample + { + 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 ProjectResourceTypeApi(config); + var projectId = "projectId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdResourceTypesOptions(projectId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceTypeApi.ApiV2ProjectsProjectIdResourceTypesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdResourceTypesOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdResourceTypesOptionsWithHttpInfo(projectId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProjectResourceTypeApi.ApiV2ProjectsProjectIdResourceTypesOptionsWithHttpInfo: " + 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="getavailableresourcetypesinformationforproject"></a> +# **GetAvailableResourceTypesInformationForProject** +> ResourceTypeInformationDtoIEnumerableResponse GetAvailableResourceTypesInformationForProject (string projectId) + +Retrieves the available resource types information for a specific project. + +### 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 GetAvailableResourceTypesInformationForProjectExample + { + 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 ProjectResourceTypeApi(config); + var projectId = "projectId_example"; // string | The Id or slug of the project. + + try + { + // Retrieves the available resource types information for a specific project. + ResourceTypeInformationDtoIEnumerableResponse result = apiInstance.GetAvailableResourceTypesInformationForProject(projectId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProjectResourceTypeApi.GetAvailableResourceTypesInformationForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAvailableResourceTypesInformationForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the available resource types information for a specific project. + ApiResponse<ResourceTypeInformationDtoIEnumerableResponse> response = apiInstance.GetAvailableResourceTypesInformationForProjectWithHttpInfo(projectId); + 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 ProjectResourceTypeApi.GetAvailableResourceTypesInformationForProjectWithHttpInfo: " + 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. | | + +### Return type + +[**ResourceTypeInformationDtoIEnumerableResponse**](ResourceTypeInformationDtoIEnumerableResponse.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 available resourceTypeInformation types information. | - | +| **403** | User is missing authorization requirements. | - | +| **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/ProjectRoleDto.md b/docs/ProjectRoleDto.md new file mode 100644 index 0000000000000000000000000000000000000000..a45b8be2721bcec42a02e13424708b204aec0425 --- /dev/null +++ b/docs/ProjectRoleDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ProjectRoleDto +Represents a data transfer object (DTO) for a project role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Identifier of the project role. | [optional] +**Project** | [**ProjectMinimalDto**](ProjectMinimalDto.md) | | [optional] +**Role** | [**RoleDto**](RoleDto.md) | | [optional] +**User** | [**PublicUserDto**](PublicUserDto.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/ProjectRoleDtoPagedResponse.md b/docs/ProjectRoleDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..a3b405b961d44711ff2d7104fffdc770a2138d1a --- /dev/null +++ b/docs/ProjectRoleDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ProjectRoleDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ProjectRoleDto>**](ProjectRoleDto.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/ProjectRoleDtoResponse.md b/docs/ProjectRoleDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..bdbb2eb4ab77d8162e60362f51c32f49e47e7520 --- /dev/null +++ b/docs/ProjectRoleDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ProjectRoleDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ProjectRoleDto**](ProjectRoleDto.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/ProjectRoleForProjectCreationDto.md b/docs/ProjectRoleForProjectCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..a6fd9c284938314ad64a2fa4598e5e47bb464a6d --- /dev/null +++ b/docs/ProjectRoleForProjectCreationDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.ProjectRoleForProjectCreationDto +Data transfer object (DTO) representing the creation of a project role within a project. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProjectRoleForProjectManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | **Guid** | Gets or initializes the identifier of the role associated with the project manipulation. | +**UserId** | **Guid** | Gets or initializes the identifier of the user associated with the project role creation. | + +[[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/ProjectRoleForProjectManipulationDto.md b/docs/ProjectRoleForProjectManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..c758a7ffdaaa75e6c32bff30c265b885f3a4f955 --- /dev/null +++ b/docs/ProjectRoleForProjectManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ProjectRoleForProjectManipulationDto +Data transfer object (DTO) representing a project role for manipulation within a project. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | **Guid** | Gets or initializes the identifier of the role associated with the project manipulation. | + +[[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/ProjectRoleMinimalDto.md b/docs/ProjectRoleMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..3516d4f0e2fa99afe446dfd1518c4b7ec056aac8 --- /dev/null +++ b/docs/ProjectRoleMinimalDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ProjectRoleMinimalDto +Represents a minimal data transfer object (DTO) for a project role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProjectId** | **Guid** | Identifier of the project associated with the role. | [optional] +**UserId** | **Guid** | Identifier of the user associated with the role. | [optional] +**RoleId** | **Guid** | Identifier of the role. | [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/ProvenanceApi.md b/docs/ProvenanceApi.md new file mode 100644 index 0000000000000000000000000000000000000000..8915cbd5ac3664f5442ffd010d330c130290d4cc --- /dev/null +++ b/docs/ProvenanceApi.md @@ -0,0 +1,304 @@ +# Coscine.ApiClient.Core.Api.ProvenanceApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptions**](ProvenanceApi.md#apiv2projectsprojectidresourcesresourceidprovenanceoptions) | **OPTIONS** /api/v2/projects/{projectId}/resources/{resourceId}/provenance | Responds with the HTTP methods allowed for the endpoint. | +| [**GetSpecificProvenance**](ProvenanceApi.md#getspecificprovenance) | **GET** /api/v2/projects/{projectId}/resources/{resourceId}/provenance/specific | Retrieves the specific provenance information associated with a resource. | +| [**UpdateSpecificProvenance**](ProvenanceApi.md#updatespecificprovenance) | **PUT** /api/v2/projects/{projectId}/resources/{resourceId}/provenance/specific | Updates existing specific provenance information of a resource. | + +<a id="apiv2projectsprojectidresourcesresourceidprovenanceoptions"></a> +# **ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptions** +> void ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptions (string projectId, string resourceId) + +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 ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptionsExample + { + 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 ProvenanceApi(config); + var projectId = "projectId_example"; // string | + var resourceId = "resourceId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptions(projectId, resourceId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProvenanceApi.ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptionsWithHttpInfo(projectId, resourceId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProvenanceApi.ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | | | +| **resourceId** | **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="getspecificprovenance"></a> +# **GetSpecificProvenance** +> ProvenanceDtoResponse GetSpecificProvenance (string projectId, Guid resourceId, string path, int? version = null) + +Retrieves the specific provenance information associated with a resource. + +### 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 GetSpecificProvenanceExample + { + 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 ProvenanceApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var path = "path_example"; // string | Gets or sets the path of the metadata tree. + var version = 56; // int? | Gets or sets the desired version. If the version is null, the newest will be returned. (optional) + + try + { + // Retrieves the specific provenance information associated with a resource. + ProvenanceDtoResponse result = apiInstance.GetSpecificProvenance(projectId, resourceId, path, version); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProvenanceApi.GetSpecificProvenance: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSpecificProvenanceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the specific provenance information associated with a resource. + ApiResponse<ProvenanceDtoResponse> response = apiInstance.GetSpecificProvenanceWithHttpInfo(projectId, resourceId, path, version); + 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 ProvenanceApi.GetSpecificProvenanceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **path** | **string** | Gets or sets the path of the metadata tree. | | +| **version** | **int?** | Gets or sets the desired version. If the version is null, the newest will be returned. | [optional] | + +### Return type + +[**ProvenanceDtoResponse**](ProvenanceDtoResponse.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 specific metadata tree of a resource. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Project does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="updatespecificprovenance"></a> +# **UpdateSpecificProvenance** +> void UpdateSpecificProvenance (string projectId, Guid resourceId, ProvenanceForUpdateDto? provenanceForUpdateDto = null) + +Updates existing specific provenance information of a resource. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 UpdateSpecificProvenanceExample + { + 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 ProvenanceApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var provenanceForUpdateDto = new ProvenanceForUpdateDto?(); // ProvenanceForUpdateDto? | The updated provenance information. (optional) + + try + { + // Updates existing specific provenance information of a resource. + apiInstance.UpdateSpecificProvenance(projectId, resourceId, provenanceForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProvenanceApi.UpdateSpecificProvenance: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateSpecificProvenanceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates existing specific provenance information of a resource. + apiInstance.UpdateSpecificProvenanceWithHttpInfo(projectId, resourceId, provenanceForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProvenanceApi.UpdateSpecificProvenanceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **provenanceForUpdateDto** | [**ProvenanceForUpdateDto?**](ProvenanceForUpdateDto?.md) | The updated provenance information. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Provenance information updated. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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/ProvenanceDto.md b/docs/ProvenanceDto.md new file mode 100644 index 0000000000000000000000000000000000000000..072e564f71a963de41ac9ceac76c2fbb6405b1e9 --- /dev/null +++ b/docs/ProvenanceDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.ProvenanceDto +Represents a data transfer object (DTO) for provenance information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Gets or sets the id of the current metadata graph. | [optional] +**GeneratedAt** | **DateTime?** | Gets or sets the date and time when the metadata was generated. | [optional] +**WasRevisionOf** | **List<string>** | Gets or sets the adapted versions from the specific metadata tree. | [optional] +**Variants** | [**List<VariantDto>**](VariantDto.md) | Gets or sets the variants of the specific metadata tree. | [optional] +**SimilarityToLastVersion** | **double?** | The similarity to the last version. | [optional] +**WasInvalidatedBy** | **string** | Information if the specific metadata tree was invalidated by something. | [optional] +**HashParameters** | [**HashParametersDto**](HashParametersDto.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/ProvenanceDtoResponse.md b/docs/ProvenanceDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..bc8c07ec56ba580ddfdad89675c524fdd86f59a7 --- /dev/null +++ b/docs/ProvenanceDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ProvenanceDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ProvenanceDto**](ProvenanceDto.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/ProvenanceForUpdateDto.md b/docs/ProvenanceForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..50982e4eed6a8c527c516d23cc28d186496237dd --- /dev/null +++ b/docs/ProvenanceForUpdateDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.ProvenanceForUpdateDto +Data transfer object (DTO) representing the update of provenance Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProvenanceParametersDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WasRevisionOf** | **List<string>** | Gets or sets the adapted versions from the specific metadata tree. | [optional] +**Variants** | [**List<VariantDto>**](VariantDto.md) | Gets or sets the variants of the specific metadata tree. | [optional] +**WasInvalidatedBy** | **string** | Information if the specific metadata tree was invalidated by something. | [optional] +**SimilarityToLastVersion** | **double?** | The similarity to the last version. | [optional] +**MetadataExtractorVersion** | **string** | Gets or initializes the version of the metadata extractor. | [optional] +**HashParameters** | [**HashParametersDto**](HashParametersDto.md) | | [optional] +**Id** | **string** | Gets or sets the id of the specific metadata tree. | [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/ProvenanceParametersDto.md b/docs/ProvenanceParametersDto.md new file mode 100644 index 0000000000000000000000000000000000000000..13c00b04c425aa238361e042a73e35f63e215674 --- /dev/null +++ b/docs/ProvenanceParametersDto.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.ProvenanceParametersDto +Data transfer object (DTO) representing Provenance Parameters in a request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WasRevisionOf** | **List<string>** | Gets or sets the adapted versions from the specific metadata tree. | [optional] +**Variants** | [**List<VariantDto>**](VariantDto.md) | Gets or sets the variants of the specific metadata tree. | [optional] +**WasInvalidatedBy** | **string** | Information if the specific metadata tree was invalidated by something. | [optional] +**SimilarityToLastVersion** | **double?** | The similarity to the last version. | [optional] +**MetadataExtractorVersion** | **string** | Gets or initializes the version of the metadata extractor. | [optional] +**HashParameters** | [**HashParametersDto**](HashParametersDto.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/PublicUserDto.md b/docs/PublicUserDto.md new file mode 100644 index 0000000000000000000000000000000000000000..635f2310e9ae0b54499f2f5901331f34c47a72e3 --- /dev/null +++ b/docs/PublicUserDto.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.PublicUserDto +Represents a public user data transfer object (DTO). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier of the user. | [optional] +**DisplayName** | **string** | Display name of the user. | [optional] +**GivenName** | **string** | Given name of the user. | [optional] +**FamilyName** | **string** | Family name of the user. | [optional] +**Email** | **string** | Email address of the user. | [optional] +**Title** | [**TitleDto**](TitleDto.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/PublicUserDtoIEnumerableResponse.md b/docs/PublicUserDtoIEnumerableResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..7a9bf4fcf5a25b229f9e9152d39c0a968d224913 --- /dev/null +++ b/docs/PublicUserDtoIEnumerableResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.PublicUserDtoIEnumerableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<PublicUserDto>**](PublicUserDto.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/PublicationAdvisoryServiceDto.md b/docs/PublicationAdvisoryServiceDto.md new file mode 100644 index 0000000000000000000000000000000000000000..3583ac5104605b266cb0f7b2017b90cae13d10a2 --- /dev/null +++ b/docs/PublicationAdvisoryServiceDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.PublicationAdvisoryServiceDto +Data transfer object (DTO) representing the publication advisory service of an organization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DisplayName** | **string** | The data publication service's display name. | +**Email** | **string** | The data publication service's email address. | + +[[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/QuotaDto.md b/docs/QuotaDto.md new file mode 100644 index 0000000000000000000000000000000000000000..7c53d93ef945df0c6c857041d9c4d55b6959148c --- /dev/null +++ b/docs/QuotaDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.QuotaDto +Represents a Data Transfer Object (DTO) for quota values. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **float** | The value of the quota. | +**Unit** | **QuotaUnit** | | + +[[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/QuotaForManipulationDto.md b/docs/QuotaForManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..8b6864a2aa7bcfb417db32c68b8f20be2d25fffd --- /dev/null +++ b/docs/QuotaForManipulationDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.QuotaForManipulationDto +Represents a data transfer object (DTO) used for manipulating quota values. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **long** | The numerical value of the quota. Must be a positive System.Int64. | +**Unit** | **QuotaUnit** | | + +[[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/QuotaUnit.md b/docs/QuotaUnit.md new file mode 100644 index 0000000000000000000000000000000000000000..7370786bfa0c3f59361c96cbf09a2de6c68d2f4f --- /dev/null +++ b/docs/QuotaUnit.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.QuotaUnit +Specifies the unit of quota. + +## 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/RdfDefinitionDto.md b/docs/RdfDefinitionDto.md new file mode 100644 index 0000000000000000000000000000000000000000..517234062bf8adf760adb02e5e8183880590136b --- /dev/null +++ b/docs/RdfDefinitionDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.RdfDefinitionDto +Represents a Data Transfer Object (DTO) for RDF (Resource Description Framework) definition details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **string** | The content of the RDF definition. | [optional] +**Type** | **string** | The type of the RDF definition. | [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/RdfDefinitionDtoResponse.md b/docs/RdfDefinitionDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..a6e05d19307bac7ae2300b26a1f10e8fb58eb4b4 --- /dev/null +++ b/docs/RdfDefinitionDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.RdfDefinitionDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**RdfDefinitionDto**](RdfDefinitionDto.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/RdfDefinitionForManipulationDto.md b/docs/RdfDefinitionForManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..11d6fdc847d38d7b145a39ea719e10756d05db4b --- /dev/null +++ b/docs/RdfDefinitionForManipulationDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.RdfDefinitionForManipulationDto +Represents the data transfer object (DTO) used for manipulating RDF definitions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **string** | The content of the RDF definition. | +**Type** | **RdfFormat** | | + +[[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/RdfFormat.md b/docs/RdfFormat.md new file mode 100644 index 0000000000000000000000000000000000000000..218966d69f2fbda6e2a5f9d73bdd99daba48ff26 --- /dev/null +++ b/docs/RdfFormat.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.RdfFormat +Specifies the RDF <i>(Resource Description Framework)</i> format. + +## 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/RdfPatchDocumentDto.md b/docs/RdfPatchDocumentDto.md new file mode 100644 index 0000000000000000000000000000000000000000..29fd5238b1a51a42c0f7adae9e806c3fe0e8d32b --- /dev/null +++ b/docs/RdfPatchDocumentDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.RdfPatchDocumentDto +Represents an RDF Patch document containing a series of operations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Operations** | [**List<RdfPatchOperationDto>**](RdfPatchOperationDto.md) | The list of operations in the RDF Patch document. | [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/RdfPatchOperationDto.md b/docs/RdfPatchOperationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..36573628f266b79502a9872bcfc1cac23eff2d31 --- /dev/null +++ b/docs/RdfPatchOperationDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.RdfPatchOperationDto +Represents a single operation in an RDF Patch document. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OperationType** | **RdfPatchOperationType** | | [optional] +**Changes** | [**RdfDefinitionForManipulationDto**](RdfDefinitionForManipulationDto.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/RdfPatchOperationType.md b/docs/RdfPatchOperationType.md new file mode 100644 index 0000000000000000000000000000000000000000..a8aa8542605885215cd198764a943491a231932e --- /dev/null +++ b/docs/RdfPatchOperationType.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.RdfPatchOperationType +Represents the types of operations that can be performed in an RDF Patch document. + +## 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/RdsOptionsDto.md b/docs/RdsOptionsDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d71744b0900a435ceb615fdd2491e8a135cbff5f --- /dev/null +++ b/docs/RdsOptionsDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.RdsOptionsDto +Represents the data transfer object (DTO) for RDS options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BucketName** | **string** | The name of the bucket associated with RDS. | [optional] +**Size** | [**QuotaDto**](QuotaDto.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/RdsResourceTypeOptionsForManipulationDto.md b/docs/RdsResourceTypeOptionsForManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d4f8a8210abdfb7ba84197dc75ee41d2135436a4 --- /dev/null +++ b/docs/RdsResourceTypeOptionsForManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.RdsResourceTypeOptionsForManipulationDto +Represents the data transfer object (DTO) for manipulating RDS Web resource type options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quota** | [**QuotaForManipulationDto**](QuotaForManipulationDto.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/RdsS3OptionsDto.md b/docs/RdsS3OptionsDto.md new file mode 100644 index 0000000000000000000000000000000000000000..6b475c84fd02a96fd424e51a747cea50da4d806f --- /dev/null +++ b/docs/RdsS3OptionsDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.RdsS3OptionsDto +Represents the data transfer object (DTO) for RDS S3 options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BucketName** | **string** | The name of the bucket associated with RDS S3. | [optional] +**AccessKeyRead** | **string** | The access key for reading from the RDS S3 bucket. | [optional] +**SecretKeyRead** | **string** | The secret key for reading from the RDS S3 bucket. | [optional] +**AccessKeyWrite** | **string** | The access key for writing to the RDS S3 bucket. | [optional] +**SecretKeyWrite** | **string** | The secret key for writing to the RDS S3 bucket. | [optional] +**Endpoint** | **string** | The endpoint for the RDS S3 bucket. | [optional] +**Size** | [**QuotaDto**](QuotaDto.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/RdsS3ResourceTypeOptionsForManipulationDto.md b/docs/RdsS3ResourceTypeOptionsForManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e358585c8d2b05f57371784b9e63caaf960baf54 --- /dev/null +++ b/docs/RdsS3ResourceTypeOptionsForManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.RdsS3ResourceTypeOptionsForManipulationDto +Represents the data transfer object (DTO) for manipulating RDS S3 resource type options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quota** | [**QuotaForManipulationDto**](QuotaForManipulationDto.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/RdsS3WormOptionsDto.md b/docs/RdsS3WormOptionsDto.md new file mode 100644 index 0000000000000000000000000000000000000000..ebaba2680fac3aa6d4710c4fd3d393e8c7508f64 --- /dev/null +++ b/docs/RdsS3WormOptionsDto.md @@ -0,0 +1,17 @@ +# Coscine.ApiClient.Core.Model.RdsS3WormOptionsDto +Represents the data transfer object (DTO) for RDS S3 WORM options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BucketName** | **string** | The name of the bucket associated with RDS S3 WORM. | [optional] +**AccessKeyRead** | **string** | The access key for reading from the RDS S3 WORM bucket. | [optional] +**SecretKeyRead** | **string** | The secret key for reading from the RDS S3 WORM bucket. | [optional] +**AccessKeyWrite** | **string** | The access key for writing to the RDS S3 WORM bucket. | [optional] +**SecretKeyWrite** | **string** | The secret key for writing to the RDS S3 WORM bucket. | [optional] +**Endpoint** | **string** | The endpoint for the RDS S3 WORM bucket. | [optional] +**Size** | [**QuotaDto**](QuotaDto.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/RdsS3WormResourceTypeOptionsForManipulationDto.md b/docs/RdsS3WormResourceTypeOptionsForManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..db37d0436ed07a9f951a32f89d976d66a2a9adb6 --- /dev/null +++ b/docs/RdsS3WormResourceTypeOptionsForManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.RdsS3WormResourceTypeOptionsForManipulationDto +Represents the data transfer object (DTO) for manipulating RDS S3 WORM resource type options. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quota** | [**QuotaForManipulationDto**](QuotaForManipulationDto.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/ResourceAdminDto.md b/docs/ResourceAdminDto.md new file mode 100644 index 0000000000000000000000000000000000000000..c2b5e73d02c648ce9d5898c92b14e0ed04348f8c --- /dev/null +++ b/docs/ResourceAdminDto.md @@ -0,0 +1,32 @@ +# Coscine.ApiClient.Core.Model.ResourceAdminDto +Represents a Data Transfer Object (DTO) for administrative purposes with additional resource details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the resource. | [optional] +**Pid** | **string** | Persistent identifier for the resource. | [optional] +**Type** | [**ResourceTypeDto**](ResourceTypeDto.md) | | [optional] +**Name** | **string** | Name of the resource. | [optional] +**DisplayName** | **string** | Display name of the resource. | [optional] +**Description** | **string** | Description of the resource. | [optional] +**Keywords** | **List<string>** | Keywords associated with the resource. | [optional] +**License** | [**LicenseDto**](LicenseDto.md) | | [optional] +**UsageRights** | **string** | Usage rights associated with the resource. | [optional] +**MetadataLocalCopy** | **bool** | Setting for creating a local copy of the metadata. | [optional] +**MetadataExtraction** | **bool** | Setting for metadata extraction. | [optional] +**ApplicationProfile** | [**ApplicationProfileMinimalDto**](ApplicationProfileMinimalDto.md) | | [optional] +**FixedValues** | **Dictionary<string, Dictionary<string, List<FixedValueForResourceManipulationDto>>>** | Fixed values associated with resource manipulation. This dictionary may contain multiple levels and is structured as follows: Dictionary (Key: string) -> Dictionary (Key: string) -> List of FixedValueForResourceManipulationDto. | [optional] +**Disciplines** | [**List<DisciplineDto>**](DisciplineDto.md) | Disciplines associated with the resource. | [optional] +**Visibility** | [**VisibilityDto**](VisibilityDto.md) | | [optional] +**DateCreated** | **DateTime?** | Date when the resource was created. | [optional] +**Creator** | [**UserMinimalDto**](UserMinimalDto.md) | | [optional] +**Archived** | **bool** | Indicates whether the resource is archived. | [optional] +**Projects** | [**List<ProjectMinimalDto>**](ProjectMinimalDto.md) | The projects associated with the resource. | [optional] +**Deleted** | **bool** | Indicates whether the resource is deleted. | [optional] +**ProjectResources** | [**List<ProjectResourceMinimalDto>**](ProjectResourceMinimalDto.md) | Collection of minimal project resource details associated with this resource. | [optional] +**ResourceQuota** | [**ResourceQuotaDto**](ResourceQuotaDto.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/ResourceAdminDtoPagedResponse.md b/docs/ResourceAdminDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..cd2994c6a7868b8f73ba9a00195cdcc1ddd197cf --- /dev/null +++ b/docs/ResourceAdminDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ResourceAdminDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ResourceAdminDto>**](ResourceAdminDto.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/ResourceApi.md b/docs/ResourceApi.md new file mode 100644 index 0000000000000000000000000000000000000000..efae8d760b7d7f9f501a1e756a42a1906cdd773f --- /dev/null +++ b/docs/ResourceApi.md @@ -0,0 +1,190 @@ +# Coscine.ApiClient.Core.Api.ResourceApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ResourcesOptions**](ResourceApi.md#apiv2resourcesoptions) | **OPTIONS** /api/v2/resources | Responds with the HTTP methods allowed for the endpoint. | +| [**GetResource**](ResourceApi.md#getresource) | **GET** /api/v2/resources/{resourceId} | Retrieves a resource by its ID. | + +<a id="apiv2resourcesoptions"></a> +# **ApiV2ResourcesOptions** +> void ApiV2ResourcesOptions () + +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 ApiV2ResourcesOptionsExample + { + 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 ResourceApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ResourcesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceApi.ApiV2ResourcesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ResourcesOptionsWithHttpInfo 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.ApiV2ResourcesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ResourceApi.ApiV2ResourcesOptionsWithHttpInfo: " + 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="getresource"></a> +# **GetResource** +> ResourceDtoResponse GetResource (Guid resourceId) + +Retrieves a resource by its ID. + +### 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 GetResourceExample + { + 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 ResourceApi(config); + var resourceId = "resourceId_example"; // Guid | The ID of the resource to retrieve. + + try + { + // Retrieves a resource by its ID. + ResourceDtoResponse result = apiInstance.GetResource(resourceId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceApi.GetResource: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetResourceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a resource by its ID. + ApiResponse<ResourceDtoResponse> response = apiInstance.GetResourceWithHttpInfo(resourceId); + 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 ResourceApi.GetResourceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **resourceId** | **Guid** | The ID of the resource to retrieve. | | + +### Return type + +[**ResourceDtoResponse**](ResourceDtoResponse.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 resource. | - | +| **403** | User is missing authorization requirements. | - | +| **404** | Resource does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ResourceContentPageColumnsDto.md b/docs/ResourceContentPageColumnsDto.md new file mode 100644 index 0000000000000000000000000000000000000000..033c7b25e8b05f5ac0f3de7fd120897d1de2f974 --- /dev/null +++ b/docs/ResourceContentPageColumnsDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ResourceContentPageColumnsDto +Represents a set of columns to be displayed in the content view. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Always** | **List<string>** | Set of columns that should always be displayed in the content view. | [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/ResourceContentPageDto.md b/docs/ResourceContentPageDto.md new file mode 100644 index 0000000000000000000000000000000000000000..93b2b92184200592b453f98fa89a997c9f25f66b --- /dev/null +++ b/docs/ResourceContentPageDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ResourceContentPageDto +Represents the content page details for a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ReadOnly** | **bool** | Indicates whether the resource is read-only. | [optional] +**MetadataView** | [**ResourceContentPageMetadataViewDto**](ResourceContentPageMetadataViewDto.md) | | [optional] +**EntriesView** | [**ResourceContentPageEntriesViewDto**](ResourceContentPageEntriesViewDto.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/ResourceContentPageEntriesViewDto.md b/docs/ResourceContentPageEntriesViewDto.md new file mode 100644 index 0000000000000000000000000000000000000000..58d8f72ec5b2d422a7a1a18aa8992bdccc50a528 --- /dev/null +++ b/docs/ResourceContentPageEntriesViewDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ResourceContentPageEntriesViewDto +Represents information about the resource type for the columns within the entries view Vue component. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Columns** | [**ResourceContentPageColumnsDto**](ResourceContentPageColumnsDto.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/ResourceContentPageMetadataViewDto.md b/docs/ResourceContentPageMetadataViewDto.md new file mode 100644 index 0000000000000000000000000000000000000000..a758344596d8fe7a2cabc20ec81f1ed4d25b68d1 --- /dev/null +++ b/docs/ResourceContentPageMetadataViewDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.ResourceContentPageMetadataViewDto +Represents the metadata view for a resource's content page. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EditableDataUrl** | **bool** | Indicates if a data URL can be provided and is editable. | [optional] +**EditableKey** | **bool** | Indicates if a key can be provided and is editable. | [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/ResourceCreationPageDto.md b/docs/ResourceCreationPageDto.md new file mode 100644 index 0000000000000000000000000000000000000000..5476910307450adf61bf0f329f49f19b6ee1dc51 --- /dev/null +++ b/docs/ResourceCreationPageDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ResourceCreationPageDto +Represents the structure of resource type-specific components for steps in the resource creation page. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Components** | **List<List<string>>** | List of Lists containing all the resource type specific components for the steps in the resource creation page. | [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/ResourceDto.md b/docs/ResourceDto.md new file mode 100644 index 0000000000000000000000000000000000000000..962d442d7f6ff2ad5d370217374ef201a238ef56 --- /dev/null +++ b/docs/ResourceDto.md @@ -0,0 +1,29 @@ +# Coscine.ApiClient.Core.Model.ResourceDto +Represents a Data Transfer Object (DTO) for resource details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the resource. | [optional] +**Pid** | **string** | Persistent identifier for the resource. | [optional] +**Type** | [**ResourceTypeDto**](ResourceTypeDto.md) | | [optional] +**Name** | **string** | Name of the resource. | [optional] +**DisplayName** | **string** | Display name of the resource. | [optional] +**Description** | **string** | Description of the resource. | [optional] +**Keywords** | **List<string>** | Keywords associated with the resource. | [optional] +**License** | [**LicenseDto**](LicenseDto.md) | | [optional] +**UsageRights** | **string** | Usage rights associated with the resource. | [optional] +**MetadataLocalCopy** | **bool** | Setting for creating a local copy of the metadata. | [optional] +**MetadataExtraction** | **bool** | Setting for metadata extraction. | [optional] +**ApplicationProfile** | [**ApplicationProfileMinimalDto**](ApplicationProfileMinimalDto.md) | | [optional] +**FixedValues** | **Dictionary<string, Dictionary<string, List<FixedValueForResourceManipulationDto>>>** | Fixed values associated with resource manipulation. This dictionary may contain multiple levels and is structured as follows: Dictionary (Key: string) -> Dictionary (Key: string) -> List of FixedValueForResourceManipulationDto. | [optional] +**Disciplines** | [**List<DisciplineDto>**](DisciplineDto.md) | Disciplines associated with the resource. | [optional] +**Visibility** | [**VisibilityDto**](VisibilityDto.md) | | [optional] +**DateCreated** | **DateTime?** | Date when the resource was created. | [optional] +**Creator** | [**UserMinimalDto**](UserMinimalDto.md) | | [optional] +**Archived** | **bool** | Indicates whether the resource is archived. | [optional] +**Projects** | [**List<ProjectMinimalDto>**](ProjectMinimalDto.md) | The projects associated with the resource. | [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/ResourceDtoPagedResponse.md b/docs/ResourceDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..863bc1ab287e4c60633ede7e210dc2ab5ff075a9 --- /dev/null +++ b/docs/ResourceDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ResourceDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ResourceDto>**](ResourceDto.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/ResourceDtoResponse.md b/docs/ResourceDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..75349a7303f3cd0e3363af508636c6846b7a94bb --- /dev/null +++ b/docs/ResourceDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ResourceDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ResourceDto**](ResourceDto.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/ResourceForCreationDto.md b/docs/ResourceForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..92570a265cb9221235d910aa2b67adafb9cda223 --- /dev/null +++ b/docs/ResourceForCreationDto.md @@ -0,0 +1,23 @@ +# Coscine.ApiClient.Core.Model.ResourceForCreationDto +Represents the data transfer object (DTO) used for creating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the resource. | +**DisplayName** | **string** | The display name of the resource. | [optional] +**Description** | **string** | The description of the resource. | +**Keywords** | **List<string>** | The keywords associated with the resource. | [optional] +**FixedValues** | **Dictionary<string, Dictionary<string, List<FixedValueForResourceManipulationDto>>>** | Fixed values associated with the resource. | [optional] +**License** | [**LicenseForResourceManipulationDto**](LicenseForResourceManipulationDto.md) | | [optional] +**UsageRights** | **string** | The usage rights description of the resource. | [optional] +**MetadataLocalCopy** | **bool?** | If a local copy for the metadata should be created. | [optional] +**Visibility** | [**VisibilityForResourceManipulationDto**](VisibilityForResourceManipulationDto.md) | | +**Disciplines** | [**List<DisciplineForResourceManipulationDto>**](DisciplineForResourceManipulationDto.md) | The disciplines associated with the resource. | +**ResourceTypeId** | **Guid** | The identifier of the resource type associated with the resource. | +**ApplicationProfile** | [**ApplicationProfileForResourceCreationDto**](ApplicationProfileForResourceCreationDto.md) | | +**ResourceTypeOptions** | [**ResourceTypeOptionsForCreationDto**](ResourceTypeOptionsForCreationDto.md) | | + +[[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/ResourceForUpdateDto.md b/docs/ResourceForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e2f5a2bbc3e0de59c1009b10a960accccf77651f --- /dev/null +++ b/docs/ResourceForUpdateDto.md @@ -0,0 +1,22 @@ +# Coscine.ApiClient.Core.Model.ResourceForUpdateDto +Represents the data transfer object (DTO) used for updating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the resource. | +**DisplayName** | **string** | The display name of the resource. | [optional] +**Description** | **string** | The description of the resource. | +**Keywords** | **List<string>** | The keywords associated with the resource. | [optional] +**FixedValues** | **Dictionary<string, Dictionary<string, List<FixedValueForResourceManipulationDto>>>** | Fixed values associated with the resource. | [optional] +**License** | [**LicenseForResourceManipulationDto**](LicenseForResourceManipulationDto.md) | | [optional] +**UsageRights** | **string** | The usage rights description of the resource. | [optional] +**MetadataLocalCopy** | **bool?** | If a local copy for the metadata should be created. | [optional] +**Visibility** | [**VisibilityForResourceManipulationDto**](VisibilityForResourceManipulationDto.md) | | +**Disciplines** | [**List<DisciplineForResourceManipulationDto>**](DisciplineForResourceManipulationDto.md) | The disciplines associated with the resource. | +**Archived** | **bool** | Indicates whether the resource is archived. | +**ResourceTypeOptions** | [**ResourceTypeOptionsForUpdateDto**](ResourceTypeOptionsForUpdateDto.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/ResourceMinimalDto.md b/docs/ResourceMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..aa780bb48c411fa0a26846ceabb54222498b21fd --- /dev/null +++ b/docs/ResourceMinimalDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.ResourceMinimalDto +Represents a minimal Data Transfer Object (DTO) for a resource, containing essential identifiers. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | Unique identifier for the resource. | [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/ResourceQuotaDto.md b/docs/ResourceQuotaDto.md new file mode 100644 index 0000000000000000000000000000000000000000..037303ea7c273785a099622f1473f3bff76eda0e --- /dev/null +++ b/docs/ResourceQuotaDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ResourceQuotaDto +Represents a Data Transfer Object (DTO) containing quota information for a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resource** | [**ResourceMinimalDto**](ResourceMinimalDto.md) | | [optional] +**UsedPercentage** | **float?** | The percentage of quota used by the resource. | [optional] +**Used** | [**QuotaDto**](QuotaDto.md) | | [optional] +**Reserved** | [**QuotaDto**](QuotaDto.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/ResourceQuotaDtoResponse.md b/docs/ResourceQuotaDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..d5f80c2eb37a6365a796f21d4c4ca21cb3a22e29 --- /dev/null +++ b/docs/ResourceQuotaDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ResourceQuotaDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ResourceQuotaDto**](ResourceQuotaDto.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/ResourceTypeApi.md b/docs/ResourceTypeApi.md new file mode 100644 index 0000000000000000000000000000000000000000..64e27c0d1fd54b426832ca2bc3fe04b71e208222 --- /dev/null +++ b/docs/ResourceTypeApi.md @@ -0,0 +1,577 @@ +# Coscine.ApiClient.Core.Api.ResourceTypeApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ResourceTypesOptions**](ResourceTypeApi.md#apiv2resourcetypesoptions) | **OPTIONS** /api/v2/resource-types | Responds with the HTTP methods allowed for the endpoint. | +| [**GetAllGitlabBranchesForProject**](ResourceTypeApi.md#getallgitlabbranchesforproject) | **GET** /api/v2/resource-types/gitlab/projects/{gitlabProjectId}/branches | Retrieves all branches of a GitLab project, that the user is a member of, based on the provided credentials. | +| [**GetAllGitlabProjects**](ResourceTypeApi.md#getallgitlabprojects) | **GET** /api/v2/resource-types/gitlab/projects | Retrieves all GitLab projects, that the user is a member of, based on the provided credentials. | +| [**GetAllResourceTypesInformation**](ResourceTypeApi.md#getallresourcetypesinformation) | **GET** /api/v2/resource-types/types | Retrieves the entire global resource types information. | +| [**GetGitlabProject**](ResourceTypeApi.md#getgitlabproject) | **GET** /api/v2/resource-types/gitlab/projects/{gitlabProjectId} | Retrieves a single GitLab project, that the user is a member of, based on the provided credentials. | +| [**GetResourceTypeInformation**](ResourceTypeApi.md#getresourcetypeinformation) | **GET** /api/v2/resource-types/types/{resourceTypeId} | Retrieves the resource type information for a specific resource type. | + +<a id="apiv2resourcetypesoptions"></a> +# **ApiV2ResourceTypesOptions** +> void ApiV2ResourceTypesOptions () + +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 ApiV2ResourceTypesOptionsExample + { + 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 ResourceTypeApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ResourceTypesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceTypeApi.ApiV2ResourceTypesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ResourceTypesOptionsWithHttpInfo 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.ApiV2ResourceTypesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ResourceTypeApi.ApiV2ResourceTypesOptionsWithHttpInfo: " + 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="getallgitlabbranchesforproject"></a> +# **GetAllGitlabBranchesForProject** +> GitlabBranchDtoIEnumerableResponse GetAllGitlabBranchesForProject (int gitlabProjectId, string domain, string accessToken) + +Retrieves all branches of a GitLab project, that the user is a member of, based on the provided credentials. + +### 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 GetAllGitlabBranchesForProjectExample + { + 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 ResourceTypeApi(config); + var gitlabProjectId = 56; // int | The ID of the GitLab project. + var domain = https://git.rwth-aachen.de/; // string | Domain/Host of the GitLab Provider. + var accessToken = "accessToken_example"; // string | GitLab Project or Group Access Token. + + try + { + // Retrieves all branches of a GitLab project, that the user is a member of, based on the provided credentials. + GitlabBranchDtoIEnumerableResponse result = apiInstance.GetAllGitlabBranchesForProject(gitlabProjectId, domain, accessToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceTypeApi.GetAllGitlabBranchesForProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllGitlabBranchesForProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all branches of a GitLab project, that the user is a member of, based on the provided credentials. + ApiResponse<GitlabBranchDtoIEnumerableResponse> response = apiInstance.GetAllGitlabBranchesForProjectWithHttpInfo(gitlabProjectId, domain, accessToken); + 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 ResourceTypeApi.GetAllGitlabBranchesForProjectWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **gitlabProjectId** | **int** | The ID of the GitLab project. | | +| **domain** | **string** | Domain/Host of the GitLab Provider. | | +| **accessToken** | **string** | GitLab Project or Group Access Token. | | + +### Return type + +[**GitlabBranchDtoIEnumerableResponse**](GitlabBranchDtoIEnumerableResponse.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 GitLab project. | - | +| **403** | GitLab access token is invalid. | - | + +[[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="getallgitlabprojects"></a> +# **GetAllGitlabProjects** +> GitlabProjectDtoIEnumerableResponse GetAllGitlabProjects (string domain, string accessToken) + +Retrieves all GitLab projects, that the user is a member of, based on the provided credentials. + +### 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 GetAllGitlabProjectsExample + { + 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 ResourceTypeApi(config); + var domain = https://git.rwth-aachen.de/; // string | Domain/Host of the GitLab Provider. + var accessToken = "accessToken_example"; // string | GitLab Project or Group Access Token. + + try + { + // Retrieves all GitLab projects, that the user is a member of, based on the provided credentials. + GitlabProjectDtoIEnumerableResponse result = apiInstance.GetAllGitlabProjects(domain, accessToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceTypeApi.GetAllGitlabProjects: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllGitlabProjectsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all GitLab projects, that the user is a member of, based on the provided credentials. + ApiResponse<GitlabProjectDtoIEnumerableResponse> response = apiInstance.GetAllGitlabProjectsWithHttpInfo(domain, accessToken); + 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 ResourceTypeApi.GetAllGitlabProjectsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **domain** | **string** | Domain/Host of the GitLab Provider. | | +| **accessToken** | **string** | GitLab Project or Group Access Token. | | + +### Return type + +[**GitlabProjectDtoIEnumerableResponse**](GitlabProjectDtoIEnumerableResponse.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 GitLab projects. | - | +| **403** | GitLab access token is invalid. | - | + +[[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="getallresourcetypesinformation"></a> +# **GetAllResourceTypesInformation** +> ResourceTypeInformationDtoIEnumerableResponse GetAllResourceTypesInformation () + +Retrieves the entire global resource types information. + +### 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 GetAllResourceTypesInformationExample + { + 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 ResourceTypeApi(config); + + try + { + // Retrieves the entire global resource types information. + ResourceTypeInformationDtoIEnumerableResponse result = apiInstance.GetAllResourceTypesInformation(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceTypeApi.GetAllResourceTypesInformation: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllResourceTypesInformationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the entire global resource types information. + ApiResponse<ResourceTypeInformationDtoIEnumerableResponse> response = apiInstance.GetAllResourceTypesInformationWithHttpInfo(); + 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 ResourceTypeApi.GetAllResourceTypesInformationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**ResourceTypeInformationDtoIEnumerableResponse**](ResourceTypeInformationDtoIEnumerableResponse.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 entire global resource types information. | - | + +[[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="getgitlabproject"></a> +# **GetGitlabProject** +> GitlabProjectDtoResponse GetGitlabProject (int gitlabProjectId, string domain, string accessToken) + +Retrieves a single GitLab project, that the user is a member of, based on the provided credentials. + +### 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 GetGitlabProjectExample + { + 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 ResourceTypeApi(config); + var gitlabProjectId = 56; // int | The ID of the GitLab project. + var domain = https://git.rwth-aachen.de/; // string | Domain/Host of the GitLab Provider. + var accessToken = "accessToken_example"; // string | GitLab Project or Group Access Token. + + try + { + // Retrieves a single GitLab project, that the user is a member of, based on the provided credentials. + GitlabProjectDtoResponse result = apiInstance.GetGitlabProject(gitlabProjectId, domain, accessToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceTypeApi.GetGitlabProject: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetGitlabProjectWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a single GitLab project, that the user is a member of, based on the provided credentials. + ApiResponse<GitlabProjectDtoResponse> response = apiInstance.GetGitlabProjectWithHttpInfo(gitlabProjectId, domain, accessToken); + 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 ResourceTypeApi.GetGitlabProjectWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **gitlabProjectId** | **int** | The ID of the GitLab project. | | +| **domain** | **string** | Domain/Host of the GitLab Provider. | | +| **accessToken** | **string** | GitLab Project or Group Access Token. | | + +### Return type + +[**GitlabProjectDtoResponse**](GitlabProjectDtoResponse.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 GitLab project. | - | +| **403** | GitLab access token is invalid. | - | + +[[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="getresourcetypeinformation"></a> +# **GetResourceTypeInformation** +> ResourceTypeInformationDtoResponse GetResourceTypeInformation (Guid resourceTypeId) + +Retrieves the resource type information for a specific resource type. + +### 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 GetResourceTypeInformationExample + { + 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 ResourceTypeApi(config); + var resourceTypeId = "resourceTypeId_example"; // Guid | The ID of the resource type to retrieve. + + try + { + // Retrieves the resource type information for a specific resource type. + ResourceTypeInformationDtoResponse result = apiInstance.GetResourceTypeInformation(resourceTypeId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ResourceTypeApi.GetResourceTypeInformation: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetResourceTypeInformationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the resource type information for a specific resource type. + ApiResponse<ResourceTypeInformationDtoResponse> response = apiInstance.GetResourceTypeInformationWithHttpInfo(resourceTypeId); + 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 ResourceTypeApi.GetResourceTypeInformationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **resourceTypeId** | **Guid** | The ID of the resource type to retrieve. | | + +### Return type + +[**ResourceTypeInformationDtoResponse**](ResourceTypeInformationDtoResponse.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 resource type information. | - | +| **404** | Resource type does not exist. | - | + +[[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/ResourceTypeDto.md b/docs/ResourceTypeDto.md new file mode 100644 index 0000000000000000000000000000000000000000..23b52393930c3e9886bad320044fe3bd013b3a6a --- /dev/null +++ b/docs/ResourceTypeDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeDto +Represents a resource type. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the resource type. | [optional] +**GeneralType** | **string** | The general type of the resource. | [optional] +**SpecificType** | **string** | The specific type of the resource. | [optional] +**Options** | [**ResourceTypeOptionsDto**](ResourceTypeOptionsDto.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/ResourceTypeInformationDto.md b/docs/ResourceTypeInformationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..17723a6d44fc506da56304b2450ccf226e678a2e --- /dev/null +++ b/docs/ResourceTypeInformationDto.md @@ -0,0 +1,30 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeInformationDto +Represents information about a resource type. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the resource type. | [optional] +**GeneralType** | **string** | The general type of the resource. | [optional] +**SpecificType** | **string** | The specific type of the resource. | [optional] +**Status** | **ResourceTypeStatus** | | [optional] +**CanCreate** | **bool** | Indicates if the resource type supports creation. | [optional] +**CanRead** | **bool** | Indicates if the resource type supports reading. | [optional] +**CanSetResourceReadonly** | **bool** | Indicates if the resource type supports read-only. | [optional] +**CanUpdate** | **bool** | Indicates if the resource type supports updating. | [optional] +**CanUpdateResource** | **bool** | Indicates if the resource type supports updating (not an Object). | [optional] +**CanDelete** | **bool** | Indicates if the resource type supports deletion. | [optional] +**CanDeleteResource** | **bool** | Indicates if the resource type supports deletion (not an Object). | [optional] +**CanList** | **bool** | Indicates if the resource type supports listing. | [optional] +**CanCreateLinks** | **bool** | Indicates if the resource type supports linking. | [optional] +**CanCopyLocalMetadata** | **bool** | Indicates whether local backup of metadata is supported. | [optional] +**IsArchived** | **bool** | Indicates if the resource type is archived. | [optional] +**IsQuotaAvailable** | **bool** | Indicates if the resource type supports quota. | [optional] +**IsQuotaAdjustable** | **bool** | Indicates if the resource type quota can be changed. | [optional] +**IsEnabled** | **bool** | Indicates if the resource type is enabled. | [optional] [readonly] +**ResourceCreation** | [**ResourceCreationPageDto**](ResourceCreationPageDto.md) | | [optional] +**ResourceContent** | [**ResourceContentPageDto**](ResourceContentPageDto.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/ResourceTypeInformationDtoIEnumerableResponse.md b/docs/ResourceTypeInformationDtoIEnumerableResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..92095654d3ef724c2c7c4db14bdb2068fe67092c --- /dev/null +++ b/docs/ResourceTypeInformationDtoIEnumerableResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeInformationDtoIEnumerableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<ResourceTypeInformationDto>**](ResourceTypeInformationDto.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/ResourceTypeInformationDtoResponse.md b/docs/ResourceTypeInformationDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..a5bea014c244f8b8e5e3231c604b039eb5f858ff --- /dev/null +++ b/docs/ResourceTypeInformationDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeInformationDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ResourceTypeInformationDto**](ResourceTypeInformationDto.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/ResourceTypeMinimalDto.md b/docs/ResourceTypeMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d6e000b714b510c036cc8c5f516f5e48e1acecd8 --- /dev/null +++ b/docs/ResourceTypeMinimalDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeMinimalDto +Represents a minimal Data Transfer Object (DTO) for a resource type. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the resource type. | [optional] +**SpecificType** | **string** | The specific type of the resource. | [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/ResourceTypeOptionsDto.md b/docs/ResourceTypeOptionsDto.md new file mode 100644 index 0000000000000000000000000000000000000000..86dc23c15607fbe8891108b914dae0b7334f5ab5 --- /dev/null +++ b/docs/ResourceTypeOptionsDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeOptionsDto +Represents the options available for different resource types. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LinkedData** | **Object** | Represents the data transfer object (DTO) for Linked Data options. | [optional] +**GitLab** | [**GitLabOptionsDto**](GitLabOptionsDto.md) | | [optional] +**Rds** | [**RdsOptionsDto**](RdsOptionsDto.md) | | [optional] +**RdsS3** | [**RdsS3OptionsDto**](RdsS3OptionsDto.md) | | [optional] +**RdsS3Worm** | [**RdsS3WormOptionsDto**](RdsS3WormOptionsDto.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/ResourceTypeOptionsForCreationDto.md b/docs/ResourceTypeOptionsForCreationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e1861d2ed98964c8b93cc2ff358991d4fa147f74 --- /dev/null +++ b/docs/ResourceTypeOptionsForCreationDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeOptionsForCreationDto +Represents the data transfer object (DTO) for creating options related to any resource type. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LinkedResourceTypeOptions** | **Object** | Represents the data transfer object (DTO) for manipulating linked data resource type options. | [optional] +**GitlabResourceTypeOptions** | [**GitlabResourceTypeOptionsForCreationDto**](GitlabResourceTypeOptionsForCreationDto.md) | | [optional] +**RdsResourceTypeOptions** | [**RdsResourceTypeOptionsForManipulationDto**](RdsResourceTypeOptionsForManipulationDto.md) | | [optional] +**RdsS3ResourceTypeOptions** | [**RdsS3ResourceTypeOptionsForManipulationDto**](RdsS3ResourceTypeOptionsForManipulationDto.md) | | [optional] +**RdsS3WormResourceTypeOptions** | [**RdsS3WormResourceTypeOptionsForManipulationDto**](RdsS3WormResourceTypeOptionsForManipulationDto.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/ResourceTypeOptionsForUpdateDto.md b/docs/ResourceTypeOptionsForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..90ae445f3381596c6d342a8844dda28919a50f4a --- /dev/null +++ b/docs/ResourceTypeOptionsForUpdateDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeOptionsForUpdateDto +Represents the data transfer object (DTO) used for updating options related to any resource type. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LinkedResourceTypeOptions** | **Object** | Represents the data transfer object (DTO) for manipulating linked data resource type options. | [optional] +**GitlabResourceTypeOptions** | [**GitlabResourceTypeOptionsForUpdateDto**](GitlabResourceTypeOptionsForUpdateDto.md) | | [optional] +**RdsResourceTypeOptions** | [**RdsResourceTypeOptionsForManipulationDto**](RdsResourceTypeOptionsForManipulationDto.md) | | [optional] +**RdsS3ResourceTypeOptions** | [**RdsS3ResourceTypeOptionsForManipulationDto**](RdsS3ResourceTypeOptionsForManipulationDto.md) | | [optional] +**RdsS3WormResourceTypeOptions** | [**RdsS3WormResourceTypeOptionsForManipulationDto**](RdsS3WormResourceTypeOptionsForManipulationDto.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/ResourceTypeStatus.md b/docs/ResourceTypeStatus.md new file mode 100644 index 0000000000000000000000000000000000000000..7cef98003d43df0dbbea5961318116194afb404f --- /dev/null +++ b/docs/ResourceTypeStatus.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.ResourceTypeStatus +Specifies the status of a resource type. + +## 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/RoleApi.md b/docs/RoleApi.md new file mode 100644 index 0000000000000000000000000000000000000000..e9f65fcfa5465cf0389b81152da7e4935f9683d3 --- /dev/null +++ b/docs/RoleApi.md @@ -0,0 +1,288 @@ +# Coscine.ApiClient.Core.Api.RoleApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2RolesOptions**](RoleApi.md#apiv2rolesoptions) | **OPTIONS** /api/v2/roles | Responds with the HTTP methods allowed for the endpoint. | +| [**GetRole**](RoleApi.md#getrole) | **GET** /api/v2/roles/{roleId} | Retrieves a role by ID. | +| [**GetRoles**](RoleApi.md#getroles) | **GET** /api/v2/roles | Retrieves all roles. | + +<a id="apiv2rolesoptions"></a> +# **ApiV2RolesOptions** +> void ApiV2RolesOptions () + +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 ApiV2RolesOptionsExample + { + 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 RoleApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2RolesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RoleApi.ApiV2RolesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2RolesOptionsWithHttpInfo 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.ApiV2RolesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling RoleApi.ApiV2RolesOptionsWithHttpInfo: " + 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="getrole"></a> +# **GetRole** +> RoleDtoResponse GetRole (Guid roleId) + +Retrieves a role by ID. + +### 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 GetRoleExample + { + 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 RoleApi(config); + var roleId = "roleId_example"; // Guid | The ID of the role. + + try + { + // Retrieves a role by ID. + RoleDtoResponse result = apiInstance.GetRole(roleId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RoleApi.GetRole: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetRoleWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a role by ID. + ApiResponse<RoleDtoResponse> response = apiInstance.GetRoleWithHttpInfo(roleId); + 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 RoleApi.GetRoleWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **roleId** | **Guid** | The ID of the role. | | + +### Return type + +[**RoleDtoResponse**](RoleDtoResponse.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 role. | - | +| **404** | Role does not exist. | - | + +[[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="getroles"></a> +# **GetRoles** +> RoleDtoPagedResponse GetRoles (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all roles. + +### 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 GetRolesExample + { + 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 RoleApi(config); + 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 all roles. + RoleDtoPagedResponse result = apiInstance.GetRoles(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RoleApi.GetRoles: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetRolesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all roles. + ApiResponse<RoleDtoPagedResponse> response = apiInstance.GetRolesWithHttpInfo(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 RoleApi.GetRolesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**RoleDtoPagedResponse**](RoleDtoPagedResponse.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 roles. | - | + +[[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/RoleDto.md b/docs/RoleDto.md new file mode 100644 index 0000000000000000000000000000000000000000..09f3bc7f7f4cb6c871c364c387663faa216c4f5a --- /dev/null +++ b/docs/RoleDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.RoleDto +Represents a Data Transfer Object (DTO) for a role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the role. | [optional] +**DisplayName** | **string** | The display name of the role. | [optional] +**Description** | **string** | The description of the role. | [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/RoleDtoPagedResponse.md b/docs/RoleDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..8b0b03068ddaba2c3b6bcad47a673bf580056ce5 --- /dev/null +++ b/docs/RoleDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.RoleDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<RoleDto>**](RoleDto.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/RoleDtoResponse.md b/docs/RoleDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..d521da5fd014907ad440960db5c202b902ab62f5 --- /dev/null +++ b/docs/RoleDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.RoleDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**RoleDto**](RoleDto.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/RoleMinimalDto.md b/docs/RoleMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..3d5c6f707ae0d865e3590b5095a73d21faac096c --- /dev/null +++ b/docs/RoleMinimalDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.RoleMinimalDto +Represents a Data Transfer Object (DTO) containing minimal information about a role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the role. | [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/SearchApi.md b/docs/SearchApi.md new file mode 100644 index 0000000000000000000000000000000000000000..3529894ef306ed4a4e82d38c8d13ebc3483803c3 --- /dev/null +++ b/docs/SearchApi.md @@ -0,0 +1,203 @@ +# Coscine.ApiClient.Core.Api.SearchApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2SearchOptions**](SearchApi.md#apiv2searchoptions) | **OPTIONS** /api/v2/search | Responds with the HTTP methods allowed for the endpoint. | +| [**GetSearchResults**](SearchApi.md#getsearchresults) | **GET** /api/v2/search | Retrieves a search result by given search parameters. | + +<a id="apiv2searchoptions"></a> +# **ApiV2SearchOptions** +> void ApiV2SearchOptions () + +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 ApiV2SearchOptionsExample + { + 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 SearchApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2SearchOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SearchApi.ApiV2SearchOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2SearchOptionsWithHttpInfo 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.ApiV2SearchOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SearchApi.ApiV2SearchOptionsWithHttpInfo: " + 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="getsearchresults"></a> +# **GetSearchResults** +> SearchResultDtoPagedSearchResponse GetSearchResults (string? query = null, bool? useAdvancedSyntax = null, List<string>? languages = null, SearchCategoryType? category = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves a search result by given search parameters. + +### 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 GetSearchResultsExample + { + 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 SearchApi(config); + var query = "query_example"; // string? | The search query (optional) + var useAdvancedSyntax = true; // bool? | Set true for advanced Elasticsearch search syntax (optional) + var languages = new List<string>?(); // List<string>? | Set the used languages (optional) + var category = new SearchCategoryType?(); // SearchCategoryType? | Set the category filter (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 a search result by given search parameters. + SearchResultDtoPagedSearchResponse result = apiInstance.GetSearchResults(query, useAdvancedSyntax, languages, category, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SearchApi.GetSearchResults: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSearchResultsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a search result by given search parameters. + ApiResponse<SearchResultDtoPagedSearchResponse> response = apiInstance.GetSearchResultsWithHttpInfo(query, useAdvancedSyntax, languages, category, 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 SearchApi.GetSearchResultsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **query** | **string?** | The search query | [optional] | +| **useAdvancedSyntax** | **bool?** | Set true for advanced Elasticsearch search syntax | [optional] | +| **languages** | [**List<string>?**](string.md) | Set the used languages | [optional] | +| **category** | [**SearchCategoryType?**](SearchCategoryType?.md) | Set the category filter | [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 + +[**SearchResultDtoPagedSearchResponse**](SearchResultDtoPagedSearchResponse.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 search result. | - | +| **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/SearchCategory.md b/docs/SearchCategory.md new file mode 100644 index 0000000000000000000000000000000000000000..4be22b40b39be9dcb48bcee2dcf17c8030f18dff --- /dev/null +++ b/docs/SearchCategory.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.SearchCategory +Represents a search category with a name and count of occurrences. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the search category. | [optional] +**Count** | **long** | The count of occurrences for the search category. | [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/SearchCategoryType.md b/docs/SearchCategoryType.md new file mode 100644 index 0000000000000000000000000000000000000000..c4072f14c74e07555670b3def4135a5fb44d7c8c --- /dev/null +++ b/docs/SearchCategoryType.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.SearchCategoryType +Specifies the search item type. + +## 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/SearchResultDto.md b/docs/SearchResultDto.md new file mode 100644 index 0000000000000000000000000000000000000000..71e4e71efc058371f8b4c7894c12ee7ced517676 --- /dev/null +++ b/docs/SearchResultDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.SearchResultDto +Represents a Data Transfer Object (DTO) for search results. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | The URI associated with the search result. | [optional] +**Type** | **SearchCategoryType** | | [optional] +**Source** | **Object** | The dynamic source data for the search result. | [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/SearchResultDtoPagedSearchResponse.md b/docs/SearchResultDtoPagedSearchResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..aefa5e11ad2ab09f19d76b6f6371b0f65f23f948 --- /dev/null +++ b/docs/SearchResultDtoPagedSearchResponse.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.SearchResultDtoPagedSearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<SearchResultDto>**](SearchResultDto.md) | | [optional] +**IsSuccess** | **bool** | | [optional] [readonly] +**StatusCode** | **int?** | | [optional] +**TraceId** | **string** | | [optional] +**Pagination** | [**Pagination**](Pagination.md) | | [optional] +**Categories** | [**List<SearchCategory>**](SearchCategory.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/SelfApi.md b/docs/SelfApi.md new file mode 100644 index 0000000000000000000000000000000000000000..b4fa527436286adb5acf668a635ac1a0570886dc --- /dev/null +++ b/docs/SelfApi.md @@ -0,0 +1,649 @@ +# Coscine.ApiClient.Core.Api.SelfApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**AcceptCurrentTos**](SelfApi.md#acceptcurrenttos) | **POST** /api/v2/self/tos | Accepts the current Terms Of Service for the current authenticated user. | +| [**ApiV2SelfOptions**](SelfApi.md#apiv2selfoptions) | **OPTIONS** /api/v2/self | Responds with the HTTP methods allowed for the endpoint. | +| [**ConfirmUserEmail**](SelfApi.md#confirmuseremail) | **POST** /api/v2/self/emails | Confirms the email of a user. | +| [**GetCurrentUser**](SelfApi.md#getcurrentuser) | **GET** /api/v2/self | Retrieves the current authenticated user. | +| [**InitiateUserMerge**](SelfApi.md#initiateusermerge) | **POST** /api/v2/self/identities | Initiates user merging for the current user. | +| [**ResolveProjectInvitation**](SelfApi.md#resolveprojectinvitation) | **POST** /api/v2/self/project-invitations | Resolves a project invitation for the authenticated user. | +| [**UpdateCurrentUser**](SelfApi.md#updatecurrentuser) | **PUT** /api/v2/self | Updates the current authenticated user. | + +<a id="acceptcurrenttos"></a> +# **AcceptCurrentTos** +> void AcceptCurrentTos (UserTermsOfServiceAcceptDto? userTermsOfServiceAcceptDto = null) + +Accepts the current Terms Of Service for the current authenticated user. + +### 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 AcceptCurrentTosExample + { + 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 SelfApi(config); + var userTermsOfServiceAcceptDto = new UserTermsOfServiceAcceptDto?(); // UserTermsOfServiceAcceptDto? | (optional) + + try + { + // Accepts the current Terms Of Service for the current authenticated user. + apiInstance.AcceptCurrentTos(userTermsOfServiceAcceptDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApi.AcceptCurrentTos: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the AcceptCurrentTosWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Accepts the current Terms Of Service for the current authenticated user. + apiInstance.AcceptCurrentTosWithHttpInfo(userTermsOfServiceAcceptDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfApi.AcceptCurrentTosWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **userTermsOfServiceAcceptDto** | [**UserTermsOfServiceAcceptDto?**](UserTermsOfServiceAcceptDto?.md) | | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Terms of Service accepted. | - | +| **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) + +<a id="apiv2selfoptions"></a> +# **ApiV2SelfOptions** +> void ApiV2SelfOptions () + +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 ApiV2SelfOptionsExample + { + 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 SelfApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2SelfOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApi.ApiV2SelfOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2SelfOptionsWithHttpInfo 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.ApiV2SelfOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfApi.ApiV2SelfOptionsWithHttpInfo: " + 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="confirmuseremail"></a> +# **ConfirmUserEmail** +> void ConfirmUserEmail (Guid confirmationToken) + +Confirms the email of a user. + +### 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 ConfirmUserEmailExample + { + 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 SelfApi(config); + var confirmationToken = "confirmationToken_example"; // Guid | Gets or initializes the confirmation token for user email confirmation. + + try + { + // Confirms the email of a user. + apiInstance.ConfirmUserEmail(confirmationToken); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApi.ConfirmUserEmail: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ConfirmUserEmailWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Confirms the email of a user. + apiInstance.ConfirmUserEmailWithHttpInfo(confirmationToken); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfApi.ConfirmUserEmailWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **confirmationToken** | **Guid** | Gets or initializes the confirmation token for user email confirmation. | | + +### 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 | +|-------------|-------------|------------------| +| **204** | Contact email confirmed. | - | +| **404** | Provided input refers to entries that do not exist or have been deleted. | - | +| **400** | Provided input has a bad format. | - | + +[[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="getcurrentuser"></a> +# **GetCurrentUser** +> UserDtoResponse GetCurrentUser () + +Retrieves the current authenticated user. + +### 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 GetCurrentUserExample + { + 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 SelfApi(config); + + try + { + // Retrieves the current authenticated user. + UserDtoResponse result = apiInstance.GetCurrentUser(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApi.GetCurrentUser: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetCurrentUserWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the current authenticated user. + ApiResponse<UserDtoResponse> response = apiInstance.GetCurrentUserWithHttpInfo(); + 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 SelfApi.GetCurrentUserWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**UserDtoResponse**](UserDtoResponse.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 current authenticated user. | - | + +[[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="initiateusermerge"></a> +# **InitiateUserMerge** +> UserMergeDtoResponse InitiateUserMerge (IdentityProviders identityProvider) + +Initiates user merging for the current user. + +### 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 InitiateUserMergeExample + { + 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 SelfApi(config); + var identityProvider = (IdentityProviders) "Shibboleth"; // IdentityProviders | The identity provider from which user data is to be merged. + + try + { + // Initiates user merging for the current user. + UserMergeDtoResponse result = apiInstance.InitiateUserMerge(identityProvider); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApi.InitiateUserMerge: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the InitiateUserMergeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Initiates user merging for the current user. + ApiResponse<UserMergeDtoResponse> response = apiInstance.InitiateUserMergeWithHttpInfo(identityProvider); + 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 SelfApi.InitiateUserMergeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **identityProvider** | **IdentityProviders** | The identity provider from which user data is to be merged. | | + +### Return type + +[**UserMergeDtoResponse**](UserMergeDtoResponse.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 user merge dto. | - | +| **400** | Provided input has a bad format. | - | + +[[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="resolveprojectinvitation"></a> +# **ResolveProjectInvitation** +> void ResolveProjectInvitation (ProjectInvitationResolveDto? projectInvitationResolveDto = null) + +Resolves a project invitation for the authenticated user. + +### 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 ResolveProjectInvitationExample + { + 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 SelfApi(config); + var projectInvitationResolveDto = new ProjectInvitationResolveDto?(); // ProjectInvitationResolveDto? | The project invitation resolve data. (optional) + + try + { + // Resolves a project invitation for the authenticated user. + apiInstance.ResolveProjectInvitation(projectInvitationResolveDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApi.ResolveProjectInvitation: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ResolveProjectInvitationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Resolves a project invitation for the authenticated user. + apiInstance.ResolveProjectInvitationWithHttpInfo(projectInvitationResolveDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfApi.ResolveProjectInvitationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectInvitationResolveDto** | [**ProjectInvitationResolveDto?**](ProjectInvitationResolveDto?.md) | The project invitation resolve data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +<a id="updatecurrentuser"></a> +# **UpdateCurrentUser** +> void UpdateCurrentUser (UserForUpdateDto? userForUpdateDto = null) + +Updates the current authenticated user. + +### 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 UpdateCurrentUserExample + { + 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 SelfApi(config); + var userForUpdateDto = new UserForUpdateDto?(); // UserForUpdateDto? | The updated user data. (optional) + + try + { + // Updates the current authenticated user. + apiInstance.UpdateCurrentUser(userForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApi.UpdateCurrentUser: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateCurrentUserWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates the current authenticated user. + apiInstance.UpdateCurrentUserWithHttpInfo(userForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfApi.UpdateCurrentUserWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **userForUpdateDto** | [**UserForUpdateDto?**](UserForUpdateDto?.md) | The updated user data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | User updated. | - | +| **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/SelfApiTokenApi.md b/docs/SelfApiTokenApi.md new file mode 100644 index 0000000000000000000000000000000000000000..f43826efa262c662e1e28d2d68a473866c0e177e --- /dev/null +++ b/docs/SelfApiTokenApi.md @@ -0,0 +1,478 @@ +# Coscine.ApiClient.Core.Api.SelfApiTokenApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2SelfApiTokensOptions**](SelfApiTokenApi.md#apiv2selfapitokensoptions) | **OPTIONS** /api/v2/self/api-tokens | Responds with the HTTP methods allowed for the endpoint. | +| [**CreateApiToken**](SelfApiTokenApi.md#createapitoken) | **POST** /api/v2/self/api-tokens | Creates an API token for the current authenticated user. | +| [**GetAllApiTokens**](SelfApiTokenApi.md#getallapitokens) | **GET** /api/v2/self/api-tokens | Retrieves all API tokens for the current authenticated user. | +| [**GetApiToken**](SelfApiTokenApi.md#getapitoken) | **GET** /api/v2/self/api-tokens/{apiTokenId} | Retrieves an API token for the current authenticated user. | +| [**RevokeToken**](SelfApiTokenApi.md#revoketoken) | **DELETE** /api/v2/self/api-tokens/{apiTokenId} | Revokes an API token for the current authenticated user. | + +<a id="apiv2selfapitokensoptions"></a> +# **ApiV2SelfApiTokensOptions** +> void ApiV2SelfApiTokensOptions () + +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 ApiV2SelfApiTokensOptionsExample + { + 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 SelfApiTokenApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2SelfApiTokensOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApiTokenApi.ApiV2SelfApiTokensOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2SelfApiTokensOptionsWithHttpInfo 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.ApiV2SelfApiTokensOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfApiTokenApi.ApiV2SelfApiTokensOptionsWithHttpInfo: " + 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="createapitoken"></a> +# **CreateApiToken** +> ApiTokenDtoResponse CreateApiToken (ApiTokenForCreationDto? apiTokenForCreationDto = null) + +Creates an API token for the current authenticated user. + +### 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 CreateApiTokenExample + { + 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 SelfApiTokenApi(config); + var apiTokenForCreationDto = new ApiTokenForCreationDto?(); // ApiTokenForCreationDto? | The API token data for creation. (optional) + + try + { + // Creates an API token for the current authenticated user. + ApiTokenDtoResponse result = apiInstance.CreateApiToken(apiTokenForCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApiTokenApi.CreateApiToken: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateApiTokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates an API token for the current authenticated user. + ApiResponse<ApiTokenDtoResponse> response = apiInstance.CreateApiTokenWithHttpInfo(apiTokenForCreationDto); + 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 SelfApiTokenApi.CreateApiTokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **apiTokenForCreationDto** | [**ApiTokenForCreationDto?**](ApiTokenForCreationDto?.md) | The API token data for creation. | [optional] | + +### Return type + +[**ApiTokenDtoResponse**](ApiTokenDtoResponse.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** | API token created. | - | +| **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) + +<a id="getallapitokens"></a> +# **GetAllApiTokens** +> ApiTokenDtoPagedResponse GetAllApiTokens (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all API tokens for the current authenticated user. + +### 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 GetAllApiTokensExample + { + 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 SelfApiTokenApi(config); + 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 all API tokens for the current authenticated user. + ApiTokenDtoPagedResponse result = apiInstance.GetAllApiTokens(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApiTokenApi.GetAllApiTokens: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetAllApiTokensWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all API tokens for the current authenticated user. + ApiResponse<ApiTokenDtoPagedResponse> response = apiInstance.GetAllApiTokensWithHttpInfo(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 SelfApiTokenApi.GetAllApiTokensWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**ApiTokenDtoPagedResponse**](ApiTokenDtoPagedResponse.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 API tokens of the current user. | - | + +[[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="getapitoken"></a> +# **GetApiToken** +> ApiTokenDtoResponse GetApiToken (Guid apiTokenId) + +Retrieves an API token for the current authenticated user. + +### 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 GetApiTokenExample + { + 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 SelfApiTokenApi(config); + var apiTokenId = "apiTokenId_example"; // Guid | The ID of the token. + + try + { + // Retrieves an API token for the current authenticated user. + ApiTokenDtoResponse result = apiInstance.GetApiToken(apiTokenId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApiTokenApi.GetApiToken: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetApiTokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves an API token for the current authenticated user. + ApiResponse<ApiTokenDtoResponse> response = apiInstance.GetApiTokenWithHttpInfo(apiTokenId); + 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 SelfApiTokenApi.GetApiTokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **apiTokenId** | **Guid** | The ID of the token. | | + +### Return type + +[**ApiTokenDtoResponse**](ApiTokenDtoResponse.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 API token. | - | +| **404** | API token does not exist. | - | + +[[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="revoketoken"></a> +# **RevokeToken** +> void RevokeToken (Guid apiTokenId) + +Revokes an API token for the current authenticated user. + +### 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 RevokeTokenExample + { + 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 SelfApiTokenApi(config); + var apiTokenId = "apiTokenId_example"; // Guid | The ID of the token. + + try + { + // Revokes an API token for the current authenticated user. + apiInstance.RevokeToken(apiTokenId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling SelfApiTokenApi.RevokeToken: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RevokeTokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Revokes an API token for the current authenticated user. + apiInstance.RevokeTokenWithHttpInfo(apiTokenId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SelfApiTokenApi.RevokeTokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **apiTokenId** | **Guid** | The ID of the token. | | + +### 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 | +|-------------|-------------|------------------| +| **204** | API token revoked/deleted. | - | +| **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/TermsOfServiceDto.md b/docs/TermsOfServiceDto.md new file mode 100644 index 0000000000000000000000000000000000000000..87551ffa3952c6b84ba24a1c575aad7fc31ac942 --- /dev/null +++ b/docs/TermsOfServiceDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.TermsOfServiceDto +Represents the Data Transfer Object (DTO) for terms of service information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VarVersion** | **string** | The version of the terms of service. | [optional] +**Href** | **string** | The URI point to the content of ToS' version | [optional] +**IsCurrent** | **bool** | Indicates whether these terms of service are current or not. | [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/TermsOfServiceDtoResponse.md b/docs/TermsOfServiceDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..ff3c09493438a95ce9d754d3d454c7ed9ed296eb --- /dev/null +++ b/docs/TermsOfServiceDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.TermsOfServiceDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**TermsOfServiceDto**](TermsOfServiceDto.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/TitleApi.md b/docs/TitleApi.md new file mode 100644 index 0000000000000000000000000000000000000000..38ac118431bb7644aba877ab8974b626bfcac5d1 --- /dev/null +++ b/docs/TitleApi.md @@ -0,0 +1,288 @@ +# Coscine.ApiClient.Core.Api.TitleApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2TitlesOptions**](TitleApi.md#apiv2titlesoptions) | **OPTIONS** /api/v2/titles | Responds with the HTTP methods allowed for the endpoint. | +| [**GetTitle**](TitleApi.md#gettitle) | **GET** /api/v2/titles/{titleId} | Retrieves a title by ID. | +| [**GetTitles**](TitleApi.md#gettitles) | **GET** /api/v2/titles | Retrieves all titles. | + +<a id="apiv2titlesoptions"></a> +# **ApiV2TitlesOptions** +> void ApiV2TitlesOptions () + +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 ApiV2TitlesOptionsExample + { + 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 TitleApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2TitlesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TitleApi.ApiV2TitlesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2TitlesOptionsWithHttpInfo 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.ApiV2TitlesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TitleApi.ApiV2TitlesOptionsWithHttpInfo: " + 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="gettitle"></a> +# **GetTitle** +> TitleDtoResponse GetTitle (Guid titleId) + +Retrieves a title by ID. + +### 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 GetTitleExample + { + 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 TitleApi(config); + var titleId = "titleId_example"; // Guid | The ID of the title. + + try + { + // Retrieves a title by ID. + TitleDtoResponse result = apiInstance.GetTitle(titleId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TitleApi.GetTitle: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTitleWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a title by ID. + ApiResponse<TitleDtoResponse> response = apiInstance.GetTitleWithHttpInfo(titleId); + 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 TitleApi.GetTitleWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **titleId** | **Guid** | The ID of the title. | | + +### Return type + +[**TitleDtoResponse**](TitleDtoResponse.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 title. | - | +| **404** | Title does not exist. | - | + +[[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="gettitles"></a> +# **GetTitles** +> TitleDtoIEnumerableResponse GetTitles (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all titles. + +### 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 GetTitlesExample + { + 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 TitleApi(config); + 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 all titles. + TitleDtoIEnumerableResponse result = apiInstance.GetTitles(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TitleApi.GetTitles: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTitlesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all titles. + ApiResponse<TitleDtoIEnumerableResponse> response = apiInstance.GetTitlesWithHttpInfo(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 TitleApi.GetTitlesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**TitleDtoIEnumerableResponse**](TitleDtoIEnumerableResponse.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 titles. | - | + +[[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/TitleDto.md b/docs/TitleDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e56bb9b5839b24d0d2b6f9084b8078bb9f2a7a1c --- /dev/null +++ b/docs/TitleDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.TitleDto +Represents the Data Transfer Object (DTO) for title information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The identifier for the title. | [optional] +**DisplayName** | **string** | The displayed name of the title. | [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/TitleDtoIEnumerableResponse.md b/docs/TitleDtoIEnumerableResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..1647aa89f821174e292c063b831abc8e553c3530 --- /dev/null +++ b/docs/TitleDtoIEnumerableResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.TitleDtoIEnumerableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<TitleDto>**](TitleDto.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/TitleDtoResponse.md b/docs/TitleDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..2d358319fe3b2068da6d52fea58f3c13d0d953d0 --- /dev/null +++ b/docs/TitleDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.TitleDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**TitleDto**](TitleDto.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/TitleForUserManipulationDto.md b/docs/TitleForUserManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e253311b5f83177d25a0d165a1e0976cd67c7293 --- /dev/null +++ b/docs/TitleForUserManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.TitleForUserManipulationDto +Represents the data transfer object (DTO) for manipulating a user's title. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the title. | + +[[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/TosApi.md b/docs/TosApi.md new file mode 100644 index 0000000000000000000000000000000000000000..b51ec29a3d5eafb1a8ddf509fd1dfa30e95e6e40 --- /dev/null +++ b/docs/TosApi.md @@ -0,0 +1,183 @@ +# Coscine.ApiClient.Core.Api.TosApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2TosOptions**](TosApi.md#apiv2tosoptions) | **OPTIONS** /api/v2/tos | Responds with the HTTP methods allowed for the endpoint. | +| [**GetTos**](TosApi.md#gettos) | **GET** /api/v2/tos | Retrieves the current Terms of Service version. | + +<a id="apiv2tosoptions"></a> +# **ApiV2TosOptions** +> void ApiV2TosOptions () + +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 ApiV2TosOptionsExample + { + 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 TosApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2TosOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TosApi.ApiV2TosOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2TosOptionsWithHttpInfo 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.ApiV2TosOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TosApi.ApiV2TosOptionsWithHttpInfo: " + 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="gettos"></a> +# **GetTos** +> TermsOfServiceDtoResponse GetTos () + +Retrieves the current Terms of Service version. + +### 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 GetTosExample + { + 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 TosApi(config); + + try + { + // Retrieves the current Terms of Service version. + TermsOfServiceDtoResponse result = apiInstance.GetTos(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TosApi.GetTos: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetTosWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the current Terms of Service version. + ApiResponse<TermsOfServiceDtoResponse> response = apiInstance.GetTosWithHttpInfo(); + 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 TosApi.GetTosWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**TermsOfServiceDtoResponse**](TermsOfServiceDtoResponse.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 current Terms of Service version. | - | + +[[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/TreeApi.md b/docs/TreeApi.md new file mode 100644 index 0000000000000000000000000000000000000000..8c72c0e7fe28108eef55fb33381625f624a1c6ea --- /dev/null +++ b/docs/TreeApi.md @@ -0,0 +1,938 @@ +# Coscine.ApiClient.Core.Api.TreeApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions**](TreeApi.md#apiv2projectsprojectidresourcesresourceidtreesoptions) | **OPTIONS** /api/v2/projects/{projectId}/resources/{resourceId}/trees | Responds with the HTTP methods allowed for the endpoint. | +| [**CreateExtractedMetadataTree**](TreeApi.md#createextractedmetadatatree) | **POST** /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted | Creates a new extracted metadata tree for a resource. | +| [**CreateMetadataTree**](TreeApi.md#createmetadatatree) | **POST** /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata | Creates a new metadata tree for a resource. | +| [**DeleteMetadataTree**](TreeApi.md#deletemetadatatree) | **DELETE** /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata | Deletes (invalidates) a metadata tree associated with a resource. | +| [**GetFileTree**](TreeApi.md#getfiletree) | **GET** /api/v2/projects/{projectId}/resources/{resourceId}/trees/files | Retrieves the file tree associated with a resource. | +| [**GetMetadataTree**](TreeApi.md#getmetadatatree) | **GET** /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata | Retrieves the metadata tree associated with a resource. | +| [**GetSpecificMetadataTree**](TreeApi.md#getspecificmetadatatree) | **GET** /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/specific | Retrieves the specific metadata tree associated with a resource. | +| [**UpdateExtractedMetadataTree**](TreeApi.md#updateextractedmetadatatree) | **PUT** /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted | Updates an existing metadata tree of a resource. | +| [**UpdateMetadataTree**](TreeApi.md#updatemetadatatree) | **PUT** /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata | Updates an existing metadata tree of a resource. | + +<a id="apiv2projectsprojectidresourcesresourceidtreesoptions"></a> +# **ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions** +> void ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions (string projectId, string resourceId) + +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 ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | + var resourceId = "resourceId_example"; // string | + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions(projectId, resourceId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfo 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.ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfo(projectId, resourceId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TreeApi.ApiV2ProjectsProjectIdResourcesResourceIdTreesOptionsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | | | +| **resourceId** | **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="createextractedmetadatatree"></a> +# **CreateExtractedMetadataTree** +> MetadataTreeDtoResponse CreateExtractedMetadataTree (string projectId, Guid resourceId, ExtractedMetadataTreeForCreationDto? extractedMetadataTreeForCreationDto = null) + +Creates a new extracted metadata tree for a resource. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 CreateExtractedMetadataTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var extractedMetadataTreeForCreationDto = new ExtractedMetadataTreeForCreationDto?(); // ExtractedMetadataTreeForCreationDto? | The metadata tree data for creation. (optional) + + try + { + // Creates a new extracted metadata tree for a resource. + MetadataTreeDtoResponse result = apiInstance.CreateExtractedMetadataTree(projectId, resourceId, extractedMetadataTreeForCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.CreateExtractedMetadataTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateExtractedMetadataTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a new extracted metadata tree for a resource. + ApiResponse<MetadataTreeDtoResponse> response = apiInstance.CreateExtractedMetadataTreeWithHttpInfo(projectId, resourceId, extractedMetadataTreeForCreationDto); + 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 TreeApi.CreateExtractedMetadataTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **extractedMetadataTreeForCreationDto** | [**ExtractedMetadataTreeForCreationDto?**](ExtractedMetadataTreeForCreationDto?.md) | The metadata tree data for creation. | [optional] | + +### Return type + +[**MetadataTreeDtoResponse**](MetadataTreeDtoResponse.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** | Extracted Metadata tree 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) + +<a id="createmetadatatree"></a> +# **CreateMetadataTree** +> MetadataTreeDtoResponse CreateMetadataTree (string projectId, Guid resourceId, MetadataTreeForCreationDto? metadataTreeForCreationDto = null) + +Creates a new metadata tree for a resource. + +### 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 CreateMetadataTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var metadataTreeForCreationDto = new MetadataTreeForCreationDto?(); // MetadataTreeForCreationDto? | The metadata tree data for creation. (optional) + + try + { + // Creates a new metadata tree for a resource. + MetadataTreeDtoResponse result = apiInstance.CreateMetadataTree(projectId, resourceId, metadataTreeForCreationDto); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.CreateMetadataTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateMetadataTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Creates a new metadata tree for a resource. + ApiResponse<MetadataTreeDtoResponse> response = apiInstance.CreateMetadataTreeWithHttpInfo(projectId, resourceId, metadataTreeForCreationDto); + 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 TreeApi.CreateMetadataTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **metadataTreeForCreationDto** | [**MetadataTreeForCreationDto?**](MetadataTreeForCreationDto?.md) | The metadata tree data for creation. | [optional] | + +### Return type + +[**MetadataTreeDtoResponse**](MetadataTreeDtoResponse.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** | Metadata tree 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) + +<a id="deletemetadatatree"></a> +# **DeleteMetadataTree** +> void DeleteMetadataTree (string projectId, Guid resourceId, MetadataTreeForDeletionDto? metadataTreeForDeletionDto = null) + +Deletes (invalidates) a metadata tree associated with a resource. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 DeleteMetadataTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var metadataTreeForDeletionDto = new MetadataTreeForDeletionDto?(); // MetadataTreeForDeletionDto? | The dto for the deletion. (optional) + + try + { + // Deletes (invalidates) a metadata tree associated with a resource. + apiInstance.DeleteMetadataTree(projectId, resourceId, metadataTreeForDeletionDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.DeleteMetadataTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteMetadataTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Deletes (invalidates) a metadata tree associated with a resource. + apiInstance.DeleteMetadataTreeWithHttpInfo(projectId, resourceId, metadataTreeForDeletionDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TreeApi.DeleteMetadataTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **metadataTreeForDeletionDto** | [**MetadataTreeForDeletionDto?**](MetadataTreeForDeletionDto?.md) | The dto for the deletion. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Metadata tree deleted. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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) + +<a id="getfiletree"></a> +# **GetFileTree** +> FileTreeDtoPagedResponse GetFileTree (string projectId, Guid resourceId, string? path = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves the file tree associated with a resource. + +The `OrderBy` query is currently not supported. + +### 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 GetFileTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var path = "path_example"; // string? | Gets or sets the path of the file tree. (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 file tree associated with a resource. + FileTreeDtoPagedResponse result = apiInstance.GetFileTree(projectId, resourceId, path, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.GetFileTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetFileTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the file tree associated with a resource. + ApiResponse<FileTreeDtoPagedResponse> response = apiInstance.GetFileTreeWithHttpInfo(projectId, resourceId, path, 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 TreeApi.GetFileTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **path** | **string?** | Gets or sets the path of the file tree. | [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 + +[**FileTreeDtoPagedResponse**](FileTreeDtoPagedResponse.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 file tree of a resource. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Project does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="getmetadatatree"></a> +# **GetMetadataTree** +> MetadataTreeDtoPagedResponse GetMetadataTree (string projectId, Guid resourceId, string? path = null, RdfFormat? format = null, bool? includeExtractedMetadata = null, bool? includeProvenance = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves the metadata tree associated with a resource. + +### 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 GetMetadataTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var path = "path_example"; // string? | Gets or sets the path of the metadata tree. (optional) + var format = new RdfFormat?(); // RdfFormat? | Gets or sets the format of the RDF data. (optional) + var includeExtractedMetadata = true; // bool? | Gets or sets if extracted metadata should be included. (optional) + var includeProvenance = true; // bool? | Gets or sets if provenance metadata should be included. (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 metadata tree associated with a resource. + MetadataTreeDtoPagedResponse result = apiInstance.GetMetadataTree(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.GetMetadataTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetMetadataTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the metadata tree associated with a resource. + ApiResponse<MetadataTreeDtoPagedResponse> response = apiInstance.GetMetadataTreeWithHttpInfo(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, 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 TreeApi.GetMetadataTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **path** | **string?** | Gets or sets the path of the metadata tree. | [optional] | +| **format** | [**RdfFormat?**](RdfFormat?.md) | Gets or sets the format of the RDF data. | [optional] | +| **includeExtractedMetadata** | **bool?** | Gets or sets if extracted metadata should be included. | [optional] | +| **includeProvenance** | **bool?** | Gets or sets if provenance metadata should be included. | [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 + +[**MetadataTreeDtoPagedResponse**](MetadataTreeDtoPagedResponse.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 metadata tree of a resource. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Project does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="getspecificmetadatatree"></a> +# **GetSpecificMetadataTree** +> MetadataTreeDtoResponse GetSpecificMetadataTree (string projectId, Guid resourceId, string path, RdfFormat? format = null, bool? includeExtractedMetadata = null, bool? includeProvenance = null, int? version = null) + +Retrieves the specific metadata tree associated with a resource. + +### 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 GetSpecificMetadataTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var path = "path_example"; // string | Gets or sets the path of the metadata tree. + var format = new RdfFormat?(); // RdfFormat? | Gets or sets the format of the RDF data. (optional) + var includeExtractedMetadata = true; // bool? | Gets or sets if extracted metadata should be included. (optional) + var includeProvenance = true; // bool? | Gets or sets if provenance should be included. (optional) + var version = 56; // int? | Gets or sets the desired version. If the version is null, the newest will be returned. (optional) + + try + { + // Retrieves the specific metadata tree associated with a resource. + MetadataTreeDtoResponse result = apiInstance.GetSpecificMetadataTree(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, version); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.GetSpecificMetadataTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetSpecificMetadataTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves the specific metadata tree associated with a resource. + ApiResponse<MetadataTreeDtoResponse> response = apiInstance.GetSpecificMetadataTreeWithHttpInfo(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, version); + 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 TreeApi.GetSpecificMetadataTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **path** | **string** | Gets or sets the path of the metadata tree. | | +| **format** | [**RdfFormat?**](RdfFormat?.md) | Gets or sets the format of the RDF data. | [optional] | +| **includeExtractedMetadata** | **bool?** | Gets or sets if extracted metadata should be included. | [optional] | +| **includeProvenance** | **bool?** | Gets or sets if provenance should be included. | [optional] | +| **version** | **int?** | Gets or sets the desired version. If the version is null, the newest will be returned. | [optional] | + +### Return type + +[**MetadataTreeDtoResponse**](MetadataTreeDtoResponse.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 specific metadata tree of a resource. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format. | - | +| **404** | Project does not exist or has been deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +<a id="updateextractedmetadatatree"></a> +# **UpdateExtractedMetadataTree** +> void UpdateExtractedMetadataTree (string projectId, Guid resourceId, ExtractedMetadataTreeForUpdateDto? extractedMetadataTreeForUpdateDto = null) + +Updates an existing metadata tree of a resource. + +<p><strong>Required JWT roles for access:</strong> <code>administrator</code>.</p> + +### 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 UpdateExtractedMetadataTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var extractedMetadataTreeForUpdateDto = new ExtractedMetadataTreeForUpdateDto?(); // ExtractedMetadataTreeForUpdateDto? | The updated metadata tree data. (optional) + + try + { + // Updates an existing metadata tree of a resource. + apiInstance.UpdateExtractedMetadataTree(projectId, resourceId, extractedMetadataTreeForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.UpdateExtractedMetadataTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateExtractedMetadataTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates an existing metadata tree of a resource. + apiInstance.UpdateExtractedMetadataTreeWithHttpInfo(projectId, resourceId, extractedMetadataTreeForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TreeApi.UpdateExtractedMetadataTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **extractedMetadataTreeForUpdateDto** | [**ExtractedMetadataTreeForUpdateDto?**](ExtractedMetadataTreeForUpdateDto?.md) | The updated metadata tree data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Metadata tree updated. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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) + +<a id="updatemetadatatree"></a> +# **UpdateMetadataTree** +> void UpdateMetadataTree (string projectId, Guid resourceId, MetadataTreeForUpdateDto? metadataTreeForUpdateDto = null) + +Updates an existing metadata tree of a resource. + +### 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 UpdateMetadataTreeExample + { + 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 TreeApi(config); + var projectId = "projectId_example"; // string | The unique identifier or slug of the project. + var resourceId = "resourceId_example"; // Guid | The unique identifier of the resource. + var metadataTreeForUpdateDto = new MetadataTreeForUpdateDto?(); // MetadataTreeForUpdateDto? | The updated metadata tree data. (optional) + + try + { + // Updates an existing metadata tree of a resource. + apiInstance.UpdateMetadataTree(projectId, resourceId, metadataTreeForUpdateDto); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TreeApi.UpdateMetadataTree: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the UpdateMetadataTreeWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Updates an existing metadata tree of a resource. + apiInstance.UpdateMetadataTreeWithHttpInfo(projectId, resourceId, metadataTreeForUpdateDto); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TreeApi.UpdateMetadataTreeWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **projectId** | **string** | The unique identifier or slug of the project. | | +| **resourceId** | **Guid** | The unique identifier of the resource. | | +| **metadataTreeForUpdateDto** | [**MetadataTreeForUpdateDto?**](MetadataTreeForUpdateDto?.md) | The updated metadata tree data. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Metadata tree updated. | - | +| **403** | User is missing authorization requirements. | - | +| **400** | Provided input has a bad format or the resource is write-protected due to its archived status. | - | +| **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/TreeDataType.md b/docs/TreeDataType.md new file mode 100644 index 0000000000000000000000000000000000000000..f44aed57e6a67189ab0f1bd5751d8cc16cca8b0a --- /dev/null +++ b/docs/TreeDataType.md @@ -0,0 +1,10 @@ +# Coscine.ApiClient.Core.Model.TreeDataType +Represents the types of nodes within a hierarchical tree structure. + +## 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/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000000000000000000000000000000000000..b7edc6c97307a150ceb09e07b1be1ee819f7cb70 --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,191 @@ +# Coscine.ApiClient.Core.Api.UserApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2UsersOptions**](UserApi.md#apiv2usersoptions) | **OPTIONS** /api/v2/users | Responds with the HTTP methods allowed for the endpoint. | +| [**GetUsers**](UserApi.md#getusers) | **GET** /api/v2/users | Retrieves all users. | + +<a id="apiv2usersoptions"></a> +# **ApiV2UsersOptions** +> void ApiV2UsersOptions () + +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 ApiV2UsersOptionsExample + { + 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 UserApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2UsersOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UserApi.ApiV2UsersOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2UsersOptionsWithHttpInfo 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.ApiV2UsersOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling UserApi.ApiV2UsersOptionsWithHttpInfo: " + 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="getusers"></a> +# **GetUsers** +> PublicUserDtoIEnumerableResponse GetUsers (string searchTerm, string? orderBy = null) + +Retrieves all users. + +### 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 GetUsersExample + { + 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 UserApi(config); + var searchTerm = "searchTerm_example"; // string | Gets or sets the search term. + var orderBy = "orderBy_example"; // string? | Gets or sets the field by which the search results are ordered. Defaults to \"firstName\". (optional) + + try + { + // Retrieves all users. + PublicUserDtoIEnumerableResponse result = apiInstance.GetUsers(searchTerm, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UserApi.GetUsers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetUsersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all users. + ApiResponse<PublicUserDtoIEnumerableResponse> response = apiInstance.GetUsersWithHttpInfo(searchTerm, 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 UserApi.GetUsersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **searchTerm** | **string** | Gets or sets the search term. | | +| **orderBy** | **string?** | Gets or sets the field by which the search results are ordered. Defaults to \"firstName\". | [optional] | + +### Return type + +[**PublicUserDtoIEnumerableResponse**](PublicUserDtoIEnumerableResponse.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 users. | - | +| **403** | User is missing authorization requirements. | - | + +[[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/UserDto.md b/docs/UserDto.md new file mode 100644 index 0000000000000000000000000000000000000000..77dd53be433cafa8a2b3475ed1e5b99afe076592 --- /dev/null +++ b/docs/UserDto.md @@ -0,0 +1,23 @@ +# Coscine.ApiClient.Core.Model.UserDto +Represents a Data Transfer Object (DTO) for user-related information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the user. | [optional] +**DisplayName** | **string** | The display name of the user. | [optional] +**GivenName** | **string** | The given name of the user. | [optional] +**FamilyName** | **string** | The family name of the user. | [optional] +**Emails** | [**List<UserEmailDto>**](UserEmailDto.md) | The email addresses associated with the user. | [optional] +**Title** | [**TitleDto**](TitleDto.md) | | [optional] +**Language** | [**LanguageDto**](LanguageDto.md) | | [optional] +**AreToSAccepted** | **bool** | Indicates if the terms of service are accepted by the user. | [optional] +**LatestActivity** | **DateTime?** | The date and time of the latest activity of the user. | [optional] +**Disciplines** | [**List<DisciplineDto>**](DisciplineDto.md) | The disciplines associated with the user. | [optional] +**Organizations** | [**List<UserOrganizationDto>**](UserOrganizationDto.md) | The organizations associated with the user. | [optional] +**Institutes** | [**List<UserInstituteDto>**](UserInstituteDto.md) | The institutes associated with the user. | [optional] +**Identities** | [**List<IdentityProviderDto>**](IdentityProviderDto.md) | The identity providers associated with the user. | [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/UserDtoPagedResponse.md b/docs/UserDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..240a7e16b1d19233d09f13edbfc773a52fb5aa21 --- /dev/null +++ b/docs/UserDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.UserDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<UserDto>**](UserDto.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/UserDtoResponse.md b/docs/UserDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..0a17823b2926b769b0b7f5339d0eab3573335788 --- /dev/null +++ b/docs/UserDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.UserDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**UserDto**](UserDto.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/UserEmailDto.md b/docs/UserEmailDto.md new file mode 100644 index 0000000000000000000000000000000000000000..1853b7f05172532160a1646c41e0fbbfce76ca21 --- /dev/null +++ b/docs/UserEmailDto.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.UserEmailDto +Represents a Data Transfer Object (DTO) for user email information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address of the user. | [optional] +**IsConfirmed** | **bool** | Indicates whether the email address is confirmed. | [optional] +**IsPrimary** | **bool** | Indicates whether the email address is the primary one for the user. | [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/UserForUpdateDto.md b/docs/UserForUpdateDto.md new file mode 100644 index 0000000000000000000000000000000000000000..aec4d48a18fbe2afb87ad2fdce648f467418a825 --- /dev/null +++ b/docs/UserForUpdateDto.md @@ -0,0 +1,18 @@ +# Coscine.ApiClient.Core.Model.UserForUpdateDto +Represents the data transfer object (DTO) for updating user details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GivenName** | **string** | The user's given name. | +**FamilyName** | **string** | The user's family name. | +**Email** | **string** | The user's email address. | +**Title** | [**TitleForUserManipulationDto**](TitleForUserManipulationDto.md) | | [optional] +**Language** | [**LanguageForUserManipulationDto**](LanguageForUserManipulationDto.md) | | +**Organization** | **string** | The user's organization. | [optional] +**Institute** | **string** | The user's institute. | [optional] +**Disciplines** | [**List<DisciplineForUserManipulationDto>**](DisciplineForUserManipulationDto.md) | The disciplines associated with the user for manipulation. | + +[[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/UserInstituteDto.md b/docs/UserInstituteDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d59a48a44f423a65aeb99259d414f6badb9d254a --- /dev/null +++ b/docs/UserInstituteDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.UserInstituteDto +Represents a Data Transfer Object (DTO) for user institute information, extending the OrganizationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | The ROR (Research Organization Registry) ID of the organization. | [optional] +**DisplayName** | **string** | The display name of the organization. | [optional] +**Email** | **string** | The email address of the organization. | [optional] +**PublicationAdvisoryService** | [**PublicationAdvisoryServiceDto**](PublicationAdvisoryServiceDto.md) | | [optional] +**ReadOnly** | **bool** | Determines if the organization's details can be modified. Defaults to `true`; manually set to `false`. | [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/UserMergeDto.md b/docs/UserMergeDto.md new file mode 100644 index 0000000000000000000000000000000000000000..3d02819708ba0c10d28ce33b75bc56b6edf6a097 --- /dev/null +++ b/docs/UserMergeDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.UserMergeDto +Represents a Data Transfer Object (DTO) for merging user accounts. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **string** | The token required for merging user accounts. | [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/UserMergeDtoResponse.md b/docs/UserMergeDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..c429482ad13b2be73c9fea5ace0500dc3cdfcf2b --- /dev/null +++ b/docs/UserMergeDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.UserMergeDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**UserMergeDto**](UserMergeDto.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/UserMinimalDto.md b/docs/UserMinimalDto.md new file mode 100644 index 0000000000000000000000000000000000000000..58afb47ce3a4ca5db5d00c17c417782e18b6df4e --- /dev/null +++ b/docs/UserMinimalDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.UserMinimalDto +Represents a minimal Data Transfer Object (DTO) for user information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier for the user. | [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/UserOrganizationDto.md b/docs/UserOrganizationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..ec68c5112ad5e6767bc1352733f0f816d59e8e04 --- /dev/null +++ b/docs/UserOrganizationDto.md @@ -0,0 +1,15 @@ +# Coscine.ApiClient.Core.Model.UserOrganizationDto +Represents a Data Transfer Object (DTO) for user-related organization information, inheriting from OrganizationDto. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | The ROR (Research Organization Registry) ID of the organization. | [optional] +**DisplayName** | **string** | The display name of the organization. | [optional] +**Email** | **string** | The email address of the organization. | [optional] +**PublicationAdvisoryService** | [**PublicationAdvisoryServiceDto**](PublicationAdvisoryServiceDto.md) | | [optional] +**ReadOnly** | **bool** | Determines if the organization's details can be modified. | [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/UserTermsOfServiceAcceptDto.md b/docs/UserTermsOfServiceAcceptDto.md new file mode 100644 index 0000000000000000000000000000000000000000..d8e62ab491f5a12726765b58c93c538ebb8b6d4b --- /dev/null +++ b/docs/UserTermsOfServiceAcceptDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.UserTermsOfServiceAcceptDto +Represents the data transfer object (DTO) for accepting the terms of service by a user. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VarVersion** | **string** | The version of the terms of service being accepted. | + +[[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/VariantDto.md b/docs/VariantDto.md new file mode 100644 index 0000000000000000000000000000000000000000..331685ecd4c6fb009fddb51a797c3a6f34c4e119 --- /dev/null +++ b/docs/VariantDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.VariantDto +Represents the variants of this specific metadata tree. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GraphName** | **string** | Name of the graph. | [optional] +**Similarity** | **double** | Similarity value 0-1 | [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/VisibilityApi.md b/docs/VisibilityApi.md new file mode 100644 index 0000000000000000000000000000000000000000..583e6a866a2ed6107e120df00448f295ebb27b9c --- /dev/null +++ b/docs/VisibilityApi.md @@ -0,0 +1,288 @@ +# Coscine.ApiClient.Core.Api.VisibilityApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2VisibilitiesOptions**](VisibilityApi.md#apiv2visibilitiesoptions) | **OPTIONS** /api/v2/visibilities | Responds with the HTTP methods allowed for the endpoint. | +| [**GetVisibilities**](VisibilityApi.md#getvisibilities) | **GET** /api/v2/visibilities | Retrieves all visibilities. | +| [**GetVisibility**](VisibilityApi.md#getvisibility) | **GET** /api/v2/visibilities/{visibilityId} | Retrieves a visibility by ID. | + +<a id="apiv2visibilitiesoptions"></a> +# **ApiV2VisibilitiesOptions** +> void ApiV2VisibilitiesOptions () + +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 ApiV2VisibilitiesOptionsExample + { + 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 VisibilityApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2VisibilitiesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VisibilityApi.ApiV2VisibilitiesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2VisibilitiesOptionsWithHttpInfo 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.ApiV2VisibilitiesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling VisibilityApi.ApiV2VisibilitiesOptionsWithHttpInfo: " + 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="getvisibilities"></a> +# **GetVisibilities** +> VisibilityDtoPagedResponse GetVisibilities (int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves all visibilities. + +### 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 GetVisibilitiesExample + { + 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 VisibilityApi(config); + 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 all visibilities. + VisibilityDtoPagedResponse result = apiInstance.GetVisibilities(pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VisibilityApi.GetVisibilities: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetVisibilitiesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves all visibilities. + ApiResponse<VisibilityDtoPagedResponse> response = apiInstance.GetVisibilitiesWithHttpInfo(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 VisibilityApi.GetVisibilitiesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **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 + +[**VisibilityDtoPagedResponse**](VisibilityDtoPagedResponse.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 visibilities. | - | + +[[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="getvisibility"></a> +# **GetVisibility** +> VisibilityDtoResponse GetVisibility (Guid visibilityId) + +Retrieves a visibility by ID. + +### 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 GetVisibilityExample + { + 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 VisibilityApi(config); + var visibilityId = "visibilityId_example"; // Guid | The ID of the visibility. + + try + { + // Retrieves a visibility by ID. + VisibilityDtoResponse result = apiInstance.GetVisibility(visibilityId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VisibilityApi.GetVisibility: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetVisibilityWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a visibility by ID. + ApiResponse<VisibilityDtoResponse> response = apiInstance.GetVisibilityWithHttpInfo(visibilityId); + 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 VisibilityApi.GetVisibilityWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **visibilityId** | **Guid** | The ID of the visibility. | | + +### Return type + +[**VisibilityDtoResponse**](VisibilityDtoResponse.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 visibility. | - | +| **404** | Visibility does not exist. | - | + +[[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/VisibilityDto.md b/docs/VisibilityDto.md new file mode 100644 index 0000000000000000000000000000000000000000..1646570ab0f18e0b468d315e81bd74998a7accae --- /dev/null +++ b/docs/VisibilityDto.md @@ -0,0 +1,12 @@ +# Coscine.ApiClient.Core.Model.VisibilityDto +Represents a Data Transfer Object (DTO) for visibility settings. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The identifier for the visibility setting. | [optional] +**DisplayName** | **string** | The display name for the visibility setting. | [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/VisibilityDtoPagedResponse.md b/docs/VisibilityDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..c9fbc33f16aa522e0f0be1a3e0f328aee31c4128 --- /dev/null +++ b/docs/VisibilityDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.VisibilityDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<VisibilityDto>**](VisibilityDto.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/VisibilityDtoResponse.md b/docs/VisibilityDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..4efffba628e9592e3fbe7e460cb697dd95ebeb27 --- /dev/null +++ b/docs/VisibilityDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.VisibilityDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**VisibilityDto**](VisibilityDto.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/VisibilityForProjectManipulationDto.md b/docs/VisibilityForProjectManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e93eb991b31506563042dc7e44845537ab6b4ea3 --- /dev/null +++ b/docs/VisibilityForProjectManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.VisibilityForProjectManipulationDto +Represents the data transfer object (DTO) for manipulating the visibility of a project. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the visibility setting. | + +[[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/VisibilityForResourceManipulationDto.md b/docs/VisibilityForResourceManipulationDto.md new file mode 100644 index 0000000000000000000000000000000000000000..35c87e20e819e83a8f6e70381d74e4d336011978 --- /dev/null +++ b/docs/VisibilityForResourceManipulationDto.md @@ -0,0 +1,11 @@ +# Coscine.ApiClient.Core.Model.VisibilityForResourceManipulationDto +Represents the data transfer object (DTO) for manipulating the visibility of a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | The unique identifier of the visibility setting. | + +[[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/VocabularyApi.md b/docs/VocabularyApi.md new file mode 100644 index 0000000000000000000000000000000000000000..d5de6ec1bcdcb5997e1080f46271987f7fcdc68e --- /dev/null +++ b/docs/VocabularyApi.md @@ -0,0 +1,400 @@ +# Coscine.ApiClient.Core.Api.VocabularyApi + +All URIs are relative to *https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**ApiV2VocabulariesOptions**](VocabularyApi.md#apiv2vocabulariesoptions) | **OPTIONS** /api/v2/vocabularies | Responds with the HTTP methods allowed for the endpoint. | +| [**GetVocabularies**](VocabularyApi.md#getvocabularies) | **GET** /api/v2/vocabularies | Retrieves top-level instances from vocabularies. | +| [**GetVocabularyInstance**](VocabularyApi.md#getvocabularyinstance) | **GET** /api/v2/vocabularies/instances/{instance} | Retrieves a single instance from a vocabulary. | +| [**GetVocabularyInstances**](VocabularyApi.md#getvocabularyinstances) | **GET** /api/v2/vocabularies/instances | Retrieves vocabulary instances. | + +<a id="apiv2vocabulariesoptions"></a> +# **ApiV2VocabulariesOptions** +> void ApiV2VocabulariesOptions () + +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 ApiV2VocabulariesOptionsExample + { + 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 VocabularyApi(config); + + try + { + // Responds with the HTTP methods allowed for the endpoint. + apiInstance.ApiV2VocabulariesOptions(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VocabularyApi.ApiV2VocabulariesOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ApiV2VocabulariesOptionsWithHttpInfo 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.ApiV2VocabulariesOptionsWithHttpInfo(); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling VocabularyApi.ApiV2VocabulariesOptionsWithHttpInfo: " + 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="getvocabularies"></a> +# **GetVocabularies** +> VocabularyDtoPagedResponse GetVocabularies (string? searchTerm = null, AcceptedLanguage? language = null, int? pageNumber = null, int? pageSize = null, string? orderBy = null) + +Retrieves top-level instances from vocabularies. + +### 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 GetVocabulariesExample + { + 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 VocabularyApi(config); + var searchTerm = "searchTerm_example"; // string? | Gets or sets the search term used to filter vocabularies. (optional) + var language = new AcceptedLanguage?(); // AcceptedLanguage? | Gets or sets the language for which the vocabularies are requested. (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 top-level instances from vocabularies. + VocabularyDtoPagedResponse result = apiInstance.GetVocabularies(searchTerm, language, pageNumber, pageSize, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VocabularyApi.GetVocabularies: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetVocabulariesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves top-level instances from vocabularies. + ApiResponse<VocabularyDtoPagedResponse> response = apiInstance.GetVocabulariesWithHttpInfo(searchTerm, language, 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 VocabularyApi.GetVocabulariesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **searchTerm** | **string?** | Gets or sets the search term used to filter vocabularies. | [optional] | +| **language** | [**AcceptedLanguage?**](AcceptedLanguage?.md) | Gets or sets the language for which the vocabularies are requested. | [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 + +[**VocabularyDtoPagedResponse**](VocabularyDtoPagedResponse.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 top-level vocabularies. | - | + +[[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="getvocabularyinstance"></a> +# **GetVocabularyInstance** +> VocabularyInstanceDtoResponse GetVocabularyInstance (string instance, AcceptedLanguage? acceptLanguage = null) + +Retrieves a single instance from a vocabulary. + +Could be a top-level instance, or an intermediate-level instance from a vocabulary. + +### 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 GetVocabularyInstanceExample + { + 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 VocabularyApi(config); + var instance = "instance_example"; // string | The URI of the vocabulary instance to retrieve. + var acceptLanguage = new AcceptedLanguage?(); // AcceptedLanguage? | The preferred language for the instance data. (optional) + + try + { + // Retrieves a single instance from a vocabulary. + VocabularyInstanceDtoResponse result = apiInstance.GetVocabularyInstance(instance, acceptLanguage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VocabularyApi.GetVocabularyInstance: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetVocabularyInstanceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves a single instance from a vocabulary. + ApiResponse<VocabularyInstanceDtoResponse> response = apiInstance.GetVocabularyInstanceWithHttpInfo(instance, acceptLanguage); + 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 VocabularyApi.GetVocabularyInstanceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **instance** | **string** | The URI of the vocabulary instance to retrieve. | | +| **acceptLanguage** | [**AcceptedLanguage?**](AcceptedLanguage?.md) | The preferred language for the instance data. | [optional] | + +### Return type + +[**VocabularyInstanceDtoResponse**](VocabularyInstanceDtoResponse.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 vocabulary instance. | - | + +[[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="getvocabularyinstances"></a> +# **GetVocabularyInstances** +> VocabularyInstanceDtoPagedResponse GetVocabularyInstances (string varClass, string? searchTerm = null, AcceptedLanguage? language = null, int? pageSize = null, int? pageNumber = null, string? orderBy = null) + +Retrieves vocabulary instances. + +### 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 GetVocabularyInstancesExample + { + 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 VocabularyApi(config); + var varClass = "varClass_example"; // string | Gets or sets the URI class, which is a required field. + var searchTerm = "searchTerm_example"; // string? | Gets or sets the search term used to filter vocabulary instances. (optional) + var language = new AcceptedLanguage?(); // AcceptedLanguage? | Gets or sets the language for which the vocabulary instances are requested. (optional) + var pageSize = 56; // int? | Number of items per page. The maximum number of items per page is `150`. (optional) + var pageNumber = 56; // int? | The desired page number. Should be greater than or equal to 1. Default is 1. (optional) + var orderBy = "orderBy_example"; // string? | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. (optional) + + try + { + // Retrieves vocabulary instances. + VocabularyInstanceDtoPagedResponse result = apiInstance.GetVocabularyInstances(varClass, searchTerm, language, pageSize, pageNumber, orderBy); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VocabularyApi.GetVocabularyInstances: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetVocabularyInstancesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Retrieves vocabulary instances. + ApiResponse<VocabularyInstanceDtoPagedResponse> response = apiInstance.GetVocabularyInstancesWithHttpInfo(varClass, searchTerm, language, pageSize, pageNumber, 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 VocabularyApi.GetVocabularyInstancesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **varClass** | **string** | Gets or sets the URI class, which is a required field. | | +| **searchTerm** | **string?** | Gets or sets the search term used to filter vocabulary instances. | [optional] | +| **language** | [**AcceptedLanguage?**](AcceptedLanguage?.md) | Gets or sets the language for which the vocabulary instances are requested. | [optional] | +| **pageSize** | **int?** | Number of items per page. The maximum number of items per page is `150`. | [optional] | +| **pageNumber** | **int?** | The desired page number. Should be greater than or equal to 1. Default is 1. | [optional] | +| **orderBy** | **string?** | Gets or sets the field name used for ordering the results. The order is constructed by a order string. Use the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc. | [optional] | + +### Return type + +[**VocabularyInstanceDtoPagedResponse**](VocabularyInstanceDtoPagedResponse.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 vocabulary instances. | - | + +[[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/VocabularyDto.md b/docs/VocabularyDto.md new file mode 100644 index 0000000000000000000000000000000000000000..f951bbe47d72f0ddaa99a70e9003bd691228e4a0 --- /dev/null +++ b/docs/VocabularyDto.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.VocabularyDto +Represents a Data Transfer Object (DTO) for vocabulary details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GraphUri** | **string** | The URI of the graph containing the vocabulary. | [optional] +**ClassUri** | **string** | The URI of the top-level parent class in the vocabulary. | [optional] +**DisplayName** | **string** | The display name of the vocabulary. | [optional] +**Description** | **string** | The description of the vocabulary. | [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/VocabularyDtoPagedResponse.md b/docs/VocabularyDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..5c753073ab9412c735b33554f107a1a7d551566e --- /dev/null +++ b/docs/VocabularyDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.VocabularyDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<VocabularyDto>**](VocabularyDto.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/VocabularyInstanceDto.md b/docs/VocabularyInstanceDto.md new file mode 100644 index 0000000000000000000000000000000000000000..e89c7bbf62fecfbea6d386346ce74e12a0b36217 --- /dev/null +++ b/docs/VocabularyInstanceDto.md @@ -0,0 +1,16 @@ +# Coscine.ApiClient.Core.Model.VocabularyInstanceDto +Represents a Data Transfer Object (DTO) for vocabulary instance details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GraphUri** | **string** | The URI of the graph containing the vocabulary. | [optional] +**InstanceUri** | **string** | The URI of the instance. | [optional] +**TypeUri** | **string** | The URI representing the type of the instance. | [optional] +**SubClassOfUri** | **string** | The URI of the direct parent class. | [optional] +**DisplayName** | **string** | The display name of the vocabulary instance. | [optional] +**Description** | **string** | The description of the vocabulary instance. | [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/VocabularyInstanceDtoPagedResponse.md b/docs/VocabularyInstanceDtoPagedResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..34037719ff579e27cdf9ef4300cb122931a7ff00 --- /dev/null +++ b/docs/VocabularyInstanceDtoPagedResponse.md @@ -0,0 +1,14 @@ +# Coscine.ApiClient.Core.Model.VocabularyInstanceDtoPagedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<VocabularyInstanceDto>**](VocabularyInstanceDto.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/VocabularyInstanceDtoResponse.md b/docs/VocabularyInstanceDtoResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..1abbc1a5957e3f8c2d4c2ef11e1ea33a517805b0 --- /dev/null +++ b/docs/VocabularyInstanceDtoResponse.md @@ -0,0 +1,13 @@ +# Coscine.ApiClient.Core.Model.VocabularyInstanceDtoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**VocabularyInstanceDto**](VocabularyInstanceDto.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/generate-api-client.sh b/generate-api-client.sh index 971feeb3a93aabf19da5872b08af95551dafe808..0db451546ceafb348a9b6be42dc5a42c1ac86abc 100644 --- a/generate-api-client.sh +++ b/generate-api-client.sh @@ -6,20 +6,18 @@ # This script generates a C# API client based on the OpenAPI specification. # # The actions performed are: -# - Downloading the OpenAPI generator CLI tool. -# - Generating the API client code. +# - Generating the API client code using podman (make sure it's available). # - Deleting existing API client source files. # - 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. # # Defined variables: -GENERATOR_URL="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar" # URL to the OpenAPI generator JAR file -GENERATOR_JAR="openapi-generator-cli.jar" # The name of the OpenAPI generator JAR file OUTPUT_DIR="temp" # The temporary directory for generated files ARTIFACT_ID="Coscine.ApiClient.Core" # The artifact ID for the API client PACKAGE_NAME="Coscine.ApiClient.Core" # The package name for the API client -API_SPEC_URL="http://localhost:7206/coscine/api/swagger/v2/swagger.json" # URL to the OpenAPI spec file +API_SPEC_URL="https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine/api/swagger/v2/swagger.json" # URL to the OpenAPI spec file # -------------------------------------------------------------------------------------------------------------------------------------------------------------------- # ANSI color codes for styling @@ -28,13 +26,17 @@ YELLOW='\033[0;33m' CYAN='\033[0;36m' NC='\033[0m' # No Color -# Download the OpenAPI generator JAR file -echo -e "${CYAN}Downloading the OpenAPI generator JAR file...${NC}" -curl -o "$GENERATOR_JAR" "$GENERATOR_URL" - # Run the OpenAPI generator echo -e "${CYAN}Running the OpenAPI generator...${NC}" -java -jar "$GENERATOR_JAR" generate -i "$API_SPEC_URL" -g csharp -o "$OUTPUT_DIR" --artifact-id "$ARTIFACT_ID" --package-name "$PACKAGE_NAME" --skip-validate-spec --server-variables=host=localhost:7206,basePath=coscine +podman run --rm \ + -v ${PWD}:/local openapitools/openapi-generator-cli generate \ + -i "$API_SPEC_URL" \ + -g csharp \ + -o /local/$OUTPUT_DIR \ + --artifact-id "$ARTIFACT_ID" \ + --package-name "$PACKAGE_NAME" \ + --skip-validate-spec \ + --server-variables=host=localhost:5000,basePath=coscine echo -e "${GREEN}API client generation complete.${NC}" @@ -43,11 +45,19 @@ echo -e "${YELLOW}Deleting current API client source...${NC}" rm -rf "src/$PACKAGE_NAME" rm -rf "src/${PACKAGE_NAME}.Test" +# Delete the current docs directory +echo -e "${YELLOW}Deleting current docs directory...${NC}" +rm -rf "docs" + # Copy the generated API client source to the src directory echo -e "${CYAN}Copying generated API client source to src directory...${NC}" cp -R "$OUTPUT_DIR/src/$PACKAGE_NAME" "src/$PACKAGE_NAME" cp -R "$OUTPUT_DIR/src/${PACKAGE_NAME}.Test" "src/${PACKAGE_NAME}.Test" +# Copy the generated docs to the docs directory +echo -e "${CYAN}Copying generated docs to docs directory...${NC}" +cp -R "$OUTPUT_DIR/docs" "docs" + # Replace the README.md file echo -e "\n${CYAN}Replacing README.md file...${NC}" cp "$OUTPUT_DIR/README.md" "README.md" @@ -55,6 +65,5 @@ cp "$OUTPUT_DIR/README.md" "README.md" # Remove the temp directory and the generator JAR file echo -e "${YELLOW}Cleaning up...${NC}" rm -rf "$OUTPUT_DIR" -rm -f "$GENERATOR_JAR" echo -e "${GREEN}Finished.${NC}" diff --git a/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs deleted file mode 100644 index 7226d44f344c5cc8c9eb3687bf613818c87c0b78..0000000000000000000000000000000000000000 --- a/src/Coscine.ApiClient.Core.Test/Api/ProjectPublicationRequestApiTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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/ProvenanceApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/ProvenanceApiTests.cs index 8681e63f87bdb0a73cb66026bd5fa843cc5862b9..671e865e61ed3daf04186c0e160d4b46cb373d91 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/ProvenanceApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/ProvenanceApiTests.cs @@ -77,8 +77,8 @@ namespace Coscine.ApiClient.Core.Test.Api //string projectId = null; //Guid resourceId = null; //string path = null; - //int? varVersion = null; - //var response = instance.GetSpecificProvenance(projectId, resourceId, path, varVersion); + //int? version = null; + //var response = instance.GetSpecificProvenance(projectId, resourceId, path, version); //Assert.IsType<ProvenanceDtoResponse>(response); } diff --git a/src/Coscine.ApiClient.Core.Test/Api/TreeApiTests.cs b/src/Coscine.ApiClient.Core.Test/Api/TreeApiTests.cs index a22029eada9a2df90746b8611cd1937d190baca1..14eb56aced36a5605efc4ed2b934d4e0b6fc7b3a 100644 --- a/src/Coscine.ApiClient.Core.Test/Api/TreeApiTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Api/TreeApiTests.cs @@ -158,8 +158,8 @@ namespace Coscine.ApiClient.Core.Test.Api //RdfFormat? format = null; //bool? includeExtractedMetadata = null; //bool? includeProvenance = null; - //int? varVersion = null; - //var response = instance.GetSpecificMetadataTree(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, varVersion); + //int? version = null; + //var response = instance.GetSpecificMetadataTree(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, version); //Assert.IsType<MetadataTreeDtoResponse>(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 22455df4fd594b9dde9ceb7b773047ab6c8cf1a6..4f5781e92c5d4e3b2b83d7d65070a60de9fe2fb3 100644 --- a/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj +++ b/src/Coscine.ApiClient.Core.Test/Coscine.ApiClient.Core.Test.csproj @@ -3,15 +3,15 @@ <PropertyGroup> <AssemblyName>Coscine.ApiClient.Core.Test</AssemblyName> <RootNamespace>Coscine.ApiClient.Core.Test</RootNamespace> - <TargetFramework>net7.0</TargetFramework> + <TargetFramework>net8.0</TargetFramework> <IsPackable>false</IsPackable> <Nullable>annotations</Nullable> - <Version>1.9.0</Version></PropertyGroup> + </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" /> - <PackageReference Include="xunit" Version="2.5.0" /> - <PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> + <PackageReference Include="xunit" Version="2.7.0" /> + <PackageReference Include="xunit.runner.visualstudio" Version="2.5.7" /> </ItemGroup> <ItemGroup> diff --git a/src/Coscine.ApiClient.Core.Test/Model/GitlabBranchDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/GitlabBranchDtoTests.cs index 3334ae1f96f9210ecf351a60b6c5337dbe43e1d9..a712692c9f09c5d4dfd36ff62caa89bb63ecb11d 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/GitlabBranchDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/GitlabBranchDtoTests.cs @@ -74,21 +74,21 @@ namespace Coscine.ApiClient.Core.Test.Model } /// <summary> - /// Test the property 'VarProtected' + /// Test the property 'Protected' /// </summary> [Fact] - public void VarProtectedTest() + public void ProtectedTest() { - // TODO unit test for the property 'VarProtected' + // TODO unit test for the property 'Protected' } /// <summary> - /// Test the property 'VarDefault' + /// Test the property 'Default' /// </summary> [Fact] - public void VarDefaultTest() + public void DefaultTest() { - // TODO unit test for the property 'VarDefault' + // TODO unit test for the property 'Default' } /// <summary> diff --git a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs b/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs deleted file mode 100644 index c70a604f816b26741a9604f7441c98357a90ba81..0000000000000000000000000000000000000000 --- a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoResponseTests.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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 deleted file mode 100644 index bb74e10decd7bb512bb52687046a4b44a7409b35..0000000000000000000000000000000000000000 --- a/src/Coscine.ApiClient.Core.Test/Model/PublicationRequestForCreationDtoTests.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.Test/Model/ResourceContentPageDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/ResourceContentPageDtoTests.cs index fc5ed86601b67e7a043df1aff016b1b2184c0d57..dfbde22290dd8113181010c4d6a09a5e13836743 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/ResourceContentPageDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/ResourceContentPageDtoTests.cs @@ -56,12 +56,12 @@ namespace Coscine.ApiClient.Core.Test.Model } /// <summary> - /// Test the property 'VarReadOnly' + /// Test the property 'ReadOnly' /// </summary> [Fact] - public void VarReadOnlyTest() + public void ReadOnlyTest() { - // TODO unit test for the property 'VarReadOnly' + // TODO unit test for the property 'ReadOnly' } /// <summary> diff --git a/src/Coscine.ApiClient.Core.Test/Model/UserInstituteDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/UserInstituteDtoTests.cs index 0db8453912c92c37304a64124fd66964df6f5b63..4fb040e16949b1f43f23685a55685b307291accb 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/UserInstituteDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/UserInstituteDtoTests.cs @@ -92,12 +92,12 @@ namespace Coscine.ApiClient.Core.Test.Model } /// <summary> - /// Test the property 'VarReadOnly' + /// Test the property 'ReadOnly' /// </summary> [Fact] - public void VarReadOnlyTest() + public void ReadOnlyTest() { - // TODO unit test for the property 'VarReadOnly' + // TODO unit test for the property 'ReadOnly' } } } diff --git a/src/Coscine.ApiClient.Core.Test/Model/UserOrganizationDtoTests.cs b/src/Coscine.ApiClient.Core.Test/Model/UserOrganizationDtoTests.cs index 31c3ce063092eb41e3ff40dcb76eda1040741259..fdf23cae810f7b57ad2a86f47c002739e34ee98c 100644 --- a/src/Coscine.ApiClient.Core.Test/Model/UserOrganizationDtoTests.cs +++ b/src/Coscine.ApiClient.Core.Test/Model/UserOrganizationDtoTests.cs @@ -92,12 +92,12 @@ namespace Coscine.ApiClient.Core.Test.Model } /// <summary> - /// Test the property 'VarReadOnly' + /// Test the property 'ReadOnly' /// </summary> [Fact] - public void VarReadOnlyTest() + public void ReadOnlyTest() { - // TODO unit test for the property 'VarReadOnly' + // TODO unit test for the property 'ReadOnly' } } } diff --git a/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs b/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs deleted file mode 100644 index 3b6f1fc34e7708de7ccb13ba1be476b5947db8df..0000000000000000000000000000000000000000 --- a/src/Coscine.ApiClient.Core/Api/ProjectPublicationRequestApi.cs +++ /dev/null @@ -1,572 +0,0 @@ -/* - * 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/ProvenanceApi.cs b/src/Coscine.ApiClient.Core/Api/ProvenanceApi.cs index e4fac4512b8b8d7bf6828283860c18a9bbdaffdb..57a832b9ff2bf5ed1fe60582248b9cfab56ab1c6 100644 --- a/src/Coscine.ApiClient.Core/Api/ProvenanceApi.cs +++ b/src/Coscine.ApiClient.Core/Api/ProvenanceApi.cs @@ -56,10 +56,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ProvenanceDtoResponse</returns> - ProvenanceDtoResponse GetSpecificProvenance(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0); + ProvenanceDtoResponse GetSpecificProvenance(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0); /// <summary> /// Retrieves the specific provenance information associated with a resource. @@ -71,10 +71,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of ProvenanceDtoResponse</returns> - ApiResponse<ProvenanceDtoResponse> GetSpecificProvenanceWithHttpInfo(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0); + ApiResponse<ProvenanceDtoResponse> GetSpecificProvenanceWithHttpInfo(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0); /// <summary> /// Updates existing specific provenance information of a resource. /// </summary> @@ -148,11 +148,11 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ProvenanceDtoResponse</returns> - System.Threading.Tasks.Task<ProvenanceDtoResponse> GetSpecificProvenanceAsync(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ProvenanceDtoResponse> GetSpecificProvenanceAsync(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Retrieves the specific provenance information associated with a resource. @@ -164,11 +164,11 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (ProvenanceDtoResponse)</returns> - System.Threading.Tasks.Task<ApiResponse<ProvenanceDtoResponse>> GetSpecificProvenanceWithHttpInfoAsync(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ApiResponse<ProvenanceDtoResponse>> GetSpecificProvenanceWithHttpInfoAsync(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Updates existing specific provenance information of a resource. /// </summary> @@ -493,12 +493,12 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ProvenanceDtoResponse</returns> - public ProvenanceDtoResponse GetSpecificProvenance(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0) + public ProvenanceDtoResponse GetSpecificProvenance(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0) { - Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse> localVarResponse = GetSpecificProvenanceWithHttpInfo(projectId, resourceId, path, varVersion); + Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse> localVarResponse = GetSpecificProvenanceWithHttpInfo(projectId, resourceId, path, version); return localVarResponse.Data; } @@ -509,10 +509,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of ProvenanceDtoResponse</returns> - public Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse> GetSpecificProvenanceWithHttpInfo(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0) + public Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse> GetSpecificProvenanceWithHttpInfo(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) @@ -552,9 +552,9 @@ namespace Coscine.ApiClient.Core.Api localVarRequestOptions.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); - if (varVersion != null) + if (version != null) { - localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", varVersion)); + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", version)); } localVarRequestOptions.Operation = "ProvenanceApi.GetSpecificProvenance"; @@ -587,13 +587,13 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ProvenanceDtoResponse</returns> - public async System.Threading.Tasks.Task<ProvenanceDtoResponse> GetSpecificProvenanceAsync(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<ProvenanceDtoResponse> GetSpecificProvenanceAsync(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse> localVarResponse = await GetSpecificProvenanceWithHttpInfoAsync(projectId, resourceId, path, varVersion, operationIndex, cancellationToken).ConfigureAwait(false); + Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse> localVarResponse = await GetSpecificProvenanceWithHttpInfoAsync(projectId, resourceId, path, version, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -604,11 +604,11 @@ namespace Coscine.ApiClient.Core.Api /// <param name="projectId">The unique identifier or slug of the project.</param> /// <param name="resourceId">The unique identifier of the resource.</param> /// <param name="path">Gets or sets the path of the metadata tree.</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (ProvenanceDtoResponse)</returns> - public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse>> GetSpecificProvenanceWithHttpInfoAsync(string projectId, Guid resourceId, string path, int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<ProvenanceDtoResponse>> GetSpecificProvenanceWithHttpInfoAsync(string projectId, Guid resourceId, string path, int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) @@ -649,9 +649,9 @@ namespace Coscine.ApiClient.Core.Api localVarRequestOptions.PathParameters.Add("projectId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(projectId)); // path parameter localVarRequestOptions.PathParameters.Add("resourceId", Coscine.ApiClient.Core.Client.ClientUtils.ParameterToString(resourceId)); // path parameter localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Path", path)); - if (varVersion != null) + if (version != null) { - localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", varVersion)); + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", version)); } localVarRequestOptions.Operation = "ProvenanceApi.GetSpecificProvenance"; diff --git a/src/Coscine.ApiClient.Core/Api/SelfApi.cs b/src/Coscine.ApiClient.Core/Api/SelfApi.cs index ec761b0f70ca807cb36d8cb8c028d5466f31db68..73b5d95c0460d3c96227be95c76ab5e87505dc28 100644 --- a/src/Coscine.ApiClient.Core/Api/SelfApi.cs +++ b/src/Coscine.ApiClient.Core/Api/SelfApi.cs @@ -1037,12 +1037,6 @@ namespace Coscine.ApiClient.Core.Api /// <returns>ApiResponse of UserMergeDtoResponse</returns> public Coscine.ApiClient.Core.Client.ApiResponse<UserMergeDtoResponse> InitiateUserMergeWithHttpInfo(IdentityProviders identityProvider, int operationIndex = 0) { - // verify the required parameter 'identityProvider' is set - if (identityProvider == null) - { - throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'identityProvider' when calling SelfApi->InitiateUserMerge"); - } - Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -1115,12 +1109,6 @@ namespace Coscine.ApiClient.Core.Api /// <returns>Task of ApiResponse (UserMergeDtoResponse)</returns> public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<UserMergeDtoResponse>> InitiateUserMergeWithHttpInfoAsync(IdentityProviders identityProvider, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'identityProvider' is set - if (identityProvider == null) - { - throw new Coscine.ApiClient.Core.Client.ApiException(400, "Missing required parameter 'identityProvider' when calling SelfApi->InitiateUserMerge"); - } - Coscine.ApiClient.Core.Client.RequestOptions localVarRequestOptions = new Coscine.ApiClient.Core.Client.RequestOptions(); diff --git a/src/Coscine.ApiClient.Core/Api/TreeApi.cs b/src/Coscine.ApiClient.Core/Api/TreeApi.cs index fbde5c52b2ccb0913aad017c0344ef08bef3a97e..cf0696fac4c549ee5b55a24007ce8782e43e7673 100644 --- a/src/Coscine.ApiClient.Core/Api/TreeApi.cs +++ b/src/Coscine.ApiClient.Core/Api/TreeApi.cs @@ -206,10 +206,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> - MetadataTreeDtoResponse GetSpecificMetadataTree(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0); + MetadataTreeDtoResponse GetSpecificMetadataTree(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0); /// <summary> /// Retrieves the specific metadata tree associated with a resource. @@ -224,10 +224,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> - ApiResponse<MetadataTreeDtoResponse> GetSpecificMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0); + ApiResponse<MetadataTreeDtoResponse> GetSpecificMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0); /// <summary> /// Updates an existing metadata tree of a resource. /// </summary> @@ -491,11 +491,11 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> - System.Threading.Tasks.Task<MetadataTreeDtoResponse> GetSpecificMetadataTreeAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<MetadataTreeDtoResponse> GetSpecificMetadataTreeAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Retrieves the specific metadata tree associated with a resource. @@ -510,11 +510,11 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (MetadataTreeDtoResponse)</returns> - System.Threading.Tasks.Task<ApiResponse<MetadataTreeDtoResponse>> GetSpecificMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ApiResponse<MetadataTreeDtoResponse>> GetSpecificMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// Updates an existing metadata tree of a resource. /// </summary> @@ -1843,12 +1843,12 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>MetadataTreeDtoResponse</returns> - public MetadataTreeDtoResponse GetSpecificMetadataTree(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0) + public MetadataTreeDtoResponse GetSpecificMetadataTree(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0) { - Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = GetSpecificMetadataTreeWithHttpInfo(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, varVersion); + Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = GetSpecificMetadataTreeWithHttpInfo(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, version); return localVarResponse.Data; } @@ -1862,10 +1862,10 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <returns>ApiResponse of MetadataTreeDtoResponse</returns> - public Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> GetSpecificMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0) + public Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> GetSpecificMetadataTreeWithHttpInfo(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0) { // verify the required parameter 'projectId' is set if (projectId == null) @@ -1917,9 +1917,9 @@ namespace Coscine.ApiClient.Core.Api { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeProvenance", includeProvenance)); } - if (varVersion != null) + if (version != null) { - localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", varVersion)); + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", version)); } localVarRequestOptions.Operation = "TreeApi.GetSpecificMetadataTree"; @@ -1955,13 +1955,13 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of MetadataTreeDtoResponse</returns> - public async System.Threading.Tasks.Task<MetadataTreeDtoResponse> GetSpecificMetadataTreeAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<MetadataTreeDtoResponse> GetSpecificMetadataTreeAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = await GetSpecificMetadataTreeWithHttpInfoAsync(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, varVersion, operationIndex, cancellationToken).ConfigureAwait(false); + Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse> localVarResponse = await GetSpecificMetadataTreeWithHttpInfoAsync(projectId, resourceId, path, format, includeExtractedMetadata, includeProvenance, version, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1975,11 +1975,11 @@ namespace Coscine.ApiClient.Core.Api /// <param name="format">Gets or sets the format of the RDF data. (optional)</param> /// <param name="includeExtractedMetadata">Gets or sets if extracted metadata should be included. (optional)</param> /// <param name="includeProvenance">Gets or sets if provenance should be included. (optional)</param> - /// <param name="varVersion">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> + /// <param name="version">Gets or sets the desired version. If the version is null, the newest will be returned. (optional)</param> /// <param name="operationIndex">Index associated with the operation.</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (MetadataTreeDtoResponse)</returns> - public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse>> GetSpecificMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? varVersion = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<Coscine.ApiClient.Core.Client.ApiResponse<MetadataTreeDtoResponse>> GetSpecificMetadataTreeWithHttpInfoAsync(string projectId, Guid resourceId, string path, RdfFormat? format = default(RdfFormat?), bool? includeExtractedMetadata = default(bool?), bool? includeProvenance = default(bool?), int? version = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'projectId' is set if (projectId == null) @@ -2032,9 +2032,9 @@ namespace Coscine.ApiClient.Core.Api { localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "IncludeProvenance", includeProvenance)); } - if (varVersion != null) + if (version != null) { - localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", varVersion)); + localVarRequestOptions.QueryParameters.Add(Coscine.ApiClient.Core.Client.ClientUtils.ParameterToMultiMap("", "Version", version)); } localVarRequestOptions.Operation = "TreeApi.GetSpecificMetadataTree"; diff --git a/src/Coscine.ApiClient.Core/Client/ApiClient.cs b/src/Coscine.ApiClient.Core/Client/ApiClient.cs index 2d9d64d9ac6e0e0e7aef9066410bc892a9e2fb75..7839021d7a5b38f71d04aa271b2aec99a416962d 100644 --- a/src/Coscine.ApiClient.Core/Client/ApiClient.cs +++ b/src/Coscine.ApiClient.Core/Client/ApiClient.cs @@ -23,13 +23,14 @@ using System.Text; using System.Threading; using System.Text.RegularExpressions; using System.Threading.Tasks; -using System.Web; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using RestSharp; using RestSharp.Serializers; using RestSharpMethod = RestSharp.Method; +using FileIO = System.IO.File; using Polly; +using Coscine.ApiClient.Core.Model; namespace Coscine.ApiClient.Core.Client { @@ -70,10 +71,10 @@ namespace Coscine.ApiClient.Core.Client /// <returns>A JSON string.</returns> public string Serialize(object obj) { - if (obj != null && obj is Coscine.ApiClient.Core.Model.AbstractOpenAPISchema) + if (obj != null && obj is AbstractOpenAPISchema) { // the object to be serialized is an oneOf/anyOf schema - return ((Coscine.ApiClient.Core.Model.AbstractOpenAPISchema)obj).ToJson(); + return ((AbstractOpenAPISchema)obj).ToJson(); } else { @@ -118,7 +119,7 @@ namespace Coscine.ApiClient.Core.Client if (match.Success) { string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, bytes); + FileIO.WriteAllBytes(fileName, bytes); return new FileStream(fileName, FileMode.Open); } } @@ -129,7 +130,7 @@ namespace Coscine.ApiClient.Core.Client if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); } if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type @@ -151,13 +152,13 @@ namespace Coscine.ApiClient.Core.Client public ISerializer Serializer => this; public IDeserializer Deserializer => this; - public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept; + public string[] AcceptedContentTypes => ContentType.JsonAccept; public SupportsContentType SupportsContentType => contentType => contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); - public ContentType ContentType { get; set; } = RestSharp.ContentType.Json; + public ContentType ContentType { get; set; } = ContentType.Json; public DataFormat DataFormat => DataFormat.Json; } @@ -204,7 +205,7 @@ namespace Coscine.ApiClient.Core.Client /// </summary> public ApiClient() { - _baseUrl = Coscine.ApiClient.Core.Client.GlobalConfiguration.Instance.BasePath; + _baseUrl = GlobalConfiguration.Instance.BasePath; } /// <summary> @@ -261,14 +262,14 @@ namespace Coscine.ApiClient.Core.Client /// <summary> /// Provides all logic for constructing a new RestSharp <see cref="RestRequest"/>. - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the RestSharp request. + /// At this point, all information for querying the service is known. + /// Here, it is simply mapped into the RestSharp request. /// </summary> /// <param name="method">The http verb.</param> /// <param name="path">The target path (or resource).</param> /// <param name="options">The additional request options.</param> - /// <param name="configuration">A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method.</param> + /// <param name="configuration">A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method.</param> /// <returns>[private] A new RestRequest instance.</returns> /// <exception cref="ArgumentNullException"></exception> private RestRequest NewRequest( @@ -376,7 +377,7 @@ namespace Coscine.ApiClient.Core.Client var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); + request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name)); else request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } @@ -386,6 +387,13 @@ namespace Coscine.ApiClient.Core.Client return request; } + /// <summary> + /// Transforms a RestResponse instance into a new ApiResponse instance. + /// At this point, we have a concrete http response from the service. + /// Here, it is simply mapped into the [public] ApiResponse object. + /// </summary> + /// <param name="response">The RestSharp response object</param> + /// <returns>A new ApiResponse instance.</returns> private ApiResponse<T> ToApiResponse<T>(RestResponse<T> response) { T result = response.Data; @@ -430,57 +438,45 @@ namespace Coscine.ApiClient.Core.Client return transformed; } - private ApiResponse<T> Exec<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + /// <summary> + /// Executes the HTTP request for the current service. + /// Based on functions received it can be async or sync. + /// </summary> + /// <param name="getResponse">Local function that executes http request and returns http response.</param> + /// <param name="setOptions">Local function to specify options for the service.</param> + /// <param name="request">The RestSharp request object</param> + /// <param name="options">The RestSharp options object</param> + /// <param name="configuration">A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method.</param> + /// <returns>A new ApiResponse instance.</returns> + private ApiResponse<T> ExecClient<T>(Func<RestClient, RestResponse<T>> getResponse, Action<RestClientOptions> setOptions, RestRequest request, RequestOptions options, IReadableConfiguration configuration) { var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - var cookies = new CookieContainer(); - - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - cookies.Add(new Cookie(cookie.Name, cookie.Value)); - } - } - var clientOptions = new RestClientOptions(baseUrl) { ClientCertificates = configuration.ClientCertificates, - CookieContainer = cookies, MaxTimeout = configuration.Timeout, Proxy = configuration.Proxy, UserAgent = configuration.UserAgent, UseDefaultCredentials = configuration.UseDefaultCredentials, RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback }; - + setOptions(clientOptions); + using (RestClient client = new RestClient(clientOptions, configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) { InterceptRequest(request); - RestResponse<T> response; - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>(request) - { - ErrorException = policyResult.FinalException - }; - } - else - { - response = client.Execute<T>(request); - } + RestResponse<T> response = getResponse(client); // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Coscine.ApiClient.Core.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { try { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + response.Data = (T)typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); } catch (Exception ex) { @@ -538,89 +534,80 @@ namespace Coscine.ApiClient.Core.Client } } - private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private RestResponse<T> DeserializeRestResponseFromPolicy<T>(RestClient client, RestRequest request, PolicyResult<RestResponse> policyResult) { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - - var clientOptions = new RestClientOptions(baseUrl) + if (policyResult.Outcome == OutcomeType.Successful) { - ClientCertificates = configuration.ClientCertificates, - MaxTimeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent, - UseDefaultCredentials = configuration.UseDefaultCredentials - }; - - using (RestClient client = new RestClient(clientOptions, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) + return client.Deserialize<T>(policyResult.Result); + } + else { - InterceptRequest(request); + return new RestResponse<T>(request) + { + ErrorException = policyResult.FinalException + }; + } + } + + private ApiResponse<T> Exec<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + { + Action<RestClientOptions> setOptions = (clientOptions) => + { + var cookies = new CookieContainer(); - RestResponse<T> response; - if (RetryConfiguration.AsyncRetryPolicy != null) + if (options.Cookies != null && options.Cookies.Count > 0) { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>(request) + foreach (var cookie in options.Cookies) { - ErrorException = policyResult.FinalException - }; - } - else - { - response = await client.ExecuteAsync<T>(request, cancellationToken).ConfigureAwait(false); + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } } + clientOptions.CookieContainer = cookies; + }; - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Coscine.ApiClient.Core.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response + Func<RestClient, RestResponse<T>> getResponse = (client) => + { + if (RetryConfiguration.RetryPolicy != null) { - response.Data = (T)(object)new MemoryStream(response.RawBytes); + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + return DeserializeRestResponseFromPolicy<T>(client, request, policyResult); } - else if (typeof(T).Name == "Byte[]") // for byte response + else { - response.Data = (T)(object)response.RawBytes; + return client.Execute<T>(request); } + }; - InterceptResponse(request, response); + return ExecClient(getResponse, setOptions, request, options, configuration); + } - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + private Task<ApiResponse<T>> ExecAsync<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken = default(CancellationToken)) + { + Action<RestClientOptions> setOptions = (clientOptions) => + { + //no extra options + }; - if (response.Cookies != null && response.Cookies.Count > 0) + Func<RestClient, RestResponse<T>> getResponse = (client) => + { + Func<Task<RestResponse<T>>> action = async () => { - if (result.Cookies == null) result.Cookies = new List<Cookie>(); - foreach (var restResponseCookie in response.Cookies.Cast<Cookie>()) + if (RetryConfiguration.AsyncRetryPolicy != null) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + return DeserializeRestResponseFromPolicy<T>(client, request, policyResult); } - } - return result; - } + else + { + return await client.ExecuteAsync<T>(request, cancellationToken).ConfigureAwait(false); + } + }; + return action().Result; + }; + + return Task.FromResult<ApiResponse<T>>(ExecClient(getResponse, setOptions, request, options, configuration)); } #region IAsynchronousClient @@ -633,7 +620,7 @@ namespace Coscine.ApiClient.Core.Client /// GlobalConfiguration has been done before calling this method.</param> /// <param name="cancellationToken">Token that enables callers to cancel the request.</param> /// <returns>A Task containing ApiResponse</returns> - public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync<T>(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); @@ -648,7 +635,7 @@ namespace Coscine.ApiClient.Core.Client /// GlobalConfiguration has been done before calling this method.</param> /// <param name="cancellationToken">Token that enables callers to cancel the request.</param> /// <returns>A Task containing ApiResponse</returns> - public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync<T>(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); @@ -663,7 +650,7 @@ namespace Coscine.ApiClient.Core.Client /// GlobalConfiguration has been done before calling this method.</param> /// <param name="cancellationToken">Token that enables callers to cancel the request.</param> /// <returns>A Task containing ApiResponse</returns> - public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync<T>(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); @@ -678,7 +665,7 @@ namespace Coscine.ApiClient.Core.Client /// GlobalConfiguration has been done before calling this method.</param> /// <param name="cancellationToken">Token that enables callers to cancel the request.</param> /// <returns>A Task containing ApiResponse</returns> - public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync<T>(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); @@ -693,7 +680,7 @@ namespace Coscine.ApiClient.Core.Client /// GlobalConfiguration has been done before calling this method.</param> /// <param name="cancellationToken">Token that enables callers to cancel the request.</param> /// <returns>A Task containing ApiResponse</returns> - public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync<T>(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); @@ -708,7 +695,7 @@ namespace Coscine.ApiClient.Core.Client /// GlobalConfiguration has been done before calling this method.</param> /// <param name="cancellationToken">Token that enables callers to cancel the request.</param> /// <returns>A Task containing ApiResponse</returns> - public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync<T>(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); @@ -723,7 +710,7 @@ namespace Coscine.ApiClient.Core.Client /// GlobalConfiguration has been done before calling this method.</param> /// <param name="cancellationToken">Token that enables callers to cancel the request.</param> /// <returns>A Task containing ApiResponse</returns> - public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync<T>(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); diff --git a/src/Coscine.ApiClient.Core/Client/Configuration.cs b/src/Coscine.ApiClient.Core/Client/Configuration.cs index ab8a70cb519d9615a111c181c7918f18240f1b42..63c416aea1dfe7463c255e20f93b5a708975df2f 100644 --- a/src/Coscine.ApiClient.Core/Client/Configuration.cs +++ b/src/Coscine.ApiClient.Core/Client/Configuration.cs @@ -119,7 +119,7 @@ namespace Coscine.ApiClient.Core.Client { Proxy = null; UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp"); - BasePath = "http://localhost:7206/coscine"; + BasePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"; DefaultHeaders = new ConcurrentDictionary<string, string>(); ApiKey = new ConcurrentDictionary<string, string>(); ApiKeyPrefix = new ConcurrentDictionary<string, string>(); @@ -127,7 +127,7 @@ namespace Coscine.ApiClient.Core.Client { { new Dictionary<string, object> { - {"url", "http://localhost:7206/coscine"}, + {"url", "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine"}, {"description", "No description provided"}, } } @@ -148,7 +148,7 @@ namespace Coscine.ApiClient.Core.Client IDictionary<string, string> defaultHeaders, IDictionary<string, string> apiKey, IDictionary<string, string> apiKeyPrefix, - string basePath = "http://localhost:7206/coscine") : this() + string basePath = "https://coscine-api-hristov.web.vulcanus.otc.coscine.dev/coscine") : this() { if (string.IsNullOrWhiteSpace(basePath)) throw new ArgumentException("The provided basePath is invalid.", "basePath"); diff --git a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj index 2581a84e4c0c4c922f8a0029c95f0609ade6a8c6..d95edf2ca80568e9c968c8ce97ff606524cee21e 100644 --- a/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj +++ b/src/Coscine.ApiClient.Core/Coscine.ApiClient.Core.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <GenerateAssemblyInfo>false</GenerateAssemblyInfo><!-- setting GenerateAssemblyInfo to false causes this bug https://github.com/dotnet/project-system/issues/3934 --> - <TargetFramework>net7.0</TargetFramework> + <TargetFramework>net8.0</TargetFramework> <AssemblyName>Coscine.ApiClient.Core</AssemblyName> <PackageId>Coscine.ApiClient.Core</PackageId> <OutputType>Library</OutputType> @@ -12,25 +12,24 @@ <Description>A library generated from a OpenAPI doc</Description> <Copyright>No Copyright</Copyright> <RootNamespace>Coscine.ApiClient.Core</RootNamespace> - <Version>1.9.0</Version> + <Version>1.0.0</Version> <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Coscine.ApiClient.Core.xml</DocumentationFile> <RepositoryUrl>https://github.com/GIT_USER_ID/GIT_REPO_ID.git</RepositoryUrl> <RepositoryType>git</RepositoryType> <PackageReleaseNotes>Minor update</PackageReleaseNotes> <Nullable>annotations</Nullable> + <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally> </PropertyGroup> <ItemGroup> <PackageReference Include="JsonSubTypes" Version="2.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="RestSharp" Version="110.2.0" /> - <PackageReference Include="Polly" Version="7.2.3" /> + <PackageReference Include="Polly" Version="8.1.0" /> </ItemGroup> <ItemGroup> - <None Remove="System.Web" /> </ItemGroup> <ItemGroup> - <Reference Include="System.Web" /> </ItemGroup> </Project> diff --git a/src/Coscine.ApiClient.Core/Model/ActivityLogDto.cs b/src/Coscine.ApiClient.Core/Model/ActivityLogDto.cs index bdf3af4c8966df8f43798d8b68ca1afcc7ff051e..a311b1c03cb698a92b5f11dc6aca9ba20088c711 100644 --- a/src/Coscine.ApiClient.Core/Model/ActivityLogDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ActivityLogDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for an activity log. /// </summary> [DataContract(Name = "ActivityLogDto")] - public partial class ActivityLogDto : IEquatable<ActivityLogDto>, IValidatableObject + public partial class ActivityLogDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ActivityLogDto" /> class. @@ -123,112 +123,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ActivityLogDto); - } - - /// <summary> - /// Returns true if ActivityLogDto instances are equal - /// </summary> - /// <param name="input">Instance of ActivityLogDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ActivityLogDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ApiPath == input.ApiPath || - (this.ApiPath != null && - this.ApiPath.Equals(input.ApiPath)) - ) && - ( - this.HttpAction == input.HttpAction || - (this.HttpAction != null && - this.HttpAction.Equals(input.HttpAction)) - ) && - ( - this.ControllerName == input.ControllerName || - (this.ControllerName != null && - this.ControllerName.Equals(input.ControllerName)) - ) && - ( - this.ActionName == input.ActionName || - (this.ActionName != null && - this.ActionName.Equals(input.ActionName)) - ) && - ( - this.UserId == input.UserId || - (this.UserId != null && - this.UserId.Equals(input.UserId)) - ) && - ( - this.ActivityTimestamp == input.ActivityTimestamp || - (this.ActivityTimestamp != null && - this.ActivityTimestamp.Equals(input.ActivityTimestamp)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ApiPath != null) - { - hashCode = (hashCode * 59) + this.ApiPath.GetHashCode(); - } - if (this.HttpAction != null) - { - hashCode = (hashCode * 59) + this.HttpAction.GetHashCode(); - } - if (this.ControllerName != null) - { - hashCode = (hashCode * 59) + this.ControllerName.GetHashCode(); - } - if (this.ActionName != null) - { - hashCode = (hashCode * 59) + this.ActionName.GetHashCode(); - } - if (this.UserId != null) - { - hashCode = (hashCode * 59) + this.UserId.GetHashCode(); - } - if (this.ActivityTimestamp != null) - { - hashCode = (hashCode * 59) + this.ActivityTimestamp.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ActivityLogDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ActivityLogDtoPagedResponse.cs index d8e436a70de55384a537141c567562afa33ee06e..8df42f0699d8a1f55eb85c0c7338727c7ce4af75 100644 --- a/src/Coscine.ApiClient.Core/Model/ActivityLogDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ActivityLogDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ActivityLogDtoPagedResponse /// </summary> [DataContract(Name = "ActivityLogDtoPagedResponse")] - public partial class ActivityLogDtoPagedResponse : IEquatable<ActivityLogDtoPagedResponse>, IValidatableObject + public partial class ActivityLogDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ActivityLogDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ActivityLogDtoPagedResponse); - } - - /// <summary> - /// Returns true if ActivityLogDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ActivityLogDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ActivityLogDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApiTokenDto.cs b/src/Coscine.ApiClient.Core/Model/ApiTokenDto.cs index 6a8f447e14282fe2161235c4568593650a602b96..1724fd4e32a541221b3ea01c2f7e483b07517620 100644 --- a/src/Coscine.ApiClient.Core/Model/ApiTokenDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ApiTokenDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents an API token used for authentication. /// </summary> [DataContract(Name = "ApiTokenDto")] - public partial class ApiTokenDto : IEquatable<ApiTokenDto>, IValidatableObject + public partial class ApiTokenDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApiTokenDto" /> class. @@ -119,103 +119,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApiTokenDto); - } - - /// <summary> - /// Returns true if ApiTokenDto instances are equal - /// </summary> - /// <param name="input">Instance of ApiTokenDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApiTokenDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.ExpiryDate == input.ExpiryDate || - (this.ExpiryDate != null && - this.ExpiryDate.Equals(input.ExpiryDate)) - ) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.ExpiryDate != null) - { - hashCode = (hashCode * 59) + this.ExpiryDate.GetHashCode(); - } - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApiTokenDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ApiTokenDtoPagedResponse.cs index 7aaa67de03a92ba4dd45a286be48d5f08c463f8f..8321c7856bdb8791c349628fa52f5a75e7b67e1a 100644 --- a/src/Coscine.ApiClient.Core/Model/ApiTokenDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ApiTokenDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ApiTokenDtoPagedResponse /// </summary> [DataContract(Name = "ApiTokenDtoPagedResponse")] - public partial class ApiTokenDtoPagedResponse : IEquatable<ApiTokenDtoPagedResponse>, IValidatableObject + public partial class ApiTokenDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApiTokenDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApiTokenDtoPagedResponse); - } - - /// <summary> - /// Returns true if ApiTokenDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ApiTokenDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApiTokenDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApiTokenDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ApiTokenDtoResponse.cs index 81fc7428409d9a66686df5c4dfb8d34d4ac3981e..86638d924203a1d82fd7458dcd11048292f384a3 100644 --- a/src/Coscine.ApiClient.Core/Model/ApiTokenDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ApiTokenDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ApiTokenDtoResponse /// </summary> [DataContract(Name = "ApiTokenDtoResponse")] - public partial class ApiTokenDtoResponse : IEquatable<ApiTokenDtoResponse>, IValidatableObject + public partial class ApiTokenDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApiTokenDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApiTokenDtoResponse); - } - - /// <summary> - /// Returns true if ApiTokenDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ApiTokenDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApiTokenDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApiTokenForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ApiTokenForCreationDto.cs index b1c306acbf407391a3140d30e94876a88a2f5a7c..f742aeede76b1f0b55a4cf6e47ae6e8eef8ac3e8 100644 --- a/src/Coscine.ApiClient.Core/Model/ApiTokenForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ApiTokenForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the creation of an API token. /// </summary> [DataContract(Name = "ApiTokenForCreationDto")] - public partial class ApiTokenForCreationDto : IEquatable<ApiTokenForCreationDto>, IValidatableObject + public partial class ApiTokenForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApiTokenForCreationDto" /> class. @@ -90,80 +90,29 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApiTokenForCreationDto); - } - - /// <summary> - /// Returns true if ApiTokenForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ApiTokenForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApiTokenForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.ExpiresInDays == input.ExpiresInDays || - this.ExpiresInDays.Equals(input.ExpiresInDays) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresInDays.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Name (string) minLength if (this.Name != null && this.Name.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // ExpiresInDays (int) maximum if (this.ExpiresInDays > (int)370) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiresInDays, must be a value less than or equal to 370.", new [] { "ExpiresInDays" }); + yield return new ValidationResult("Invalid value for ExpiresInDays, must be a value less than or equal to 370.", new [] { "ExpiresInDays" }); } // ExpiresInDays (int) minimum if (this.ExpiresInDays < (int)7) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiresInDays, must be a value greater than or equal to 7.", new [] { "ExpiresInDays" }); + yield return new ValidationResult("Invalid value for ExpiresInDays, must be a value greater than or equal to 7.", new [] { "ExpiresInDays" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ApplicationProfileDto.cs b/src/Coscine.ApiClient.Core/Model/ApplicationProfileDto.cs index 99cf147a412dd89a6aba3a6c14ec92f2e3417879..4ea4e4f9abb9a47cfeb8e25572e763459a426f9b 100644 --- a/src/Coscine.ApiClient.Core/Model/ApplicationProfileDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ApplicationProfileDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents an application profile data transfer object. /// </summary> [DataContract(Name = "ApplicationProfileDto")] - public partial class ApplicationProfileDto : IEquatable<ApplicationProfileDto>, IValidatableObject + public partial class ApplicationProfileDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApplicationProfileDto" /> class. @@ -99,85 +99,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApplicationProfileDto); - } - - /// <summary> - /// Returns true if ApplicationProfileDto instances are equal - /// </summary> - /// <param name="input">Instance of ApplicationProfileDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApplicationProfileDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoPagedResponse.cs index 789eb288f36084c2b367e298a0f658893c8a380f..76296e418d71be2a75cba75a2574c5087541c964 100644 --- a/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ApplicationProfileDtoPagedResponse /// </summary> [DataContract(Name = "ApplicationProfileDtoPagedResponse")] - public partial class ApplicationProfileDtoPagedResponse : IEquatable<ApplicationProfileDtoPagedResponse>, IValidatableObject + public partial class ApplicationProfileDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApplicationProfileDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApplicationProfileDtoPagedResponse); - } - - /// <summary> - /// Returns true if ApplicationProfileDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ApplicationProfileDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApplicationProfileDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoResponse.cs index b3dd3b0bd8e69a0cd464ad6a0a77f3402b32baa6..a02e0d73dfa7e03a7d368831a239b05dcb650083 100644 --- a/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ApplicationProfileDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ApplicationProfileDtoResponse /// </summary> [DataContract(Name = "ApplicationProfileDtoResponse")] - public partial class ApplicationProfileDtoResponse : IEquatable<ApplicationProfileDtoResponse>, IValidatableObject + public partial class ApplicationProfileDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApplicationProfileDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApplicationProfileDtoResponse); - } - - /// <summary> - /// Returns true if ApplicationProfileDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ApplicationProfileDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApplicationProfileDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDto.cs index a23793def925d398f70344eecf14f216b612b2c6..3c353e3b656525f0cd12fb4637deb3bb2a5c303d 100644 --- a/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the creation of an application profile. /// </summary> [DataContract(Name = "ApplicationProfileForCreationDto")] - public partial class ApplicationProfileForCreationDto : IEquatable<ApplicationProfileForCreationDto>, IValidatableObject + public partial class ApplicationProfileForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApplicationProfileForCreationDto" /> class. @@ -109,81 +109,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApplicationProfileForCreationDto); - } - - /// <summary> - /// Returns true if ApplicationProfileForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ApplicationProfileForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApplicationProfileForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Name (string) minLength if (this.Name != null && this.Name.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDtoResponse.cs index 37fcad2eda0c2963f8f895ac3f975c494461e0e9..56e2f901cf0a05f2ed6036f0af4ca5e7e62a4e63 100644 --- a/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ApplicationProfileForCreationDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ApplicationProfileForCreationDtoResponse /// </summary> [DataContract(Name = "ApplicationProfileForCreationDtoResponse")] - public partial class ApplicationProfileForCreationDtoResponse : IEquatable<ApplicationProfileForCreationDtoResponse>, IValidatableObject + public partial class ApplicationProfileForCreationDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApplicationProfileForCreationDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApplicationProfileForCreationDtoResponse); - } - - /// <summary> - /// Returns true if ApplicationProfileForCreationDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ApplicationProfileForCreationDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApplicationProfileForCreationDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApplicationProfileForResourceCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ApplicationProfileForResourceCreationDto.cs index 93c987cdd9a848ab464534de949fa3676e2a659d..bfdaed9cdc8297a0666c0f26e6a76b58dded3b54 100644 --- a/src/Coscine.ApiClient.Core/Model/ApplicationProfileForResourceCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ApplicationProfileForResourceCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the creation of an application profile for a resource. /// </summary> [DataContract(Name = "ApplicationProfileForResourceCreationDto")] - public partial class ApplicationProfileForResourceCreationDto : IEquatable<ApplicationProfileForResourceCreationDto>, IValidatableObject + public partial class ApplicationProfileForResourceCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApplicationProfileForResourceCreationDto" /> class. @@ -80,58 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApplicationProfileForResourceCreationDto); - } - - /// <summary> - /// Returns true if ApplicationProfileForResourceCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ApplicationProfileForResourceCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApplicationProfileForResourceCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ApplicationProfileMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/ApplicationProfileMinimalDto.cs index 21bdcac80edcd4ebbec79fa442a1bace0ae29dd5..fc4d7990191fe7d871316f109a523608603f97ad 100644 --- a/src/Coscine.ApiClient.Core/Model/ApplicationProfileMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ApplicationProfileMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a minimalistic application profile data transfer object. /// </summary> [DataContract(Name = "ApplicationProfileMinimalDto")] - public partial class ApplicationProfileMinimalDto : IEquatable<ApplicationProfileMinimalDto>, IValidatableObject + public partial class ApplicationProfileMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ApplicationProfileMinimalDto" /> class. @@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ApplicationProfileMinimalDto); - } - - /// <summary> - /// Returns true if ApplicationProfileMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of ApplicationProfileMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ApplicationProfileMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DeployedGraphDto.cs b/src/Coscine.ApiClient.Core/Model/DeployedGraphDto.cs index 91b8e76a06fce7431629828a67247a0aae98b27e..bfcb2591272d610b118d6bbf395bdd638c8bc98c 100644 --- a/src/Coscine.ApiClient.Core/Model/DeployedGraphDto.cs +++ b/src/Coscine.ApiClient.Core/Model/DeployedGraphDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for deployed graph details. /// </summary> [DataContract(Name = "DeployedGraphDto")] - public partial class DeployedGraphDto : IEquatable<DeployedGraphDto>, IValidatableObject + public partial class DeployedGraphDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DeployedGraphDto" /> class. @@ -80,68 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DeployedGraphDto); - } - - /// <summary> - /// Returns true if DeployedGraphDto instances are equal - /// </summary> - /// <param name="input">Instance of DeployedGraphDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DeployedGraphDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.FileHashes == input.FileHashes || - this.FileHashes != null && - input.FileHashes != null && - this.FileHashes.SequenceEqual(input.FileHashes) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.FileHashes != null) - { - hashCode = (hashCode * 59) + this.FileHashes.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DeployedGraphDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/DeployedGraphDtoPagedResponse.cs index 36033eda15d5a3c6b610fbbcd39864af3ac162fd..814b2e8902c165cd40069ec327952c07e18c762b 100644 --- a/src/Coscine.ApiClient.Core/Model/DeployedGraphDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/DeployedGraphDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// DeployedGraphDtoPagedResponse /// </summary> [DataContract(Name = "DeployedGraphDtoPagedResponse")] - public partial class DeployedGraphDtoPagedResponse : IEquatable<DeployedGraphDtoPagedResponse>, IValidatableObject + public partial class DeployedGraphDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DeployedGraphDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DeployedGraphDtoPagedResponse); - } - - /// <summary> - /// Returns true if DeployedGraphDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of DeployedGraphDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DeployedGraphDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DisciplineDto.cs b/src/Coscine.ApiClient.Core/Model/DisciplineDto.cs index 32475b3a32eb736193dc59fc8570cb6e0be48f16..7f731ef4530a409a0f419555ab1afeaf04f494c0 100644 --- a/src/Coscine.ApiClient.Core/Model/DisciplineDto.cs +++ b/src/Coscine.ApiClient.Core/Model/DisciplineDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object for a discipline. /// </summary> [DataContract(Name = "DisciplineDto")] - public partial class DisciplineDto : IEquatable<DisciplineDto>, IValidatableObject + public partial class DisciplineDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DisciplineDto" /> class. @@ -100,85 +100,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DisciplineDto); - } - - /// <summary> - /// Returns true if DisciplineDto instances are equal - /// </summary> - /// <param name="input">Instance of DisciplineDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DisciplineDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DisplayNameDe == input.DisplayNameDe || - (this.DisplayNameDe != null && - this.DisplayNameDe.Equals(input.DisplayNameDe)) - ) && - ( - this.DisplayNameEn == input.DisplayNameEn || - (this.DisplayNameEn != null && - this.DisplayNameEn.Equals(input.DisplayNameEn)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DisplayNameDe != null) - { - hashCode = (hashCode * 59) + this.DisplayNameDe.GetHashCode(); - } - if (this.DisplayNameEn != null) - { - hashCode = (hashCode * 59) + this.DisplayNameEn.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DisciplineDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/DisciplineDtoPagedResponse.cs index 78de5fb8d698f90c18f78ca3c7ff16182957f41f..d6beac40f4bcae5093b005a7c9fe93c8011e710b 100644 --- a/src/Coscine.ApiClient.Core/Model/DisciplineDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/DisciplineDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// DisciplineDtoPagedResponse /// </summary> [DataContract(Name = "DisciplineDtoPagedResponse")] - public partial class DisciplineDtoPagedResponse : IEquatable<DisciplineDtoPagedResponse>, IValidatableObject + public partial class DisciplineDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DisciplineDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DisciplineDtoPagedResponse); - } - - /// <summary> - /// Returns true if DisciplineDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of DisciplineDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DisciplineDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DisciplineDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/DisciplineDtoResponse.cs index e53f43f2a555b4b17f602bc22685e751dc880cda..299e4041f7dfeb899db70921a67afc6bf605d28e 100644 --- a/src/Coscine.ApiClient.Core/Model/DisciplineDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/DisciplineDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// DisciplineDtoResponse /// </summary> [DataContract(Name = "DisciplineDtoResponse")] - public partial class DisciplineDtoResponse : IEquatable<DisciplineDtoResponse>, IValidatableObject + public partial class DisciplineDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DisciplineDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DisciplineDtoResponse); - } - - /// <summary> - /// Returns true if DisciplineDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of DisciplineDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DisciplineDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DisciplineForProjectManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/DisciplineForProjectManipulationDto.cs index 6356c65a8b51df6c5042501e9e6a679d8b3d3915..219135904d832969e336ed79073458607625c8d1 100644 --- a/src/Coscine.ApiClient.Core/Model/DisciplineForProjectManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/DisciplineForProjectManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing a discipline for project manipulation. /// </summary> [DataContract(Name = "DisciplineForProjectManipulationDto")] - public partial class DisciplineForProjectManipulationDto : IEquatable<DisciplineForProjectManipulationDto>, IValidatableObject + public partial class DisciplineForProjectManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DisciplineForProjectManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DisciplineForProjectManipulationDto); - } - - /// <summary> - /// Returns true if DisciplineForProjectManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of DisciplineForProjectManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DisciplineForProjectManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DisciplineForResourceManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/DisciplineForResourceManipulationDto.cs index eb25326695a4e3908ccdda9c4b776cabb5aba98c..9dc86e500954880df1cb353fdda49e3f0bbf6e9f 100644 --- a/src/Coscine.ApiClient.Core/Model/DisciplineForResourceManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/DisciplineForResourceManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing a discipline for resource manipulation. /// </summary> [DataContract(Name = "DisciplineForResourceManipulationDto")] - public partial class DisciplineForResourceManipulationDto : IEquatable<DisciplineForResourceManipulationDto>, IValidatableObject + public partial class DisciplineForResourceManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DisciplineForResourceManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DisciplineForResourceManipulationDto); - } - - /// <summary> - /// Returns true if DisciplineForResourceManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of DisciplineForResourceManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DisciplineForResourceManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/DisciplineForUserManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/DisciplineForUserManipulationDto.cs index 86efce516430363324d20c207766de672d57ca08..c17e5b14f6f0a7d3e445f11dc53d2ef9d7b9802f 100644 --- a/src/Coscine.ApiClient.Core/Model/DisciplineForUserManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/DisciplineForUserManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing a discipline for user manipulation. /// </summary> [DataContract(Name = "DisciplineForUserManipulationDto")] - public partial class DisciplineForUserManipulationDto : IEquatable<DisciplineForUserManipulationDto>, IValidatableObject + public partial class DisciplineForUserManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="DisciplineForUserManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as DisciplineForUserManipulationDto); - } - - /// <summary> - /// Returns true if DisciplineForUserManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of DisciplineForUserManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(DisciplineForUserManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForCreationDto.cs index b5724a63d576a0f79de8d9f3435f18147a91a08b..b838b4acf1b1730d7bce58ec7ce7f7293ec952cd 100644 --- a/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the creation of a metadata tree. Extends the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. /// </summary> [DataContract(Name = "ExtractedMetadataTreeForCreationDto")] - public partial class ExtractedMetadataTreeForCreationDto : IEquatable<ExtractedMetadataTreeForCreationDto>, IValidatableObject + public partial class ExtractedMetadataTreeForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ExtractedMetadataTreeForCreationDto" /> class. @@ -123,90 +123,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ExtractedMetadataTreeForCreationDto); - } - - /// <summary> - /// Returns true if ExtractedMetadataTreeForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ExtractedMetadataTreeForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ExtractedMetadataTreeForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ) && - ( - this.Provenance == input.Provenance || - (this.Provenance != null && - this.Provenance.Equals(input.Provenance)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - if (this.Provenance != null) - { - hashCode = (hashCode * 59) + this.Provenance.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Path (string) minLength if (this.Path != null && this.Path.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); + yield return new ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForUpdateDto.cs index 9dc097ef694730ec356ecb4b374807d46ad70cec..b270f4d2c671658ab3eee2f2f717730eec7294b4 100644 --- a/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ExtractedMetadataTreeForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the update of a metadata tree. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. /// </summary> [DataContract(Name = "ExtractedMetadataTreeForUpdateDto")] - public partial class ExtractedMetadataTreeForUpdateDto : IEquatable<ExtractedMetadataTreeForUpdateDto>, IValidatableObject + public partial class ExtractedMetadataTreeForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ExtractedMetadataTreeForUpdateDto" /> class. @@ -133,95 +133,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ExtractedMetadataTreeForUpdateDto); - } - - /// <summary> - /// Returns true if ExtractedMetadataTreeForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of ExtractedMetadataTreeForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ExtractedMetadataTreeForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ) && - ( - this.Provenance == input.Provenance || - (this.Provenance != null && - this.Provenance.Equals(input.Provenance)) - ) && - ( - this.ForceNewMetadataVersion == input.ForceNewMetadataVersion || - this.ForceNewMetadataVersion.Equals(input.ForceNewMetadataVersion) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - if (this.Provenance != null) - { - hashCode = (hashCode * 59) + this.Provenance.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ForceNewMetadataVersion.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Path (string) minLength if (this.Path != null && this.Path.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); + yield return new ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/FileActionDto.cs b/src/Coscine.ApiClient.Core/Model/FileActionDto.cs index 3857f738e083c65501a617d65fb6ceea160c0722..b3f7327e96468af8f18793952e702a7ee48f4254 100644 --- a/src/Coscine.ApiClient.Core/Model/FileActionDto.cs +++ b/src/Coscine.ApiClient.Core/Model/FileActionDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for file actions, including the URL and HTTP method. /// </summary> [DataContract(Name = "FileActionDto")] - public partial class FileActionDto : IEquatable<FileActionDto>, IValidatableObject + public partial class FileActionDto : IValidatableObject { /// <summary> @@ -79,63 +79,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as FileActionDto); - } - - /// <summary> - /// Returns true if FileActionDto instances are equal - /// </summary> - /// <param name="input">Instance of FileActionDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(FileActionDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Method == input.Method || - this.Method.Equals(input.Method) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/FileActionsDto.cs b/src/Coscine.ApiClient.Core/Model/FileActionsDto.cs index a4ba08c5ad68334ebe08dea07c611c0b54ea1c84..d49aed4f213cc3c7d6aec1a34192d86a7a1123c6 100644 --- a/src/Coscine.ApiClient.Core/Model/FileActionsDto.cs +++ b/src/Coscine.ApiClient.Core/Model/FileActionsDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for a collection of file actions, including download action details. /// </summary> [DataContract(Name = "FileActionsDto")] - public partial class FileActionsDto : IEquatable<FileActionsDto>, IValidatableObject + public partial class FileActionsDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="FileActionsDto" /> class. @@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as FileActionsDto); - } - - /// <summary> - /// Returns true if FileActionsDto instances are equal - /// </summary> - /// <param name="input">Instance of FileActionsDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(FileActionsDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Download == input.Download || - (this.Download != null && - this.Download.Equals(input.Download)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Download != null) - { - hashCode = (hashCode * 59) + this.Download.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs b/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs index 9d74a3a778f6d4a03db5269369b8604997059843..e7e166ccc6030bc0918993c8ce92d5bbf14bfe6e 100644 --- a/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs +++ b/src/Coscine.ApiClient.Core/Model/FileTreeDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for a file within a tree structure, extending the base TreeDto. /// </summary> [DataContract(Name = "FileTreeDto")] - public partial class FileTreeDto : IEquatable<FileTreeDto>, IValidatableObject + public partial class FileTreeDto : IValidatableObject { /// <summary> @@ -158,127 +158,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as FileTreeDto); - } - - /// <summary> - /// Returns true if FileTreeDto instances are equal - /// </summary> - /// <param name="input">Instance of FileTreeDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(FileTreeDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Directory == input.Directory || - (this.Directory != null && - this.Directory.Equals(input.Directory)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Extension == input.Extension || - (this.Extension != null && - this.Extension.Equals(input.Extension)) - ) && - ( - this.Size == input.Size || - this.Size.Equals(input.Size) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.ChangeDate == input.ChangeDate || - (this.ChangeDate != null && - this.ChangeDate.Equals(input.ChangeDate)) - ) && - ( - this.Actions == input.Actions || - (this.Actions != null && - this.Actions.Equals(input.Actions)) - ) && - ( - this.Hidden == input.Hidden || - this.Hidden.Equals(input.Hidden) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Directory != null) - { - hashCode = (hashCode * 59) + this.Directory.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Extension != null) - { - hashCode = (hashCode * 59) + this.Extension.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Size.GetHashCode(); - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.ChangeDate != null) - { - hashCode = (hashCode * 59) + this.ChangeDate.GetHashCode(); - } - if (this.Actions != null) - { - hashCode = (hashCode * 59) + this.Actions.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Hidden.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/FileTreeDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/FileTreeDtoPagedResponse.cs index 707d886fccec0838fdd054fd45fd7140c01d064e..46a78b6002d372e7d0a85fa82d47dac4029a59d4 100644 --- a/src/Coscine.ApiClient.Core/Model/FileTreeDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/FileTreeDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// FileTreeDtoPagedResponse /// </summary> [DataContract(Name = "FileTreeDtoPagedResponse")] - public partial class FileTreeDtoPagedResponse : IEquatable<FileTreeDtoPagedResponse>, IValidatableObject + public partial class FileTreeDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="FileTreeDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as FileTreeDtoPagedResponse); - } - - /// <summary> - /// Returns true if FileTreeDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of FileTreeDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(FileTreeDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/FixedValueForResourceManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/FixedValueForResourceManipulationDto.cs index 85da694818700704e6a91f31354c3f9b6325a3fc..1c8606c4fb5f457d320f9e277b0396c6f7577452 100644 --- a/src/Coscine.ApiClient.Core/Model/FixedValueForResourceManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/FixedValueForResourceManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the manipulation of a fixed value associated with a resource. /// </summary> [DataContract(Name = "FixedValueForResourceManipulationDto")] - public partial class FixedValueForResourceManipulationDto : IEquatable<FixedValueForResourceManipulationDto>, IValidatableObject + public partial class FixedValueForResourceManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="FixedValueForResourceManipulationDto" /> class. @@ -100,85 +100,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as FixedValueForResourceManipulationDto); - } - - /// <summary> - /// Returns true if FixedValueForResourceManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of FixedValueForResourceManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(FixedValueForResourceManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Datatype == input.Datatype || - (this.Datatype != null && - this.Datatype.Equals(input.Datatype)) - ) && - ( - this.TargetClass == input.TargetClass || - (this.TargetClass != null && - this.TargetClass.Equals(input.TargetClass)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Datatype != null) - { - hashCode = (hashCode * 59) + this.Datatype.GetHashCode(); - } - if (this.TargetClass != null) - { - hashCode = (hashCode * 59) + this.TargetClass.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/GitLabOptionsDto.cs b/src/Coscine.ApiClient.Core/Model/GitLabOptionsDto.cs index 1a67c4d29c946fa795243aae524f79c50c116dc8..518a00b4205b2cdbb77f1412ea21b476c13a3903 100644 --- a/src/Coscine.ApiClient.Core/Model/GitLabOptionsDto.cs +++ b/src/Coscine.ApiClient.Core/Model/GitLabOptionsDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for GitLab options. /// </summary> [DataContract(Name = "GitLabOptionsDto")] - public partial class GitLabOptionsDto : IEquatable<GitLabOptionsDto>, IValidatableObject + public partial class GitLabOptionsDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitLabOptionsDto" /> class. @@ -100,81 +100,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitLabOptionsDto); - } - - /// <summary> - /// Returns true if GitLabOptionsDto instances are equal - /// </summary> - /// <param name="input">Instance of GitLabOptionsDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitLabOptionsDto input) - { - if (input == null) - { - return false; - } - return - ( - this.ProjectId == input.ProjectId || - this.ProjectId.Equals(input.ProjectId) - ) && - ( - this.RepoUrl == input.RepoUrl || - (this.RepoUrl != null && - this.RepoUrl.Equals(input.RepoUrl)) - ) && - ( - this.AccessToken == input.AccessToken || - (this.AccessToken != null && - this.AccessToken.Equals(input.AccessToken)) - ) && - ( - this.Branch == input.Branch || - (this.Branch != null && - this.Branch.Equals(input.Branch)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ProjectId.GetHashCode(); - if (this.RepoUrl != null) - { - hashCode = (hashCode * 59) + this.RepoUrl.GetHashCode(); - } - if (this.AccessToken != null) - { - hashCode = (hashCode * 59) + this.AccessToken.GetHashCode(); - } - if (this.Branch != null) - { - hashCode = (hashCode * 59) + this.Branch.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/GitlabBranchDto.cs b/src/Coscine.ApiClient.Core/Model/GitlabBranchDto.cs index bd915088237ba05609b4d03af5fc75c60cd03735..980b581858f29fe15675ed1b08f5895e80905668 100644 --- a/src/Coscine.ApiClient.Core/Model/GitlabBranchDto.cs +++ b/src/Coscine.ApiClient.Core/Model/GitlabBranchDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a GitLab branch data transfer object (DTO). /// </summary> [DataContract(Name = "GitlabBranchDto")] - public partial class GitlabBranchDto : IEquatable<GitlabBranchDto>, IValidatableObject + public partial class GitlabBranchDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitlabBranchDto" /> class. @@ -46,8 +46,8 @@ namespace Coscine.ApiClient.Core.Model { this.Name = name; this.Merged = merged; - this.VarProtected = varProtected; - this.VarDefault = varDefault; + this.Protected = varProtected; + this.Default = varDefault; this.DevelopersCanPush = developersCanPush; this.DevelopersCanMerge = developersCanMerge; this.CanPush = canPush; @@ -72,14 +72,14 @@ namespace Coscine.ApiClient.Core.Model /// </summary> /// <value>Indicates if the branch is protected.</value> [DataMember(Name = "protected", EmitDefaultValue = true)] - public bool VarProtected { get; set; } + public bool Protected { get; set; } /// <summary> /// Indicates if the branch is set as default. /// </summary> /// <value>Indicates if the branch is set as default.</value> [DataMember(Name = "default", EmitDefaultValue = true)] - public bool VarDefault { get; set; } + public bool Default { get; set; } /// <summary> /// Indicates if developers can push changes to the branch. @@ -112,8 +112,8 @@ namespace Coscine.ApiClient.Core.Model sb.Append("class GitlabBranchDto {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Merged: ").Append(Merged).Append("\n"); - sb.Append(" VarProtected: ").Append(VarProtected).Append("\n"); - sb.Append(" VarDefault: ").Append(VarDefault).Append("\n"); + sb.Append(" Protected: ").Append(Protected).Append("\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); sb.Append(" DevelopersCanPush: ").Append(DevelopersCanPush).Append("\n"); sb.Append(" DevelopersCanMerge: ").Append(DevelopersCanMerge).Append("\n"); sb.Append(" CanPush: ").Append(CanPush).Append("\n"); @@ -130,88 +130,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitlabBranchDto); - } - - /// <summary> - /// Returns true if GitlabBranchDto instances are equal - /// </summary> - /// <param name="input">Instance of GitlabBranchDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitlabBranchDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Merged == input.Merged || - this.Merged.Equals(input.Merged) - ) && - ( - this.VarProtected == input.VarProtected || - this.VarProtected.Equals(input.VarProtected) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ) && - ( - this.DevelopersCanPush == input.DevelopersCanPush || - this.DevelopersCanPush.Equals(input.DevelopersCanPush) - ) && - ( - this.DevelopersCanMerge == input.DevelopersCanMerge || - this.DevelopersCanMerge.Equals(input.DevelopersCanMerge) - ) && - ( - this.CanPush == input.CanPush || - this.CanPush.Equals(input.CanPush) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Merged.GetHashCode(); - hashCode = (hashCode * 59) + this.VarProtected.GetHashCode(); - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - hashCode = (hashCode * 59) + this.DevelopersCanPush.GetHashCode(); - hashCode = (hashCode * 59) + this.DevelopersCanMerge.GetHashCode(); - hashCode = (hashCode * 59) + this.CanPush.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/GitlabBranchDtoIEnumerableResponse.cs b/src/Coscine.ApiClient.Core/Model/GitlabBranchDtoIEnumerableResponse.cs index 845eae756a972f8eaed115ff24527d809c2af42b..6dd410e9a59c7c287ab4cba8019d8c8a4903b85e 100644 --- a/src/Coscine.ApiClient.Core/Model/GitlabBranchDtoIEnumerableResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/GitlabBranchDtoIEnumerableResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// GitlabBranchDtoIEnumerableResponse /// </summary> [DataContract(Name = "GitlabBranchDtoIEnumerableResponse")] - public partial class GitlabBranchDtoIEnumerableResponse : IEquatable<GitlabBranchDtoIEnumerableResponse>, IValidatableObject + public partial class GitlabBranchDtoIEnumerableResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitlabBranchDtoIEnumerableResponse" /> class. @@ -102,82 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitlabBranchDtoIEnumerableResponse); - } - - /// <summary> - /// Returns true if GitlabBranchDtoIEnumerableResponse instances are equal - /// </summary> - /// <param name="input">Instance of GitlabBranchDtoIEnumerableResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitlabBranchDtoIEnumerableResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/GitlabProjectDto.cs b/src/Coscine.ApiClient.Core/Model/GitlabProjectDto.cs index 0139cd81ff3c720e11d32fd7781396a3310358ba..68cceeafacbd2355ec1d1f171b95e0f3ef3288d6 100644 --- a/src/Coscine.ApiClient.Core/Model/GitlabProjectDto.cs +++ b/src/Coscine.ApiClient.Core/Model/GitlabProjectDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a GitLab project data transfer object (DTO). /// </summary> [DataContract(Name = "GitlabProjectDto")] - public partial class GitlabProjectDto : IEquatable<GitlabProjectDto>, IValidatableObject + public partial class GitlabProjectDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitlabProjectDto" /> class. @@ -190,158 +190,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitlabProjectDto); - } - - /// <summary> - /// Returns true if GitlabProjectDto instances are equal - /// </summary> - /// <param name="input">Instance of GitlabProjectDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitlabProjectDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - this.Id.Equals(input.Id) - ) && - ( - this.Archived == input.Archived || - this.Archived.Equals(input.Archived) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NameWithNamespace == input.NameWithNamespace || - (this.NameWithNamespace != null && - this.NameWithNamespace.Equals(input.NameWithNamespace)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DefaultBranch == input.DefaultBranch || - (this.DefaultBranch != null && - this.DefaultBranch.Equals(input.DefaultBranch)) - ) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.PathWithNamespace == input.PathWithNamespace || - (this.PathWithNamespace != null && - this.PathWithNamespace.Equals(input.PathWithNamespace)) - ) && - ( - this.LastActivityAt == input.LastActivityAt || - (this.LastActivityAt != null && - this.LastActivityAt.Equals(input.LastActivityAt)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.WebUrl == input.WebUrl || - (this.WebUrl != null && - this.WebUrl.Equals(input.WebUrl)) - ) && - ( - this.HttpUrlToRepo == input.HttpUrlToRepo || - (this.HttpUrlToRepo != null && - this.HttpUrlToRepo.Equals(input.HttpUrlToRepo)) - ) && - ( - this.SshUrlToRepo == input.SshUrlToRepo || - (this.SshUrlToRepo != null && - this.SshUrlToRepo.Equals(input.SshUrlToRepo)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.Archived.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.NameWithNamespace != null) - { - hashCode = (hashCode * 59) + this.NameWithNamespace.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DefaultBranch != null) - { - hashCode = (hashCode * 59) + this.DefaultBranch.GetHashCode(); - } - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.PathWithNamespace != null) - { - hashCode = (hashCode * 59) + this.PathWithNamespace.GetHashCode(); - } - if (this.LastActivityAt != null) - { - hashCode = (hashCode * 59) + this.LastActivityAt.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.WebUrl != null) - { - hashCode = (hashCode * 59) + this.WebUrl.GetHashCode(); - } - if (this.HttpUrlToRepo != null) - { - hashCode = (hashCode * 59) + this.HttpUrlToRepo.GetHashCode(); - } - if (this.SshUrlToRepo != null) - { - hashCode = (hashCode * 59) + this.SshUrlToRepo.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoIEnumerableResponse.cs b/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoIEnumerableResponse.cs index c2e54baa9dc168c48f3c6a26a78b7e8480d7eeb5..ee2337df9d72b64e806a5913ce2955f81364b300 100644 --- a/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoIEnumerableResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoIEnumerableResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// GitlabProjectDtoIEnumerableResponse /// </summary> [DataContract(Name = "GitlabProjectDtoIEnumerableResponse")] - public partial class GitlabProjectDtoIEnumerableResponse : IEquatable<GitlabProjectDtoIEnumerableResponse>, IValidatableObject + public partial class GitlabProjectDtoIEnumerableResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitlabProjectDtoIEnumerableResponse" /> class. @@ -102,82 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitlabProjectDtoIEnumerableResponse); - } - - /// <summary> - /// Returns true if GitlabProjectDtoIEnumerableResponse instances are equal - /// </summary> - /// <param name="input">Instance of GitlabProjectDtoIEnumerableResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitlabProjectDtoIEnumerableResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoResponse.cs index 5707973b40bb55a29310ebfaa8ad6a17cbbb0c47..04d08970c71919d90952b4a4c894aa23959c73a7 100644 --- a/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/GitlabProjectDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// GitlabProjectDtoResponse /// </summary> [DataContract(Name = "GitlabProjectDtoResponse")] - public partial class GitlabProjectDtoResponse : IEquatable<GitlabProjectDtoResponse>, IValidatableObject + public partial class GitlabProjectDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitlabProjectDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitlabProjectDtoResponse); - } - - /// <summary> - /// Returns true if GitlabProjectDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of GitlabProjectDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitlabProjectDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForCreationDto.cs index 8208db1878785538ac4160f9d77993463918139d..e74b24291a62d98779f8a827ed241f0cff526dbd 100644 --- a/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for creating GitLab resource type options. /// </summary> [DataContract(Name = "GitlabResourceTypeOptionsForCreationDto")] - public partial class GitlabResourceTypeOptionsForCreationDto : IEquatable<GitlabResourceTypeOptionsForCreationDto>, IValidatableObject + public partial class GitlabResourceTypeOptionsForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitlabResourceTypeOptionsForCreationDto" /> class. @@ -130,109 +130,35 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitlabResourceTypeOptionsForCreationDto); - } - - /// <summary> - /// Returns true if GitlabResourceTypeOptionsForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of GitlabResourceTypeOptionsForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitlabResourceTypeOptionsForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Branch == input.Branch || - (this.Branch != null && - this.Branch.Equals(input.Branch)) - ) && - ( - this.AccessToken == input.AccessToken || - (this.AccessToken != null && - this.AccessToken.Equals(input.AccessToken)) - ) && - ( - this.RepoUrl == input.RepoUrl || - (this.RepoUrl != null && - this.RepoUrl.Equals(input.RepoUrl)) - ) && - ( - this.ProjectId == input.ProjectId || - this.ProjectId.Equals(input.ProjectId) - ) && - ( - this.TosAccepted == input.TosAccepted || - this.TosAccepted.Equals(input.TosAccepted) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Branch != null) - { - hashCode = (hashCode * 59) + this.Branch.GetHashCode(); - } - if (this.AccessToken != null) - { - hashCode = (hashCode * 59) + this.AccessToken.GetHashCode(); - } - if (this.RepoUrl != null) - { - hashCode = (hashCode * 59) + this.RepoUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ProjectId.GetHashCode(); - hashCode = (hashCode * 59) + this.TosAccepted.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Branch (string) minLength if (this.Branch != null && this.Branch.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Branch, length must be greater than 1.", new [] { "Branch" }); + yield return new ValidationResult("Invalid value for Branch, length must be greater than 1.", new [] { "Branch" }); } // AccessToken (string) minLength if (this.AccessToken != null && this.AccessToken.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccessToken, length must be greater than 1.", new [] { "AccessToken" }); + yield return new ValidationResult("Invalid value for AccessToken, length must be greater than 1.", new [] { "AccessToken" }); } // ProjectId (int) maximum if (this.ProjectId > (int)2147483647) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ProjectId, must be a value less than or equal to 2147483647.", new [] { "ProjectId" }); + yield return new ValidationResult("Invalid value for ProjectId, must be a value less than or equal to 2147483647.", new [] { "ProjectId" }); } // ProjectId (int) minimum if (this.ProjectId < (int)1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ProjectId, must be a value greater than or equal to 1.", new [] { "ProjectId" }); + yield return new ValidationResult("Invalid value for ProjectId, must be a value greater than or equal to 1.", new [] { "ProjectId" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForUpdateDto.cs index c513b15f1e7b37734995513fb319cefe9f8cfa7b..2bf73d01449d97bfe5cc378b40abb9df6dde01f6 100644 --- a/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/GitlabResourceTypeOptionsForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for updating GitLab resource type options. /// </summary> [DataContract(Name = "GitlabResourceTypeOptionsForUpdateDto")] - public partial class GitlabResourceTypeOptionsForUpdateDto : IEquatable<GitlabResourceTypeOptionsForUpdateDto>, IValidatableObject + public partial class GitlabResourceTypeOptionsForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="GitlabResourceTypeOptionsForUpdateDto" /> class. @@ -95,78 +95,23 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as GitlabResourceTypeOptionsForUpdateDto); - } - - /// <summary> - /// Returns true if GitlabResourceTypeOptionsForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of GitlabResourceTypeOptionsForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(GitlabResourceTypeOptionsForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Branch == input.Branch || - (this.Branch != null && - this.Branch.Equals(input.Branch)) - ) && - ( - this.AccessToken == input.AccessToken || - (this.AccessToken != null && - this.AccessToken.Equals(input.AccessToken)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Branch != null) - { - hashCode = (hashCode * 59) + this.Branch.GetHashCode(); - } - if (this.AccessToken != null) - { - hashCode = (hashCode * 59) + this.AccessToken.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Branch (string) minLength if (this.Branch != null && this.Branch.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Branch, length must be greater than 1.", new [] { "Branch" }); + yield return new ValidationResult("Invalid value for Branch, length must be greater than 1.", new [] { "Branch" }); } // AccessToken (string) minLength if (this.AccessToken != null && this.AccessToken.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccessToken, length must be greater than 1.", new [] { "AccessToken" }); + yield return new ValidationResult("Invalid value for AccessToken, length must be greater than 1.", new [] { "AccessToken" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/HandleDto.cs b/src/Coscine.ApiClient.Core/Model/HandleDto.cs index 707d857d5aef80d311390f1946e64be1a6c7e351..427ec9236307ae0bc8887dbf52ee21bc7ab3038c 100644 --- a/src/Coscine.ApiClient.Core/Model/HandleDto.cs +++ b/src/Coscine.ApiClient.Core/Model/HandleDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// HandleDto /// </summary> [DataContract(Name = "HandleDto")] - public partial class HandleDto : IEquatable<HandleDto>, IValidatableObject + public partial class HandleDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="HandleDto" /> class. @@ -78,68 +78,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as HandleDto); - } - - /// <summary> - /// Returns true if HandleDto instances are equal - /// </summary> - /// <param name="input">Instance of HandleDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(HandleDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Pid == input.Pid || - (this.Pid != null && - this.Pid.Equals(input.Pid)) - ) && - ( - this.Values == input.Values || - this.Values != null && - input.Values != null && - this.Values.SequenceEqual(input.Values) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Pid != null) - { - hashCode = (hashCode * 59) + this.Pid.GetHashCode(); - } - if (this.Values != null) - { - hashCode = (hashCode * 59) + this.Values.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/HandleDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/HandleDtoResponse.cs index 0dfefd269991f53696ecc0d075dfdad696c45ea5..a482bc765b23166ec0a763a965c39b8f7f46bbba 100644 --- a/src/Coscine.ApiClient.Core/Model/HandleDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/HandleDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// HandleDtoResponse /// </summary> [DataContract(Name = "HandleDtoResponse")] - public partial class HandleDtoResponse : IEquatable<HandleDtoResponse>, IValidatableObject + public partial class HandleDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="HandleDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as HandleDtoResponse); - } - - /// <summary> - /// Returns true if HandleDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of HandleDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(HandleDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/HandleForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/HandleForUpdateDto.cs index 00385b21167b583bf08852048775b70538b71aab..63f0c8aa5256e35ddbcac903d124e299dbce352a 100644 --- a/src/Coscine.ApiClient.Core/Model/HandleForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/HandleForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// HandleForUpdateDto /// </summary> [DataContract(Name = "HandleForUpdateDto")] - public partial class HandleForUpdateDto : IEquatable<HandleForUpdateDto>, IValidatableObject + public partial class HandleForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="HandleForUpdateDto" /> class. @@ -69,59 +69,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as HandleForUpdateDto); - } - - /// <summary> - /// Returns true if HandleForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of HandleForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(HandleForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Values == input.Values || - this.Values != null && - input.Values != null && - this.Values.SequenceEqual(input.Values) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Values != null) - { - hashCode = (hashCode * 59) + this.Values.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/HandleValueDto.cs b/src/Coscine.ApiClient.Core/Model/HandleValueDto.cs index 45c52f88794e2328ea2fc3a00e9a44b85c37ba50..60b104d83daf8e54094ddfa4bd8edccf3a1cbda8 100644 --- a/src/Coscine.ApiClient.Core/Model/HandleValueDto.cs +++ b/src/Coscine.ApiClient.Core/Model/HandleValueDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// HandleValueDto /// </summary> [DataContract(Name = "HandleValueDto")] - public partial class HandleValueDto : IEquatable<HandleValueDto>, IValidatableObject + public partial class HandleValueDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="HandleValueDto" /> class. @@ -141,119 +141,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as HandleValueDto); - } - - /// <summary> - /// Returns true if HandleValueDto instances are equal - /// </summary> - /// <param name="input">Instance of HandleValueDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(HandleValueDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Idx == input.Idx || - this.Idx.Equals(input.Idx) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.ParsedData == input.ParsedData || - (this.ParsedData != null && - this.ParsedData.Equals(input.ParsedData)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.TtlType == input.TtlType || - this.TtlType.Equals(input.TtlType) - ) && - ( - this.Ttl == input.Ttl || - this.Ttl.Equals(input.Ttl) - ) && - ( - this.Refs == input.Refs || - this.Refs != null && - input.Refs != null && - this.Refs.SequenceEqual(input.Refs) - ) && - ( - this.Privs == input.Privs || - (this.Privs != null && - this.Privs.Equals(input.Privs)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Idx.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.ParsedData != null) - { - hashCode = (hashCode * 59) + this.ParsedData.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TtlType.GetHashCode(); - hashCode = (hashCode * 59) + this.Ttl.GetHashCode(); - if (this.Refs != null) - { - hashCode = (hashCode * 59) + this.Refs.GetHashCode(); - } - if (this.Privs != null) - { - hashCode = (hashCode * 59) + this.Privs.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/HandleValueForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/HandleValueForUpdateDto.cs index fcb1ca3e57417cc2b255615e3894ed216cac5ef3..0061996ace8147d467bde1098732c2dd4ce9edb2 100644 --- a/src/Coscine.ApiClient.Core/Model/HandleValueForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/HandleValueForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing updating a handle. /// </summary> [DataContract(Name = "HandleValueForUpdateDto")] - public partial class HandleValueForUpdateDto : IEquatable<HandleValueForUpdateDto>, IValidatableObject + public partial class HandleValueForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="HandleValueForUpdateDto" /> class. @@ -90,72 +90,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as HandleValueForUpdateDto); - } - - /// <summary> - /// Returns true if HandleValueForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of HandleValueForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(HandleValueForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.ParsedData == input.ParsedData || - (this.ParsedData != null && - this.ParsedData.Equals(input.ParsedData)) - ) && - ( - this.Idx == input.Idx || - this.Idx.Equals(input.Idx) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.ParsedData != null) - { - hashCode = (hashCode * 59) + this.ParsedData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Idx.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/HashParametersDto.cs b/src/Coscine.ApiClient.Core/Model/HashParametersDto.cs index 10017c119ad3d2de2e00c3c270ce8c0bc2b756a0..0da6353457ec286a7eb1ba8ce60bd8885e52be0d 100644 --- a/src/Coscine.ApiClient.Core/Model/HashParametersDto.cs +++ b/src/Coscine.ApiClient.Core/Model/HashParametersDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing Hash Parameters in a request. /// </summary> [DataContract(Name = "HashParametersDto")] - public partial class HashParametersDto : IEquatable<HashParametersDto>, IValidatableObject + public partial class HashParametersDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="HashParametersDto" /> class. @@ -95,78 +95,23 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as HashParametersDto); - } - - /// <summary> - /// Returns true if HashParametersDto instances are equal - /// </summary> - /// <param name="input">Instance of HashParametersDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(HashParametersDto input) - { - if (input == null) - { - return false; - } - return - ( - this.AlgorithmName == input.AlgorithmName || - (this.AlgorithmName != null && - this.AlgorithmName.Equals(input.AlgorithmName)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AlgorithmName != null) - { - hashCode = (hashCode * 59) + this.AlgorithmName.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // AlgorithmName (string) minLength if (this.AlgorithmName != null && this.AlgorithmName.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AlgorithmName, length must be greater than 1.", new [] { "AlgorithmName" }); + yield return new ValidationResult("Invalid value for AlgorithmName, length must be greater than 1.", new [] { "AlgorithmName" }); } // Value (string) minLength if (this.Value != null && this.Value.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Value, length must be greater than 1.", new [] { "Value" }); + yield return new ValidationResult("Invalid value for Value, length must be greater than 1.", new [] { "Value" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/IdentityProviderDto.cs b/src/Coscine.ApiClient.Core/Model/IdentityProviderDto.cs index f06610e24cd167b3794ecf817b23b1be4c08fa16..b968a8d37164bd62871d0a25332f6312842f9cce 100644 --- a/src/Coscine.ApiClient.Core/Model/IdentityProviderDto.cs +++ b/src/Coscine.ApiClient.Core/Model/IdentityProviderDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for an identity provider. /// </summary> [DataContract(Name = "IdentityProviderDto")] - public partial class IdentityProviderDto : IEquatable<IdentityProviderDto>, IValidatableObject + public partial class IdentityProviderDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="IdentityProviderDto" /> class. @@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as IdentityProviderDto); - } - - /// <summary> - /// Returns true if IdentityProviderDto instances are equal - /// </summary> - /// <param name="input">Instance of IdentityProviderDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(IdentityProviderDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LanguageDto.cs b/src/Coscine.ApiClient.Core/Model/LanguageDto.cs index 574b780100aa2ffa8008f2a62dfb41d53d85838b..9064da071a01529a2b6a372302aa6f7e8dd8c27b 100644 --- a/src/Coscine.ApiClient.Core/Model/LanguageDto.cs +++ b/src/Coscine.ApiClient.Core/Model/LanguageDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for language details. /// </summary> [DataContract(Name = "LanguageDto")] - public partial class LanguageDto : IEquatable<LanguageDto>, IValidatableObject + public partial class LanguageDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LanguageDto" /> class. @@ -90,76 +90,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LanguageDto); - } - - /// <summary> - /// Returns true if LanguageDto instances are equal - /// </summary> - /// <param name="input">Instance of LanguageDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LanguageDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Abbreviation == input.Abbreviation || - (this.Abbreviation != null && - this.Abbreviation.Equals(input.Abbreviation)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Abbreviation != null) - { - hashCode = (hashCode * 59) + this.Abbreviation.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LanguageDtoIEnumerableResponse.cs b/src/Coscine.ApiClient.Core/Model/LanguageDtoIEnumerableResponse.cs index 4770cafc79f45eb2af57923e8382a343a39eafe4..453d4d37af7d41532e987399dac96403d312aeed 100644 --- a/src/Coscine.ApiClient.Core/Model/LanguageDtoIEnumerableResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/LanguageDtoIEnumerableResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// LanguageDtoIEnumerableResponse /// </summary> [DataContract(Name = "LanguageDtoIEnumerableResponse")] - public partial class LanguageDtoIEnumerableResponse : IEquatable<LanguageDtoIEnumerableResponse>, IValidatableObject + public partial class LanguageDtoIEnumerableResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LanguageDtoIEnumerableResponse" /> class. @@ -102,82 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LanguageDtoIEnumerableResponse); - } - - /// <summary> - /// Returns true if LanguageDtoIEnumerableResponse instances are equal - /// </summary> - /// <param name="input">Instance of LanguageDtoIEnumerableResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LanguageDtoIEnumerableResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LanguageDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/LanguageDtoResponse.cs index a50eb3ea7e13272a21480da18698290a387b6053..386d251639cb78bd7b81314c25b10899382b057e 100644 --- a/src/Coscine.ApiClient.Core/Model/LanguageDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/LanguageDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// LanguageDtoResponse /// </summary> [DataContract(Name = "LanguageDtoResponse")] - public partial class LanguageDtoResponse : IEquatable<LanguageDtoResponse>, IValidatableObject + public partial class LanguageDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LanguageDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LanguageDtoResponse); - } - - /// <summary> - /// Returns true if LanguageDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of LanguageDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LanguageDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LanguageForUserManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/LanguageForUserManipulationDto.cs index 714fff8f1bd310756b2208862b553a2a9f94ba04..4212019f22efedf61f86baf77df38006bf864ca7 100644 --- a/src/Coscine.ApiClient.Core/Model/LanguageForUserManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/LanguageForUserManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing a language for user manipulation. /// </summary> [DataContract(Name = "LanguageForUserManipulationDto")] - public partial class LanguageForUserManipulationDto : IEquatable<LanguageForUserManipulationDto>, IValidatableObject + public partial class LanguageForUserManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LanguageForUserManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LanguageForUserManipulationDto); - } - - /// <summary> - /// Returns true if LanguageForUserManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of LanguageForUserManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LanguageForUserManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LicenseDto.cs b/src/Coscine.ApiClient.Core/Model/LicenseDto.cs index 534df0f76d8d4bae820246b3fd231c7673326af6..70ed8a86f3d335559a28f2946f95225fa4c8b224 100644 --- a/src/Coscine.ApiClient.Core/Model/LicenseDto.cs +++ b/src/Coscine.ApiClient.Core/Model/LicenseDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for license details. /// </summary> [DataContract(Name = "LicenseDto")] - public partial class LicenseDto : IEquatable<LicenseDto>, IValidatableObject + public partial class LicenseDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LicenseDto" /> class. @@ -90,76 +90,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LicenseDto); - } - - /// <summary> - /// Returns true if LicenseDto instances are equal - /// </summary> - /// <param name="input">Instance of LicenseDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LicenseDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LicenseDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/LicenseDtoPagedResponse.cs index 83ae4aa970afdf97938d71014a472c9204715d0b..fe0ba0df2a27210e4b64feb25bf6ad163181058b 100644 --- a/src/Coscine.ApiClient.Core/Model/LicenseDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/LicenseDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// LicenseDtoPagedResponse /// </summary> [DataContract(Name = "LicenseDtoPagedResponse")] - public partial class LicenseDtoPagedResponse : IEquatable<LicenseDtoPagedResponse>, IValidatableObject + public partial class LicenseDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LicenseDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LicenseDtoPagedResponse); - } - - /// <summary> - /// Returns true if LicenseDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of LicenseDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LicenseDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LicenseDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/LicenseDtoResponse.cs index 1c79716e33853b9166147f8ecb3281ca64ed9fee..bdabbaf40350dc2b83464b2bac11a62ca2f0104b 100644 --- a/src/Coscine.ApiClient.Core/Model/LicenseDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/LicenseDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// LicenseDtoResponse /// </summary> [DataContract(Name = "LicenseDtoResponse")] - public partial class LicenseDtoResponse : IEquatable<LicenseDtoResponse>, IValidatableObject + public partial class LicenseDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LicenseDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LicenseDtoResponse); - } - - /// <summary> - /// Returns true if LicenseDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of LicenseDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LicenseDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/LicenseForResourceManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/LicenseForResourceManipulationDto.cs index 9c54b316dc7f831459ee26d259ccd9b7b5b83da1..711be59eeb0bf95a73bba96f656fe7b71ce2d9b0 100644 --- a/src/Coscine.ApiClient.Core/Model/LicenseForResourceManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/LicenseForResourceManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing a license for resource manipulation. /// </summary> [DataContract(Name = "LicenseForResourceManipulationDto")] - public partial class LicenseForResourceManipulationDto : IEquatable<LicenseForResourceManipulationDto>, IValidatableObject + public partial class LicenseForResourceManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="LicenseForResourceManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as LicenseForResourceManipulationDto); - } - - /// <summary> - /// Returns true if LicenseForResourceManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of LicenseForResourceManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(LicenseForResourceManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/MaintenanceDto.cs b/src/Coscine.ApiClient.Core/Model/MaintenanceDto.cs index 7e71912aa9e77c4ff0e23f85166fd1b651d89fea..908175a61bbfc5d7adccadbe700af2405c9d2870 100644 --- a/src/Coscine.ApiClient.Core/Model/MaintenanceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/MaintenanceDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// This class represents a maintenance with its significant properties, which is returned from the API. /// </summary> [DataContract(Name = "MaintenanceDto")] - public partial class MaintenanceDto : IEquatable<MaintenanceDto>, IValidatableObject + public partial class MaintenanceDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MaintenanceDto" /> class. @@ -120,103 +120,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MaintenanceDto); - } - - /// <summary> - /// Returns true if MaintenanceDto instances are equal - /// </summary> - /// <param name="input">Instance of MaintenanceDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MaintenanceDto input) - { - if (input == null) - { - return false; - } - return - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Href == input.Href || - (this.Href != null && - this.Href.Equals(input.Href)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ) && - ( - this.StartsDate == input.StartsDate || - (this.StartsDate != null && - this.StartsDate.Equals(input.StartsDate)) - ) && - ( - this.EndsDate == input.EndsDate || - (this.EndsDate != null && - this.EndsDate.Equals(input.EndsDate)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Href != null) - { - hashCode = (hashCode * 59) + this.Href.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - if (this.StartsDate != null) - { - hashCode = (hashCode * 59) + this.StartsDate.GetHashCode(); - } - if (this.EndsDate != null) - { - hashCode = (hashCode * 59) + this.EndsDate.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/MaintenanceDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/MaintenanceDtoPagedResponse.cs index c3adb9a31f24db4f287c976c5047d4741f3cb1c2..1b74126787122e23b321de44c0ce787ef95f186c 100644 --- a/src/Coscine.ApiClient.Core/Model/MaintenanceDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/MaintenanceDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// MaintenanceDtoPagedResponse /// </summary> [DataContract(Name = "MaintenanceDtoPagedResponse")] - public partial class MaintenanceDtoPagedResponse : IEquatable<MaintenanceDtoPagedResponse>, IValidatableObject + public partial class MaintenanceDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MaintenanceDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MaintenanceDtoPagedResponse); - } - - /// <summary> - /// Returns true if MaintenanceDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of MaintenanceDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MaintenanceDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/MetadataTreeDto.cs b/src/Coscine.ApiClient.Core/Model/MetadataTreeDto.cs index d541bec457a57b33af42b039d1fa1efb0a95f205..37674a8b9a18f512c43286523c69904eb87079a8 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataTreeDto.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataTreeDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for metadata within a tree structure, extending the base TreeDto. /// </summary> [DataContract(Name = "MetadataTreeDto")] - public partial class MetadataTreeDto : IEquatable<MetadataTreeDto>, IValidatableObject + public partial class MetadataTreeDto : IValidatableObject { /// <summary> @@ -136,118 +136,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataTreeDto); - } - - /// <summary> - /// Returns true if MetadataTreeDto instances are equal - /// </summary> - /// <param name="input">Instance of MetadataTreeDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataTreeDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarVersion == input.VarVersion || - (this.VarVersion != null && - this.VarVersion.Equals(input.VarVersion)) - ) && - ( - this.AvailableVersions == input.AvailableVersions || - this.AvailableVersions != null && - input.AvailableVersions != null && - this.AvailableVersions.SequenceEqual(input.AvailableVersions) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ) && - ( - this.Extracted == input.Extracted || - (this.Extracted != null && - this.Extracted.Equals(input.Extracted)) - ) && - ( - this.Provenance == input.Provenance || - (this.Provenance != null && - this.Provenance.Equals(input.Provenance)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarVersion != null) - { - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); - } - if (this.AvailableVersions != null) - { - hashCode = (hashCode * 59) + this.AvailableVersions.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - if (this.Extracted != null) - { - hashCode = (hashCode * 59) + this.Extracted.GetHashCode(); - } - if (this.Provenance != null) - { - hashCode = (hashCode * 59) + this.Provenance.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoPagedResponse.cs index b44b2c62e9c92f91291f6556adbd1df746b9cc85..0c2c685790d6b393855d609340ef6359e39bc906 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// MetadataTreeDtoPagedResponse /// </summary> [DataContract(Name = "MetadataTreeDtoPagedResponse")] - public partial class MetadataTreeDtoPagedResponse : IEquatable<MetadataTreeDtoPagedResponse>, IValidatableObject + public partial class MetadataTreeDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MetadataTreeDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataTreeDtoPagedResponse); - } - - /// <summary> - /// Returns true if MetadataTreeDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of MetadataTreeDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataTreeDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoResponse.cs index 22813d380f53d18336d61614711c6433de70f62c..65450f1cdcc955d6fc9a6b076c5238bdfccf4dfc 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataTreeDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// MetadataTreeDtoResponse /// </summary> [DataContract(Name = "MetadataTreeDtoResponse")] - public partial class MetadataTreeDtoResponse : IEquatable<MetadataTreeDtoResponse>, IValidatableObject + public partial class MetadataTreeDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MetadataTreeDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataTreeDtoResponse); - } - - /// <summary> - /// Returns true if MetadataTreeDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of MetadataTreeDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataTreeDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/MetadataTreeExtractedDto.cs b/src/Coscine.ApiClient.Core/Model/MetadataTreeExtractedDto.cs index 369e8cec22108128728c4c770214140fcc3e3a9c..5e7a1bdb6551d96fd33441703790eabee606ec94 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataTreeExtractedDto.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataTreeExtractedDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for extracted metadata within a tree structure, extending the base TreeDto. /// </summary> [DataContract(Name = "MetadataTreeExtractedDto")] - public partial class MetadataTreeExtractedDto : IEquatable<MetadataTreeExtractedDto>, IValidatableObject + public partial class MetadataTreeExtractedDto : IValidatableObject { /// <summary> @@ -108,90 +108,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataTreeExtractedDto); - } - - /// <summary> - /// Returns true if MetadataTreeExtractedDto instances are equal - /// </summary> - /// <param name="input">Instance of MetadataTreeExtractedDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataTreeExtractedDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.MetadataId == input.MetadataId || - (this.MetadataId != null && - this.MetadataId.Equals(input.MetadataId)) - ) && - ( - this.RawDataId == input.RawDataId || - (this.RawDataId != null && - this.RawDataId.Equals(input.RawDataId)) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.MetadataId != null) - { - hashCode = (hashCode * 59) + this.MetadataId.GetHashCode(); - } - if (this.RawDataId != null) - { - hashCode = (hashCode * 59) + this.RawDataId.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/MetadataTreeForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/MetadataTreeForCreationDto.cs index e3bb3b3f7021ca89273a7091cd9dc2acec2c7694..4663d96000121b3f4d20e54ade62443b62399671 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataTreeForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataTreeForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the creation of a metadata tree. Extends the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. /// </summary> [DataContract(Name = "MetadataTreeForCreationDto")] - public partial class MetadataTreeForCreationDto : IEquatable<MetadataTreeForCreationDto>, IValidatableObject + public partial class MetadataTreeForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MetadataTreeForCreationDto" /> class. @@ -94,72 +94,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataTreeForCreationDto); - } - - /// <summary> - /// Returns true if MetadataTreeForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of MetadataTreeForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataTreeForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Path (string) minLength if (this.Path != null && this.Path.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); + yield return new ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/MetadataTreeForDeletionDto.cs b/src/Coscine.ApiClient.Core/Model/MetadataTreeForDeletionDto.cs index c07e0b532b89d31dfc49960cf034bda78789ed05..64352b82960fe5d6b019ba442030d6617e4d4a7a 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataTreeForDeletionDto.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataTreeForDeletionDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) for deleting a specific version of metadata. /// </summary> [DataContract(Name = "MetadataTreeForDeletionDto")] - public partial class MetadataTreeForDeletionDto : IEquatable<MetadataTreeForDeletionDto>, IValidatableObject + public partial class MetadataTreeForDeletionDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MetadataTreeForDeletionDto" /> class. @@ -105,77 +105,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataTreeForDeletionDto); - } - - /// <summary> - /// Returns true if MetadataTreeForDeletionDto instances are equal - /// </summary> - /// <param name="input">Instance of MetadataTreeForDeletionDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataTreeForDeletionDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.VarVersion == input.VarVersion || - this.VarVersion.Equals(input.VarVersion) - ) && - ( - this.InvalidatedBy == input.InvalidatedBy || - (this.InvalidatedBy != null && - this.InvalidatedBy.Equals(input.InvalidatedBy)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); - if (this.InvalidatedBy != null) - { - hashCode = (hashCode * 59) + this.InvalidatedBy.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Path (string) minLength if (this.Path != null && this.Path.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); + yield return new ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/MetadataTreeForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/MetadataTreeForUpdateDto.cs index 0088dc0244ab14d566bffdfe24f724fa70cdccde..46bc28c102a093603502f68e1f9af7b7ec009036 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataTreeForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataTreeForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the update of a metadata tree. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.MetadataTreeForManipulationDto. /// </summary> [DataContract(Name = "MetadataTreeForUpdateDto")] - public partial class MetadataTreeForUpdateDto : IEquatable<MetadataTreeForUpdateDto>, IValidatableObject + public partial class MetadataTreeForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MetadataTreeForUpdateDto" /> class. @@ -94,72 +94,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataTreeForUpdateDto); - } - - /// <summary> - /// Returns true if MetadataTreeForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of MetadataTreeForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataTreeForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Path (string) minLength if (this.Path != null && this.Path.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); + yield return new ValidationResult("Invalid value for Path, length must be greater than 1.", new [] { "Path" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/MetadataUpdateAdminParameters.cs b/src/Coscine.ApiClient.Core/Model/MetadataUpdateAdminParameters.cs index 0cd7ef6040324c26f6ae3719017c5c3b6a9db21b..3b380b2cd77bb456ee0c085c97aeeda2e2b2b7dd 100644 --- a/src/Coscine.ApiClient.Core/Model/MetadataUpdateAdminParameters.cs +++ b/src/Coscine.ApiClient.Core/Model/MetadataUpdateAdminParameters.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents parameters for updating metadata in an administrative context. /// </summary> [DataContract(Name = "MetadataUpdateAdminParameters")] - public partial class MetadataUpdateAdminParameters : IEquatable<MetadataUpdateAdminParameters>, IValidatableObject + public partial class MetadataUpdateAdminParameters : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="MetadataUpdateAdminParameters" /> class. @@ -79,58 +79,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as MetadataUpdateAdminParameters); - } - - /// <summary> - /// Returns true if MetadataUpdateAdminParameters instances are equal - /// </summary> - /// <param name="input">Instance of MetadataUpdateAdminParameters to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(MetadataUpdateAdminParameters input) - { - if (input == null) - { - return false; - } - return - ( - this.Definition == input.Definition || - (this.Definition != null && - this.Definition.Equals(input.Definition)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Definition != null) - { - hashCode = (hashCode * 59) + this.Definition.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/OrganizationDto.cs b/src/Coscine.ApiClient.Core/Model/OrganizationDto.cs index 4b65d76868d8a30c65f60f291df327ad6ff239fa..dd7233b97027cca136c7fb3c67139d6702bcae26 100644 --- a/src/Coscine.ApiClient.Core/Model/OrganizationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/OrganizationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for an organization, including its ROR (Research Organization Registry) ID, display name, and email address. /// </summary> [DataContract(Name = "OrganizationDto")] - public partial class OrganizationDto : IEquatable<OrganizationDto>, IValidatableObject + public partial class OrganizationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="OrganizationDto" /> class. @@ -99,85 +99,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as OrganizationDto); - } - - /// <summary> - /// Returns true if OrganizationDto instances are equal - /// </summary> - /// <param name="input">Instance of OrganizationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(OrganizationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.PublicationAdvisoryService == input.PublicationAdvisoryService || - (this.PublicationAdvisoryService != null && - this.PublicationAdvisoryService.Equals(input.PublicationAdvisoryService)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.PublicationAdvisoryService != null) - { - hashCode = (hashCode * 59) + this.PublicationAdvisoryService.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/OrganizationDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/OrganizationDtoPagedResponse.cs index ae9d5febe5b0ad1bf64b945af244c78ad2429ff5..5c121a4755e44a698397e8b416d03c949d59ac68 100644 --- a/src/Coscine.ApiClient.Core/Model/OrganizationDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/OrganizationDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// OrganizationDtoPagedResponse /// </summary> [DataContract(Name = "OrganizationDtoPagedResponse")] - public partial class OrganizationDtoPagedResponse : IEquatable<OrganizationDtoPagedResponse>, IValidatableObject + public partial class OrganizationDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="OrganizationDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as OrganizationDtoPagedResponse); - } - - /// <summary> - /// Returns true if OrganizationDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of OrganizationDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(OrganizationDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/OrganizationDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/OrganizationDtoResponse.cs index 61b5a96b8074ad625a0239e08b132243f019e09a..d8d1f4931be774e1e9e597cd5e0e63a9b4477613 100644 --- a/src/Coscine.ApiClient.Core/Model/OrganizationDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/OrganizationDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// OrganizationDtoResponse /// </summary> [DataContract(Name = "OrganizationDtoResponse")] - public partial class OrganizationDtoResponse : IEquatable<OrganizationDtoResponse>, IValidatableObject + public partial class OrganizationDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="OrganizationDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as OrganizationDtoResponse); - } - - /// <summary> - /// Returns true if OrganizationDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of OrganizationDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(OrganizationDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/OrganizationForProjectManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/OrganizationForProjectManipulationDto.cs index c66faf962416a2f2a85277540580437bf17562c4..7252f5138115b544afdd3fada68f5ce30a795418 100644 --- a/src/Coscine.ApiClient.Core/Model/OrganizationForProjectManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/OrganizationForProjectManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing an organization for project manipulation. /// </summary> [DataContract(Name = "OrganizationForProjectManipulationDto")] - public partial class OrganizationForProjectManipulationDto : IEquatable<OrganizationForProjectManipulationDto>, IValidatableObject + public partial class OrganizationForProjectManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="OrganizationForProjectManipulationDto" /> class. @@ -80,58 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as OrganizationForProjectManipulationDto); - } - - /// <summary> - /// Returns true if OrganizationForProjectManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of OrganizationForProjectManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(OrganizationForProjectManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/Pagination.cs b/src/Coscine.ApiClient.Core/Model/Pagination.cs index 9cb931b01689ae493b3c1992d1161adf7eeb0b9c..71282d229d152d9f35662a4b7e79495ac19ebc7d 100644 --- a/src/Coscine.ApiClient.Core/Model/Pagination.cs +++ b/src/Coscine.ApiClient.Core/Model/Pagination.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents pagination information for a collection of items. /// </summary> [DataContract(Name = "Pagination")] - public partial class Pagination : IEquatable<Pagination>, IValidatableObject + public partial class Pagination : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="Pagination" /> class. @@ -132,79 +132,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as Pagination); - } - - /// <summary> - /// Returns true if Pagination instances are equal - /// </summary> - /// <param name="input">Instance of Pagination to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(Pagination input) - { - if (input == null) - { - return false; - } - return - ( - this.CurrentPage == input.CurrentPage || - this.CurrentPage.Equals(input.CurrentPage) - ) && - ( - this.TotalPages == input.TotalPages || - this.TotalPages.Equals(input.TotalPages) - ) && - ( - this.PageSize == input.PageSize || - this.PageSize.Equals(input.PageSize) - ) && - ( - this.TotalCount == input.TotalCount || - this.TotalCount.Equals(input.TotalCount) - ) && - ( - this.HasPrevious == input.HasPrevious || - this.HasPrevious.Equals(input.HasPrevious) - ) && - ( - this.HasNext == input.HasNext || - this.HasNext.Equals(input.HasNext) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.CurrentPage.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalPages.GetHashCode(); - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalCount.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPrevious.GetHashCode(); - hashCode = (hashCode * 59) + this.HasNext.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/PidDto.cs b/src/Coscine.ApiClient.Core/Model/PidDto.cs index 7076c44b48def30814daf8a72028f9f52d738c8d..f2b529b2d06e5343203a11da2f318922c9b43e3c 100644 --- a/src/Coscine.ApiClient.Core/Model/PidDto.cs +++ b/src/Coscine.ApiClient.Core/Model/PidDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for a PID (Persistent Identifier). /// </summary> [DataContract(Name = "PidDto")] - public partial class PidDto : IEquatable<PidDto>, IValidatableObject + public partial class PidDto : IValidatableObject { /// <summary> @@ -115,86 +115,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PidDto); - } - - /// <summary> - /// Returns true if PidDto instances are equal - /// </summary> - /// <param name="input">Instance of PidDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PidDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Prefix == input.Prefix || - (this.Prefix != null && - this.Prefix.Equals(input.Prefix)) - ) && - ( - this.Suffix == input.Suffix || - (this.Suffix != null && - this.Suffix.Equals(input.Suffix)) - ) && - ( - this.Identifier == input.Identifier || - (this.Identifier != null && - this.Identifier.Equals(input.Identifier)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.IsEntityValid == input.IsEntityValid || - this.IsEntityValid.Equals(input.IsEntityValid) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Prefix != null) - { - hashCode = (hashCode * 59) + this.Prefix.GetHashCode(); - } - if (this.Suffix != null) - { - hashCode = (hashCode * 59) + this.Suffix.GetHashCode(); - } - if (this.Identifier != null) - { - hashCode = (hashCode * 59) + this.Identifier.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.IsEntityValid.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/PidDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/PidDtoPagedResponse.cs index d4f3cb14fe525e5a454b840949ad365f6cb9f1ab..cd9a8803585f4d86e0eac556d3876e1341546fd4 100644 --- a/src/Coscine.ApiClient.Core/Model/PidDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/PidDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// PidDtoPagedResponse /// </summary> [DataContract(Name = "PidDtoPagedResponse")] - public partial class PidDtoPagedResponse : IEquatable<PidDtoPagedResponse>, IValidatableObject + public partial class PidDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="PidDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PidDtoPagedResponse); - } - - /// <summary> - /// Returns true if PidDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of PidDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PidDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/PidDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/PidDtoResponse.cs index 016c69186bf530bcb040e17cc3929e9e5efd3ed9..9ac1ca1c2474251d65ead683750bb45a59202230 100644 --- a/src/Coscine.ApiClient.Core/Model/PidDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/PidDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// PidDtoResponse /// </summary> [DataContract(Name = "PidDtoResponse")] - public partial class PidDtoResponse : IEquatable<PidDtoResponse>, IValidatableObject + public partial class PidDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="PidDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PidDtoResponse); - } - - /// <summary> - /// Returns true if PidDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of PidDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PidDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/PidRequestDto.cs b/src/Coscine.ApiClient.Core/Model/PidRequestDto.cs index 4f08db591f0ae08bd96b4d30da917cb5c8ae2770..e0c9615e50df80c87a56784e7e4675d9d6bc02e8 100644 --- a/src/Coscine.ApiClient.Core/Model/PidRequestDto.cs +++ b/src/Coscine.ApiClient.Core/Model/PidRequestDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing a PID request. /// </summary> [DataContract(Name = "PidRequestDto")] - public partial class PidRequestDto : IEquatable<PidRequestDto>, IValidatableObject + public partial class PidRequestDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="PidRequestDto" /> class. @@ -120,104 +120,35 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PidRequestDto); - } - - /// <summary> - /// Returns true if PidRequestDto instances are equal - /// </summary> - /// <param name="input">Instance of PidRequestDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PidRequestDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.SendConfirmationEmail == input.SendConfirmationEmail || - this.SendConfirmationEmail.Equals(input.SendConfirmationEmail) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SendConfirmationEmail.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Name (string) minLength if (this.Name != null && this.Name.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Email (string) minLength if (this.Email != null && this.Email.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); + yield return new ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); } // Message (string) maxLength if (this.Message != null && this.Message.Length > 5000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new [] { "Message" }); } // Message (string) minLength if (this.Message != null && this.Message.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be greater than 1.", new [] { "Message" }); + yield return new ValidationResult("Invalid value for Message, length must be greater than 1.", new [] { "Message" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs index edd708a5865df7acdf926924fcba4c8a3f58ee3c..01c8a1f924dffa0a7d554b10c9a2468dc2b20c39 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectAdminDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for an administrative view of a project. Extends the base information in Coscine.Api.Core.Shared.DataTransferObjects.ReturnObjects.ProjectDto. /// </summary> [DataContract(Name = "ProjectAdminDto")] - public partial class ProjectAdminDto : IEquatable<ProjectAdminDto>, IValidatableObject + public partial class ProjectAdminDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectAdminDto" /> class. @@ -277,250 +277,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectAdminDto); - } - - /// <summary> - /// Returns true if ProjectAdminDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectAdminDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectAdminDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Pid == input.Pid || - (this.Pid != null && - this.Pid.Equals(input.Pid)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.StartDate == input.StartDate || - (this.StartDate != null && - this.StartDate.Equals(input.StartDate)) - ) && - ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.PrincipleInvestigators == input.PrincipleInvestigators || - (this.PrincipleInvestigators != null && - this.PrincipleInvestigators.Equals(input.PrincipleInvestigators)) - ) && - ( - this.GrantId == input.GrantId || - (this.GrantId != null && - this.GrantId.Equals(input.GrantId)) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Organizations == input.Organizations || - this.Organizations != null && - input.Organizations != null && - this.Organizations.SequenceEqual(input.Organizations) - ) && - ( - this.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && - ( - this.Creator == input.Creator || - (this.Creator != null && - this.Creator.Equals(input.Creator)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.SubProjects == input.SubProjects || - this.SubProjects != null && - input.SubProjects != null && - this.SubProjects.SequenceEqual(input.SubProjects) - ) && - ( - this.Parent == input.Parent || - (this.Parent != null && - this.Parent.Equals(input.Parent)) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ) && - ( - this.ProjectResources == input.ProjectResources || - this.ProjectResources != null && - input.ProjectResources != null && - this.ProjectResources.SequenceEqual(input.ProjectResources) - ) && - ( - this.ProjectRoles == input.ProjectRoles || - this.ProjectRoles != null && - input.ProjectRoles != null && - this.ProjectRoles.SequenceEqual(input.ProjectRoles) - ) && - ( - this.ProjectQuota == input.ProjectQuota || - this.ProjectQuota != null && - input.ProjectQuota != null && - this.ProjectQuota.SequenceEqual(input.ProjectQuota) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Pid != null) - { - hashCode = (hashCode * 59) + this.Pid.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } - if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.PrincipleInvestigators != null) - { - hashCode = (hashCode * 59) + this.PrincipleInvestigators.GetHashCode(); - } - if (this.GrantId != null) - { - hashCode = (hashCode * 59) + this.GrantId.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.Organizations != null) - { - hashCode = (hashCode * 59) + this.Organizations.GetHashCode(); - } - if (this.Slug != null) - { - hashCode = (hashCode * 59) + this.Slug.GetHashCode(); - } - if (this.Creator != null) - { - hashCode = (hashCode * 59) + this.Creator.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.SubProjects != null) - { - hashCode = (hashCode * 59) + this.SubProjects.GetHashCode(); - } - if (this.Parent != null) - { - hashCode = (hashCode * 59) + this.Parent.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - if (this.ProjectResources != null) - { - hashCode = (hashCode * 59) + this.ProjectResources.GetHashCode(); - } - if (this.ProjectRoles != null) - { - hashCode = (hashCode * 59) + this.ProjectRoles.GetHashCode(); - } - if (this.ProjectQuota != null) - { - hashCode = (hashCode * 59) + this.ProjectQuota.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectAdminDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectAdminDtoPagedResponse.cs index 3b3d732b0d97f5c9bf49ad580231b1ca6658204e..bb6f8bef1665bf940e9cbaa7f18f8be3abd9ae0c 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectAdminDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectAdminDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectAdminDtoPagedResponse /// </summary> [DataContract(Name = "ProjectAdminDtoPagedResponse")] - public partial class ProjectAdminDtoPagedResponse : IEquatable<ProjectAdminDtoPagedResponse>, IValidatableObject + public partial class ProjectAdminDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectAdminDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectAdminDtoPagedResponse); - } - - /// <summary> - /// Returns true if ProjectAdminDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectAdminDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectAdminDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectDto.cs index b6079a426b6dc13541d55271157f19fe8e3284da..1a5dd014b632ae5ace264235043beb99fdb509d7 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for project information. /// </summary> [DataContract(Name = "ProjectDto")] - public partial class ProjectDto : IEquatable<ProjectDto>, IValidatableObject + public partial class ProjectDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectDto" /> class. @@ -237,215 +237,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectDto); - } - - /// <summary> - /// Returns true if ProjectDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Pid == input.Pid || - (this.Pid != null && - this.Pid.Equals(input.Pid)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.StartDate == input.StartDate || - (this.StartDate != null && - this.StartDate.Equals(input.StartDate)) - ) && - ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.PrincipleInvestigators == input.PrincipleInvestigators || - (this.PrincipleInvestigators != null && - this.PrincipleInvestigators.Equals(input.PrincipleInvestigators)) - ) && - ( - this.GrantId == input.GrantId || - (this.GrantId != null && - this.GrantId.Equals(input.GrantId)) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Organizations == input.Organizations || - this.Organizations != null && - input.Organizations != null && - this.Organizations.SequenceEqual(input.Organizations) - ) && - ( - this.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && - ( - this.Creator == input.Creator || - (this.Creator != null && - this.Creator.Equals(input.Creator)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.SubProjects == input.SubProjects || - this.SubProjects != null && - input.SubProjects != null && - this.SubProjects.SequenceEqual(input.SubProjects) - ) && - ( - this.Parent == input.Parent || - (this.Parent != null && - this.Parent.Equals(input.Parent)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Pid != null) - { - hashCode = (hashCode * 59) + this.Pid.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } - if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.PrincipleInvestigators != null) - { - hashCode = (hashCode * 59) + this.PrincipleInvestigators.GetHashCode(); - } - if (this.GrantId != null) - { - hashCode = (hashCode * 59) + this.GrantId.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.Organizations != null) - { - hashCode = (hashCode * 59) + this.Organizations.GetHashCode(); - } - if (this.Slug != null) - { - hashCode = (hashCode * 59) + this.Slug.GetHashCode(); - } - if (this.Creator != null) - { - hashCode = (hashCode * 59) + this.Creator.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.SubProjects != null) - { - hashCode = (hashCode * 59) + this.SubProjects.GetHashCode(); - } - if (this.Parent != null) - { - hashCode = (hashCode * 59) + this.Parent.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectDtoPagedResponse.cs index d51f55c25de2cc4a4a3c40feae7def07abb9fa7d..460f109f4de4d112923bedb5a84fd2d625a33e01 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectDtoPagedResponse /// </summary> [DataContract(Name = "ProjectDtoPagedResponse")] - public partial class ProjectDtoPagedResponse : IEquatable<ProjectDtoPagedResponse>, IValidatableObject + public partial class ProjectDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectDtoPagedResponse); - } - - /// <summary> - /// Returns true if ProjectDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectDtoResponse.cs index ce32480d97cba4a24063350dbaa2c110dfb30056..3f8e42754001b5f7139aeecf1dbc57e0eff1c3c9 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectDtoResponse /// </summary> [DataContract(Name = "ProjectDtoResponse")] - public partial class ProjectDtoResponse : IEquatable<ProjectDtoResponse>, IValidatableObject + public partial class ProjectDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectDtoResponse); - } - - /// <summary> - /// Returns true if ProjectDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectForCreationDto.cs index 2044c160636358692b98e9b92dd896c1d2f9a339..747b9884ff7d5d4b72c8bfd93742bda39bd6b35d 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the creation of a project. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProjectForManipulationDto. /// </summary> [DataContract(Name = "ProjectForCreationDto")] - public partial class ProjectForCreationDto : IEquatable<ProjectForCreationDto>, IValidatableObject + public partial class ProjectForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectForCreationDto" /> class. @@ -209,201 +209,53 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectForCreationDto); - } - - /// <summary> - /// Returns true if ProjectForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.StartDate == input.StartDate || - (this.StartDate != null && - this.StartDate.Equals(input.StartDate)) - ) && - ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.PrincipleInvestigators == input.PrincipleInvestigators || - (this.PrincipleInvestigators != null && - this.PrincipleInvestigators.Equals(input.PrincipleInvestigators)) - ) && - ( - this.GrantId == input.GrantId || - (this.GrantId != null && - this.GrantId.Equals(input.GrantId)) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Organizations == input.Organizations || - this.Organizations != null && - input.Organizations != null && - this.Organizations.SequenceEqual(input.Organizations) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } - if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.PrincipleInvestigators != null) - { - hashCode = (hashCode * 59) + this.PrincipleInvestigators.GetHashCode(); - } - if (this.GrantId != null) - { - hashCode = (hashCode * 59) + this.GrantId.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.Organizations != null) - { - hashCode = (hashCode * 59) + this.Organizations.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Name (string) maxLength if (this.Name != null && this.Name.Length > 200) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); } // Name (string) minLength if (this.Name != null && this.Name.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Description (string) maxLength if (this.Description != null && this.Description.Length > 10000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); } // Description (string) minLength if (this.Description != null && this.Description.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); } // DisplayName (string) maxLength if (this.DisplayName != null && this.DisplayName.Length > 25) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); + yield return new ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); } // PrincipleInvestigators (string) maxLength if (this.PrincipleInvestigators != null && this.PrincipleInvestigators.Length > 500) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PrincipleInvestigators, length must be less than 500.", new [] { "PrincipleInvestigators" }); + yield return new ValidationResult("Invalid value for PrincipleInvestigators, length must be less than 500.", new [] { "PrincipleInvestigators" }); } // GrantId (string) maxLength if (this.GrantId != null && this.GrantId.Length > 500) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GrantId, length must be less than 500.", new [] { "GrantId" }); + yield return new ValidationResult("Invalid value for GrantId, length must be less than 500.", new [] { "GrantId" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ProjectForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectForUpdateDto.cs index 45b2a050e370575232f6750a878d4357eb0a6112..dfb9f508e3d511547ffc6fefef83f2b48c200c43 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the update of a project. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProjectForManipulationDto. /// </summary> [DataContract(Name = "ProjectForUpdateDto")] - public partial class ProjectForUpdateDto : IEquatable<ProjectForUpdateDto>, IValidatableObject + public partial class ProjectForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectForUpdateDto" /> class. @@ -214,213 +214,65 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectForUpdateDto); - } - - /// <summary> - /// Returns true if ProjectForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.StartDate == input.StartDate || - (this.StartDate != null && - this.StartDate.Equals(input.StartDate)) - ) && - ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.PrincipleInvestigators == input.PrincipleInvestigators || - (this.PrincipleInvestigators != null && - this.PrincipleInvestigators.Equals(input.PrincipleInvestigators)) - ) && - ( - this.GrantId == input.GrantId || - (this.GrantId != null && - this.GrantId.Equals(input.GrantId)) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Organizations == input.Organizations || - this.Organizations != null && - input.Organizations != null && - this.Organizations.SequenceEqual(input.Organizations) - ) && - ( - this.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } - if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.PrincipleInvestigators != null) - { - hashCode = (hashCode * 59) + this.PrincipleInvestigators.GetHashCode(); - } - if (this.GrantId != null) - { - hashCode = (hashCode * 59) + this.GrantId.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.Organizations != null) - { - hashCode = (hashCode * 59) + this.Organizations.GetHashCode(); - } - if (this.Slug != null) - { - hashCode = (hashCode * 59) + this.Slug.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Name (string) maxLength if (this.Name != null && this.Name.Length > 200) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); } // Name (string) minLength if (this.Name != null && this.Name.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Description (string) maxLength if (this.Description != null && this.Description.Length > 10000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); } // Description (string) minLength if (this.Description != null && this.Description.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); } // DisplayName (string) maxLength if (this.DisplayName != null && this.DisplayName.Length > 25) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); + yield return new ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); } // PrincipleInvestigators (string) maxLength if (this.PrincipleInvestigators != null && this.PrincipleInvestigators.Length > 500) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PrincipleInvestigators, length must be less than 500.", new [] { "PrincipleInvestigators" }); + yield return new ValidationResult("Invalid value for PrincipleInvestigators, length must be less than 500.", new [] { "PrincipleInvestigators" }); } // GrantId (string) maxLength if (this.GrantId != null && this.GrantId.Length > 500) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GrantId, length must be less than 500.", new [] { "GrantId" }); + yield return new ValidationResult("Invalid value for GrantId, length must be less than 500.", new [] { "GrantId" }); } // Slug (string) maxLength if (this.Slug != null && this.Slug.Length > 63) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Slug, length must be less than 63.", new [] { "Slug" }); + yield return new ValidationResult("Invalid value for Slug, length must be less than 63.", new [] { "Slug" }); } // Slug (string) minLength if (this.Slug != null && this.Slug.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Slug, length must be greater than 1.", new [] { "Slug" }); + yield return new ValidationResult("Invalid value for Slug, length must be greater than 1.", new [] { "Slug" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ProjectInvitationDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectInvitationDto.cs index 64e2b8f0b239770b266c86a619cbb70755d49058..b76d8cf36689510466d686ffff2c8d5fd153f897 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectInvitationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectInvitationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for project invitations. /// </summary> [DataContract(Name = "ProjectInvitationDto")] - public partial class ProjectInvitationDto : IEquatable<ProjectInvitationDto>, IValidatableObject + public partial class ProjectInvitationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectInvitationDto" /> class. @@ -117,103 +117,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectInvitationDto); - } - - /// <summary> - /// Returns true if ProjectInvitationDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectInvitationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectInvitationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ExpirationDate == input.ExpirationDate || - (this.ExpirationDate != null && - this.ExpirationDate.Equals(input.ExpirationDate)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Project == input.Project || - (this.Project != null && - this.Project.Equals(input.Project)) - ) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ExpirationDate != null) - { - hashCode = (hashCode * 59) + this.ExpirationDate.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.Project != null) - { - hashCode = (hashCode * 59) + this.Project.GetHashCode(); - } - if (this.Role != null) - { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoPagedResponse.cs index e9237eec261478953fec13e80d44684d1a9766a2..04529efed16611ad4ade328475508e9dd2c9fcf8 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectInvitationDtoPagedResponse /// </summary> [DataContract(Name = "ProjectInvitationDtoPagedResponse")] - public partial class ProjectInvitationDtoPagedResponse : IEquatable<ProjectInvitationDtoPagedResponse>, IValidatableObject + public partial class ProjectInvitationDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectInvitationDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectInvitationDtoPagedResponse); - } - - /// <summary> - /// Returns true if ProjectInvitationDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectInvitationDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectInvitationDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoResponse.cs index bf0ec34bdc71f86dd6de28b33263548c481e0dec..1cf532f3de183cf8d0d8be7e11590b512628c319 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectInvitationDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectInvitationDtoResponse /// </summary> [DataContract(Name = "ProjectInvitationDtoResponse")] - public partial class ProjectInvitationDtoResponse : IEquatable<ProjectInvitationDtoResponse>, IValidatableObject + public partial class ProjectInvitationDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectInvitationDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectInvitationDtoResponse); - } - - /// <summary> - /// Returns true if ProjectInvitationDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectInvitationDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectInvitationDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectInvitationForProjectManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectInvitationForProjectManipulationDto.cs index 4e75b8ae7cf1814ba5a7b738f8ba453fe32c5b1e..6a713edf2d0f83695fd52db57d2b6a5662288805 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectInvitationForProjectManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectInvitationForProjectManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing an invitation for project manipulation. /// </summary> [DataContract(Name = "ProjectInvitationForProjectManipulationDto")] - public partial class ProjectInvitationForProjectManipulationDto : IEquatable<ProjectInvitationForProjectManipulationDto>, IValidatableObject + public partial class ProjectInvitationForProjectManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectInvitationForProjectManipulationDto" /> class. @@ -90,72 +90,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectInvitationForProjectManipulationDto); - } - - /// <summary> - /// Returns true if ProjectInvitationForProjectManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectInvitationForProjectManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectInvitationForProjectManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.RoleId == input.RoleId || - (this.RoleId != null && - this.RoleId.Equals(input.RoleId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RoleId != null) - { - hashCode = (hashCode * 59) + this.RoleId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Email (string) minLength if (this.Email != null && this.Email.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); + yield return new ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ProjectInvitationResolveDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectInvitationResolveDto.cs index 57ac833a4b8cbdffdc765e5132ae411072b46e55..1e3c7253616aaccf79d6182c996303c8f9548e33 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectInvitationResolveDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectInvitationResolveDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) for resolving a project invitation. /// </summary> [DataContract(Name = "ProjectInvitationResolveDto")] - public partial class ProjectInvitationResolveDto : IEquatable<ProjectInvitationResolveDto>, IValidatableObject + public partial class ProjectInvitationResolveDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectInvitationResolveDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectInvitationResolveDto); - } - - /// <summary> - /// Returns true if ProjectInvitationResolveDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectInvitationResolveDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectInvitationResolveDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectMinimalDto.cs index 45d39a79bf340e7e664c55861d8667c903bb488a..a4be4a7f95297b6d84422bc9f06693fe709dc2e2 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a minimal data transfer object (DTO) for a project. /// </summary> [DataContract(Name = "ProjectMinimalDto")] - public partial class ProjectMinimalDto : IEquatable<ProjectMinimalDto>, IValidatableObject + public partial class ProjectMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectMinimalDto" /> class. @@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectMinimalDto); - } - - /// <summary> - /// Returns true if ProjectMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectQuotaDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectQuotaDto.cs index b765f986fab1f88fd3d9470e506a56861bdcf41a..e0d21c678b447101169eef37d884c4ddf3bc88ba 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectQuotaDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectQuotaDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) containing quota information for a project. /// </summary> [DataContract(Name = "ProjectQuotaDto")] - public partial class ProjectQuotaDto : IEquatable<ProjectQuotaDto>, IValidatableObject + public partial class ProjectQuotaDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectQuotaDto" /> class. @@ -125,113 +125,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectQuotaDto); - } - - /// <summary> - /// Returns true if ProjectQuotaDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectQuotaDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectQuotaDto input) - { - if (input == null) - { - return false; - } - return - ( - this.ProjectId == input.ProjectId || - (this.ProjectId != null && - this.ProjectId.Equals(input.ProjectId)) - ) && - ( - this.TotalUsed == input.TotalUsed || - (this.TotalUsed != null && - this.TotalUsed.Equals(input.TotalUsed)) - ) && - ( - this.TotalReserved == input.TotalReserved || - (this.TotalReserved != null && - this.TotalReserved.Equals(input.TotalReserved)) - ) && - ( - this.Allocated == input.Allocated || - (this.Allocated != null && - this.Allocated.Equals(input.Allocated)) - ) && - ( - this.Maximum == input.Maximum || - (this.Maximum != null && - this.Maximum.Equals(input.Maximum)) - ) && - ( - this.ResourceType == input.ResourceType || - (this.ResourceType != null && - this.ResourceType.Equals(input.ResourceType)) - ) && - ( - this.ResourceQuotas == input.ResourceQuotas || - this.ResourceQuotas != null && - input.ResourceQuotas != null && - this.ResourceQuotas.SequenceEqual(input.ResourceQuotas) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ProjectId != null) - { - hashCode = (hashCode * 59) + this.ProjectId.GetHashCode(); - } - if (this.TotalUsed != null) - { - hashCode = (hashCode * 59) + this.TotalUsed.GetHashCode(); - } - if (this.TotalReserved != null) - { - hashCode = (hashCode * 59) + this.TotalReserved.GetHashCode(); - } - if (this.Allocated != null) - { - hashCode = (hashCode * 59) + this.Allocated.GetHashCode(); - } - if (this.Maximum != null) - { - hashCode = (hashCode * 59) + this.Maximum.GetHashCode(); - } - if (this.ResourceType != null) - { - hashCode = (hashCode * 59) + this.ResourceType.GetHashCode(); - } - if (this.ResourceQuotas != null) - { - hashCode = (hashCode * 59) + this.ResourceQuotas.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoPagedResponse.cs index 95bf329cde91da46ba2c9fe0a8abbd015a44a0d2..55217fcf33afdf56e068f87539337da51fd5950d 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectQuotaDtoPagedResponse /// </summary> [DataContract(Name = "ProjectQuotaDtoPagedResponse")] - public partial class ProjectQuotaDtoPagedResponse : IEquatable<ProjectQuotaDtoPagedResponse>, IValidatableObject + public partial class ProjectQuotaDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectQuotaDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectQuotaDtoPagedResponse); - } - - /// <summary> - /// Returns true if ProjectQuotaDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectQuotaDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectQuotaDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoResponse.cs index d2f9a7d0fa3f72efeba6425211fb82ff043ceff3..4e51610686692b5fcf99d98832f304e3b6690d67 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectQuotaDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectQuotaDtoResponse /// </summary> [DataContract(Name = "ProjectQuotaDtoResponse")] - public partial class ProjectQuotaDtoResponse : IEquatable<ProjectQuotaDtoResponse>, IValidatableObject + public partial class ProjectQuotaDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectQuotaDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectQuotaDtoResponse); - } - - /// <summary> - /// Returns true if ProjectQuotaDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectQuotaDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectQuotaDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectQuotaForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectQuotaForUpdateDto.cs index b8584c1389bdd224b4a742fae5a9684420a77b79..908e59a2da3f14487245c03f32a2709716b51e93 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectQuotaForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectQuotaForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the update of project quotas. /// </summary> [DataContract(Name = "ProjectQuotaForUpdateDto")] - public partial class ProjectQuotaForUpdateDto : IEquatable<ProjectQuotaForUpdateDto>, IValidatableObject + public partial class ProjectQuotaForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectQuotaForUpdateDto" /> class. @@ -88,67 +88,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectQuotaForUpdateDto); - } - - /// <summary> - /// Returns true if ProjectQuotaForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectQuotaForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectQuotaForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Allocated == input.Allocated || - (this.Allocated != null && - this.Allocated.Equals(input.Allocated)) - ) && - ( - this.Maximum == input.Maximum || - (this.Maximum != null && - this.Maximum.Equals(input.Maximum)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Allocated != null) - { - hashCode = (hashCode * 59) + this.Allocated.GetHashCode(); - } - if (this.Maximum != null) - { - hashCode = (hashCode * 59) + this.Maximum.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectResourceMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectResourceMinimalDto.cs index 48097bc7525af0408bd4850c64e09544b2025275..4cdde0a16c46f1e9dc7130d317f5c4663a8db93b 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectResourceMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectResourceMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a minimal data transfer object (DTO) for a project resource. /// </summary> [DataContract(Name = "ProjectResourceMinimalDto")] - public partial class ProjectResourceMinimalDto : IEquatable<ProjectResourceMinimalDto>, IValidatableObject + public partial class ProjectResourceMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectResourceMinimalDto" /> class. @@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectResourceMinimalDto); - } - - /// <summary> - /// Returns true if ProjectResourceMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectResourceMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectResourceMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.ResourceId == input.ResourceId || - (this.ResourceId != null && - this.ResourceId.Equals(input.ResourceId)) - ) && - ( - this.ProjectId == input.ProjectId || - (this.ProjectId != null && - this.ProjectId.Equals(input.ProjectId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ResourceId != null) - { - hashCode = (hashCode * 59) + this.ResourceId.GetHashCode(); - } - if (this.ProjectId != null) - { - hashCode = (hashCode * 59) + this.ProjectId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectRoleDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectRoleDto.cs index 3e03a8a2586be7eab0858011716997002481c367..c9e4761c8f1fd89a6886adff1edfddf16ce5ef6e 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectRoleDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectRoleDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for a project role. /// </summary> [DataContract(Name = "ProjectRoleDto")] - public partial class ProjectRoleDto : IEquatable<ProjectRoleDto>, IValidatableObject + public partial class ProjectRoleDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectRoleDto" /> class. @@ -97,85 +97,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectRoleDto); - } - - /// <summary> - /// Returns true if ProjectRoleDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectRoleDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectRoleDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Project == input.Project || - (this.Project != null && - this.Project.Equals(input.Project)) - ) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ) && - ( - this.User == input.User || - (this.User != null && - this.User.Equals(input.User)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Project != null) - { - hashCode = (hashCode * 59) + this.Project.GetHashCode(); - } - if (this.Role != null) - { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); - } - if (this.User != null) - { - hashCode = (hashCode * 59) + this.User.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoPagedResponse.cs index 95eed6d87766fc614a7345abf2137ebc74013a8f..d6ef9b8314878b92b1d4c7f4074cc3331797ccc0 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectRoleDtoPagedResponse /// </summary> [DataContract(Name = "ProjectRoleDtoPagedResponse")] - public partial class ProjectRoleDtoPagedResponse : IEquatable<ProjectRoleDtoPagedResponse>, IValidatableObject + public partial class ProjectRoleDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectRoleDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectRoleDtoPagedResponse); - } - - /// <summary> - /// Returns true if ProjectRoleDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectRoleDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectRoleDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoResponse.cs index c72531d50f5090ab5a30dfa9f4f3dc5021f37277..dd8647d1883ccd156a1c44153ff07131f4d7b985 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectRoleDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProjectRoleDtoResponse /// </summary> [DataContract(Name = "ProjectRoleDtoResponse")] - public partial class ProjectRoleDtoResponse : IEquatable<ProjectRoleDtoResponse>, IValidatableObject + public partial class ProjectRoleDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectRoleDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectRoleDtoResponse); - } - - /// <summary> - /// Returns true if ProjectRoleDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProjectRoleDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectRoleDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectCreationDto.cs index 6334bf73708c4edd5af9bcbbf33adeba2ec40b70..dfa501ebc3390122a17364bde8fba2ad08c4445d 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the creation of a project role within a project. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProjectRoleForProjectManipulationDto. /// </summary> [DataContract(Name = "ProjectRoleForProjectCreationDto")] - public partial class ProjectRoleForProjectCreationDto : IEquatable<ProjectRoleForProjectCreationDto>, IValidatableObject + public partial class ProjectRoleForProjectCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectRoleForProjectCreationDto" /> class. @@ -85,67 +85,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectRoleForProjectCreationDto); - } - - /// <summary> - /// Returns true if ProjectRoleForProjectCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectRoleForProjectCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectRoleForProjectCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.RoleId == input.RoleId || - (this.RoleId != null && - this.RoleId.Equals(input.RoleId)) - ) && - ( - this.UserId == input.UserId || - (this.UserId != null && - this.UserId.Equals(input.UserId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RoleId != null) - { - hashCode = (hashCode * 59) + this.RoleId.GetHashCode(); - } - if (this.UserId != null) - { - hashCode = (hashCode * 59) + this.UserId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectManipulationDto.cs index 7dc914a29e2fc0e64c5e50fc52723ba19380230a..4e29262c590a4f30d10dd3861b4d139e58e4a54b 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectRoleForProjectManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing a project role for manipulation within a project. /// </summary> [DataContract(Name = "ProjectRoleForProjectManipulationDto")] - public partial class ProjectRoleForProjectManipulationDto : IEquatable<ProjectRoleForProjectManipulationDto>, IValidatableObject + public partial class ProjectRoleForProjectManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectRoleForProjectManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectRoleForProjectManipulationDto); - } - - /// <summary> - /// Returns true if ProjectRoleForProjectManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectRoleForProjectManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectRoleForProjectManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.RoleId == input.RoleId || - (this.RoleId != null && - this.RoleId.Equals(input.RoleId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RoleId != null) - { - hashCode = (hashCode * 59) + this.RoleId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProjectRoleMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/ProjectRoleMinimalDto.cs index 2851eb44fef245c3d548a72d04ea5f26db2859c9..3a5c1a45f26f09a87802fed2e5d769978b643f9e 100644 --- a/src/Coscine.ApiClient.Core/Model/ProjectRoleMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProjectRoleMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a minimal data transfer object (DTO) for a project role. /// </summary> [DataContract(Name = "ProjectRoleMinimalDto")] - public partial class ProjectRoleMinimalDto : IEquatable<ProjectRoleMinimalDto>, IValidatableObject + public partial class ProjectRoleMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProjectRoleMinimalDto" /> class. @@ -90,76 +90,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProjectRoleMinimalDto); - } - - /// <summary> - /// Returns true if ProjectRoleMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of ProjectRoleMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProjectRoleMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.ProjectId == input.ProjectId || - (this.ProjectId != null && - this.ProjectId.Equals(input.ProjectId)) - ) && - ( - this.UserId == input.UserId || - (this.UserId != null && - this.UserId.Equals(input.UserId)) - ) && - ( - this.RoleId == input.RoleId || - (this.RoleId != null && - this.RoleId.Equals(input.RoleId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ProjectId != null) - { - hashCode = (hashCode * 59) + this.ProjectId.GetHashCode(); - } - if (this.UserId != null) - { - hashCode = (hashCode * 59) + this.UserId.GetHashCode(); - } - if (this.RoleId != null) - { - hashCode = (hashCode * 59) + this.RoleId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProvenanceDto.cs b/src/Coscine.ApiClient.Core/Model/ProvenanceDto.cs index dc3ae894080262676cc1c754ba681148dec07511..a4a144fe237dfa47f8ee09bea7fba004879a0d5c 100644 --- a/src/Coscine.ApiClient.Core/Model/ProvenanceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProvenanceDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) for provenance information. /// </summary> [DataContract(Name = "ProvenanceDto")] - public partial class ProvenanceDto : IEquatable<ProvenanceDto>, IValidatableObject + public partial class ProvenanceDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProvenanceDto" /> class. @@ -129,114 +129,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProvenanceDto); - } - - /// <summary> - /// Returns true if ProvenanceDto instances are equal - /// </summary> - /// <param name="input">Instance of ProvenanceDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProvenanceDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.GeneratedAt == input.GeneratedAt || - (this.GeneratedAt != null && - this.GeneratedAt.Equals(input.GeneratedAt)) - ) && - ( - this.WasRevisionOf == input.WasRevisionOf || - this.WasRevisionOf != null && - input.WasRevisionOf != null && - this.WasRevisionOf.SequenceEqual(input.WasRevisionOf) - ) && - ( - this.Variants == input.Variants || - this.Variants != null && - input.Variants != null && - this.Variants.SequenceEqual(input.Variants) - ) && - ( - this.SimilarityToLastVersion == input.SimilarityToLastVersion || - (this.SimilarityToLastVersion != null && - this.SimilarityToLastVersion.Equals(input.SimilarityToLastVersion)) - ) && - ( - this.WasInvalidatedBy == input.WasInvalidatedBy || - (this.WasInvalidatedBy != null && - this.WasInvalidatedBy.Equals(input.WasInvalidatedBy)) - ) && - ( - this.HashParameters == input.HashParameters || - (this.HashParameters != null && - this.HashParameters.Equals(input.HashParameters)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.GeneratedAt != null) - { - hashCode = (hashCode * 59) + this.GeneratedAt.GetHashCode(); - } - if (this.WasRevisionOf != null) - { - hashCode = (hashCode * 59) + this.WasRevisionOf.GetHashCode(); - } - if (this.Variants != null) - { - hashCode = (hashCode * 59) + this.Variants.GetHashCode(); - } - if (this.SimilarityToLastVersion != null) - { - hashCode = (hashCode * 59) + this.SimilarityToLastVersion.GetHashCode(); - } - if (this.WasInvalidatedBy != null) - { - hashCode = (hashCode * 59) + this.WasInvalidatedBy.GetHashCode(); - } - if (this.HashParameters != null) - { - hashCode = (hashCode * 59) + this.HashParameters.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProvenanceDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ProvenanceDtoResponse.cs index 5197e6709a259e58666bd344ba66f02df47b4117..599977061ad6fb867ed2dd1ff6478568d81c92f4 100644 --- a/src/Coscine.ApiClient.Core/Model/ProvenanceDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ProvenanceDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ProvenanceDtoResponse /// </summary> [DataContract(Name = "ProvenanceDtoResponse")] - public partial class ProvenanceDtoResponse : IEquatable<ProvenanceDtoResponse>, IValidatableObject + public partial class ProvenanceDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProvenanceDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProvenanceDtoResponse); - } - - /// <summary> - /// Returns true if ProvenanceDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ProvenanceDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProvenanceDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProvenanceForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/ProvenanceForUpdateDto.cs index f20cfd9d84a5d7bb027d8ca604fa4a7a4e5c4bdf..c339a22e2a6b6db15349408e71ad98452d7182f1 100644 --- a/src/Coscine.ApiClient.Core/Model/ProvenanceForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProvenanceForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the update of provenance Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProvenanceParametersDto. /// </summary> [DataContract(Name = "ProvenanceForUpdateDto")] - public partial class ProvenanceForUpdateDto : IEquatable<ProvenanceForUpdateDto>, IValidatableObject + public partial class ProvenanceForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProvenanceForUpdateDto" /> class. @@ -129,114 +129,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProvenanceForUpdateDto); - } - - /// <summary> - /// Returns true if ProvenanceForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of ProvenanceForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProvenanceForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.WasRevisionOf == input.WasRevisionOf || - this.WasRevisionOf != null && - input.WasRevisionOf != null && - this.WasRevisionOf.SequenceEqual(input.WasRevisionOf) - ) && - ( - this.Variants == input.Variants || - this.Variants != null && - input.Variants != null && - this.Variants.SequenceEqual(input.Variants) - ) && - ( - this.WasInvalidatedBy == input.WasInvalidatedBy || - (this.WasInvalidatedBy != null && - this.WasInvalidatedBy.Equals(input.WasInvalidatedBy)) - ) && - ( - this.SimilarityToLastVersion == input.SimilarityToLastVersion || - (this.SimilarityToLastVersion != null && - this.SimilarityToLastVersion.Equals(input.SimilarityToLastVersion)) - ) && - ( - this.MetadataExtractorVersion == input.MetadataExtractorVersion || - (this.MetadataExtractorVersion != null && - this.MetadataExtractorVersion.Equals(input.MetadataExtractorVersion)) - ) && - ( - this.HashParameters == input.HashParameters || - (this.HashParameters != null && - this.HashParameters.Equals(input.HashParameters)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WasRevisionOf != null) - { - hashCode = (hashCode * 59) + this.WasRevisionOf.GetHashCode(); - } - if (this.Variants != null) - { - hashCode = (hashCode * 59) + this.Variants.GetHashCode(); - } - if (this.WasInvalidatedBy != null) - { - hashCode = (hashCode * 59) + this.WasInvalidatedBy.GetHashCode(); - } - if (this.SimilarityToLastVersion != null) - { - hashCode = (hashCode * 59) + this.SimilarityToLastVersion.GetHashCode(); - } - if (this.MetadataExtractorVersion != null) - { - hashCode = (hashCode * 59) + this.MetadataExtractorVersion.GetHashCode(); - } - if (this.HashParameters != null) - { - hashCode = (hashCode * 59) + this.HashParameters.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ProvenanceParametersDto.cs b/src/Coscine.ApiClient.Core/Model/ProvenanceParametersDto.cs index fd8edd763e5026a6ebc23f18bea610322bde6478..b91cac2b52e8e604e3422e584ad965d8c14e064f 100644 --- a/src/Coscine.ApiClient.Core/Model/ProvenanceParametersDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ProvenanceParametersDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing Provenance Parameters in a request. /// </summary> [DataContract(Name = "ProvenanceParametersDto")] - public partial class ProvenanceParametersDto : IEquatable<ProvenanceParametersDto>, IValidatableObject + public partial class ProvenanceParametersDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ProvenanceParametersDto" /> class. @@ -119,105 +119,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ProvenanceParametersDto); - } - - /// <summary> - /// Returns true if ProvenanceParametersDto instances are equal - /// </summary> - /// <param name="input">Instance of ProvenanceParametersDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ProvenanceParametersDto input) - { - if (input == null) - { - return false; - } - return - ( - this.WasRevisionOf == input.WasRevisionOf || - this.WasRevisionOf != null && - input.WasRevisionOf != null && - this.WasRevisionOf.SequenceEqual(input.WasRevisionOf) - ) && - ( - this.Variants == input.Variants || - this.Variants != null && - input.Variants != null && - this.Variants.SequenceEqual(input.Variants) - ) && - ( - this.WasInvalidatedBy == input.WasInvalidatedBy || - (this.WasInvalidatedBy != null && - this.WasInvalidatedBy.Equals(input.WasInvalidatedBy)) - ) && - ( - this.SimilarityToLastVersion == input.SimilarityToLastVersion || - (this.SimilarityToLastVersion != null && - this.SimilarityToLastVersion.Equals(input.SimilarityToLastVersion)) - ) && - ( - this.MetadataExtractorVersion == input.MetadataExtractorVersion || - (this.MetadataExtractorVersion != null && - this.MetadataExtractorVersion.Equals(input.MetadataExtractorVersion)) - ) && - ( - this.HashParameters == input.HashParameters || - (this.HashParameters != null && - this.HashParameters.Equals(input.HashParameters)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WasRevisionOf != null) - { - hashCode = (hashCode * 59) + this.WasRevisionOf.GetHashCode(); - } - if (this.Variants != null) - { - hashCode = (hashCode * 59) + this.Variants.GetHashCode(); - } - if (this.WasInvalidatedBy != null) - { - hashCode = (hashCode * 59) + this.WasInvalidatedBy.GetHashCode(); - } - if (this.SimilarityToLastVersion != null) - { - hashCode = (hashCode * 59) + this.SimilarityToLastVersion.GetHashCode(); - } - if (this.MetadataExtractorVersion != null) - { - hashCode = (hashCode * 59) + this.MetadataExtractorVersion.GetHashCode(); - } - if (this.HashParameters != null) - { - hashCode = (hashCode * 59) + this.HashParameters.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/PublicUserDto.cs b/src/Coscine.ApiClient.Core/Model/PublicUserDto.cs index f470c8b23d6089b50acbc9823fd7a61ac2b1d07a..d6dd5cb64f72d7681e88433e9fd98949a27d7086 100644 --- a/src/Coscine.ApiClient.Core/Model/PublicUserDto.cs +++ b/src/Coscine.ApiClient.Core/Model/PublicUserDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a public user data transfer object (DTO). /// </summary> [DataContract(Name = "PublicUserDto")] - public partial class PublicUserDto : IEquatable<PublicUserDto>, IValidatableObject + public partial class PublicUserDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="PublicUserDto" /> class. @@ -119,103 +119,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PublicUserDto); - } - - /// <summary> - /// Returns true if PublicUserDto instances are equal - /// </summary> - /// <param name="input">Instance of PublicUserDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PublicUserDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.GivenName == input.GivenName || - (this.GivenName != null && - this.GivenName.Equals(input.GivenName)) - ) && - ( - this.FamilyName == input.FamilyName || - (this.FamilyName != null && - this.FamilyName.Equals(input.FamilyName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.GivenName != null) - { - hashCode = (hashCode * 59) + this.GivenName.GetHashCode(); - } - if (this.FamilyName != null) - { - hashCode = (hashCode * 59) + this.FamilyName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/PublicUserDtoIEnumerableResponse.cs b/src/Coscine.ApiClient.Core/Model/PublicUserDtoIEnumerableResponse.cs index 8b89ea174b72574426c04c259f15764624b770cb..cd29226e406604f548ee5584c90faea1b2f7055a 100644 --- a/src/Coscine.ApiClient.Core/Model/PublicUserDtoIEnumerableResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/PublicUserDtoIEnumerableResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// PublicUserDtoIEnumerableResponse /// </summary> [DataContract(Name = "PublicUserDtoIEnumerableResponse")] - public partial class PublicUserDtoIEnumerableResponse : IEquatable<PublicUserDtoIEnumerableResponse>, IValidatableObject + public partial class PublicUserDtoIEnumerableResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="PublicUserDtoIEnumerableResponse" /> class. @@ -102,82 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PublicUserDtoIEnumerableResponse); - } - - /// <summary> - /// Returns true if PublicUserDtoIEnumerableResponse instances are equal - /// </summary> - /// <param name="input">Instance of PublicUserDtoIEnumerableResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PublicUserDtoIEnumerableResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs b/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs index ac46c0ac3825c7e100ed8e38919b36f4e9390a01..dff1af9ab1aea01c2c9958bf02fc813ce38b204a 100644 --- a/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/PublicationAdvisoryServiceDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Data transfer object (DTO) representing the publication advisory service of an organization. /// </summary> [DataContract(Name = "PublicationAdvisoryServiceDto")] - public partial class PublicationAdvisoryServiceDto : IEquatable<PublicationAdvisoryServiceDto>, IValidatableObject + public partial class PublicationAdvisoryServiceDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="PublicationAdvisoryServiceDto" /> class. @@ -95,78 +95,23 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PublicationAdvisoryServiceDto); - } - - /// <summary> - /// Returns true if PublicationAdvisoryServiceDto instances are equal - /// </summary> - /// <param name="input">Instance of PublicationAdvisoryServiceDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PublicationAdvisoryServiceDto input) - { - if (input == null) - { - return false; - } - return - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // DisplayName (string) minLength if (this.DisplayName != null && this.DisplayName.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be greater than 1.", new [] { "DisplayName" }); + yield return new ValidationResult("Invalid value for DisplayName, length must be greater than 1.", new [] { "DisplayName" }); } // Email (string) minLength if (this.Email != null && this.Email.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); + yield return new ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs deleted file mode 100644 index e0dd96023e8226bfef298f4de7c20a9ba5fadbd8..0000000000000000000000000000000000000000 --- a/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDto.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 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 : IEquatable<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> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PublicationRequestForCreationDto); - } - - /// <summary> - /// Returns true if PublicationRequestForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of PublicationRequestForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PublicationRequestForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.DataPublicationServiceRorId == input.DataPublicationServiceRorId || - (this.DataPublicationServiceRorId != null && - this.DataPublicationServiceRorId.Equals(input.DataPublicationServiceRorId)) - ) && - ( - this.ResourceIds == input.ResourceIds || - this.ResourceIds != null && - input.ResourceIds != null && - this.ResourceIds.SequenceEqual(input.ResourceIds) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DataPublicationServiceRorId != null) - { - hashCode = (hashCode * 59) + this.DataPublicationServiceRorId.GetHashCode(); - } - if (this.ResourceIds != null) - { - hashCode = (hashCode * 59) + this.ResourceIds.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - - /// <summary> - /// To validate all properties of the instance - /// </summary> - /// <param name="validationContext">Validation context</param> - /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) - { - // DataPublicationServiceRorId (string) minLength - if (this.DataPublicationServiceRorId != null && this.DataPublicationServiceRorId.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.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 deleted file mode 100644 index e95bb5a2c600d7b2a7854587d0f380264b6c53e5..0000000000000000000000000000000000000000 --- a/src/Coscine.ApiClient.Core/Model/PublicationRequestForCreationDtoResponse.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* - * 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 : IEquatable<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> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as PublicationRequestForCreationDtoResponse); - } - - /// <summary> - /// Returns true if PublicationRequestForCreationDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of PublicationRequestForCreationDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(PublicationRequestForCreationDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - - /// <summary> - /// To validate all properties of the instance - /// </summary> - /// <param name="validationContext">Validation context</param> - /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Coscine.ApiClient.Core/Model/QuotaDto.cs b/src/Coscine.ApiClient.Core/Model/QuotaDto.cs index b2631f4844461732dee42036369a300904a6b885..02b1e7f8fed460809f7870922f31ea198b0109c1 100644 --- a/src/Coscine.ApiClient.Core/Model/QuotaDto.cs +++ b/src/Coscine.ApiClient.Core/Model/QuotaDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for quota values. /// </summary> [DataContract(Name = "QuotaDto")] - public partial class QuotaDto : IEquatable<QuotaDto>, IValidatableObject + public partial class QuotaDto : IValidatableObject { /// <summary> @@ -84,59 +84,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as QuotaDto); - } - - /// <summary> - /// Returns true if QuotaDto instances are equal - /// </summary> - /// <param name="input">Instance of QuotaDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(QuotaDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ) && - ( - this.Unit == input.Unit || - this.Unit.Equals(input.Unit) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - hashCode = (hashCode * 59) + this.Unit.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/QuotaForManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/QuotaForManipulationDto.cs index d6a98c5bf1ecc6bc8cd00823a15ca31846b34526..c38cc3d091bf2de8be14f32117abe9c592314f8a 100644 --- a/src/Coscine.ApiClient.Core/Model/QuotaForManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/QuotaForManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a data transfer object (DTO) used for manipulating quota values. /// </summary> [DataContract(Name = "QuotaForManipulationDto")] - public partial class QuotaForManipulationDto : IEquatable<QuotaForManipulationDto>, IValidatableObject + public partial class QuotaForManipulationDto : IValidatableObject { /// <summary> @@ -84,64 +84,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as QuotaForManipulationDto); - } - - /// <summary> - /// Returns true if QuotaForManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of QuotaForManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(QuotaForManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ) && - ( - this.Unit == input.Unit || - this.Unit.Equals(input.Unit) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - hashCode = (hashCode * 59) + this.Unit.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Value (long) minimum if (this.Value < (long)0) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Value, must be a value greater than or equal to 0.", new [] { "Value" }); + yield return new ValidationResult("Invalid value for Value, must be a value greater than or equal to 0.", new [] { "Value" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/RdfDefinitionDto.cs b/src/Coscine.ApiClient.Core/Model/RdfDefinitionDto.cs index b65f0c52a5cdae404a75c7f59596018740acc9da..f099214663ec19c378c180b67e872fe92a1dce99 100644 --- a/src/Coscine.ApiClient.Core/Model/RdfDefinitionDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdfDefinitionDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for RDF (Resource Description Framework) definition details. /// </summary> [DataContract(Name = "RdfDefinitionDto")] - public partial class RdfDefinitionDto : IEquatable<RdfDefinitionDto>, IValidatableObject + public partial class RdfDefinitionDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdfDefinitionDto" /> class. @@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdfDefinitionDto); - } - - /// <summary> - /// Returns true if RdfDefinitionDto instances are equal - /// </summary> - /// <param name="input">Instance of RdfDefinitionDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdfDefinitionDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdfDefinitionDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/RdfDefinitionDtoResponse.cs index 0dc9d556ac4844630e27698865098e6f543efce5..bdbbdda9e2d8135a0f05657fd569a30deb0f983c 100644 --- a/src/Coscine.ApiClient.Core/Model/RdfDefinitionDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/RdfDefinitionDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// RdfDefinitionDtoResponse /// </summary> [DataContract(Name = "RdfDefinitionDtoResponse")] - public partial class RdfDefinitionDtoResponse : IEquatable<RdfDefinitionDtoResponse>, IValidatableObject + public partial class RdfDefinitionDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdfDefinitionDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdfDefinitionDtoResponse); - } - - /// <summary> - /// Returns true if RdfDefinitionDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of RdfDefinitionDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdfDefinitionDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdfDefinitionForManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/RdfDefinitionForManipulationDto.cs index ca93afe3d405f22e852b501706064562a341657c..d2722d2952a27e68ead61b5b727e4fa7a1fe1be6 100644 --- a/src/Coscine.ApiClient.Core/Model/RdfDefinitionForManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdfDefinitionForManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) used for manipulating RDF definitions. /// </summary> [DataContract(Name = "RdfDefinitionForManipulationDto")] - public partial class RdfDefinitionForManipulationDto : IEquatable<RdfDefinitionForManipulationDto>, IValidatableObject + public partial class RdfDefinitionForManipulationDto : IValidatableObject { /// <summary> @@ -89,68 +89,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdfDefinitionForManipulationDto); - } - - /// <summary> - /// Returns true if RdfDefinitionForManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of RdfDefinitionForManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdfDefinitionForManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Content (string) minLength if (this.Content != null && this.Content.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Content, length must be greater than 1.", new [] { "Content" }); + yield return new ValidationResult("Invalid value for Content, length must be greater than 1.", new [] { "Content" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/RdfPatchDocumentDto.cs b/src/Coscine.ApiClient.Core/Model/RdfPatchDocumentDto.cs index 32e23d7f75d849f62a6922424db96010d48adaec..99249ed9767fc34abd842eacafca2ebe52d82740 100644 --- a/src/Coscine.ApiClient.Core/Model/RdfPatchDocumentDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdfPatchDocumentDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents an RDF Patch document containing a series of operations. /// </summary> [DataContract(Name = "RdfPatchDocumentDto")] - public partial class RdfPatchDocumentDto : IEquatable<RdfPatchDocumentDto>, IValidatableObject + public partial class RdfPatchDocumentDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdfPatchDocumentDto" /> class. @@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdfPatchDocumentDto); - } - - /// <summary> - /// Returns true if RdfPatchDocumentDto instances are equal - /// </summary> - /// <param name="input">Instance of RdfPatchDocumentDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdfPatchDocumentDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Operations == input.Operations || - this.Operations != null && - input.Operations != null && - this.Operations.SequenceEqual(input.Operations) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operations != null) - { - hashCode = (hashCode * 59) + this.Operations.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdfPatchOperationDto.cs b/src/Coscine.ApiClient.Core/Model/RdfPatchOperationDto.cs index e9f2abac48e17f164eeacd7a89a4c6632a1d54ad..e69cb4b98ed1edebd794c037e65a721bddc8561a 100644 --- a/src/Coscine.ApiClient.Core/Model/RdfPatchOperationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdfPatchOperationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a single operation in an RDF Patch document. /// </summary> [DataContract(Name = "RdfPatchOperationDto")] - public partial class RdfPatchOperationDto : IEquatable<RdfPatchOperationDto>, IValidatableObject + public partial class RdfPatchOperationDto : IValidatableObject { /// <summary> @@ -78,63 +78,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdfPatchOperationDto); - } - - /// <summary> - /// Returns true if RdfPatchOperationDto instances are equal - /// </summary> - /// <param name="input">Instance of RdfPatchOperationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdfPatchOperationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.OperationType == input.OperationType || - this.OperationType.Equals(input.OperationType) - ) && - ( - this.Changes == input.Changes || - (this.Changes != null && - this.Changes.Equals(input.Changes)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.OperationType.GetHashCode(); - if (this.Changes != null) - { - hashCode = (hashCode * 59) + this.Changes.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdsOptionsDto.cs b/src/Coscine.ApiClient.Core/Model/RdsOptionsDto.cs index 23ed7a349904a04ebff558a864ed1cea7bc8ad33..4b55115c82c30cfac7eacc67c9bd477da548d7b7 100644 --- a/src/Coscine.ApiClient.Core/Model/RdsOptionsDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdsOptionsDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for RDS options. /// </summary> [DataContract(Name = "RdsOptionsDto")] - public partial class RdsOptionsDto : IEquatable<RdsOptionsDto>, IValidatableObject + public partial class RdsOptionsDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdsOptionsDto" /> class. @@ -79,67 +79,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdsOptionsDto); - } - - /// <summary> - /// Returns true if RdsOptionsDto instances are equal - /// </summary> - /// <param name="input">Instance of RdsOptionsDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdsOptionsDto input) - { - if (input == null) - { - return false; - } - return - ( - this.BucketName == input.BucketName || - (this.BucketName != null && - this.BucketName.Equals(input.BucketName)) - ) && - ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BucketName != null) - { - hashCode = (hashCode * 59) + this.BucketName.GetHashCode(); - } - if (this.Size != null) - { - hashCode = (hashCode * 59) + this.Size.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdsResourceTypeOptionsForManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/RdsResourceTypeOptionsForManipulationDto.cs index d86c45d0096e68813a140fe57c3b6fff9d48cb30..e136c5e629a20a1e24f20d0417cdaf7bf9cb6ff9 100644 --- a/src/Coscine.ApiClient.Core/Model/RdsResourceTypeOptionsForManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdsResourceTypeOptionsForManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for manipulating RDS Web resource type options. /// </summary> [DataContract(Name = "RdsResourceTypeOptionsForManipulationDto")] - public partial class RdsResourceTypeOptionsForManipulationDto : IEquatable<RdsResourceTypeOptionsForManipulationDto>, IValidatableObject + public partial class RdsResourceTypeOptionsForManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdsResourceTypeOptionsForManipulationDto" /> class. @@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdsResourceTypeOptionsForManipulationDto); - } - - /// <summary> - /// Returns true if RdsResourceTypeOptionsForManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of RdsResourceTypeOptionsForManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdsResourceTypeOptionsForManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Quota == input.Quota || - (this.Quota != null && - this.Quota.Equals(input.Quota)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Quota != null) - { - hashCode = (hashCode * 59) + this.Quota.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdsS3OptionsDto.cs b/src/Coscine.ApiClient.Core/Model/RdsS3OptionsDto.cs index f6be489d0bb95bb8296f058242370a813c645a0e..14270e1fb21c323bb7b540e9220c8ab8e9ee3e60 100644 --- a/src/Coscine.ApiClient.Core/Model/RdsS3OptionsDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdsS3OptionsDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for RDS S3 options. /// </summary> [DataContract(Name = "RdsS3OptionsDto")] - public partial class RdsS3OptionsDto : IEquatable<RdsS3OptionsDto>, IValidatableObject + public partial class RdsS3OptionsDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdsS3OptionsDto" /> class. @@ -129,112 +129,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdsS3OptionsDto); - } - - /// <summary> - /// Returns true if RdsS3OptionsDto instances are equal - /// </summary> - /// <param name="input">Instance of RdsS3OptionsDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdsS3OptionsDto input) - { - if (input == null) - { - return false; - } - return - ( - this.BucketName == input.BucketName || - (this.BucketName != null && - this.BucketName.Equals(input.BucketName)) - ) && - ( - this.AccessKeyRead == input.AccessKeyRead || - (this.AccessKeyRead != null && - this.AccessKeyRead.Equals(input.AccessKeyRead)) - ) && - ( - this.SecretKeyRead == input.SecretKeyRead || - (this.SecretKeyRead != null && - this.SecretKeyRead.Equals(input.SecretKeyRead)) - ) && - ( - this.AccessKeyWrite == input.AccessKeyWrite || - (this.AccessKeyWrite != null && - this.AccessKeyWrite.Equals(input.AccessKeyWrite)) - ) && - ( - this.SecretKeyWrite == input.SecretKeyWrite || - (this.SecretKeyWrite != null && - this.SecretKeyWrite.Equals(input.SecretKeyWrite)) - ) && - ( - this.Endpoint == input.Endpoint || - (this.Endpoint != null && - this.Endpoint.Equals(input.Endpoint)) - ) && - ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BucketName != null) - { - hashCode = (hashCode * 59) + this.BucketName.GetHashCode(); - } - if (this.AccessKeyRead != null) - { - hashCode = (hashCode * 59) + this.AccessKeyRead.GetHashCode(); - } - if (this.SecretKeyRead != null) - { - hashCode = (hashCode * 59) + this.SecretKeyRead.GetHashCode(); - } - if (this.AccessKeyWrite != null) - { - hashCode = (hashCode * 59) + this.AccessKeyWrite.GetHashCode(); - } - if (this.SecretKeyWrite != null) - { - hashCode = (hashCode * 59) + this.SecretKeyWrite.GetHashCode(); - } - if (this.Endpoint != null) - { - hashCode = (hashCode * 59) + this.Endpoint.GetHashCode(); - } - if (this.Size != null) - { - hashCode = (hashCode * 59) + this.Size.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdsS3ResourceTypeOptionsForManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/RdsS3ResourceTypeOptionsForManipulationDto.cs index 8b726def1248979487b9c59c961a85a88930db94..78f100e1340ba9f1b7855db52b984498e617b845 100644 --- a/src/Coscine.ApiClient.Core/Model/RdsS3ResourceTypeOptionsForManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdsS3ResourceTypeOptionsForManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for manipulating RDS S3 resource type options. /// </summary> [DataContract(Name = "RdsS3ResourceTypeOptionsForManipulationDto")] - public partial class RdsS3ResourceTypeOptionsForManipulationDto : IEquatable<RdsS3ResourceTypeOptionsForManipulationDto>, IValidatableObject + public partial class RdsS3ResourceTypeOptionsForManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdsS3ResourceTypeOptionsForManipulationDto" /> class. @@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdsS3ResourceTypeOptionsForManipulationDto); - } - - /// <summary> - /// Returns true if RdsS3ResourceTypeOptionsForManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of RdsS3ResourceTypeOptionsForManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdsS3ResourceTypeOptionsForManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Quota == input.Quota || - (this.Quota != null && - this.Quota.Equals(input.Quota)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Quota != null) - { - hashCode = (hashCode * 59) + this.Quota.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdsS3WormOptionsDto.cs b/src/Coscine.ApiClient.Core/Model/RdsS3WormOptionsDto.cs index 746dd05ebd391e221f35088e4337921cc8b9fdf6..4030411a967d64cf7a6a7d3a2d0cecaa89adf391 100644 --- a/src/Coscine.ApiClient.Core/Model/RdsS3WormOptionsDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdsS3WormOptionsDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for RDS S3 WORM options. /// </summary> [DataContract(Name = "RdsS3WormOptionsDto")] - public partial class RdsS3WormOptionsDto : IEquatable<RdsS3WormOptionsDto>, IValidatableObject + public partial class RdsS3WormOptionsDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdsS3WormOptionsDto" /> class. @@ -129,112 +129,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdsS3WormOptionsDto); - } - - /// <summary> - /// Returns true if RdsS3WormOptionsDto instances are equal - /// </summary> - /// <param name="input">Instance of RdsS3WormOptionsDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdsS3WormOptionsDto input) - { - if (input == null) - { - return false; - } - return - ( - this.BucketName == input.BucketName || - (this.BucketName != null && - this.BucketName.Equals(input.BucketName)) - ) && - ( - this.AccessKeyRead == input.AccessKeyRead || - (this.AccessKeyRead != null && - this.AccessKeyRead.Equals(input.AccessKeyRead)) - ) && - ( - this.SecretKeyRead == input.SecretKeyRead || - (this.SecretKeyRead != null && - this.SecretKeyRead.Equals(input.SecretKeyRead)) - ) && - ( - this.AccessKeyWrite == input.AccessKeyWrite || - (this.AccessKeyWrite != null && - this.AccessKeyWrite.Equals(input.AccessKeyWrite)) - ) && - ( - this.SecretKeyWrite == input.SecretKeyWrite || - (this.SecretKeyWrite != null && - this.SecretKeyWrite.Equals(input.SecretKeyWrite)) - ) && - ( - this.Endpoint == input.Endpoint || - (this.Endpoint != null && - this.Endpoint.Equals(input.Endpoint)) - ) && - ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BucketName != null) - { - hashCode = (hashCode * 59) + this.BucketName.GetHashCode(); - } - if (this.AccessKeyRead != null) - { - hashCode = (hashCode * 59) + this.AccessKeyRead.GetHashCode(); - } - if (this.SecretKeyRead != null) - { - hashCode = (hashCode * 59) + this.SecretKeyRead.GetHashCode(); - } - if (this.AccessKeyWrite != null) - { - hashCode = (hashCode * 59) + this.AccessKeyWrite.GetHashCode(); - } - if (this.SecretKeyWrite != null) - { - hashCode = (hashCode * 59) + this.SecretKeyWrite.GetHashCode(); - } - if (this.Endpoint != null) - { - hashCode = (hashCode * 59) + this.Endpoint.GetHashCode(); - } - if (this.Size != null) - { - hashCode = (hashCode * 59) + this.Size.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RdsS3WormResourceTypeOptionsForManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/RdsS3WormResourceTypeOptionsForManipulationDto.cs index 6e16e37d57575b62e5057c74473f9c789b0baf5f..4325b41e935ae239d4afeeadd20c29757859789e 100644 --- a/src/Coscine.ApiClient.Core/Model/RdsS3WormResourceTypeOptionsForManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RdsS3WormResourceTypeOptionsForManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for manipulating RDS S3 WORM resource type options. /// </summary> [DataContract(Name = "RdsS3WormResourceTypeOptionsForManipulationDto")] - public partial class RdsS3WormResourceTypeOptionsForManipulationDto : IEquatable<RdsS3WormResourceTypeOptionsForManipulationDto>, IValidatableObject + public partial class RdsS3WormResourceTypeOptionsForManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RdsS3WormResourceTypeOptionsForManipulationDto" /> class. @@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RdsS3WormResourceTypeOptionsForManipulationDto); - } - - /// <summary> - /// Returns true if RdsS3WormResourceTypeOptionsForManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of RdsS3WormResourceTypeOptionsForManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RdsS3WormResourceTypeOptionsForManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Quota == input.Quota || - (this.Quota != null && - this.Quota.Equals(input.Quota)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Quota != null) - { - hashCode = (hashCode * 59) + this.Quota.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceAdminDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceAdminDto.cs index e1fe515d581a96cab7aa5e5076b15d068fc143d7..c0eb36d6e229a8f431600a506fa2058e79813d1c 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceAdminDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceAdminDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for administrative purposes with additional resource details. /// </summary> [DataContract(Name = "ResourceAdminDto")] - public partial class ResourceAdminDto : IEquatable<ResourceAdminDto>, IValidatableObject + public partial class ResourceAdminDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceAdminDto" /> class. @@ -274,236 +274,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceAdminDto); - } - - /// <summary> - /// Returns true if ResourceAdminDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceAdminDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceAdminDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Pid == input.Pid || - (this.Pid != null && - this.Pid.Equals(input.Pid)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ) && - ( - this.UsageRights == input.UsageRights || - (this.UsageRights != null && - this.UsageRights.Equals(input.UsageRights)) - ) && - ( - this.MetadataLocalCopy == input.MetadataLocalCopy || - this.MetadataLocalCopy.Equals(input.MetadataLocalCopy) - ) && - ( - this.MetadataExtraction == input.MetadataExtraction || - this.MetadataExtraction.Equals(input.MetadataExtraction) - ) && - ( - this.ApplicationProfile == input.ApplicationProfile || - (this.ApplicationProfile != null && - this.ApplicationProfile.Equals(input.ApplicationProfile)) - ) && - ( - this.FixedValues == input.FixedValues || - this.FixedValues != null && - input.FixedValues != null && - this.FixedValues.SequenceEqual(input.FixedValues) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.Creator == input.Creator || - (this.Creator != null && - this.Creator.Equals(input.Creator)) - ) && - ( - this.Archived == input.Archived || - this.Archived.Equals(input.Archived) - ) && - ( - this.Projects == input.Projects || - this.Projects != null && - input.Projects != null && - this.Projects.SequenceEqual(input.Projects) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ) && - ( - this.ProjectResources == input.ProjectResources || - this.ProjectResources != null && - input.ProjectResources != null && - this.ProjectResources.SequenceEqual(input.ProjectResources) - ) && - ( - this.ResourceQuota == input.ResourceQuota || - (this.ResourceQuota != null && - this.ResourceQuota.Equals(input.ResourceQuota)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Pid != null) - { - hashCode = (hashCode * 59) + this.Pid.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.License != null) - { - hashCode = (hashCode * 59) + this.License.GetHashCode(); - } - if (this.UsageRights != null) - { - hashCode = (hashCode * 59) + this.UsageRights.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode(); - hashCode = (hashCode * 59) + this.MetadataExtraction.GetHashCode(); - if (this.ApplicationProfile != null) - { - hashCode = (hashCode * 59) + this.ApplicationProfile.GetHashCode(); - } - if (this.FixedValues != null) - { - hashCode = (hashCode * 59) + this.FixedValues.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.Creator != null) - { - hashCode = (hashCode * 59) + this.Creator.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Archived.GetHashCode(); - if (this.Projects != null) - { - hashCode = (hashCode * 59) + this.Projects.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - if (this.ProjectResources != null) - { - hashCode = (hashCode * 59) + this.ProjectResources.GetHashCode(); - } - if (this.ResourceQuota != null) - { - hashCode = (hashCode * 59) + this.ResourceQuota.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceAdminDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ResourceAdminDtoPagedResponse.cs index 4f7d37d8d385d1e47360fc858b4e900167ec06d6..78164f336a0280ea3165302e96bae95b369e91bb 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceAdminDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceAdminDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ResourceAdminDtoPagedResponse /// </summary> [DataContract(Name = "ResourceAdminDtoPagedResponse")] - public partial class ResourceAdminDtoPagedResponse : IEquatable<ResourceAdminDtoPagedResponse>, IValidatableObject + public partial class ResourceAdminDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceAdminDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceAdminDtoPagedResponse); - } - - /// <summary> - /// Returns true if ResourceAdminDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ResourceAdminDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceAdminDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceContentPageColumnsDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceContentPageColumnsDto.cs index f1f65252c948c0588ec8881c476ef7422b69a716..e1c57dc93edd90f513b2795645955f113bbf50ee 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceContentPageColumnsDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceContentPageColumnsDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a set of columns to be displayed in the content view. /// </summary> [DataContract(Name = "ResourceContentPageColumnsDto")] - public partial class ResourceContentPageColumnsDto : IEquatable<ResourceContentPageColumnsDto>, IValidatableObject + public partial class ResourceContentPageColumnsDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceContentPageColumnsDto" /> class. @@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceContentPageColumnsDto); - } - - /// <summary> - /// Returns true if ResourceContentPageColumnsDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceContentPageColumnsDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceContentPageColumnsDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Always == input.Always || - this.Always != null && - input.Always != null && - this.Always.SequenceEqual(input.Always) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Always != null) - { - hashCode = (hashCode * 59) + this.Always.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceContentPageDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceContentPageDto.cs index 5a53c9cf84ba5bd1e3047007fdc4033bdbe7a641..9a48041d262f8e18589bf7cfb1d4d99d18d97943 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceContentPageDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceContentPageDto.cs @@ -30,17 +30,17 @@ namespace Coscine.ApiClient.Core.Model /// Represents the content page details for a resource. /// </summary> [DataContract(Name = "ResourceContentPageDto")] - public partial class ResourceContentPageDto : IEquatable<ResourceContentPageDto>, IValidatableObject + public partial class ResourceContentPageDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceContentPageDto" /> class. /// </summary> - /// <param name="varReadOnly">Indicates whether the resource is read-only..</param> + /// <param name="readOnly">Indicates whether the resource is read-only..</param> /// <param name="metadataView">metadataView.</param> /// <param name="entriesView">entriesView.</param> - public ResourceContentPageDto(bool varReadOnly = default(bool), ResourceContentPageMetadataViewDto metadataView = default(ResourceContentPageMetadataViewDto), ResourceContentPageEntriesViewDto entriesView = default(ResourceContentPageEntriesViewDto)) + public ResourceContentPageDto(bool readOnly = default(bool), ResourceContentPageMetadataViewDto metadataView = default(ResourceContentPageMetadataViewDto), ResourceContentPageEntriesViewDto entriesView = default(ResourceContentPageEntriesViewDto)) { - this.VarReadOnly = varReadOnly; + this.ReadOnly = readOnly; this.MetadataView = metadataView; this.EntriesView = entriesView; } @@ -50,7 +50,7 @@ namespace Coscine.ApiClient.Core.Model /// </summary> /// <value>Indicates whether the resource is read-only.</value> [DataMember(Name = "readOnly", EmitDefaultValue = true)] - public bool VarReadOnly { get; set; } + public bool ReadOnly { get; set; } /// <summary> /// Gets or Sets MetadataView @@ -72,7 +72,7 @@ namespace Coscine.ApiClient.Core.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ResourceContentPageDto {\n"); - sb.Append(" VarReadOnly: ").Append(VarReadOnly).Append("\n"); + sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n"); sb.Append(" MetadataView: ").Append(MetadataView).Append("\n"); sb.Append(" EntriesView: ").Append(EntriesView).Append("\n"); sb.Append("}\n"); @@ -88,72 +88,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceContentPageDto); - } - - /// <summary> - /// Returns true if ResourceContentPageDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceContentPageDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceContentPageDto input) - { - if (input == null) - { - return false; - } - return - ( - this.VarReadOnly == input.VarReadOnly || - this.VarReadOnly.Equals(input.VarReadOnly) - ) && - ( - this.MetadataView == input.MetadataView || - (this.MetadataView != null && - this.MetadataView.Equals(input.MetadataView)) - ) && - ( - this.EntriesView == input.EntriesView || - (this.EntriesView != null && - this.EntriesView.Equals(input.EntriesView)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.VarReadOnly.GetHashCode(); - if (this.MetadataView != null) - { - hashCode = (hashCode * 59) + this.MetadataView.GetHashCode(); - } - if (this.EntriesView != null) - { - hashCode = (hashCode * 59) + this.EntriesView.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceContentPageEntriesViewDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceContentPageEntriesViewDto.cs index ac24740570e99ac86e0f94e60863f4adbf732300..74d0f9248030e8e5c5b4d009ae68fb29fbd741fe 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceContentPageEntriesViewDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceContentPageEntriesViewDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents information about the resource type for the columns within the entries view Vue component. /// </summary> [DataContract(Name = "ResourceContentPageEntriesViewDto")] - public partial class ResourceContentPageEntriesViewDto : IEquatable<ResourceContentPageEntriesViewDto>, IValidatableObject + public partial class ResourceContentPageEntriesViewDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceContentPageEntriesViewDto" /> class. @@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceContentPageEntriesViewDto); - } - - /// <summary> - /// Returns true if ResourceContentPageEntriesViewDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceContentPageEntriesViewDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceContentPageEntriesViewDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Columns == input.Columns || - (this.Columns != null && - this.Columns.Equals(input.Columns)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Columns != null) - { - hashCode = (hashCode * 59) + this.Columns.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceContentPageMetadataViewDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceContentPageMetadataViewDto.cs index 4c1376ae01858b25b6d98eaadd34967dc77c4a68..b0d34c1dbaf44860b10537e271b56565bc66249b 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceContentPageMetadataViewDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceContentPageMetadataViewDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the metadata view for a resource's content page. /// </summary> [DataContract(Name = "ResourceContentPageMetadataViewDto")] - public partial class ResourceContentPageMetadataViewDto : IEquatable<ResourceContentPageMetadataViewDto>, IValidatableObject + public partial class ResourceContentPageMetadataViewDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceContentPageMetadataViewDto" /> class. @@ -80,59 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceContentPageMetadataViewDto); - } - - /// <summary> - /// Returns true if ResourceContentPageMetadataViewDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceContentPageMetadataViewDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceContentPageMetadataViewDto input) - { - if (input == null) - { - return false; - } - return - ( - this.EditableDataUrl == input.EditableDataUrl || - this.EditableDataUrl.Equals(input.EditableDataUrl) - ) && - ( - this.EditableKey == input.EditableKey || - this.EditableKey.Equals(input.EditableKey) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EditableDataUrl.GetHashCode(); - hashCode = (hashCode * 59) + this.EditableKey.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceCreationPageDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceCreationPageDto.cs index ae8d767a58787d03343465e751352365fd7690f2..54633e85364b4ef888a96c45bf9b2776c28b26a1 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceCreationPageDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceCreationPageDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the structure of resource type-specific components for steps in the resource creation page. /// </summary> [DataContract(Name = "ResourceCreationPageDto")] - public partial class ResourceCreationPageDto : IEquatable<ResourceCreationPageDto>, IValidatableObject + public partial class ResourceCreationPageDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceCreationPageDto" /> class. @@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceCreationPageDto); - } - - /// <summary> - /// Returns true if ResourceCreationPageDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceCreationPageDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceCreationPageDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Components == input.Components || - this.Components != null && - input.Components != null && - this.Components.SequenceEqual(input.Components) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Components != null) - { - hashCode = (hashCode * 59) + this.Components.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceDto.cs index ee19f97223cb8d1903ad8ce4c24c368810e30e94..63bd8a4bac4acd80372c44ee32c81a9ae4fc5cad 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for resource details. /// </summary> [DataContract(Name = "ResourceDto")] - public partial class ResourceDto : IEquatable<ResourceDto>, IValidatableObject + public partial class ResourceDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceDto" /> class. @@ -245,212 +245,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceDto); - } - - /// <summary> - /// Returns true if ResourceDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Pid == input.Pid || - (this.Pid != null && - this.Pid.Equals(input.Pid)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ) && - ( - this.UsageRights == input.UsageRights || - (this.UsageRights != null && - this.UsageRights.Equals(input.UsageRights)) - ) && - ( - this.MetadataLocalCopy == input.MetadataLocalCopy || - this.MetadataLocalCopy.Equals(input.MetadataLocalCopy) - ) && - ( - this.MetadataExtraction == input.MetadataExtraction || - this.MetadataExtraction.Equals(input.MetadataExtraction) - ) && - ( - this.ApplicationProfile == input.ApplicationProfile || - (this.ApplicationProfile != null && - this.ApplicationProfile.Equals(input.ApplicationProfile)) - ) && - ( - this.FixedValues == input.FixedValues || - this.FixedValues != null && - input.FixedValues != null && - this.FixedValues.SequenceEqual(input.FixedValues) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.Creator == input.Creator || - (this.Creator != null && - this.Creator.Equals(input.Creator)) - ) && - ( - this.Archived == input.Archived || - this.Archived.Equals(input.Archived) - ) && - ( - this.Projects == input.Projects || - this.Projects != null && - input.Projects != null && - this.Projects.SequenceEqual(input.Projects) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Pid != null) - { - hashCode = (hashCode * 59) + this.Pid.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.License != null) - { - hashCode = (hashCode * 59) + this.License.GetHashCode(); - } - if (this.UsageRights != null) - { - hashCode = (hashCode * 59) + this.UsageRights.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode(); - hashCode = (hashCode * 59) + this.MetadataExtraction.GetHashCode(); - if (this.ApplicationProfile != null) - { - hashCode = (hashCode * 59) + this.ApplicationProfile.GetHashCode(); - } - if (this.FixedValues != null) - { - hashCode = (hashCode * 59) + this.FixedValues.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.Creator != null) - { - hashCode = (hashCode * 59) + this.Creator.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Archived.GetHashCode(); - if (this.Projects != null) - { - hashCode = (hashCode * 59) + this.Projects.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/ResourceDtoPagedResponse.cs index 97215031295ee6b25be15d3a16c82e49634a3211..badb6a0c303f9a5f1a8ef0924eaef7b5255d302d 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ResourceDtoPagedResponse /// </summary> [DataContract(Name = "ResourceDtoPagedResponse")] - public partial class ResourceDtoPagedResponse : IEquatable<ResourceDtoPagedResponse>, IValidatableObject + public partial class ResourceDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceDtoPagedResponse); - } - - /// <summary> - /// Returns true if ResourceDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of ResourceDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ResourceDtoResponse.cs index 4ca8883a5f2242646b5a8ce01e0bc6acee078aaf..713b5a7ad847b76b4c3638f54cf584d2fe976458 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ResourceDtoResponse /// </summary> [DataContract(Name = "ResourceDtoResponse")] - public partial class ResourceDtoResponse : IEquatable<ResourceDtoResponse>, IValidatableObject + public partial class ResourceDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceDtoResponse); - } - - /// <summary> - /// Returns true if ResourceDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ResourceDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceForCreationDto.cs index d84b00477e5fa00f25891c15d780cb8a4fe0f6eb..5d7454e1b3476624475b1fcd94e3d76e706d7983 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) used for creating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto. /// </summary> [DataContract(Name = "ResourceForCreationDto")] - public partial class ResourceForCreationDto : IEquatable<ResourceForCreationDto>, IValidatableObject + public partial class ResourceForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceForCreationDto" /> class. @@ -221,204 +221,47 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceForCreationDto); - } - - /// <summary> - /// Returns true if ResourceForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.FixedValues == input.FixedValues || - this.FixedValues != null && - input.FixedValues != null && - this.FixedValues.SequenceEqual(input.FixedValues) - ) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ) && - ( - this.UsageRights == input.UsageRights || - (this.UsageRights != null && - this.UsageRights.Equals(input.UsageRights)) - ) && - ( - this.MetadataLocalCopy == input.MetadataLocalCopy || - (this.MetadataLocalCopy != null && - this.MetadataLocalCopy.Equals(input.MetadataLocalCopy)) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.ResourceTypeId == input.ResourceTypeId || - (this.ResourceTypeId != null && - this.ResourceTypeId.Equals(input.ResourceTypeId)) - ) && - ( - this.ApplicationProfile == input.ApplicationProfile || - (this.ApplicationProfile != null && - this.ApplicationProfile.Equals(input.ApplicationProfile)) - ) && - ( - this.ResourceTypeOptions == input.ResourceTypeOptions || - (this.ResourceTypeOptions != null && - this.ResourceTypeOptions.Equals(input.ResourceTypeOptions)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.FixedValues != null) - { - hashCode = (hashCode * 59) + this.FixedValues.GetHashCode(); - } - if (this.License != null) - { - hashCode = (hashCode * 59) + this.License.GetHashCode(); - } - if (this.UsageRights != null) - { - hashCode = (hashCode * 59) + this.UsageRights.GetHashCode(); - } - if (this.MetadataLocalCopy != null) - { - hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.ResourceTypeId != null) - { - hashCode = (hashCode * 59) + this.ResourceTypeId.GetHashCode(); - } - if (this.ApplicationProfile != null) - { - hashCode = (hashCode * 59) + this.ApplicationProfile.GetHashCode(); - } - if (this.ResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.ResourceTypeOptions.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Name (string) maxLength if (this.Name != null && this.Name.Length > 200) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); } // Name (string) minLength if (this.Name != null && this.Name.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // DisplayName (string) maxLength if (this.DisplayName != null && this.DisplayName.Length > 25) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); + yield return new ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); } // Description (string) maxLength if (this.Description != null && this.Description.Length > 10000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); } // Description (string) minLength if (this.Description != null && this.Description.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); } // UsageRights (string) maxLength if (this.UsageRights != null && this.UsageRights.Length > 200) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" }); + yield return new ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ResourceForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceForUpdateDto.cs index a7dd4c6f45a94731d4e1a5bebe3c2d67eb1bd201..e229212d98989404b8e9936de0c599a4c9e0ff44 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) used for updating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto. /// </summary> [DataContract(Name = "ResourceForUpdateDto")] - public partial class ResourceForUpdateDto : IEquatable<ResourceForUpdateDto>, IValidatableObject + public partial class ResourceForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceForUpdateDto" /> class. @@ -202,191 +202,47 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceForUpdateDto); - } - - /// <summary> - /// Returns true if ResourceForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Keywords == input.Keywords || - this.Keywords != null && - input.Keywords != null && - this.Keywords.SequenceEqual(input.Keywords) - ) && - ( - this.FixedValues == input.FixedValues || - this.FixedValues != null && - input.FixedValues != null && - this.FixedValues.SequenceEqual(input.FixedValues) - ) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ) && - ( - this.UsageRights == input.UsageRights || - (this.UsageRights != null && - this.UsageRights.Equals(input.UsageRights)) - ) && - ( - this.MetadataLocalCopy == input.MetadataLocalCopy || - (this.MetadataLocalCopy != null && - this.MetadataLocalCopy.Equals(input.MetadataLocalCopy)) - ) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Archived == input.Archived || - this.Archived.Equals(input.Archived) - ) && - ( - this.ResourceTypeOptions == input.ResourceTypeOptions || - (this.ResourceTypeOptions != null && - this.ResourceTypeOptions.Equals(input.ResourceTypeOptions)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Keywords != null) - { - hashCode = (hashCode * 59) + this.Keywords.GetHashCode(); - } - if (this.FixedValues != null) - { - hashCode = (hashCode * 59) + this.FixedValues.GetHashCode(); - } - if (this.License != null) - { - hashCode = (hashCode * 59) + this.License.GetHashCode(); - } - if (this.UsageRights != null) - { - hashCode = (hashCode * 59) + this.UsageRights.GetHashCode(); - } - if (this.MetadataLocalCopy != null) - { - hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode(); - } - if (this.Visibility != null) - { - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Archived.GetHashCode(); - if (this.ResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.ResourceTypeOptions.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // Name (string) maxLength if (this.Name != null && this.Name.Length > 200) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); } // Name (string) minLength if (this.Name != null && this.Name.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // DisplayName (string) maxLength if (this.DisplayName != null && this.DisplayName.Length > 25) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); + yield return new ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); } // Description (string) maxLength if (this.Description != null && this.Description.Length > 10000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); } // Description (string) minLength if (this.Description != null && this.Description.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); + yield return new ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); } // UsageRights (string) maxLength if (this.UsageRights != null && this.UsageRights.Length > 200) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" }); + yield return new ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/ResourceMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceMinimalDto.cs index edf565ad65e9403544ba3dcd3f51dfa3ae96b0c1..3660f15968029c052e0540771acbf35af7667baf 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a minimal Data Transfer Object (DTO) for a resource, containing essential identifiers. /// </summary> [DataContract(Name = "ResourceMinimalDto")] - public partial class ResourceMinimalDto : IEquatable<ResourceMinimalDto>, IValidatableObject + public partial class ResourceMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceMinimalDto" /> class. @@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceMinimalDto); - } - - /// <summary> - /// Returns true if ResourceMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceQuotaDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceQuotaDto.cs index 6dd0a58a66d38fe95cb436e56fe7ead28f124696..61e845e1d698f80256daec301207518a799c20d4 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceQuotaDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceQuotaDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) containing quota information for a resource. /// </summary> [DataContract(Name = "ResourceQuotaDto")] - public partial class ResourceQuotaDto : IEquatable<ResourceQuotaDto>, IValidatableObject + public partial class ResourceQuotaDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceQuotaDto" /> class. @@ -97,85 +97,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceQuotaDto); - } - - /// <summary> - /// Returns true if ResourceQuotaDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceQuotaDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceQuotaDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Resource == input.Resource || - (this.Resource != null && - this.Resource.Equals(input.Resource)) - ) && - ( - this.UsedPercentage == input.UsedPercentage || - (this.UsedPercentage != null && - this.UsedPercentage.Equals(input.UsedPercentage)) - ) && - ( - this.Used == input.Used || - (this.Used != null && - this.Used.Equals(input.Used)) - ) && - ( - this.Reserved == input.Reserved || - (this.Reserved != null && - this.Reserved.Equals(input.Reserved)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Resource != null) - { - hashCode = (hashCode * 59) + this.Resource.GetHashCode(); - } - if (this.UsedPercentage != null) - { - hashCode = (hashCode * 59) + this.UsedPercentage.GetHashCode(); - } - if (this.Used != null) - { - hashCode = (hashCode * 59) + this.Used.GetHashCode(); - } - if (this.Reserved != null) - { - hashCode = (hashCode * 59) + this.Reserved.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceQuotaDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ResourceQuotaDtoResponse.cs index 83a07f64277e76fa00d803d60efe000d88e55cda..47939418572c8f7e131abd9ed19dc5dd5f722aba 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceQuotaDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceQuotaDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ResourceQuotaDtoResponse /// </summary> [DataContract(Name = "ResourceQuotaDtoResponse")] - public partial class ResourceQuotaDtoResponse : IEquatable<ResourceQuotaDtoResponse>, IValidatableObject + public partial class ResourceQuotaDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceQuotaDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceQuotaDtoResponse); - } - - /// <summary> - /// Returns true if ResourceQuotaDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ResourceQuotaDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceQuotaDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeDto.cs index fe03ef9b9e3dc7d8fac6a44e89a8a7ff027a2a2a..cc86ef943807758d95b7bff0051a5d6413b572b4 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a resource type. /// </summary> [DataContract(Name = "ResourceTypeDto")] - public partial class ResourceTypeDto : IEquatable<ResourceTypeDto>, IValidatableObject + public partial class ResourceTypeDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceTypeDto" /> class. @@ -99,85 +99,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeDto); - } - - /// <summary> - /// Returns true if ResourceTypeDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.GeneralType == input.GeneralType || - (this.GeneralType != null && - this.GeneralType.Equals(input.GeneralType)) - ) && - ( - this.SpecificType == input.SpecificType || - (this.SpecificType != null && - this.SpecificType.Equals(input.SpecificType)) - ) && - ( - this.Options == input.Options || - (this.Options != null && - this.Options.Equals(input.Options)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.GeneralType != null) - { - hashCode = (hashCode * 59) + this.GeneralType.GetHashCode(); - } - if (this.SpecificType != null) - { - hashCode = (hashCode * 59) + this.SpecificType.GetHashCode(); - } - if (this.Options != null) - { - hashCode = (hashCode * 59) + this.Options.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDto.cs index 60e5c487cfc1451da8c400ea8e8e18cb0bd481e7..089554c3082288a3d75a2965698ec7abb0896614 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents information about a resource type. /// </summary> [DataContract(Name = "ResourceTypeInformationDto")] - public partial class ResourceTypeInformationDto : IEquatable<ResourceTypeInformationDto>, IValidatableObject + public partial class ResourceTypeInformationDto : IValidatableObject { /// <summary> @@ -263,169 +263,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeInformationDto); - } - - /// <summary> - /// Returns true if ResourceTypeInformationDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeInformationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeInformationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.GeneralType == input.GeneralType || - (this.GeneralType != null && - this.GeneralType.Equals(input.GeneralType)) - ) && - ( - this.SpecificType == input.SpecificType || - (this.SpecificType != null && - this.SpecificType.Equals(input.SpecificType)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.CanCreate == input.CanCreate || - this.CanCreate.Equals(input.CanCreate) - ) && - ( - this.CanRead == input.CanRead || - this.CanRead.Equals(input.CanRead) - ) && - ( - this.CanSetResourceReadonly == input.CanSetResourceReadonly || - this.CanSetResourceReadonly.Equals(input.CanSetResourceReadonly) - ) && - ( - this.CanUpdate == input.CanUpdate || - this.CanUpdate.Equals(input.CanUpdate) - ) && - ( - this.CanUpdateResource == input.CanUpdateResource || - this.CanUpdateResource.Equals(input.CanUpdateResource) - ) && - ( - this.CanDelete == input.CanDelete || - this.CanDelete.Equals(input.CanDelete) - ) && - ( - this.CanDeleteResource == input.CanDeleteResource || - this.CanDeleteResource.Equals(input.CanDeleteResource) - ) && - ( - this.CanList == input.CanList || - this.CanList.Equals(input.CanList) - ) && - ( - this.CanCreateLinks == input.CanCreateLinks || - this.CanCreateLinks.Equals(input.CanCreateLinks) - ) && - ( - this.CanCopyLocalMetadata == input.CanCopyLocalMetadata || - this.CanCopyLocalMetadata.Equals(input.CanCopyLocalMetadata) - ) && - ( - this.IsArchived == input.IsArchived || - this.IsArchived.Equals(input.IsArchived) - ) && - ( - this.IsQuotaAvailable == input.IsQuotaAvailable || - this.IsQuotaAvailable.Equals(input.IsQuotaAvailable) - ) && - ( - this.IsQuotaAdjustable == input.IsQuotaAdjustable || - this.IsQuotaAdjustable.Equals(input.IsQuotaAdjustable) - ) && - ( - this.IsEnabled == input.IsEnabled || - this.IsEnabled.Equals(input.IsEnabled) - ) && - ( - this.ResourceCreation == input.ResourceCreation || - (this.ResourceCreation != null && - this.ResourceCreation.Equals(input.ResourceCreation)) - ) && - ( - this.ResourceContent == input.ResourceContent || - (this.ResourceContent != null && - this.ResourceContent.Equals(input.ResourceContent)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.GeneralType != null) - { - hashCode = (hashCode * 59) + this.GeneralType.GetHashCode(); - } - if (this.SpecificType != null) - { - hashCode = (hashCode * 59) + this.SpecificType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.CanCreate.GetHashCode(); - hashCode = (hashCode * 59) + this.CanRead.GetHashCode(); - hashCode = (hashCode * 59) + this.CanSetResourceReadonly.GetHashCode(); - hashCode = (hashCode * 59) + this.CanUpdate.GetHashCode(); - hashCode = (hashCode * 59) + this.CanUpdateResource.GetHashCode(); - hashCode = (hashCode * 59) + this.CanDelete.GetHashCode(); - hashCode = (hashCode * 59) + this.CanDeleteResource.GetHashCode(); - hashCode = (hashCode * 59) + this.CanList.GetHashCode(); - hashCode = (hashCode * 59) + this.CanCreateLinks.GetHashCode(); - hashCode = (hashCode * 59) + this.CanCopyLocalMetadata.GetHashCode(); - hashCode = (hashCode * 59) + this.IsArchived.GetHashCode(); - hashCode = (hashCode * 59) + this.IsQuotaAvailable.GetHashCode(); - hashCode = (hashCode * 59) + this.IsQuotaAdjustable.GetHashCode(); - hashCode = (hashCode * 59) + this.IsEnabled.GetHashCode(); - if (this.ResourceCreation != null) - { - hashCode = (hashCode * 59) + this.ResourceCreation.GetHashCode(); - } - if (this.ResourceContent != null) - { - hashCode = (hashCode * 59) + this.ResourceContent.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoIEnumerableResponse.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoIEnumerableResponse.cs index 7d5d565e1786f0daac22a8b0089e6105b281b47b..569f3742803289028eda4ff4dfc31933abecd14b 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoIEnumerableResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoIEnumerableResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ResourceTypeInformationDtoIEnumerableResponse /// </summary> [DataContract(Name = "ResourceTypeInformationDtoIEnumerableResponse")] - public partial class ResourceTypeInformationDtoIEnumerableResponse : IEquatable<ResourceTypeInformationDtoIEnumerableResponse>, IValidatableObject + public partial class ResourceTypeInformationDtoIEnumerableResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceTypeInformationDtoIEnumerableResponse" /> class. @@ -102,82 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeInformationDtoIEnumerableResponse); - } - - /// <summary> - /// Returns true if ResourceTypeInformationDtoIEnumerableResponse instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeInformationDtoIEnumerableResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeInformationDtoIEnumerableResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoResponse.cs index 836f66cfde111537bfc0d657d4ec49f9178608c5..ae58c61dbbd786002d76ba7a00ca4e4f647ec1b7 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeInformationDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// ResourceTypeInformationDtoResponse /// </summary> [DataContract(Name = "ResourceTypeInformationDtoResponse")] - public partial class ResourceTypeInformationDtoResponse : IEquatable<ResourceTypeInformationDtoResponse>, IValidatableObject + public partial class ResourceTypeInformationDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceTypeInformationDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeInformationDtoResponse); - } - - /// <summary> - /// Returns true if ResourceTypeInformationDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeInformationDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeInformationDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeMinimalDto.cs index 3265e658a25dafbfcc3abce28d00493cbc6f8d34..bbe2cee360c57c1ce3fa3ec9972697322251e1c7 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a minimal Data Transfer Object (DTO) for a resource type. /// </summary> [DataContract(Name = "ResourceTypeMinimalDto")] - public partial class ResourceTypeMinimalDto : IEquatable<ResourceTypeMinimalDto>, IValidatableObject + public partial class ResourceTypeMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceTypeMinimalDto" /> class. @@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeMinimalDto); - } - - /// <summary> - /// Returns true if ResourceTypeMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.SpecificType == input.SpecificType || - (this.SpecificType != null && - this.SpecificType.Equals(input.SpecificType)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.SpecificType != null) - { - hashCode = (hashCode * 59) + this.SpecificType.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsDto.cs index 63587f6ff39db74665807e09c92bb92c738b6380..db64d13f2d019e0438a2c69c33eb885cd4f11db1 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the options available for different resource types. /// </summary> [DataContract(Name = "ResourceTypeOptionsDto")] - public partial class ResourceTypeOptionsDto : IEquatable<ResourceTypeOptionsDto>, IValidatableObject + public partial class ResourceTypeOptionsDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceTypeOptionsDto" /> class. @@ -106,94 +106,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeOptionsDto); - } - - /// <summary> - /// Returns true if ResourceTypeOptionsDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeOptionsDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeOptionsDto input) - { - if (input == null) - { - return false; - } - return - ( - this.LinkedData == input.LinkedData || - (this.LinkedData != null && - this.LinkedData.Equals(input.LinkedData)) - ) && - ( - this.GitLab == input.GitLab || - (this.GitLab != null && - this.GitLab.Equals(input.GitLab)) - ) && - ( - this.Rds == input.Rds || - (this.Rds != null && - this.Rds.Equals(input.Rds)) - ) && - ( - this.RdsS3 == input.RdsS3 || - (this.RdsS3 != null && - this.RdsS3.Equals(input.RdsS3)) - ) && - ( - this.RdsS3Worm == input.RdsS3Worm || - (this.RdsS3Worm != null && - this.RdsS3Worm.Equals(input.RdsS3Worm)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LinkedData != null) - { - hashCode = (hashCode * 59) + this.LinkedData.GetHashCode(); - } - if (this.GitLab != null) - { - hashCode = (hashCode * 59) + this.GitLab.GetHashCode(); - } - if (this.Rds != null) - { - hashCode = (hashCode * 59) + this.Rds.GetHashCode(); - } - if (this.RdsS3 != null) - { - hashCode = (hashCode * 59) + this.RdsS3.GetHashCode(); - } - if (this.RdsS3Worm != null) - { - hashCode = (hashCode * 59) + this.RdsS3Worm.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForCreationDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForCreationDto.cs index 079fe27fb774ae31929747ca317f50449003e2a3..e96a9346c1b11d46f6b958e929060ff20cf93746 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForCreationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForCreationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for creating options related to any resource type. /// </summary> [DataContract(Name = "ResourceTypeOptionsForCreationDto")] - public partial class ResourceTypeOptionsForCreationDto : IEquatable<ResourceTypeOptionsForCreationDto>, IValidatableObject + public partial class ResourceTypeOptionsForCreationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceTypeOptionsForCreationDto" /> class. @@ -106,94 +106,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeOptionsForCreationDto); - } - - /// <summary> - /// Returns true if ResourceTypeOptionsForCreationDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeOptionsForCreationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeOptionsForCreationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.LinkedResourceTypeOptions == input.LinkedResourceTypeOptions || - (this.LinkedResourceTypeOptions != null && - this.LinkedResourceTypeOptions.Equals(input.LinkedResourceTypeOptions)) - ) && - ( - this.GitlabResourceTypeOptions == input.GitlabResourceTypeOptions || - (this.GitlabResourceTypeOptions != null && - this.GitlabResourceTypeOptions.Equals(input.GitlabResourceTypeOptions)) - ) && - ( - this.RdsResourceTypeOptions == input.RdsResourceTypeOptions || - (this.RdsResourceTypeOptions != null && - this.RdsResourceTypeOptions.Equals(input.RdsResourceTypeOptions)) - ) && - ( - this.RdsS3ResourceTypeOptions == input.RdsS3ResourceTypeOptions || - (this.RdsS3ResourceTypeOptions != null && - this.RdsS3ResourceTypeOptions.Equals(input.RdsS3ResourceTypeOptions)) - ) && - ( - this.RdsS3WormResourceTypeOptions == input.RdsS3WormResourceTypeOptions || - (this.RdsS3WormResourceTypeOptions != null && - this.RdsS3WormResourceTypeOptions.Equals(input.RdsS3WormResourceTypeOptions)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LinkedResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.LinkedResourceTypeOptions.GetHashCode(); - } - if (this.GitlabResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.GitlabResourceTypeOptions.GetHashCode(); - } - if (this.RdsResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.RdsResourceTypeOptions.GetHashCode(); - } - if (this.RdsS3ResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.RdsS3ResourceTypeOptions.GetHashCode(); - } - if (this.RdsS3WormResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.RdsS3WormResourceTypeOptions.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForUpdateDto.cs index bd9618ec17fc8d3a3bd4a10c011d1dc11857e031..4e47fe84ae582e3d6f529d5891cc7a5f285fd691 100644 --- a/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/ResourceTypeOptionsForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) used for updating options related to any resource type. /// </summary> [DataContract(Name = "ResourceTypeOptionsForUpdateDto")] - public partial class ResourceTypeOptionsForUpdateDto : IEquatable<ResourceTypeOptionsForUpdateDto>, IValidatableObject + public partial class ResourceTypeOptionsForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="ResourceTypeOptionsForUpdateDto" /> class. @@ -106,94 +106,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as ResourceTypeOptionsForUpdateDto); - } - - /// <summary> - /// Returns true if ResourceTypeOptionsForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of ResourceTypeOptionsForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(ResourceTypeOptionsForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.LinkedResourceTypeOptions == input.LinkedResourceTypeOptions || - (this.LinkedResourceTypeOptions != null && - this.LinkedResourceTypeOptions.Equals(input.LinkedResourceTypeOptions)) - ) && - ( - this.GitlabResourceTypeOptions == input.GitlabResourceTypeOptions || - (this.GitlabResourceTypeOptions != null && - this.GitlabResourceTypeOptions.Equals(input.GitlabResourceTypeOptions)) - ) && - ( - this.RdsResourceTypeOptions == input.RdsResourceTypeOptions || - (this.RdsResourceTypeOptions != null && - this.RdsResourceTypeOptions.Equals(input.RdsResourceTypeOptions)) - ) && - ( - this.RdsS3ResourceTypeOptions == input.RdsS3ResourceTypeOptions || - (this.RdsS3ResourceTypeOptions != null && - this.RdsS3ResourceTypeOptions.Equals(input.RdsS3ResourceTypeOptions)) - ) && - ( - this.RdsS3WormResourceTypeOptions == input.RdsS3WormResourceTypeOptions || - (this.RdsS3WormResourceTypeOptions != null && - this.RdsS3WormResourceTypeOptions.Equals(input.RdsS3WormResourceTypeOptions)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LinkedResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.LinkedResourceTypeOptions.GetHashCode(); - } - if (this.GitlabResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.GitlabResourceTypeOptions.GetHashCode(); - } - if (this.RdsResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.RdsResourceTypeOptions.GetHashCode(); - } - if (this.RdsS3ResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.RdsS3ResourceTypeOptions.GetHashCode(); - } - if (this.RdsS3WormResourceTypeOptions != null) - { - hashCode = (hashCode * 59) + this.RdsS3WormResourceTypeOptions.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RoleDto.cs b/src/Coscine.ApiClient.Core/Model/RoleDto.cs index cdd2ec1c67c1857b48a7be99d87279c6783a55d7..4649506adf13a23119593af75890bcbb996687f6 100644 --- a/src/Coscine.ApiClient.Core/Model/RoleDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RoleDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for a role. /// </summary> [DataContract(Name = "RoleDto")] - public partial class RoleDto : IEquatable<RoleDto>, IValidatableObject + public partial class RoleDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RoleDto" /> class. @@ -90,76 +90,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RoleDto); - } - - /// <summary> - /// Returns true if RoleDto instances are equal - /// </summary> - /// <param name="input">Instance of RoleDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RoleDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RoleDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/RoleDtoPagedResponse.cs index e1ff8838e07b9d907d1d09e637e80747ea79df7f..4a42354b2a1deb4f7b9a3d911e3c187b9f3d9075 100644 --- a/src/Coscine.ApiClient.Core/Model/RoleDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/RoleDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// RoleDtoPagedResponse /// </summary> [DataContract(Name = "RoleDtoPagedResponse")] - public partial class RoleDtoPagedResponse : IEquatable<RoleDtoPagedResponse>, IValidatableObject + public partial class RoleDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RoleDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RoleDtoPagedResponse); - } - - /// <summary> - /// Returns true if RoleDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of RoleDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RoleDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RoleDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/RoleDtoResponse.cs index 06a6246f9d3312344fd1b019be4351066582ee8d..0d1bb877c6208cc3fdea910371a7e28e01195793 100644 --- a/src/Coscine.ApiClient.Core/Model/RoleDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/RoleDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// RoleDtoResponse /// </summary> [DataContract(Name = "RoleDtoResponse")] - public partial class RoleDtoResponse : IEquatable<RoleDtoResponse>, IValidatableObject + public partial class RoleDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RoleDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RoleDtoResponse); - } - - /// <summary> - /// Returns true if RoleDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of RoleDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RoleDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/RoleMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/RoleMinimalDto.cs index 8a44c911f081c5db3049c0a6a9b9b5915f63176a..530eea35984d5c6a0845567aae0f7b39cf2ed428 100644 --- a/src/Coscine.ApiClient.Core/Model/RoleMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/RoleMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) containing minimal information about a role. /// </summary> [DataContract(Name = "RoleMinimalDto")] - public partial class RoleMinimalDto : IEquatable<RoleMinimalDto>, IValidatableObject + public partial class RoleMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="RoleMinimalDto" /> class. @@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as RoleMinimalDto); - } - - /// <summary> - /// Returns true if RoleMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of RoleMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(RoleMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/SearchCategory.cs b/src/Coscine.ApiClient.Core/Model/SearchCategory.cs index 8f5b5e4722041b2d157d9f5efabbc6798baccedd..2cb3d695b831673baacc207439763900ccda1336 100644 --- a/src/Coscine.ApiClient.Core/Model/SearchCategory.cs +++ b/src/Coscine.ApiClient.Core/Model/SearchCategory.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a search category with a name and count of occurrences. /// </summary> [DataContract(Name = "SearchCategory")] - public partial class SearchCategory : IEquatable<SearchCategory>, IValidatableObject + public partial class SearchCategory : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="SearchCategory" /> class. @@ -80,63 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as SearchCategory); - } - - /// <summary> - /// Returns true if SearchCategory instances are equal - /// </summary> - /// <param name="input">Instance of SearchCategory to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(SearchCategory input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Count == input.Count || - this.Count.Equals(input.Count) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Count.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/SearchResultDto.cs b/src/Coscine.ApiClient.Core/Model/SearchResultDto.cs index f65aaf5d9e134011a4c6e1e2f03ed9ce01282b41..f4adc40593fc6221b6cb215c4af67e78b4b4b790 100644 --- a/src/Coscine.ApiClient.Core/Model/SearchResultDto.cs +++ b/src/Coscine.ApiClient.Core/Model/SearchResultDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for search results. /// </summary> [DataContract(Name = "SearchResultDto")] - public partial class SearchResultDto : IEquatable<SearchResultDto>, IValidatableObject + public partial class SearchResultDto : IValidatableObject { /// <summary> @@ -89,72 +89,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as SearchResultDto); - } - - /// <summary> - /// Returns true if SearchResultDto instances are equal - /// </summary> - /// <param name="input">Instance of SearchResultDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(SearchResultDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Source != null) - { - hashCode = (hashCode * 59) + this.Source.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/SearchResultDtoPagedSearchResponse.cs b/src/Coscine.ApiClient.Core/Model/SearchResultDtoPagedSearchResponse.cs index 876fd858588a0ac78bf42474c68ed8ce4ed066e2..6198baf5e026d3c789b9dae49131863b5636f93c 100644 --- a/src/Coscine.ApiClient.Core/Model/SearchResultDtoPagedSearchResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/SearchResultDtoPagedSearchResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// SearchResultDtoPagedSearchResponse /// </summary> [DataContract(Name = "SearchResultDtoPagedSearchResponse")] - public partial class SearchResultDtoPagedSearchResponse : IEquatable<SearchResultDtoPagedSearchResponse>, IValidatableObject + public partial class SearchResultDtoPagedSearchResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="SearchResultDtoPagedSearchResponse" /> class. @@ -120,101 +120,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as SearchResultDtoPagedSearchResponse); - } - - /// <summary> - /// Returns true if SearchResultDtoPagedSearchResponse instances are equal - /// </summary> - /// <param name="input">Instance of SearchResultDtoPagedSearchResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(SearchResultDtoPagedSearchResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ) && - ( - this.Categories == input.Categories || - this.Categories != null && - input.Categories != null && - this.Categories.SequenceEqual(input.Categories) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - if (this.Categories != null) - { - hashCode = (hashCode * 59) + this.Categories.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/TermsOfServiceDto.cs b/src/Coscine.ApiClient.Core/Model/TermsOfServiceDto.cs index d103dd12d2842c2c7bc935327af5af2559bbac01..1c261140509fde894e12e56da8f7fc60e434e4fd 100644 --- a/src/Coscine.ApiClient.Core/Model/TermsOfServiceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/TermsOfServiceDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the Data Transfer Object (DTO) for terms of service information. /// </summary> [DataContract(Name = "TermsOfServiceDto")] - public partial class TermsOfServiceDto : IEquatable<TermsOfServiceDto>, IValidatableObject + public partial class TermsOfServiceDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="TermsOfServiceDto" /> class. @@ -90,72 +90,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as TermsOfServiceDto); - } - - /// <summary> - /// Returns true if TermsOfServiceDto instances are equal - /// </summary> - /// <param name="input">Instance of TermsOfServiceDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(TermsOfServiceDto input) - { - if (input == null) - { - return false; - } - return - ( - this.VarVersion == input.VarVersion || - (this.VarVersion != null && - this.VarVersion.Equals(input.VarVersion)) - ) && - ( - this.Href == input.Href || - (this.Href != null && - this.Href.Equals(input.Href)) - ) && - ( - this.IsCurrent == input.IsCurrent || - this.IsCurrent.Equals(input.IsCurrent) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarVersion != null) - { - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); - } - if (this.Href != null) - { - hashCode = (hashCode * 59) + this.Href.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsCurrent.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/TermsOfServiceDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/TermsOfServiceDtoResponse.cs index 81fdb8c6034a6666abedc860dc25878227fd96fe..04881c9841dac0731d1bf712b3ff584762414ff5 100644 --- a/src/Coscine.ApiClient.Core/Model/TermsOfServiceDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/TermsOfServiceDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// TermsOfServiceDtoResponse /// </summary> [DataContract(Name = "TermsOfServiceDtoResponse")] - public partial class TermsOfServiceDtoResponse : IEquatable<TermsOfServiceDtoResponse>, IValidatableObject + public partial class TermsOfServiceDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="TermsOfServiceDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as TermsOfServiceDtoResponse); - } - - /// <summary> - /// Returns true if TermsOfServiceDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of TermsOfServiceDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(TermsOfServiceDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/TitleDto.cs b/src/Coscine.ApiClient.Core/Model/TitleDto.cs index 98b725127ceda70d03836e6e34aeaa97480c34d3..23e8643091e0ae62e46854399436e0d2fec11215 100644 --- a/src/Coscine.ApiClient.Core/Model/TitleDto.cs +++ b/src/Coscine.ApiClient.Core/Model/TitleDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the Data Transfer Object (DTO) for title information. /// </summary> [DataContract(Name = "TitleDto")] - public partial class TitleDto : IEquatable<TitleDto>, IValidatableObject + public partial class TitleDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="TitleDto" /> class. @@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as TitleDto); - } - - /// <summary> - /// Returns true if TitleDto instances are equal - /// </summary> - /// <param name="input">Instance of TitleDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(TitleDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/TitleDtoIEnumerableResponse.cs b/src/Coscine.ApiClient.Core/Model/TitleDtoIEnumerableResponse.cs index 022dad8ab7094b0fa6b6f18c6a8dbd0f50046a46..b8184f8d9492300ca1e7c5fb0d5fd35e6c3ffee4 100644 --- a/src/Coscine.ApiClient.Core/Model/TitleDtoIEnumerableResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/TitleDtoIEnumerableResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// TitleDtoIEnumerableResponse /// </summary> [DataContract(Name = "TitleDtoIEnumerableResponse")] - public partial class TitleDtoIEnumerableResponse : IEquatable<TitleDtoIEnumerableResponse>, IValidatableObject + public partial class TitleDtoIEnumerableResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="TitleDtoIEnumerableResponse" /> class. @@ -102,82 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as TitleDtoIEnumerableResponse); - } - - /// <summary> - /// Returns true if TitleDtoIEnumerableResponse instances are equal - /// </summary> - /// <param name="input">Instance of TitleDtoIEnumerableResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(TitleDtoIEnumerableResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/TitleDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/TitleDtoResponse.cs index e18ccce6e5226a133901f0c84e42e9a4b66f7e67..b737a359a3bde41996b64180251507e108373d35 100644 --- a/src/Coscine.ApiClient.Core/Model/TitleDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/TitleDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// TitleDtoResponse /// </summary> [DataContract(Name = "TitleDtoResponse")] - public partial class TitleDtoResponse : IEquatable<TitleDtoResponse>, IValidatableObject + public partial class TitleDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="TitleDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as TitleDtoResponse); - } - - /// <summary> - /// Returns true if TitleDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of TitleDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(TitleDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/TitleForUserManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/TitleForUserManipulationDto.cs index 4f3094a535b116e31b0d337af58a8dfdcee6d7b9..87203f05b0a9337c8b54dd74e358e368923e0c75 100644 --- a/src/Coscine.ApiClient.Core/Model/TitleForUserManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/TitleForUserManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for manipulating a user's title. /// </summary> [DataContract(Name = "TitleForUserManipulationDto")] - public partial class TitleForUserManipulationDto : IEquatable<TitleForUserManipulationDto>, IValidatableObject + public partial class TitleForUserManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="TitleForUserManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as TitleForUserManipulationDto); - } - - /// <summary> - /// Returns true if TitleForUserManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of TitleForUserManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(TitleForUserManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserDto.cs b/src/Coscine.ApiClient.Core/Model/UserDto.cs index 52c970818b75161feb1bc6bd25cddf2db2cc1f1c..1ab89e4c981489b1237c379fc572dea4b631bebe 100644 --- a/src/Coscine.ApiClient.Core/Model/UserDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for user-related information. /// </summary> [DataContract(Name = "UserDto")] - public partial class UserDto : IEquatable<UserDto>, IValidatableObject + public partial class UserDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserDto" /> class. @@ -188,167 +188,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserDto); - } - - /// <summary> - /// Returns true if UserDto instances are equal - /// </summary> - /// <param name="input">Instance of UserDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.GivenName == input.GivenName || - (this.GivenName != null && - this.GivenName.Equals(input.GivenName)) - ) && - ( - this.FamilyName == input.FamilyName || - (this.FamilyName != null && - this.FamilyName.Equals(input.FamilyName)) - ) && - ( - this.Emails == input.Emails || - this.Emails != null && - input.Emails != null && - this.Emails.SequenceEqual(input.Emails) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.AreToSAccepted == input.AreToSAccepted || - this.AreToSAccepted.Equals(input.AreToSAccepted) - ) && - ( - this.LatestActivity == input.LatestActivity || - (this.LatestActivity != null && - this.LatestActivity.Equals(input.LatestActivity)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ) && - ( - this.Organizations == input.Organizations || - this.Organizations != null && - input.Organizations != null && - this.Organizations.SequenceEqual(input.Organizations) - ) && - ( - this.Institutes == input.Institutes || - this.Institutes != null && - input.Institutes != null && - this.Institutes.SequenceEqual(input.Institutes) - ) && - ( - this.Identities == input.Identities || - this.Identities != null && - input.Identities != null && - this.Identities.SequenceEqual(input.Identities) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.GivenName != null) - { - hashCode = (hashCode * 59) + this.GivenName.GetHashCode(); - } - if (this.FamilyName != null) - { - hashCode = (hashCode * 59) + this.FamilyName.GetHashCode(); - } - if (this.Emails != null) - { - hashCode = (hashCode * 59) + this.Emails.GetHashCode(); - } - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AreToSAccepted.GetHashCode(); - if (this.LatestActivity != null) - { - hashCode = (hashCode * 59) + this.LatestActivity.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - if (this.Organizations != null) - { - hashCode = (hashCode * 59) + this.Organizations.GetHashCode(); - } - if (this.Institutes != null) - { - hashCode = (hashCode * 59) + this.Institutes.GetHashCode(); - } - if (this.Identities != null) - { - hashCode = (hashCode * 59) + this.Identities.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/UserDtoPagedResponse.cs index 189ca3a0e62b4d0e95e3aab4531a6a6e965daff1..fc3471be84edc410af3c792cd74a7857c01adde8 100644 --- a/src/Coscine.ApiClient.Core/Model/UserDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/UserDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// UserDtoPagedResponse /// </summary> [DataContract(Name = "UserDtoPagedResponse")] - public partial class UserDtoPagedResponse : IEquatable<UserDtoPagedResponse>, IValidatableObject + public partial class UserDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserDtoPagedResponse); - } - - /// <summary> - /// Returns true if UserDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of UserDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/UserDtoResponse.cs index faa9d778e97c5c6e5809948242b6a0b463cc1066..d0e62749495469b026d8ca8081eea25fe8ca17b7 100644 --- a/src/Coscine.ApiClient.Core/Model/UserDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/UserDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// UserDtoResponse /// </summary> [DataContract(Name = "UserDtoResponse")] - public partial class UserDtoResponse : IEquatable<UserDtoResponse>, IValidatableObject + public partial class UserDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserDtoResponse); - } - - /// <summary> - /// Returns true if UserDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of UserDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserEmailDto.cs b/src/Coscine.ApiClient.Core/Model/UserEmailDto.cs index d48bcbc17b71c5264c1eba485e455c2758effa12..52c740301401fe60bd09ef05c9e42bed0eb7fae9 100644 --- a/src/Coscine.ApiClient.Core/Model/UserEmailDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserEmailDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for user email information. /// </summary> [DataContract(Name = "UserEmailDto")] - public partial class UserEmailDto : IEquatable<UserEmailDto>, IValidatableObject + public partial class UserEmailDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserEmailDto" /> class. @@ -90,68 +90,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserEmailDto); - } - - /// <summary> - /// Returns true if UserEmailDto instances are equal - /// </summary> - /// <param name="input">Instance of UserEmailDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserEmailDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.IsConfirmed == input.IsConfirmed || - this.IsConfirmed.Equals(input.IsConfirmed) - ) && - ( - this.IsPrimary == input.IsPrimary || - this.IsPrimary.Equals(input.IsPrimary) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsConfirmed.GetHashCode(); - hashCode = (hashCode * 59) + this.IsPrimary.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserForUpdateDto.cs b/src/Coscine.ApiClient.Core/Model/UserForUpdateDto.cs index d14c7f5bfd51c8eb4b9b606530dd1bd52235fbf1..d53853d12244eb9219905112fb8b70a6b10aeb3c 100644 --- a/src/Coscine.ApiClient.Core/Model/UserForUpdateDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserForUpdateDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for updating user details. /// </summary> [DataContract(Name = "UserForUpdateDto")] - public partial class UserForUpdateDto : IEquatable<UserForUpdateDto>, IValidatableObject + public partial class UserForUpdateDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserForUpdateDto" /> class. @@ -168,139 +168,29 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserForUpdateDto); - } - - /// <summary> - /// Returns true if UserForUpdateDto instances are equal - /// </summary> - /// <param name="input">Instance of UserForUpdateDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserForUpdateDto input) - { - if (input == null) - { - return false; - } - return - ( - this.GivenName == input.GivenName || - (this.GivenName != null && - this.GivenName.Equals(input.GivenName)) - ) && - ( - this.FamilyName == input.FamilyName || - (this.FamilyName != null && - this.FamilyName.Equals(input.FamilyName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.Organization == input.Organization || - (this.Organization != null && - this.Organization.Equals(input.Organization)) - ) && - ( - this.Institute == input.Institute || - (this.Institute != null && - this.Institute.Equals(input.Institute)) - ) && - ( - this.Disciplines == input.Disciplines || - this.Disciplines != null && - input.Disciplines != null && - this.Disciplines.SequenceEqual(input.Disciplines) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.GivenName != null) - { - hashCode = (hashCode * 59) + this.GivenName.GetHashCode(); - } - if (this.FamilyName != null) - { - hashCode = (hashCode * 59) + this.FamilyName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - if (this.Institute != null) - { - hashCode = (hashCode * 59) + this.Institute.GetHashCode(); - } - if (this.Disciplines != null) - { - hashCode = (hashCode * 59) + this.Disciplines.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // GivenName (string) minLength if (this.GivenName != null && this.GivenName.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GivenName, length must be greater than 1.", new [] { "GivenName" }); + yield return new ValidationResult("Invalid value for GivenName, length must be greater than 1.", new [] { "GivenName" }); } // FamilyName (string) minLength if (this.FamilyName != null && this.FamilyName.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FamilyName, length must be greater than 1.", new [] { "FamilyName" }); + yield return new ValidationResult("Invalid value for FamilyName, length must be greater than 1.", new [] { "FamilyName" }); } // Email (string) minLength if (this.Email != null && this.Email.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); + yield return new ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/UserInstituteDto.cs b/src/Coscine.ApiClient.Core/Model/UserInstituteDto.cs index 396c73e0b0473635a213e89792c06cac81a98603..081c82b40d99a3d9199fdb2e9a0a40a80217bab9 100644 --- a/src/Coscine.ApiClient.Core/Model/UserInstituteDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserInstituteDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for user institute information, extending the OrganizationDto. /// </summary> [DataContract(Name = "UserInstituteDto")] - public partial class UserInstituteDto : IEquatable<UserInstituteDto>, IValidatableObject + public partial class UserInstituteDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserInstituteDto" /> class. @@ -39,14 +39,14 @@ namespace Coscine.ApiClient.Core.Model /// <param name="displayName">The display name of the organization..</param> /// <param name="email">The email address of the organization..</param> /// <param name="publicationAdvisoryService">publicationAdvisoryService.</param> - /// <param name="varReadOnly">Determines if the organization's details can be modified. Defaults to `true`; manually set to `false`..</param> - public UserInstituteDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool varReadOnly = default(bool)) + /// <param name="readOnly">Determines if the organization's details can be modified. Defaults to `true`; manually set to `false`..</param> + public UserInstituteDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool readOnly = default(bool)) { this.Uri = uri; this.DisplayName = displayName; this.Email = email; this.PublicationAdvisoryService = publicationAdvisoryService; - this.VarReadOnly = varReadOnly; + this.ReadOnly = readOnly; } /// <summary> @@ -81,7 +81,7 @@ namespace Coscine.ApiClient.Core.Model /// </summary> /// <value>Determines if the organization's details can be modified. Defaults to `true`; manually set to `false`.</value> [DataMember(Name = "readOnly", EmitDefaultValue = true)] - public bool VarReadOnly { get; set; } + public bool ReadOnly { get; set; } /// <summary> /// Returns the string presentation of the object @@ -95,7 +95,7 @@ namespace Coscine.ApiClient.Core.Model sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" PublicationAdvisoryService: ").Append(PublicationAdvisoryService).Append("\n"); - sb.Append(" VarReadOnly: ").Append(VarReadOnly).Append("\n"); + sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -109,90 +109,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserInstituteDto); - } - - /// <summary> - /// Returns true if UserInstituteDto instances are equal - /// </summary> - /// <param name="input">Instance of UserInstituteDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserInstituteDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.PublicationAdvisoryService == input.PublicationAdvisoryService || - (this.PublicationAdvisoryService != null && - this.PublicationAdvisoryService.Equals(input.PublicationAdvisoryService)) - ) && - ( - this.VarReadOnly == input.VarReadOnly || - this.VarReadOnly.Equals(input.VarReadOnly) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.PublicationAdvisoryService != null) - { - hashCode = (hashCode * 59) + this.PublicationAdvisoryService.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarReadOnly.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserMergeDto.cs b/src/Coscine.ApiClient.Core/Model/UserMergeDto.cs index a33697e15a3419e8e23f55a754372cb082bd23a9..1c84e77dc202c17eaa7fc62596055b28dcf59c08 100644 --- a/src/Coscine.ApiClient.Core/Model/UserMergeDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserMergeDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for merging user accounts. /// </summary> [DataContract(Name = "UserMergeDto")] - public partial class UserMergeDto : IEquatable<UserMergeDto>, IValidatableObject + public partial class UserMergeDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserMergeDto" /> class. @@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserMergeDto); - } - - /// <summary> - /// Returns true if UserMergeDto instances are equal - /// </summary> - /// <param name="input">Instance of UserMergeDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserMergeDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserMergeDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/UserMergeDtoResponse.cs index 2e0c0331015bec5cbeb73dc15e2eb65962e21742..0772d3550ba3aea5e9a9836a85111300ac9c8443 100644 --- a/src/Coscine.ApiClient.Core/Model/UserMergeDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/UserMergeDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// UserMergeDtoResponse /// </summary> [DataContract(Name = "UserMergeDtoResponse")] - public partial class UserMergeDtoResponse : IEquatable<UserMergeDtoResponse>, IValidatableObject + public partial class UserMergeDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserMergeDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserMergeDtoResponse); - } - - /// <summary> - /// Returns true if UserMergeDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of UserMergeDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserMergeDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserMinimalDto.cs b/src/Coscine.ApiClient.Core/Model/UserMinimalDto.cs index 5d3b519431aa7c3d60c7fbdaf0f6bced85deab71..bc1f02a8fad3efb21c1b1ac90b479b8b5bbdd057 100644 --- a/src/Coscine.ApiClient.Core/Model/UserMinimalDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserMinimalDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a minimal Data Transfer Object (DTO) for user information. /// </summary> [DataContract(Name = "UserMinimalDto")] - public partial class UserMinimalDto : IEquatable<UserMinimalDto>, IValidatableObject + public partial class UserMinimalDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserMinimalDto" /> class. @@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserMinimalDto); - } - - /// <summary> - /// Returns true if UserMinimalDto instances are equal - /// </summary> - /// <param name="input">Instance of UserMinimalDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserMinimalDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserOrganizationDto.cs b/src/Coscine.ApiClient.Core/Model/UserOrganizationDto.cs index 8ae88346148aedccb1f235f6194ea1b8c913e7c0..0e04c3fb83ab92f36193fd36d12c1d03c15f130e 100644 --- a/src/Coscine.ApiClient.Core/Model/UserOrganizationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserOrganizationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for user-related organization information, inheriting from OrganizationDto. /// </summary> [DataContract(Name = "UserOrganizationDto")] - public partial class UserOrganizationDto : IEquatable<UserOrganizationDto>, IValidatableObject + public partial class UserOrganizationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserOrganizationDto" /> class. @@ -39,14 +39,14 @@ namespace Coscine.ApiClient.Core.Model /// <param name="displayName">The display name of the organization..</param> /// <param name="email">The email address of the organization..</param> /// <param name="publicationAdvisoryService">publicationAdvisoryService.</param> - /// <param name="varReadOnly">Determines if the organization's details can be modified..</param> - public UserOrganizationDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool varReadOnly = default(bool)) + /// <param name="readOnly">Determines if the organization's details can be modified..</param> + public UserOrganizationDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool readOnly = default(bool)) { this.Uri = uri; this.DisplayName = displayName; this.Email = email; this.PublicationAdvisoryService = publicationAdvisoryService; - this.VarReadOnly = varReadOnly; + this.ReadOnly = readOnly; } /// <summary> @@ -81,7 +81,7 @@ namespace Coscine.ApiClient.Core.Model /// </summary> /// <value>Determines if the organization's details can be modified.</value> [DataMember(Name = "readOnly", EmitDefaultValue = true)] - public bool VarReadOnly { get; set; } + public bool ReadOnly { get; set; } /// <summary> /// Returns the string presentation of the object @@ -95,7 +95,7 @@ namespace Coscine.ApiClient.Core.Model sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" PublicationAdvisoryService: ").Append(PublicationAdvisoryService).Append("\n"); - sb.Append(" VarReadOnly: ").Append(VarReadOnly).Append("\n"); + sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -109,90 +109,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserOrganizationDto); - } - - /// <summary> - /// Returns true if UserOrganizationDto instances are equal - /// </summary> - /// <param name="input">Instance of UserOrganizationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserOrganizationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.PublicationAdvisoryService == input.PublicationAdvisoryService || - (this.PublicationAdvisoryService != null && - this.PublicationAdvisoryService.Equals(input.PublicationAdvisoryService)) - ) && - ( - this.VarReadOnly == input.VarReadOnly || - this.VarReadOnly.Equals(input.VarReadOnly) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.PublicationAdvisoryService != null) - { - hashCode = (hashCode * 59) + this.PublicationAdvisoryService.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarReadOnly.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/UserTermsOfServiceAcceptDto.cs b/src/Coscine.ApiClient.Core/Model/UserTermsOfServiceAcceptDto.cs index f5fb52502d594f456bd2d86d666f1acf11c97f29..e835125dcf92736aa1b6c9a190c33279a4ee9f51 100644 --- a/src/Coscine.ApiClient.Core/Model/UserTermsOfServiceAcceptDto.cs +++ b/src/Coscine.ApiClient.Core/Model/UserTermsOfServiceAcceptDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for accepting the terms of service by a user. /// </summary> [DataContract(Name = "UserTermsOfServiceAcceptDto")] - public partial class UserTermsOfServiceAcceptDto : IEquatable<UserTermsOfServiceAcceptDto>, IValidatableObject + public partial class UserTermsOfServiceAcceptDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="UserTermsOfServiceAcceptDto" /> class. @@ -80,63 +80,17 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as UserTermsOfServiceAcceptDto); - } - - /// <summary> - /// Returns true if UserTermsOfServiceAcceptDto instances are equal - /// </summary> - /// <param name="input">Instance of UserTermsOfServiceAcceptDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(UserTermsOfServiceAcceptDto input) - { - if (input == null) - { - return false; - } - return - ( - this.VarVersion == input.VarVersion || - (this.VarVersion != null && - this.VarVersion.Equals(input.VarVersion)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarVersion != null) - { - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { // VarVersion (string) minLength if (this.VarVersion != null && this.VarVersion.Length < 1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarVersion, length must be greater than 1.", new [] { "VarVersion" }); + yield return new ValidationResult("Invalid value for VarVersion, length must be greater than 1.", new [] { "VarVersion" }); } yield break; diff --git a/src/Coscine.ApiClient.Core/Model/VariantDto.cs b/src/Coscine.ApiClient.Core/Model/VariantDto.cs index 49ed0b6ebf0573c98be30ee1ba5294a31105a480..c49701480ebae755be87816759ca13e9c81ce4d4 100644 --- a/src/Coscine.ApiClient.Core/Model/VariantDto.cs +++ b/src/Coscine.ApiClient.Core/Model/VariantDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the variants of this specific metadata tree. /// </summary> [DataContract(Name = "VariantDto")] - public partial class VariantDto : IEquatable<VariantDto>, IValidatableObject + public partial class VariantDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VariantDto" /> class. @@ -80,63 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VariantDto); - } - - /// <summary> - /// Returns true if VariantDto instances are equal - /// </summary> - /// <param name="input">Instance of VariantDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VariantDto input) - { - if (input == null) - { - return false; - } - return - ( - this.GraphName == input.GraphName || - (this.GraphName != null && - this.GraphName.Equals(input.GraphName)) - ) && - ( - this.Similarity == input.Similarity || - this.Similarity.Equals(input.Similarity) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.GraphName != null) - { - hashCode = (hashCode * 59) + this.GraphName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Similarity.GetHashCode(); - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VisibilityDto.cs b/src/Coscine.ApiClient.Core/Model/VisibilityDto.cs index 976184f17b23c235146cde1ccd5aa57ce4743727..50ea0fad22546223066ac96b8c8136fe2405469e 100644 --- a/src/Coscine.ApiClient.Core/Model/VisibilityDto.cs +++ b/src/Coscine.ApiClient.Core/Model/VisibilityDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for visibility settings. /// </summary> [DataContract(Name = "VisibilityDto")] - public partial class VisibilityDto : IEquatable<VisibilityDto>, IValidatableObject + public partial class VisibilityDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VisibilityDto" /> class. @@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VisibilityDto); - } - - /// <summary> - /// Returns true if VisibilityDto instances are equal - /// </summary> - /// <param name="input">Instance of VisibilityDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VisibilityDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VisibilityDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/VisibilityDtoPagedResponse.cs index 87f6c814fa753fedfc2d9ddde5e6d63170613aba..d300b7acb1c993879f53167cda0b061c6655f812 100644 --- a/src/Coscine.ApiClient.Core/Model/VisibilityDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/VisibilityDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// VisibilityDtoPagedResponse /// </summary> [DataContract(Name = "VisibilityDtoPagedResponse")] - public partial class VisibilityDtoPagedResponse : IEquatable<VisibilityDtoPagedResponse>, IValidatableObject + public partial class VisibilityDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VisibilityDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VisibilityDtoPagedResponse); - } - - /// <summary> - /// Returns true if VisibilityDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of VisibilityDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VisibilityDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VisibilityDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/VisibilityDtoResponse.cs index baf2620edea256d824b51a765f9f65e1be286c61..462ad440ab442b5d7af52a21709a278ebf0b347d 100644 --- a/src/Coscine.ApiClient.Core/Model/VisibilityDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/VisibilityDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// VisibilityDtoResponse /// </summary> [DataContract(Name = "VisibilityDtoResponse")] - public partial class VisibilityDtoResponse : IEquatable<VisibilityDtoResponse>, IValidatableObject + public partial class VisibilityDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VisibilityDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VisibilityDtoResponse); - } - - /// <summary> - /// Returns true if VisibilityDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of VisibilityDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VisibilityDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VisibilityForProjectManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/VisibilityForProjectManipulationDto.cs index 59f664387dd31e97d48f889735af2399b57bf1aa..9ca1b224add2368ea087c91e1fe3e1662c52fc91 100644 --- a/src/Coscine.ApiClient.Core/Model/VisibilityForProjectManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/VisibilityForProjectManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for manipulating the visibility of a project. /// </summary> [DataContract(Name = "VisibilityForProjectManipulationDto")] - public partial class VisibilityForProjectManipulationDto : IEquatable<VisibilityForProjectManipulationDto>, IValidatableObject + public partial class VisibilityForProjectManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VisibilityForProjectManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VisibilityForProjectManipulationDto); - } - - /// <summary> - /// Returns true if VisibilityForProjectManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of VisibilityForProjectManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VisibilityForProjectManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VisibilityForResourceManipulationDto.cs b/src/Coscine.ApiClient.Core/Model/VisibilityForResourceManipulationDto.cs index b7bf45d6c0a5a4c77a04572e8d5c171ecbf3cfea..01de90a0baf82e3490fbbefbd08b6fabbc616372 100644 --- a/src/Coscine.ApiClient.Core/Model/VisibilityForResourceManipulationDto.cs +++ b/src/Coscine.ApiClient.Core/Model/VisibilityForResourceManipulationDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents the data transfer object (DTO) for manipulating the visibility of a resource. /// </summary> [DataContract(Name = "VisibilityForResourceManipulationDto")] - public partial class VisibilityForResourceManipulationDto : IEquatable<VisibilityForResourceManipulationDto>, IValidatableObject + public partial class VisibilityForResourceManipulationDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VisibilityForResourceManipulationDto" /> class. @@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VisibilityForResourceManipulationDto); - } - - /// <summary> - /// Returns true if VisibilityForResourceManipulationDto instances are equal - /// </summary> - /// <param name="input">Instance of VisibilityForResourceManipulationDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VisibilityForResourceManipulationDto input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VocabularyDto.cs b/src/Coscine.ApiClient.Core/Model/VocabularyDto.cs index 3d66f0bcc345456f261b2b0fc0b8907e9cfbfb09..827477ed91c1bff4fddb96ce6e9185dcff34bbe3 100644 --- a/src/Coscine.ApiClient.Core/Model/VocabularyDto.cs +++ b/src/Coscine.ApiClient.Core/Model/VocabularyDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for vocabulary details. /// </summary> [DataContract(Name = "VocabularyDto")] - public partial class VocabularyDto : IEquatable<VocabularyDto>, IValidatableObject + public partial class VocabularyDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VocabularyDto" /> class. @@ -100,85 +100,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VocabularyDto); - } - - /// <summary> - /// Returns true if VocabularyDto instances are equal - /// </summary> - /// <param name="input">Instance of VocabularyDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VocabularyDto input) - { - if (input == null) - { - return false; - } - return - ( - this.GraphUri == input.GraphUri || - (this.GraphUri != null && - this.GraphUri.Equals(input.GraphUri)) - ) && - ( - this.ClassUri == input.ClassUri || - (this.ClassUri != null && - this.ClassUri.Equals(input.ClassUri)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.GraphUri != null) - { - hashCode = (hashCode * 59) + this.GraphUri.GetHashCode(); - } - if (this.ClassUri != null) - { - hashCode = (hashCode * 59) + this.ClassUri.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VocabularyDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/VocabularyDtoPagedResponse.cs index 341b758b7747f0f84721594d03020b1742938860..99381d290a479d91d66fa4adb26a5658523a3811 100644 --- a/src/Coscine.ApiClient.Core/Model/VocabularyDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/VocabularyDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// VocabularyDtoPagedResponse /// </summary> [DataContract(Name = "VocabularyDtoPagedResponse")] - public partial class VocabularyDtoPagedResponse : IEquatable<VocabularyDtoPagedResponse>, IValidatableObject + public partial class VocabularyDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VocabularyDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VocabularyDtoPagedResponse); - } - - /// <summary> - /// Returns true if VocabularyDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of VocabularyDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VocabularyDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDto.cs b/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDto.cs index d05e1aaa0e639a8a0f61733e11d166b8e98455e4..c0bba9ca14f45a9074d4710cf304c17164aadcc7 100644 --- a/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDto.cs +++ b/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDto.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// Represents a Data Transfer Object (DTO) for vocabulary instance details. /// </summary> [DataContract(Name = "VocabularyInstanceDto")] - public partial class VocabularyInstanceDto : IEquatable<VocabularyInstanceDto>, IValidatableObject + public partial class VocabularyInstanceDto : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VocabularyInstanceDto" /> class. @@ -120,103 +120,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VocabularyInstanceDto); - } - - /// <summary> - /// Returns true if VocabularyInstanceDto instances are equal - /// </summary> - /// <param name="input">Instance of VocabularyInstanceDto to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VocabularyInstanceDto input) - { - if (input == null) - { - return false; - } - return - ( - this.GraphUri == input.GraphUri || - (this.GraphUri != null && - this.GraphUri.Equals(input.GraphUri)) - ) && - ( - this.InstanceUri == input.InstanceUri || - (this.InstanceUri != null && - this.InstanceUri.Equals(input.InstanceUri)) - ) && - ( - this.TypeUri == input.TypeUri || - (this.TypeUri != null && - this.TypeUri.Equals(input.TypeUri)) - ) && - ( - this.SubClassOfUri == input.SubClassOfUri || - (this.SubClassOfUri != null && - this.SubClassOfUri.Equals(input.SubClassOfUri)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.GraphUri != null) - { - hashCode = (hashCode * 59) + this.GraphUri.GetHashCode(); - } - if (this.InstanceUri != null) - { - hashCode = (hashCode * 59) + this.InstanceUri.GetHashCode(); - } - if (this.TypeUri != null) - { - hashCode = (hashCode * 59) + this.TypeUri.GetHashCode(); - } - if (this.SubClassOfUri != null) - { - hashCode = (hashCode * 59) + this.SubClassOfUri.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoPagedResponse.cs b/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoPagedResponse.cs index 5eba0b0fdc877fa75b915af169128d5f06232851..69bb1e924ba9778f54bc4827cc7f45e7ff6fef79 100644 --- a/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoPagedResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoPagedResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// VocabularyInstanceDtoPagedResponse /// </summary> [DataContract(Name = "VocabularyInstanceDtoPagedResponse")] - public partial class VocabularyInstanceDtoPagedResponse : IEquatable<VocabularyInstanceDtoPagedResponse>, IValidatableObject + public partial class VocabularyInstanceDtoPagedResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VocabularyInstanceDtoPagedResponse" /> class. @@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VocabularyInstanceDtoPagedResponse); - } - - /// <summary> - /// Returns true if VocabularyInstanceDtoPagedResponse instances are equal - /// </summary> - /// <param name="input">Instance of VocabularyInstanceDtoPagedResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VocabularyInstanceDtoPagedResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ) && - ( - this.Pagination == input.Pagination || - (this.Pagination != null && - this.Pagination.Equals(input.Pagination)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - if (this.Pagination != null) - { - hashCode = (hashCode * 59) + this.Pagination.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoResponse.cs b/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoResponse.cs index 7165df4fe988070dfce8fc73c2542797cfe7c015..4c742b20d29358383644d936895b7f03b5a06df0 100644 --- a/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoResponse.cs +++ b/src/Coscine.ApiClient.Core/Model/VocabularyInstanceDtoResponse.cs @@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model /// VocabularyInstanceDtoResponse /// </summary> [DataContract(Name = "VocabularyInstanceDtoResponse")] - public partial class VocabularyInstanceDtoResponse : IEquatable<VocabularyInstanceDtoResponse>, IValidatableObject + public partial class VocabularyInstanceDtoResponse : IValidatableObject { /// <summary> /// Initializes a new instance of the <see cref="VocabularyInstanceDtoResponse" /> class. @@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// <summary> - /// Returns true if objects are equal - /// </summary> - /// <param name="input">Object to be compared</param> - /// <returns>Boolean</returns> - public override bool Equals(object input) - { - return this.Equals(input as VocabularyInstanceDtoResponse); - } - - /// <summary> - /// Returns true if VocabularyInstanceDtoResponse instances are equal - /// </summary> - /// <param name="input">Instance of VocabularyInstanceDtoResponse to be compared</param> - /// <returns>Boolean</returns> - public bool Equals(VocabularyInstanceDtoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.IsSuccess == input.IsSuccess || - this.IsSuccess.Equals(input.IsSuccess) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.TraceId == input.TraceId || - (this.TraceId != null && - this.TraceId.Equals(input.TraceId)) - ); - } - - /// <summary> - /// Gets the hash code - /// </summary> - /// <returns>Hash code</returns> - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode(); - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - if (this.TraceId != null) - { - hashCode = (hashCode * 59) + this.TraceId.GetHashCode(); - } - return hashCode; - } - } - /// <summary> /// To validate all properties of the instance /// </summary> /// <param name="validationContext">Validation context</param> /// <returns>Validation Result</returns> - IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/src/Coscine.ApiClient/Coscine.ApiClient.csproj b/src/Coscine.ApiClient/Coscine.ApiClient.csproj index 1bc6439ba81b6f49f527e2dcd67e34725321147c..6ca3778117ef9a79d5ea87eeee2f46c6c60507ce 100644 --- a/src/Coscine.ApiClient/Coscine.ApiClient.csproj +++ b/src/Coscine.ApiClient/Coscine.ApiClient.csproj @@ -3,7 +3,7 @@ <OutputType>Library</OutputType> <RootNamespace>Coscine.ApiClient</RootNamespace> <AssemblyName>Coscine.ApiClient</AssemblyName> - <TargetFramework>net7.0</TargetFramework> + <TargetFramework>net8.0</TargetFramework> <Version>1.9.0</Version> </PropertyGroup>