From 35615aac536bfacf5db68ff10cbd55a093bc9afc Mon Sep 17 00:00:00 2001 From: maksimlysenko Date: Wed, 19 Sep 2018 13:45:59 +0000 Subject: [PATCH] 9.0.000.21.1405 --- checksum.sha1 | 2 +- .../Api/AuthenticationApi.cs | 207 ++++++++++++- .../Client/ApiClient.cs | 2 +- .../Client/ApiException.cs | 2 +- .../Client/ApiResponse.cs | 2 +- .../Client/Configuration.cs | 4 +- .../Client/ExceptionFactory.cs | 2 +- .../Client/GlobalConfiguration.cs | 2 +- .../Client/IApiAccessor.cs | 2 +- .../Client/IReadableConfiguration.cs | 2 +- .../Client/SwaggerDateConverter.cs | 2 +- .../Genesys.Internal.Authentication.csproj | 4 +- .../Model/ApiResponse.cs | 2 +- .../Model/AuthSchemeLookupData.cs | 2 +- .../Model/ChangePasswordOperation.cs | 2 +- .../Model/CloudUserDetails.cs | 2 +- .../Model/DefaultOAuth2AccessToken.cs | 2 +- .../Model/ErrorResponse.cs | 2 +- .../Model/OpenIdUserInfo.cs | 291 ++++++++++++++++++ .../Model/ResponseStatus.cs | 2 +- .../Model/UserRole.cs | 2 +- 21 files changed, 504 insertions(+), 36 deletions(-) create mode 100644 src/Genesys.Internal.Authentication/Model/OpenIdUserInfo.cs diff --git a/checksum.sha1 b/checksum.sha1 index feff3d9..56a5531 100644 --- a/checksum.sha1 +++ b/checksum.sha1 @@ -1 +1 @@ -c90d9a12eb3d0db886e11a983a14d8a2821a37b9 \ No newline at end of file +f8a6590969abc2a079013bbe4ebbb9fc14e83c85 \ No newline at end of file diff --git a/src/Genesys.Internal.Authentication/Api/AuthenticationApi.cs b/src/Genesys.Internal.Authentication/Api/AuthenticationApi.cs index ad4d094..e8677b0 100644 --- a/src/Genesys.Internal.Authentication/Api/AuthenticationApi.cs +++ b/src/Genesys.Internal.Authentication/Api/AuthenticationApi.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -79,6 +79,27 @@ public interface IAuthenticationApi : IApiAccessor /// ApiResponse of ApiResponse ApiResponse ChangePasswordWithHttpInfo (ChangePasswordOperation request, string authorization = null); /// + /// Get OpenID user information by access token. + /// + /// + /// Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// OpenIdUserInfo + OpenIdUserInfo GetInfo (string authorization); + + /// + /// Get OpenID user information by access token. + /// + /// + /// Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// ApiResponse of OpenIdUserInfo + ApiResponse GetInfoWithHttpInfo (string authorization); + /// /// Get user information by access token. /// /// @@ -87,7 +108,7 @@ public interface IAuthenticationApi : IApiAccessor /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// CloudUserDetails - CloudUserDetails GetInfo (string authorization); + CloudUserDetails GetInfo1 (string authorization); /// /// Get user information by access token. @@ -98,7 +119,7 @@ public interface IAuthenticationApi : IApiAccessor /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// ApiResponse of CloudUserDetails - ApiResponse GetInfoWithHttpInfo (string authorization); + ApiResponse GetInfo1WithHttpInfo (string authorization); /// /// Retrieve access token. /// @@ -285,6 +306,27 @@ public interface IAuthenticationApi : IApiAccessor /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> ChangePasswordAsyncWithHttpInfo (ChangePasswordOperation request, string authorization = null); /// + /// Get OpenID user information by access token. + /// + /// + /// Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// Task of OpenIdUserInfo + System.Threading.Tasks.Task GetInfoAsync (string authorization); + + /// + /// Get OpenID user information by access token. + /// + /// + /// Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// Task of ApiResponse (OpenIdUserInfo) + System.Threading.Tasks.Task> GetInfoAsyncWithHttpInfo (string authorization); + /// /// Get user information by access token. /// /// @@ -293,7 +335,7 @@ public interface IAuthenticationApi : IApiAccessor /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// Task of CloudUserDetails - System.Threading.Tasks.Task GetInfoAsync (string authorization); + System.Threading.Tasks.Task GetInfo1Async (string authorization); /// /// Get user information by access token. @@ -304,7 +346,7 @@ public interface IAuthenticationApi : IApiAccessor /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// Task of ApiResponse (CloudUserDetails) - System.Threading.Tasks.Task> GetInfoAsyncWithHttpInfo (string authorization); + System.Threading.Tasks.Task> GetInfo1AsyncWithHttpInfo (string authorization); /// /// Retrieve access token. /// @@ -864,15 +906,150 @@ public async System.Threading.Tasks.Task> ChangePasswor (ApiResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// Get OpenID user information by access token. Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// OpenIdUserInfo + public OpenIdUserInfo GetInfo (string authorization) + { + ApiResponse localVarResponse = GetInfoWithHttpInfo(authorization); + return localVarResponse.Data; + } + + /// + /// Get OpenID user information by access token. Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// ApiResponse of OpenIdUserInfo + public ApiResponse< OpenIdUserInfo > GetInfoWithHttpInfo (string authorization) + { + // verify the required parameter 'authorization' is set + if (authorization == null) + throw new ApiException(400, "Missing required parameter 'authorization' when calling AuthenticationApi->GetInfo"); + + var localVarPath = "/openid/userinfo"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (authorization != null) localVarHeaderParams.Add("Authorization", Configuration.ApiClient.ParameterToString(authorization)); // header parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetInfo", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (OpenIdUserInfo) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OpenIdUserInfo))); + } + + /// + /// Get OpenID user information by access token. Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// Task of OpenIdUserInfo + public async System.Threading.Tasks.Task GetInfoAsync (string authorization) + { + ApiResponse localVarResponse = await GetInfoAsyncWithHttpInfo(authorization); + return localVarResponse.Data; + + } + + /// + /// Get OpenID user information by access token. Get information about a user by their OAuth 2 access token. + /// + /// Thrown when fails to make API call + /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" + /// Task of ApiResponse (OpenIdUserInfo) + public async System.Threading.Tasks.Task> GetInfoAsyncWithHttpInfo (string authorization) + { + // verify the required parameter 'authorization' is set + if (authorization == null) + throw new ApiException(400, "Missing required parameter 'authorization' when calling AuthenticationApi->GetInfo"); + + var localVarPath = "/openid/userinfo"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (authorization != null) localVarHeaderParams.Add("Authorization", Configuration.ApiClient.ParameterToString(authorization)); // header parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetInfo", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (OpenIdUserInfo) Configuration.ApiClient.Deserialize(localVarResponse, typeof(OpenIdUserInfo))); + } + /// /// Get user information by access token. Get information about a user by their OAuth 2 access token. /// /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// CloudUserDetails - public CloudUserDetails GetInfo (string authorization) + public CloudUserDetails GetInfo1 (string authorization) { - ApiResponse localVarResponse = GetInfoWithHttpInfo(authorization); + ApiResponse localVarResponse = GetInfo1WithHttpInfo(authorization); return localVarResponse.Data; } @@ -882,11 +1059,11 @@ public CloudUserDetails GetInfo (string authorization) /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// ApiResponse of CloudUserDetails - public ApiResponse< CloudUserDetails > GetInfoWithHttpInfo (string authorization) + public ApiResponse< CloudUserDetails > GetInfo1WithHttpInfo (string authorization) { // verify the required parameter 'authorization' is set if (authorization == null) - throw new ApiException(400, "Missing required parameter 'authorization' when calling AuthenticationApi->GetInfo"); + throw new ApiException(400, "Missing required parameter 'authorization' when calling AuthenticationApi->GetInfo1"); var localVarPath = "/userinfo"; var localVarPathParams = new Dictionary(); @@ -922,7 +1099,7 @@ public ApiResponse< CloudUserDetails > GetInfoWithHttpInfo (string authorization if (ExceptionFactory != null) { - Exception exception = ExceptionFactory("GetInfo", localVarResponse); + Exception exception = ExceptionFactory("GetInfo1", localVarResponse); if (exception != null) throw exception; } @@ -937,9 +1114,9 @@ public ApiResponse< CloudUserDetails > GetInfoWithHttpInfo (string authorization /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// Task of CloudUserDetails - public async System.Threading.Tasks.Task GetInfoAsync (string authorization) + public async System.Threading.Tasks.Task GetInfo1Async (string authorization) { - ApiResponse localVarResponse = await GetInfoAsyncWithHttpInfo(authorization); + ApiResponse localVarResponse = await GetInfo1AsyncWithHttpInfo(authorization); return localVarResponse.Data; } @@ -950,11 +1127,11 @@ public async System.Threading.Tasks.Task GetInfoAsync (string /// Thrown when fails to make API call /// The OAuth 2 bearer access token you received from `/auth/v3/oauth/token`. For example: \"Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\" /// Task of ApiResponse (CloudUserDetails) - public async System.Threading.Tasks.Task> GetInfoAsyncWithHttpInfo (string authorization) + public async System.Threading.Tasks.Task> GetInfo1AsyncWithHttpInfo (string authorization) { // verify the required parameter 'authorization' is set if (authorization == null) - throw new ApiException(400, "Missing required parameter 'authorization' when calling AuthenticationApi->GetInfo"); + throw new ApiException(400, "Missing required parameter 'authorization' when calling AuthenticationApi->GetInfo1"); var localVarPath = "/userinfo"; var localVarPathParams = new Dictionary(); @@ -990,7 +1167,7 @@ public async System.Threading.Tasks.Task> GetInfoA if (ExceptionFactory != null) { - Exception exception = ExceptionFactory("GetInfo", localVarResponse); + Exception exception = ExceptionFactory("GetInfo1", localVarResponse); if (exception != null) throw exception; } diff --git a/src/Genesys.Internal.Authentication/Client/ApiClient.cs b/src/Genesys.Internal.Authentication/Client/ApiClient.cs index 4f721ea..e2deb13 100644 --- a/src/Genesys.Internal.Authentication/Client/ApiClient.cs +++ b/src/Genesys.Internal.Authentication/Client/ApiClient.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Client/ApiException.cs b/src/Genesys.Internal.Authentication/Client/ApiException.cs index b89fbcb..5669921 100644 --- a/src/Genesys.Internal.Authentication/Client/ApiException.cs +++ b/src/Genesys.Internal.Authentication/Client/ApiException.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Client/ApiResponse.cs b/src/Genesys.Internal.Authentication/Client/ApiResponse.cs index f211a66..01e914d 100644 --- a/src/Genesys.Internal.Authentication/Client/ApiResponse.cs +++ b/src/Genesys.Internal.Authentication/Client/ApiResponse.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Client/Configuration.cs b/src/Genesys.Internal.Authentication/Client/Configuration.cs index f317651..fd87cfd 100644 --- a/src/Genesys.Internal.Authentication/Client/Configuration.cs +++ b/src/Genesys.Internal.Authentication/Client/Configuration.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -421,7 +421,7 @@ public static String ToDebugReport() String report = "C# SDK (Genesys.Internal.Authentication) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 9.0.000.16.1235\n"; + report += " Version of the API: 9.0.000.21.1405\n"; report += " SDK Package Version: 1.0.0\n"; return report; diff --git a/src/Genesys.Internal.Authentication/Client/ExceptionFactory.cs b/src/Genesys.Internal.Authentication/Client/ExceptionFactory.cs index 51b0561..55f7cdc 100644 --- a/src/Genesys.Internal.Authentication/Client/ExceptionFactory.cs +++ b/src/Genesys.Internal.Authentication/Client/ExceptionFactory.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Client/GlobalConfiguration.cs b/src/Genesys.Internal.Authentication/Client/GlobalConfiguration.cs index e156919..046bb16 100644 --- a/src/Genesys.Internal.Authentication/Client/GlobalConfiguration.cs +++ b/src/Genesys.Internal.Authentication/Client/GlobalConfiguration.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Client/IApiAccessor.cs b/src/Genesys.Internal.Authentication/Client/IApiAccessor.cs index ed22719..344ad65 100644 --- a/src/Genesys.Internal.Authentication/Client/IApiAccessor.cs +++ b/src/Genesys.Internal.Authentication/Client/IApiAccessor.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Client/IReadableConfiguration.cs b/src/Genesys.Internal.Authentication/Client/IReadableConfiguration.cs index a31e6d4..cf278e3 100644 --- a/src/Genesys.Internal.Authentication/Client/IReadableConfiguration.cs +++ b/src/Genesys.Internal.Authentication/Client/IReadableConfiguration.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Client/SwaggerDateConverter.cs b/src/Genesys.Internal.Authentication/Client/SwaggerDateConverter.cs index 3f25e36..e7f7b05 100644 --- a/src/Genesys.Internal.Authentication/Client/SwaggerDateConverter.cs +++ b/src/Genesys.Internal.Authentication/Client/SwaggerDateConverter.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Genesys.Internal.Authentication.csproj b/src/Genesys.Internal.Authentication/Genesys.Internal.Authentication.csproj index a41da36..74acc7b 100644 --- a/src/Genesys.Internal.Authentication/Genesys.Internal.Authentication.csproj +++ b/src/Genesys.Internal.Authentication/Genesys.Internal.Authentication.csproj @@ -4,7 +4,7 @@ Authentication API Authentication API -OpenAPI spec version: 9.0.000.16.1235 +OpenAPI spec version: 9.0.000.21.1405 --> @@ -12,7 +12,7 @@ OpenAPI spec version: 9.0.000.16.1235 Debug AnyCPU - {63403419-7CB5-48CB-B351-2C234E9E6DF8} + {DA668DB8-1378-4EF4-960C-C0EB4FD5474D} Library Properties Genesys.Internal.Authentication diff --git a/src/Genesys.Internal.Authentication/Model/ApiResponse.cs b/src/Genesys.Internal.Authentication/Model/ApiResponse.cs index e99ecc9..646913a 100644 --- a/src/Genesys.Internal.Authentication/Model/ApiResponse.cs +++ b/src/Genesys.Internal.Authentication/Model/ApiResponse.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Model/AuthSchemeLookupData.cs b/src/Genesys.Internal.Authentication/Model/AuthSchemeLookupData.cs index 950377c..f85692a 100644 --- a/src/Genesys.Internal.Authentication/Model/AuthSchemeLookupData.cs +++ b/src/Genesys.Internal.Authentication/Model/AuthSchemeLookupData.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Model/ChangePasswordOperation.cs b/src/Genesys.Internal.Authentication/Model/ChangePasswordOperation.cs index 1272072..9e5dbda 100644 --- a/src/Genesys.Internal.Authentication/Model/ChangePasswordOperation.cs +++ b/src/Genesys.Internal.Authentication/Model/ChangePasswordOperation.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Model/CloudUserDetails.cs b/src/Genesys.Internal.Authentication/Model/CloudUserDetails.cs index a9d4db7..a8dc55b 100644 --- a/src/Genesys.Internal.Authentication/Model/CloudUserDetails.cs +++ b/src/Genesys.Internal.Authentication/Model/CloudUserDetails.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Model/DefaultOAuth2AccessToken.cs b/src/Genesys.Internal.Authentication/Model/DefaultOAuth2AccessToken.cs index 8d44487..0688cb6 100644 --- a/src/Genesys.Internal.Authentication/Model/DefaultOAuth2AccessToken.cs +++ b/src/Genesys.Internal.Authentication/Model/DefaultOAuth2AccessToken.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Model/ErrorResponse.cs b/src/Genesys.Internal.Authentication/Model/ErrorResponse.cs index fea664c..4e841cc 100644 --- a/src/Genesys.Internal.Authentication/Model/ErrorResponse.cs +++ b/src/Genesys.Internal.Authentication/Model/ErrorResponse.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Model/OpenIdUserInfo.cs b/src/Genesys.Internal.Authentication/Model/OpenIdUserInfo.cs new file mode 100644 index 0000000..072a69b --- /dev/null +++ b/src/Genesys.Internal.Authentication/Model/OpenIdUserInfo.cs @@ -0,0 +1,291 @@ +/* + * Authentication API + * + * Authentication API + * + * OpenAPI spec version: 9.0.000.21.1405 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = Genesys.Internal.Authentication.Client.SwaggerDateConverter; + +namespace Genesys.Internal.Authentication.Model +{ + /// + /// This class describes the user in the system. Applicable to different entities (contact-center level user, application/service, cloud system admin) + /// + [DataContract] + public partial class OpenIdUserInfo : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OpenIdUserInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope.. + /// Authorities assigned to the user. (required). + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope.. + /// The DBID of the corresponding user record in Configuration Server. This is present if the user belongs to a contact center.. + /// OpenID Connect 'email' claim. This is present if user authenticated with openid scope.. + /// OpenID Connect 'environment_id' claim. This is present if user authenticated with openid scope.. + /// OpenID Connect 'family_name' (last name) claim. This is present if user authenticated with openid scope.. + /// OpenID Connect 'given_name' (first name) claim. This is present if user authenticated with openid scope.. + /// OpenID Connect 'sub' claim. This is present if user authenticated with openid scope.. + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope.. + public OpenIdUserInfo(string Aud = default(string), UserRole Authorities = default(UserRole), string ContactCenterId = default(string), int? Dbid = default(int?), string Email = default(string), string EnvironmentId = default(string), string FamilyName = default(string), string GivenName = default(string), string Sub = default(string), string UserName = default(string)) + { + // to ensure "Authorities" is required (not null) + if (Authorities == null) + { + throw new InvalidDataException("Authorities is a required property for OpenIdUserInfo and cannot be null"); + } + else + { + this.Authorities = Authorities; + } + this.Aud = Aud; + this.ContactCenterId = ContactCenterId; + this.Dbid = Dbid; + this.Email = Email; + this.EnvironmentId = EnvironmentId; + this.FamilyName = FamilyName; + this.GivenName = GivenName; + this.Sub = Sub; + this.UserName = UserName; + } + + /// + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope. + [DataMember(Name="aud", EmitDefaultValue=false)] + public string Aud { get; set; } + + /// + /// Authorities assigned to the user. + /// + /// Authorities assigned to the user. + [DataMember(Name="authorities", EmitDefaultValue=false)] + public UserRole Authorities { get; set; } + + /// + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope. + [DataMember(Name="contact_center_id", EmitDefaultValue=false)] + public string ContactCenterId { get; set; } + + /// + /// The DBID of the corresponding user record in Configuration Server. This is present if the user belongs to a contact center. + /// + /// The DBID of the corresponding user record in Configuration Server. This is present if the user belongs to a contact center. + [DataMember(Name="dbid", EmitDefaultValue=false)] + public int? Dbid { get; set; } + + /// + /// OpenID Connect 'email' claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'email' claim. This is present if user authenticated with openid scope. + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// OpenID Connect 'environment_id' claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'environment_id' claim. This is present if user authenticated with openid scope. + [DataMember(Name="environment_id", EmitDefaultValue=false)] + public string EnvironmentId { get; set; } + + /// + /// OpenID Connect 'family_name' (last name) claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'family_name' (last name) claim. This is present if user authenticated with openid scope. + [DataMember(Name="family_name", EmitDefaultValue=false)] + public string FamilyName { get; set; } + + /// + /// OpenID Connect 'given_name' (first name) claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'given_name' (first name) claim. This is present if user authenticated with openid scope. + [DataMember(Name="given_name", EmitDefaultValue=false)] + public string GivenName { get; set; } + + /// + /// OpenID Connect 'sub' claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'sub' claim. This is present if user authenticated with openid scope. + [DataMember(Name="sub", EmitDefaultValue=false)] + public string Sub { get; set; } + + /// + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope. + /// + /// OpenID Connect 'aud' claim. This is present if user authenticated with openid scope. + [DataMember(Name="user_name", EmitDefaultValue=false)] + public string UserName { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OpenIdUserInfo {\n"); + sb.Append(" Aud: ").Append(Aud).Append("\n"); + sb.Append(" Authorities: ").Append(Authorities).Append("\n"); + sb.Append(" ContactCenterId: ").Append(ContactCenterId).Append("\n"); + sb.Append(" Dbid: ").Append(Dbid).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" EnvironmentId: ").Append(EnvironmentId).Append("\n"); + sb.Append(" FamilyName: ").Append(FamilyName).Append("\n"); + sb.Append(" GivenName: ").Append(GivenName).Append("\n"); + sb.Append(" Sub: ").Append(Sub).Append("\n"); + sb.Append(" UserName: ").Append(UserName).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OpenIdUserInfo); + } + + /// + /// Returns true if OpenIdUserInfo instances are equal + /// + /// Instance of OpenIdUserInfo to be compared + /// Boolean + public bool Equals(OpenIdUserInfo input) + { + if (input == null) + return false; + + return + ( + this.Aud == input.Aud || + (this.Aud != null && + this.Aud.Equals(input.Aud)) + ) && + ( + this.Authorities == input.Authorities || + (this.Authorities != null && + this.Authorities.Equals(input.Authorities)) + ) && + ( + this.ContactCenterId == input.ContactCenterId || + (this.ContactCenterId != null && + this.ContactCenterId.Equals(input.ContactCenterId)) + ) && + ( + this.Dbid == input.Dbid || + (this.Dbid != null && + this.Dbid.Equals(input.Dbid)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.EnvironmentId == input.EnvironmentId || + (this.EnvironmentId != null && + this.EnvironmentId.Equals(input.EnvironmentId)) + ) && + ( + this.FamilyName == input.FamilyName || + (this.FamilyName != null && + this.FamilyName.Equals(input.FamilyName)) + ) && + ( + this.GivenName == input.GivenName || + (this.GivenName != null && + this.GivenName.Equals(input.GivenName)) + ) && + ( + this.Sub == input.Sub || + (this.Sub != null && + this.Sub.Equals(input.Sub)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Aud != null) + hashCode = hashCode * 59 + this.Aud.GetHashCode(); + if (this.Authorities != null) + hashCode = hashCode * 59 + this.Authorities.GetHashCode(); + if (this.ContactCenterId != null) + hashCode = hashCode * 59 + this.ContactCenterId.GetHashCode(); + if (this.Dbid != null) + hashCode = hashCode * 59 + this.Dbid.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.EnvironmentId != null) + hashCode = hashCode * 59 + this.EnvironmentId.GetHashCode(); + if (this.FamilyName != null) + hashCode = hashCode * 59 + this.FamilyName.GetHashCode(); + if (this.GivenName != null) + hashCode = hashCode * 59 + this.GivenName.GetHashCode(); + if (this.Sub != null) + hashCode = hashCode * 59 + this.Sub.GetHashCode(); + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Genesys.Internal.Authentication/Model/ResponseStatus.cs b/src/Genesys.Internal.Authentication/Model/ResponseStatus.cs index b5d1370..da50472 100644 --- a/src/Genesys.Internal.Authentication/Model/ResponseStatus.cs +++ b/src/Genesys.Internal.Authentication/Model/ResponseStatus.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/src/Genesys.Internal.Authentication/Model/UserRole.cs b/src/Genesys.Internal.Authentication/Model/UserRole.cs index 257986c..eb091df 100644 --- a/src/Genesys.Internal.Authentication/Model/UserRole.cs +++ b/src/Genesys.Internal.Authentication/Model/UserRole.cs @@ -3,7 +3,7 @@ * * Authentication API * - * OpenAPI spec version: 9.0.000.16.1235 + * OpenAPI spec version: 9.0.000.21.1405 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */