diff --git a/KeycloakAuthorizationServicesDotNet.sln b/KeycloakAuthorizationServicesDotNet.sln index 43f04b1a..f6029c7d 100644 --- a/KeycloakAuthorizationServicesDotNet.sln +++ b/KeycloakAuthorizationServicesDotNet.sln @@ -68,6 +68,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWebApi", "tests\TestWeb EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keycloak.AuthServices.Authorization.Tests", "tests\Keycloak.AuthServices.Authorization.Tests\Keycloak.AuthServices.Authorization.Tests.csproj", "{331F4EF5-9CFE-4060-B903-69CCE9062BFD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keycloak.AuthServices.Sdk.Kiota", "src\Keycloak.AuthServices.Sdk.Kiota\Keycloak.AuthServices.Sdk.Kiota.csproj", "{8C43A1C1-0069-4B21-ADDE-5268EB214820}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -142,6 +144,10 @@ Global {331F4EF5-9CFE-4060-B903-69CCE9062BFD}.Debug|Any CPU.Build.0 = Debug|Any CPU {331F4EF5-9CFE-4060-B903-69CCE9062BFD}.Release|Any CPU.ActiveCfg = Release|Any CPU {331F4EF5-9CFE-4060-B903-69CCE9062BFD}.Release|Any CPU.Build.0 = Release|Any CPU + {8C43A1C1-0069-4B21-ADDE-5268EB214820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C43A1C1-0069-4B21-ADDE-5268EB214820}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C43A1C1-0069-4B21-ADDE-5268EB214820}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C43A1C1-0069-4B21-ADDE-5268EB214820}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -165,6 +171,7 @@ Global {7499F9F0-1132-46B4-AAA2-D60D9F113293} = {96857509-627A-4FD2-AC82-34387619A7B1} {0F40EFE2-8D17-46B2-A91B-EC4BCB93E77C} = {96857509-627A-4FD2-AC82-34387619A7B1} {331F4EF5-9CFE-4060-B903-69CCE9062BFD} = {96857509-627A-4FD2-AC82-34387619A7B1} + {8C43A1C1-0069-4B21-ADDE-5268EB214820} = {F9D5C5B8-9933-4AE0-ADAC-6B8C15F7552A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E1907BFD-C144-4B48-AA40-972F499D4E08} diff --git a/assets/install-keycloak.png b/assets/install-keycloak.png deleted file mode 100644 index f4a12cbf..00000000 --- a/assets/install-keycloak.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4422bedb9067be9fa2766ccb4e8b95dd4f8db7f2e3eefb67bf3a8443e3085120 -size 110335 diff --git a/docs/.vitepress/V1/Authentication.README.md b/docs/.vitepress/V1/Authentication.README.md index 8571c71d..71ae7d76 100644 --- a/docs/.vitepress/V1/Authentication.README.md +++ b/docs/.vitepress/V1/Authentication.README.md @@ -33,7 +33,7 @@ For more details see an example - [Program.cs](../../samples/AuthorizationAndCle "workspace-authz" is a "confidential client". -![install-keycloak](../../assets/install-keycloak.png) + Here is how non-confidential client installation configuration look like: ```csharp diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index dec5fd21..c6536fb0 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -72,6 +72,7 @@ export default withMermaid({ ] }, { text: 'OpenAPI Support', link: '/admin-rest-api/admin-api-openapi' }, + { text: 'Generated Client - Kiota', link: '/admin-rest-api/admin-api-kiota' }, ] }, { diff --git a/docs/admin-rest-api/admin-api-kiota.md b/docs/admin-rest-api/admin-api-kiota.md new file mode 100644 index 00000000..9128d7e8 --- /dev/null +++ b/docs/admin-rest-api/admin-api-kiota.md @@ -0,0 +1,28 @@ +# Generated Client - Kiota + +This `KeycloakAdminApiClient` was generated using the *Kiota* library. + +> [!NOTE] +> Kiota is a powerful command line tool developed by Microsoft that simplifies the process of generating API clients for calling any OpenAPI-described API. See [OpenAPI Support](/admin-rest-api/admin-api-openapi) for more details. + +```csharp +/// +/// Adds for Keycloak Admin API. +/// +/// The IHttpClientBuilder for further configuration. +public static IHttpClientBuilder AddKeycloakAdminHttpClient( + this IServiceCollection services, + IConfiguration configuration, + Action? configureClient = default, + string keycloakClientSectionName = KeycloakAdminClientOptions.Section +); +``` + +>[!TIP] +> Kiota supports partial client generation, you can generate only the functionality you need. In this case, you can use source code of this library as an example. + +## Example + +This is an example of how to use `KeycloakAdminApiClient` together with [Access Token Management](/admin-rest-api/access-token). + +<<< @/../tests/Keycloak.AuthServices.IntegrationTests/AdminKiota/KeycloakRealmKiotaClientTests.cs#GetRealmAsyncKiota_RealmExists_Success diff --git a/docs/admin-rest-api/admin-api-openapi.md b/docs/admin-rest-api/admin-api-openapi.md index 93e025ee..2b229523 100644 --- a/docs/admin-rest-api/admin-api-openapi.md +++ b/docs/admin-rest-api/admin-api-openapi.md @@ -5,3 +5,7 @@ From Keycloak documentation: > The OpenAPI definitions are a feature that is currently in preview. Please provide your feedback by [joining this discussion](https://github.com/keycloak/keycloak/discussions/8898) while weโ€™re continuing to work on this. If you find something is outdated or wrong, create a GitHub issue and provide a pull request. It means we can use OpenAPI definitions to generate full-fledged API. + +* +* +* diff --git a/docs/admin-rest-api/admin-api-reference.md b/docs/admin-rest-api/admin-api-reference.md index e3c55b26..512e52dc 100644 --- a/docs/admin-rest-api/admin-api-reference.md +++ b/docs/admin-rest-api/admin-api-reference.md @@ -11,4 +11,6 @@ The full API documentation - +/// Adds , , , HTTP clients for Keycloak Admin API. +/// +/// The IHttpClientBuilder for further configuration. public static IHttpClientBuilder AddKeycloakAdminHttpClient( this IServiceCollection services, - KeycloakAdminClientOptions keycloakAdminClientOptions, - Action? configureClient = default + IConfiguration configuration, + Action? configureClient = default, + string keycloakClientSectionName = KeycloakAdminClientOptions.Section ) ``` diff --git a/docs/introduction.md b/docs/introduction.md index 2c39dbb0..fdb7c514 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -17,8 +17,9 @@ Keycloak.AuthServices is a [family of packages](https://www.nuget.org/packages?q ## Packages -| Package | Description | -| ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Keycloak.AuthServices.Authentication](https://www.nuget.org/packages/Keycloak.AuthServices.Authentication/2.0.0-pre-1) | As an OAuth2, OpenID Connect, and SAML compliant server, Keycloak can secure any application and service as long as the technology stack they are using supports any of these protocols. This library provides AspNetCore integration for JwtBearer and OpenIdConnect. | -| [Keycloak.AuthServices.Authorization](https://www.nuget.org/packages/Keycloak.AuthServices.Authorization/2.0.0-pre-1) | Provides Role-Based Access Control (RBAC) and integration with the Keycloak Authorization Server. | -| [Keycloak.AuthServices.Sdk](https://www.nuget.org/packages/Keycloak.AuthServices.Sdk/2.0.0-pre-1) | Provides integration with the [Keycloak Admin REST API](https://www.keycloak.org/docs-api/21.1.1/rest-api/), allowing you to manage users, roles, clients, and realms programmatically. Provides integration with the [Protection REST API](https://www.keycloak.org/docs/latest/authorization_services/index.html#_service_protection_api) - a UMA-compliant set of endpoints. | +| Package | Description | +| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Keycloak.AuthServices.Authentication](https://www.nuget.org/packages/Keycloak.AuthServices.Authentication) | As an OAuth2, OpenID Connect, and SAML compliant server, Keycloak can secure any application and service as long as the technology stack they are using supports any of these protocols. This library provides AspNetCore integration for JwtBearer and OpenIdConnect. | +| [Keycloak.AuthServices.Authorization](https://www.nuget.org/packages/Keycloak.AuthServices.Authorization) | Provides Role-Based Access Control (RBAC) and integration with the Keycloak Authorization Server. | +| [Keycloak.AuthServices.Sdk](https://www.nuget.org/packages/Keycloak.AuthServices.Sdk) | Provides integration with the [Keycloak Admin REST API](https://www.keycloak.org/docs-api/21.1.1/rest-api/), allowing you to manage users, groups, and realms programmatically. Provides integration with the [Protection REST API](https://www.keycloak.org/docs/latest/authorization_services/index.html#_service_protection_api) - a UMA-compliant set of endpoints. | +| [Keycloak.AuthServices.Sdk.Kiota](https://www.nuget.org/packages/Keycloak.AuthServices.Sdk.Kiota) | Provides integration with the [Keycloak Admin REST API](https://www.keycloak.org/docs-api/21.1.1/rest-api/). The client is generated based on Open API Spec | diff --git a/docs/public/icon.png b/docs/public/icon.png new file mode 100644 index 00000000..bd7381fe --- /dev/null +++ b/docs/public/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71fd6b87a460eabc22759b80991678f86dcf9ed2abef0f198015bd8f7443e70e +size 5796 diff --git a/src/Directory.Build.props b/src/Directory.Build.props index b891886a..c42f5ceb 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -13,6 +13,7 @@ https://github.com/NikiforovAll/keycloak-authorization-services-dotnet https://github.com/NikiforovAll/keycloak-authorization-services-dotnet README.md + icon.png The release notes are available at https://github.com/NikiforovAll/keycloak-authorization-services-dotnet/releases @@ -24,6 +25,8 @@ + + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 8a502411..4ee3fa98 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -15,6 +15,17 @@ + + + + + + + + + + + diff --git a/src/Keycloak.AuthServices.Authentication/Keycloak.AuthServices.Authentication.csproj b/src/Keycloak.AuthServices.Authentication/Keycloak.AuthServices.Authentication.csproj index 3c4e3e89..867ed84b 100644 --- a/src/Keycloak.AuthServices.Authentication/Keycloak.AuthServices.Authentication.csproj +++ b/src/Keycloak.AuthServices.Authentication/Keycloak.AuthServices.Authentication.csproj @@ -6,7 +6,7 @@ Keycloak.AuthServices.Authentication - OICD Authentication; JWT Bearer Authentication for Keycloak + Simple and configurable JWT Bearer Authentication for Web APIs and OIDC+Cookie Authentication for Web Apps. Keycloak;Authentication;Authrorization;authserver;JWT;OICD;jwt-authentication diff --git a/src/Keycloak.AuthServices.Authorization/Keycloak.AuthServices.Authorization.csproj b/src/Keycloak.AuthServices.Authorization/Keycloak.AuthServices.Authorization.csproj index bfe6487e..639bd059 100644 --- a/src/Keycloak.AuthServices.Authorization/Keycloak.AuthServices.Authorization.csproj +++ b/src/Keycloak.AuthServices.Authorization/Keycloak.AuthServices.Authorization.csproj @@ -6,8 +6,8 @@ Keycloak.AuthServices.Authorization - Keycloak Authorization Server integration. Decision + Rpt - Keycloak;Authrorization;authserver + Adds Keycloak Authorization - including RBAC, Authorization Server, Claims Transformation and more. + Keycloak;Authrorization;AuthorizationServer;RBAC diff --git a/src/Keycloak.AuthServices.Common/Keycloak.AuthServices.Common.csproj b/src/Keycloak.AuthServices.Common/Keycloak.AuthServices.Common.csproj index 45ae4451..d6deca95 100644 --- a/src/Keycloak.AuthServices.Common/Keycloak.AuthServices.Common.csproj +++ b/src/Keycloak.AuthServices.Common/Keycloak.AuthServices.Common.csproj @@ -6,7 +6,7 @@ Keycloak.AuthServices.Common - Utils for Keycloak.AuthServices + Base library for Keycloak.AuthServices packages diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/AdminRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/AdminRequestBuilder.cs new file mode 100644 index 00000000..134211e1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/AdminRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin { + /// + /// Builds and executes requests for operations under \admin + /// + public class AdminRequestBuilder : BaseRequestBuilder { + /// The realms property + public RealmsRequestBuilder Realms { get => + new RealmsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AdminRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AdminRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AdminEvents/AdminEventsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AdminEvents/AdminEventsRequestBuilder.cs new file mode 100644 index 00000000..0b39bd60 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AdminEvents/AdminEventsRequestBuilder.cs @@ -0,0 +1,196 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\admin-events + /// + public class AdminEventsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AdminEventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/admin-events{?authClient*,authIpAddress*,authRealm*,authUser*,dateFrom*,dateTo*,first*,max*,operationTypes*,resourcePath*,resourceTypes*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AdminEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/admin-events{?authClient*,authIpAddress*,authRealm*,authUser*,dateFrom*,dateTo*,first*,max*,operationTypes*,resourcePath*,resourceTypes*}", rawUrl) { + } + /// + /// Delete all admin events + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get admin events Returns all admin events, or filters events based on URL query parameters listed here + /// + /// A List<AdminEventRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, AdminEventRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Delete all admin events + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, "{+baseurl}/admin/realms/{realm}/admin-events", PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get admin events Returns all admin events, or filters events based on URL query parameters listed here + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AdminEventsRequestBuilder WithUrl(string rawUrl) { + return new AdminEventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get admin events Returns all admin events, or filters events based on URL query parameters listed here + /// + public class AdminEventsRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("authClient")] + public string? AuthClient { get; set; } +#nullable restore +#else + [QueryParameter("authClient")] + public string AuthClient { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("authIpAddress")] + public string? AuthIpAddress { get; set; } +#nullable restore +#else + [QueryParameter("authIpAddress")] + public string AuthIpAddress { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("authRealm")] + public string? AuthRealm { get; set; } +#nullable restore +#else + [QueryParameter("authRealm")] + public string AuthRealm { get; set; } +#endif + /// user id +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("authUser")] + public string? AuthUser { get; set; } +#nullable restore +#else + [QueryParameter("authUser")] + public string AuthUser { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("dateFrom")] + public string? DateFrom { get; set; } +#nullable restore +#else + [QueryParameter("dateFrom")] + public string DateFrom { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("dateTo")] + public string? DateTo { get; set; } +#nullable restore +#else + [QueryParameter("dateTo")] + public string DateTo { get; set; } +#endif + [QueryParameter("first")] + public int? First { get; set; } + /// Maximum results size (defaults to 100) + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("operationTypes")] + public string[]? OperationTypes { get; set; } +#nullable restore +#else + [QueryParameter("operationTypes")] + public string[] OperationTypes { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("resourcePath")] + public string? ResourcePath { get; set; } +#nullable restore +#else + [QueryParameter("resourcePath")] + public string ResourcePath { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("resourceTypes")] + public string[]? ResourceTypes { get; set; } +#nullable restore +#else + [QueryParameter("resourceTypes")] + public string[] ResourceTypes { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/AttackDetectionRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/AttackDetectionRequestBuilder.cs new file mode 100644 index 00000000..2fcba5f5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/AttackDetectionRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\attack-detection + /// + public class AttackDetectionRequestBuilder : BaseRequestBuilder { + /// The bruteForce property + public BruteForceRequestBuilder BruteForce { get => + new BruteForceRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttackDetectionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttackDetectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/BruteForceRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/BruteForceRequestBuilder.cs new file mode 100644 index 00000000..fbb45939 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/BruteForceRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\attack-detection\brute-force + /// + public class BruteForceRequestBuilder : BaseRequestBuilder { + /// The users property + public UsersRequestBuilder Users { get => + new UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BruteForceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection/brute-force", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BruteForceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection/brute-force", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/Item/WithUserGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/Item/WithUserGetResponse.cs new file mode 100644 index 00000000..683572a5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/Item/WithUserGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item { + public class WithUserGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithUserGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static WithUserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WithUserGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/Item/WithUserItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/Item/WithUserItemRequestBuilder.cs new file mode 100644 index 00000000..7f07e98f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/Item/WithUserItemRequestBuilder.cs @@ -0,0 +1,102 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\attack-detection\brute-force\users\{userId} + /// + public class WithUserItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUserItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection/brute-force/users/{userId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUserItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection/brute-force/users/{userId}", rawUrl) { + } + /// + /// Clear any user login failures for the user This can release temporary disabled user + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get status of a username in brute force detection + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, WithUserGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Clear any user login failures for the user This can release temporary disabled user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get status of a username in brute force detection + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithUserItemRequestBuilder WithUrl(string rawUrl) { + return new WithUserItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/UsersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/UsersRequestBuilder.cs new file mode 100644 index 00000000..a065b88f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/AttackDetection/BruteForce/Users/UsersRequestBuilder.cs @@ -0,0 +1,78 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\attack-detection\brute-force\users + /// + public class UsersRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.attackDetection.bruteForce.users.item collection + /// Unique identifier of the item + /// A + public WithUserItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("userId", position); + return new WithUserItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection/brute-force/users", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection/brute-force/users", rawUrl) { + } + /// + /// Clear any user login failures for all users This can release temporary disabled users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Clear any user login failures for all users This can release temporary disabled users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UsersRequestBuilder WithUrl(string rawUrl) { + return new UsersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticationRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticationRequestBuilder.cs new file mode 100644 index 00000000..c0c4782b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticationRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.AuthenticatorProviders; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.ClientAuthenticatorProviders; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Config; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.ConfigDescription; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.FormActionProviders; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.FormProviders; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.PerClientConfigDescription; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RegisterRequiredAction; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.UnregisteredRequiredActions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication + /// + public class AuthenticationRequestBuilder : BaseRequestBuilder { + /// The authenticatorProviders property + public AuthenticatorProvidersRequestBuilder AuthenticatorProviders { get => + new AuthenticatorProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientAuthenticatorProviders property + public ClientAuthenticatorProvidersRequestBuilder ClientAuthenticatorProviders { get => + new ClientAuthenticatorProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// The config property + public ConfigRequestBuilder Config { get => + new ConfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The configDescription property + public ConfigDescriptionRequestBuilder ConfigDescription { get => + new ConfigDescriptionRequestBuilder(PathParameters, RequestAdapter); + } + /// The executions property + public ExecutionsRequestBuilder Executions { get => + new ExecutionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The flows property + public FlowsRequestBuilder Flows { get => + new FlowsRequestBuilder(PathParameters, RequestAdapter); + } + /// The formActionProviders property + public FormActionProvidersRequestBuilder FormActionProviders { get => + new FormActionProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// The formProviders property + public FormProvidersRequestBuilder FormProviders { get => + new FormProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// The perClientConfigDescription property + public PerClientConfigDescriptionRequestBuilder PerClientConfigDescription { get => + new PerClientConfigDescriptionRequestBuilder(PathParameters, RequestAdapter); + } + /// The registerRequiredAction property + public RegisterRequiredActionRequestBuilder RegisterRequiredAction { get => + new RegisterRequiredActionRequestBuilder(PathParameters, RequestAdapter); + } + /// The requiredActions property + public RequiredActionsRequestBuilder RequiredActions { get => + new RequiredActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The unregisteredRequiredActions property + public UnregisteredRequiredActionsRequestBuilder UnregisteredRequiredActions { get => + new UnregisteredRequiredActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AuthenticationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AuthenticationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticatorProviders/AuthenticatorProviders.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticatorProviders/AuthenticatorProviders.cs new file mode 100644 index 00000000..b56971d4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticatorProviders/AuthenticatorProviders.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.AuthenticatorProviders { + public class AuthenticatorProviders : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticatorProviders() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticatorProviders CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticatorProviders(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticatorProviders/AuthenticatorProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticatorProviders/AuthenticatorProvidersRequestBuilder.cs new file mode 100644 index 00000000..eb6c0bc1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/AuthenticatorProviders/AuthenticatorProvidersRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.AuthenticatorProviders { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\authenticator-providers + /// + public class AuthenticatorProvidersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AuthenticatorProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/authenticator-providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AuthenticatorProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/authenticator-providers", rawUrl) { + } + /// + /// Get authenticator providers Returns a stream of authenticator providers. + /// + /// A List<AuthenticatorProviders> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, AuthenticatorProviders.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get authenticator providers Returns a stream of authenticator providers. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AuthenticatorProvidersRequestBuilder WithUrl(string rawUrl) { + return new AuthenticatorProvidersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ClientAuthenticatorProviders/ClientAuthenticatorProviders.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ClientAuthenticatorProviders/ClientAuthenticatorProviders.cs new file mode 100644 index 00000000..6fb2263a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ClientAuthenticatorProviders/ClientAuthenticatorProviders.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.ClientAuthenticatorProviders { + public class ClientAuthenticatorProviders : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientAuthenticatorProviders() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientAuthenticatorProviders CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientAuthenticatorProviders(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ClientAuthenticatorProviders/ClientAuthenticatorProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ClientAuthenticatorProviders/ClientAuthenticatorProvidersRequestBuilder.cs new file mode 100644 index 00000000..fa0e902e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ClientAuthenticatorProviders/ClientAuthenticatorProvidersRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.ClientAuthenticatorProviders { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\client-authenticator-providers + /// + public class ClientAuthenticatorProvidersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientAuthenticatorProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/client-authenticator-providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientAuthenticatorProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/client-authenticator-providers", rawUrl) { + } + /// + /// Get client authenticator providers Returns a stream of client authenticator providers. + /// + /// A List<ClientAuthenticatorProviders> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientAuthenticatorProviders.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get client authenticator providers Returns a stream of client authenticator providers. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientAuthenticatorProvidersRequestBuilder WithUrl(string rawUrl) { + return new ClientAuthenticatorProvidersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Config/ConfigRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Config/ConfigRequestBuilder.cs new file mode 100644 index 00000000..d9eaf4fd --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Config/ConfigRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Config.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Config { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\config + /// + public class ConfigRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.authentication.config.item collection + /// Configuration id + /// A + public ConfigItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new ConfigItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config", rawUrl) { + } + /// + /// Create new authenticator configuration + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AuthenticatorConfigRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AuthenticatorConfigRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new authenticator configuration + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AuthenticatorConfigRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AuthenticatorConfigRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public ConfigRequestBuilder WithUrl(string rawUrl) { + return new ConfigRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Config/Item/ConfigItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Config/Item/ConfigItemRequestBuilder.cs new file mode 100644 index 00000000..dfb9424c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Config/Item/ConfigItemRequestBuilder.cs @@ -0,0 +1,139 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Config.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\config\{id} + /// + public class ConfigItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config/{id}", rawUrl) { + } + /// + /// Delete authenticator configuration + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get authenticator configuration + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, AuthenticatorConfigRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update authenticator configuration + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(AuthenticatorConfigRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(AuthenticatorConfigRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete authenticator configuration + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get authenticator configuration + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update authenticator configuration + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(AuthenticatorConfigRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(AuthenticatorConfigRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ConfigItemRequestBuilder WithUrl(string rawUrl) { + return new ConfigItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ConfigDescription/ConfigDescriptionRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ConfigDescription/ConfigDescriptionRequestBuilder.cs new file mode 100644 index 00000000..efc2e571 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ConfigDescription/ConfigDescriptionRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.ConfigDescription.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.ConfigDescription { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\config-description + /// + public class ConfigDescriptionRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.authentication.configDescription.item collection + /// Unique identifier of the item + /// A + public WithProviderItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("providerId", position); + return new WithProviderItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigDescriptionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config-description", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigDescriptionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config-description", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ConfigDescription/Item/WithProviderItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ConfigDescription/Item/WithProviderItemRequestBuilder.cs new file mode 100644 index 00000000..d00c9a69 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/ConfigDescription/Item/WithProviderItemRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.ConfigDescription.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\config-description\{providerId} + /// + public class WithProviderItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProviderItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config-description/{providerId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProviderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/config-description/{providerId}", rawUrl) { + } + /// + /// Get authenticator provider's configuration description + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, AuthenticatorConfigInfoRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get authenticator provider's configuration description + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithProviderItemRequestBuilder WithUrl(string rawUrl) { + return new WithProviderItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/ExecutionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/ExecutionsRequestBuilder.cs new file mode 100644 index 00000000..2df066a6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/ExecutionsRequestBuilder.cs @@ -0,0 +1,85 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\executions + /// + public class ExecutionsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.authentication.executions.item collection + /// Unique identifier of the item + /// A + public WithExecutionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("executionId", position); + return new WithExecutionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExecutionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExecutionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions", rawUrl) { + } + /// + /// Add new authentication execution + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AuthenticationExecutionRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AuthenticationExecutionRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Add new authentication execution + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AuthenticationExecutionRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AuthenticationExecutionRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ExecutionsRequestBuilder WithUrl(string rawUrl) { + return new ExecutionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/Config/ConfigRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/Config/ConfigRequestBuilder.cs new file mode 100644 index 00000000..60eb7afb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/Config/ConfigRequestBuilder.cs @@ -0,0 +1,86 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.Config.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.Config { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\executions\{executionId}\config + /// + public class ConfigRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.authentication.executions.item.config.item collection + /// Configuration id + /// A + [Obsolete("")] + public ConfigItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new ConfigItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/config", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/config", rawUrl) { + } + /// + /// Update execution with new configuration + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AuthenticatorConfigRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AuthenticatorConfigRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update execution with new configuration + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AuthenticatorConfigRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AuthenticatorConfigRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ConfigRequestBuilder WithUrl(string rawUrl) { + return new ConfigRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/Config/Item/ConfigItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/Config/Item/ConfigItemRequestBuilder.cs new file mode 100644 index 00000000..bd8b775e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/Config/Item/ConfigItemRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.Config.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\executions\{executionId}\config\{id} + /// + public class ConfigItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/config/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/config/{id}", rawUrl) { + } + /// + /// Get execution's configuration + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, AuthenticatorConfigRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get execution's configuration + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public ConfigItemRequestBuilder WithUrl(string rawUrl) { + return new ConfigItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/LowerPriority/LowerPriorityRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/LowerPriority/LowerPriorityRequestBuilder.cs new file mode 100644 index 00000000..6abb5618 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/LowerPriority/LowerPriorityRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.LowerPriority { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\executions\{executionId}\lower-priority + /// + public class LowerPriorityRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LowerPriorityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/lower-priority", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LowerPriorityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/lower-priority", rawUrl) { + } + /// + /// Lower execution's priority + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lower execution's priority + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public LowerPriorityRequestBuilder WithUrl(string rawUrl) { + return new LowerPriorityRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/RaisePriority/RaisePriorityRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/RaisePriority/RaisePriorityRequestBuilder.cs new file mode 100644 index 00000000..15c1dc02 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/RaisePriority/RaisePriorityRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.RaisePriority { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\executions\{executionId}\raise-priority + /// + public class RaisePriorityRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RaisePriorityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/raise-priority", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RaisePriorityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}/raise-priority", rawUrl) { + } + /// + /// Raise execution's priority + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Raise execution's priority + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RaisePriorityRequestBuilder WithUrl(string rawUrl) { + return new RaisePriorityRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/WithExecutionItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/WithExecutionItemRequestBuilder.cs new file mode 100644 index 00000000..389ba274 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Executions/Item/WithExecutionItemRequestBuilder.cs @@ -0,0 +1,116 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.Config; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.LowerPriority; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item.RaisePriority; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Executions.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\executions\{executionId} + /// + public class WithExecutionItemRequestBuilder : BaseRequestBuilder { + /// The config property + public ConfigRequestBuilder Config { get => + new ConfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The lowerPriority property + public LowerPriorityRequestBuilder LowerPriority { get => + new LowerPriorityRequestBuilder(PathParameters, RequestAdapter); + } + /// The raisePriority property + public RaisePriorityRequestBuilder RaisePriority { get => + new RaisePriorityRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithExecutionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithExecutionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/executions/{executionId}", rawUrl) { + } + /// + /// Delete execution + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get Single Execution + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete execution + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get Single Execution + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithExecutionItemRequestBuilder WithUrl(string rawUrl) { + return new WithExecutionItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/FlowsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/FlowsRequestBuilder.cs new file mode 100644 index 00000000..22c493e1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/FlowsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\flows + /// + public class FlowsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.authentication.flows.item collection + /// Flow id + /// A + public FlowAliasItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("flowAlias%2Did", position); + return new FlowAliasItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FlowsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows", rawUrl) { + } + /// + /// Get authentication flows Returns a stream of authentication flows. + /// + /// A List<AuthenticationFlowRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, AuthenticationFlowRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new authentication flow + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AuthenticationFlowRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AuthenticationFlowRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get authentication flows Returns a stream of authentication flows. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new authentication flow + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AuthenticationFlowRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AuthenticationFlowRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public FlowsRequestBuilder WithUrl(string rawUrl) { + return new FlowsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Copy/CopyPostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Copy/CopyPostRequestBody.cs new file mode 100644 index 00000000..5429d54f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Copy/CopyPostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Copy { + public class CopyPostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopyPostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static CopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CopyPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Copy/CopyRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Copy/CopyRequestBuilder.cs new file mode 100644 index 00000000..6541c0e6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Copy/CopyRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Copy { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\flows\{flowAlias-id}\copy + /// + public class CopyRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CopyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/copy", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/copy", rawUrl) { + } + /// + /// Copy existing authentication flow under a new name The new name is given as 'newName' attribute of the passed JSON object + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(CopyPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Copy existing authentication flow under a new name The new name is given as 'newName' attribute of the passed JSON object + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(CopyPostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CopyPostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CopyRequestBuilder WithUrl(string rawUrl) { + return new CopyRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Execution/ExecutionPostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Execution/ExecutionPostRequestBody.cs new file mode 100644 index 00000000..1f77683b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Execution/ExecutionPostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions.Execution { + public class ExecutionPostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ExecutionPostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ExecutionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ExecutionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Execution/ExecutionRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Execution/ExecutionRequestBuilder.cs new file mode 100644 index 00000000..b9c3c6a4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Execution/ExecutionRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions.Execution { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\flows\{flowAlias-id}\executions\execution + /// + public class ExecutionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExecutionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/executions/execution", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExecutionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/executions/execution", rawUrl) { + } + /// + /// Add new authentication execution to a flow + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ExecutionPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ExecutionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Add new authentication execution to a flow + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ExecutionPostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ExecutionPostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ExecutionRequestBuilder WithUrl(string rawUrl) { + return new ExecutionRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/ExecutionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/ExecutionsRequestBuilder.cs new file mode 100644 index 00000000..bc8b9c0c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/ExecutionsRequestBuilder.cs @@ -0,0 +1,118 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions.Execution; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions.Flow; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\flows\{flowAlias-id}\executions + /// + public class ExecutionsRequestBuilder : BaseRequestBuilder { + /// The execution property + public ExecutionRequestBuilder Execution { get => + new ExecutionRequestBuilder(PathParameters, RequestAdapter); + } + /// The flow property + public FlowRequestBuilder Flow { get => + new FlowRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExecutionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/executions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExecutionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/executions", rawUrl) { + } + /// + /// Get authentication executions for a flow + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update authentication executions of a Flow + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(AuthenticationExecutionInfoRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(AuthenticationExecutionInfoRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get authentication executions for a flow + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Update authentication executions of a Flow + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(AuthenticationExecutionInfoRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(AuthenticationExecutionInfoRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ExecutionsRequestBuilder WithUrl(string rawUrl) { + return new ExecutionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Flow/FlowPostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Flow/FlowPostRequestBody.cs new file mode 100644 index 00000000..f01411c9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Flow/FlowPostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions.Flow { + public class FlowPostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public FlowPostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static FlowPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FlowPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Flow/FlowRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Flow/FlowRequestBuilder.cs new file mode 100644 index 00000000..f48352e6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/Executions/Flow/FlowRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions.Flow { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\flows\{flowAlias-id}\executions\flow + /// + public class FlowRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FlowRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/executions/flow", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FlowRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}/executions/flow", rawUrl) { + } + /// + /// Add new flow with new execution to existing flow + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(FlowPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(FlowPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Add new flow with new execution to existing flow + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(FlowPostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(FlowPostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public FlowRequestBuilder WithUrl(string rawUrl) { + return new FlowRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/FlowAliasItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/FlowAliasItemRequestBuilder.cs new file mode 100644 index 00000000..5f9f20f5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/Flows/Item/FlowAliasItemRequestBuilder.cs @@ -0,0 +1,150 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Copy; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item.Executions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.Flows.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\flows\{flowAlias-id} + /// + public class FlowAliasItemRequestBuilder : BaseRequestBuilder { + /// The copy property + public CopyRequestBuilder Copy { get => + new CopyRequestBuilder(PathParameters, RequestAdapter); + } + /// The executions property + public ExecutionsRequestBuilder Executions { get => + new ExecutionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FlowAliasItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FlowAliasItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/flows/{flowAlias%2Did}", rawUrl) { + } + /// + /// Delete an authentication flow + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get authentication flow for id + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, AuthenticationFlowRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update an authentication flow + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(AuthenticationFlowRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(AuthenticationFlowRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete an authentication flow + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get authentication flow for id + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update an authentication flow + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(AuthenticationFlowRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(AuthenticationFlowRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public FlowAliasItemRequestBuilder WithUrl(string rawUrl) { + return new FlowAliasItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormActionProviders/FormActionProviders.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormActionProviders/FormActionProviders.cs new file mode 100644 index 00000000..98efd7f8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormActionProviders/FormActionProviders.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.FormActionProviders { + public class FormActionProviders : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public FormActionProviders() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static FormActionProviders CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FormActionProviders(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormActionProviders/FormActionProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormActionProviders/FormActionProvidersRequestBuilder.cs new file mode 100644 index 00000000..323ade68 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormActionProviders/FormActionProvidersRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.FormActionProviders { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\form-action-providers + /// + public class FormActionProvidersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FormActionProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/form-action-providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FormActionProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/form-action-providers", rawUrl) { + } + /// + /// Get form action providers Returns a stream of form action providers. + /// + /// A List<FormActionProviders> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, FormActionProviders.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get form action providers Returns a stream of form action providers. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public FormActionProvidersRequestBuilder WithUrl(string rawUrl) { + return new FormActionProvidersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormProviders/FormProviders.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormProviders/FormProviders.cs new file mode 100644 index 00000000..9c32241b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormProviders/FormProviders.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.FormProviders { + public class FormProviders : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public FormProviders() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static FormProviders CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FormProviders(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormProviders/FormProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormProviders/FormProvidersRequestBuilder.cs new file mode 100644 index 00000000..2813c3fb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/FormProviders/FormProvidersRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.FormProviders { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\form-providers + /// + public class FormProvidersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FormProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/form-providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FormProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/form-providers", rawUrl) { + } + /// + /// Get form providers Returns a stream of form providers. + /// + /// A List<FormProviders> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, FormProviders.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get form providers Returns a stream of form providers. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public FormProvidersRequestBuilder WithUrl(string rawUrl) { + return new FormProvidersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/PerClientConfigDescription/PerClientConfigDescriptionGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/PerClientConfigDescription/PerClientConfigDescriptionGetResponse.cs new file mode 100644 index 00000000..85c454bf --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/PerClientConfigDescription/PerClientConfigDescriptionGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.PerClientConfigDescription { + public class PerClientConfigDescriptionGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PerClientConfigDescriptionGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PerClientConfigDescriptionGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PerClientConfigDescriptionGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/PerClientConfigDescription/PerClientConfigDescriptionRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/PerClientConfigDescription/PerClientConfigDescriptionRequestBuilder.cs new file mode 100644 index 00000000..7890d05b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/PerClientConfigDescription/PerClientConfigDescriptionRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.PerClientConfigDescription { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\per-client-config-description + /// + public class PerClientConfigDescriptionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PerClientConfigDescriptionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/per-client-config-description", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PerClientConfigDescriptionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/per-client-config-description", rawUrl) { + } + /// + /// Get configuration descriptions for all clients + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, PerClientConfigDescriptionGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get configuration descriptions for all clients + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PerClientConfigDescriptionRequestBuilder WithUrl(string rawUrl) { + return new PerClientConfigDescriptionRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RegisterRequiredAction/RegisterRequiredActionPostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RegisterRequiredAction/RegisterRequiredActionPostRequestBody.cs new file mode 100644 index 00000000..a39c7fe4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RegisterRequiredAction/RegisterRequiredActionPostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RegisterRequiredAction { + public class RegisterRequiredActionPostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RegisterRequiredActionPostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RegisterRequiredActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RegisterRequiredActionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RegisterRequiredAction/RegisterRequiredActionRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RegisterRequiredAction/RegisterRequiredActionRequestBuilder.cs new file mode 100644 index 00000000..28a6c20d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RegisterRequiredAction/RegisterRequiredActionRequestBuilder.cs @@ -0,0 +1,74 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RegisterRequiredAction { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\register-required-action + /// + public class RegisterRequiredActionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RegisterRequiredActionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/register-required-action", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RegisterRequiredActionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/register-required-action", rawUrl) { + } + /// + /// Register a new required actions + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(RegisterRequiredActionPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RegisterRequiredActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Register a new required actions + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(RegisterRequiredActionPostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RegisterRequiredActionPostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RegisterRequiredActionRequestBuilder WithUrl(string rawUrl) { + return new RegisterRequiredActionRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/LowerPriority/LowerPriorityRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/LowerPriority/LowerPriorityRequestBuilder.cs new file mode 100644 index 00000000..9073ed9b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/LowerPriority/LowerPriorityRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions.Item.LowerPriority { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\required-actions\{alias}\lower-priority + /// + public class LowerPriorityRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LowerPriorityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions/{alias}/lower-priority", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LowerPriorityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions/{alias}/lower-priority", rawUrl) { + } + /// + /// Lower required action's priority + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lower required action's priority + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public LowerPriorityRequestBuilder WithUrl(string rawUrl) { + return new LowerPriorityRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/RaisePriority/RaisePriorityRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/RaisePriority/RaisePriorityRequestBuilder.cs new file mode 100644 index 00000000..1cac212d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/RaisePriority/RaisePriorityRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions.Item.RaisePriority { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\required-actions\{alias}\raise-priority + /// + public class RaisePriorityRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RaisePriorityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions/{alias}/raise-priority", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RaisePriorityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions/{alias}/raise-priority", rawUrl) { + } + /// + /// Raise required action's priority + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Raise required action's priority + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RaisePriorityRequestBuilder WithUrl(string rawUrl) { + return new RaisePriorityRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/WithAliasItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/WithAliasItemRequestBuilder.cs new file mode 100644 index 00000000..e878ef7d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/Item/WithAliasItemRequestBuilder.cs @@ -0,0 +1,149 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions.Item.LowerPriority; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions.Item.RaisePriority; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\required-actions\{alias} + /// + public class WithAliasItemRequestBuilder : BaseRequestBuilder { + /// The lowerPriority property + public LowerPriorityRequestBuilder LowerPriority { get => + new LowerPriorityRequestBuilder(PathParameters, RequestAdapter); + } + /// The raisePriority property + public RaisePriorityRequestBuilder RaisePriority { get => + new RaisePriorityRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAliasItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions/{alias}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAliasItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions/{alias}", rawUrl) { + } + /// + /// Delete required action + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get required action for alias + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, RequiredActionProviderRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update required action + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(RequiredActionProviderRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(RequiredActionProviderRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete required action + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get required action for alias + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update required action + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(RequiredActionProviderRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(RequiredActionProviderRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithAliasItemRequestBuilder WithUrl(string rawUrl) { + return new WithAliasItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/RequiredActionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/RequiredActionsRequestBuilder.cs new file mode 100644 index 00000000..745fda30 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/RequiredActions/RequiredActionsRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.RequiredActions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\required-actions + /// + public class RequiredActionsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.authentication.requiredActions.item collection + /// Alias of required action + /// A + public WithAliasItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("alias", position); + return new WithAliasItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RequiredActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RequiredActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/required-actions", rawUrl) { + } + /// + /// Get required actions Returns a stream of required actions. + /// + /// A List<RequiredActionProviderRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RequiredActionProviderRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get required actions Returns a stream of required actions. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RequiredActionsRequestBuilder WithUrl(string rawUrl) { + return new RequiredActionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/UnregisteredRequiredActions/UnregisteredRequiredActions.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/UnregisteredRequiredActions/UnregisteredRequiredActions.cs new file mode 100644 index 00000000..1fef8b22 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/UnregisteredRequiredActions/UnregisteredRequiredActions.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.UnregisteredRequiredActions { + public class UnregisteredRequiredActions : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UnregisteredRequiredActions() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UnregisteredRequiredActions CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UnregisteredRequiredActions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/UnregisteredRequiredActions/UnregisteredRequiredActionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/UnregisteredRequiredActions/UnregisteredRequiredActionsRequestBuilder.cs new file mode 100644 index 00000000..8a52da70 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Authentication/UnregisteredRequiredActions/UnregisteredRequiredActionsRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication.UnregisteredRequiredActions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\authentication\unregistered-required-actions + /// + public class UnregisteredRequiredActionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UnregisteredRequiredActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/unregistered-required-actions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UnregisteredRequiredActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/authentication/unregistered-required-actions", rawUrl) { + } + /// + /// Get unregistered required actions Returns a stream of unregistered required actions. + /// + /// A List<UnregisteredRequiredActions> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UnregisteredRequiredActions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get unregistered required actions Returns a stream of unregistered required actions. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UnregisteredRequiredActionsRequestBuilder WithUrl(string rawUrl) { + return new UnregisteredRequiredActionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientDescriptionConverter/ClientDescriptionConverterRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientDescriptionConverter/ClientDescriptionConverterRequestBuilder.cs new file mode 100644 index 00000000..d247fa66 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientDescriptionConverter/ClientDescriptionConverterRequestBuilder.cs @@ -0,0 +1,77 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientDescriptionConverter { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-description-converter + /// + public class ClientDescriptionConverterRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientDescriptionConverterRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-description-converter", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientDescriptionConverterRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-description-converter", rawUrl) { + } + /// + /// Base path for importing clients under this realm. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Base path for importing clients under this realm. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(string body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(string body, Action> requestConfiguration = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromScalar(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientDescriptionConverterRequestBuilder WithUrl(string rawUrl) { + return new ClientDescriptionConverterRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/ClientPoliciesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/ClientPoliciesRequestBuilder.cs new file mode 100644 index 00000000..962f8c77 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/ClientPoliciesRequestBuilder.cs @@ -0,0 +1,38 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientPolicies.Policies; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientPolicies.Profiles; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientPolicies { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-policies + /// + public class ClientPoliciesRequestBuilder : BaseRequestBuilder { + /// The policies property + public PoliciesRequestBuilder Policies { get => + new PoliciesRequestBuilder(PathParameters, RequestAdapter); + } + /// The profiles property + public ProfilesRequestBuilder Profiles { get => + new ProfilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientPoliciesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-policies", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-policies", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/Policies/PoliciesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/Policies/PoliciesRequestBuilder.cs new file mode 100644 index 00000000..61fe41fb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/Policies/PoliciesRequestBuilder.cs @@ -0,0 +1,97 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientPolicies.Policies { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-policies\policies + /// + public class PoliciesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PoliciesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-policies/policies", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-policies/policies", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientPoliciesRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ClientPoliciesRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ClientPoliciesRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ClientPoliciesRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ClientPoliciesRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PoliciesRequestBuilder WithUrl(string rawUrl) { + return new PoliciesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/Profiles/ProfilesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/Profiles/ProfilesRequestBuilder.cs new file mode 100644 index 00000000..f7fedf5f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientPolicies/Profiles/ProfilesRequestBuilder.cs @@ -0,0 +1,101 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientPolicies.Profiles { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-policies\profiles + /// + public class ProfilesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProfilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-policies/profiles{?include%2Dglobal%2Dprofiles*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProfilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-policies/profiles{?include%2Dglobal%2Dprofiles*}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientProfilesRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ClientProfilesRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ClientProfilesRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ClientProfilesRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ClientProfilesRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, "{+baseurl}/admin/realms/{realm}/client-policies/profiles", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ProfilesRequestBuilder WithUrl(string rawUrl) { + return new ProfilesRequestBuilder(rawUrl, RequestAdapter); + } + public class ProfilesRequestBuilderGetQueryParameters { + [QueryParameter("include%2Dglobal%2Dprofiles")] + public bool? IncludeGlobalProfiles { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientRegistrationPolicy/ClientRegistrationPolicyRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientRegistrationPolicy/ClientRegistrationPolicyRequestBuilder.cs new file mode 100644 index 00000000..23b41ac2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientRegistrationPolicy/ClientRegistrationPolicyRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientRegistrationPolicy.Providers; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientRegistrationPolicy { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-registration-policy + /// + public class ClientRegistrationPolicyRequestBuilder : BaseRequestBuilder { + /// The providers property + public ProvidersRequestBuilder Providers { get => + new ProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientRegistrationPolicyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-registration-policy", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientRegistrationPolicyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-registration-policy", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientRegistrationPolicy/Providers/ProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientRegistrationPolicy/Providers/ProvidersRequestBuilder.cs new file mode 100644 index 00000000..aed9c629 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientRegistrationPolicy/Providers/ProvidersRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientRegistrationPolicy.Providers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-registration-policy\providers + /// + public class ProvidersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-registration-policy/providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-registration-policy/providers", rawUrl) { + } + /// + /// Base path for retrieve providers with the configProperties properly filled + /// + /// A List<ComponentTypeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ComponentTypeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Base path for retrieve providers with the configProperties properly filled + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ProvidersRequestBuilder WithUrl(string rawUrl) { + return new ProvidersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/ClientScopesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/ClientScopesRequestBuilder.cs new file mode 100644 index 00000000..47b307fb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/ClientScopesRequestBuilder.cs @@ -0,0 +1,119 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes + /// + public class ClientScopesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientScopes.item collection + /// Unique identifier of the item + /// A + public ClientScopeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client%2Dscope%2Did", position); + return new ClientScopeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientScopesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes", rawUrl) { + } + /// + /// Get client scopes belonging to the realm Returns a list of client scopes belonging to the realm + /// + /// A List<ClientScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new client scope Client Scopeโ€™s name must be unique! + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ClientScopeRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ClientScopeRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get client scopes belonging to the realm Returns a list of client scopes belonging to the realm + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new client scope Client Scopeโ€™s name must be unique! + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ClientScopeRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ClientScopeRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientScopesRequestBuilder WithUrl(string rawUrl) { + return new ClientScopesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ClientScopeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ClientScopeItemRequestBuilder.cs new file mode 100644 index 00000000..6969bd85 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ClientScopeItemRequestBuilder.cs @@ -0,0 +1,151 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id} + /// + public class ClientScopeItemRequestBuilder : BaseRequestBuilder { + /// The protocolMappers property + public ProtocolMappersRequestBuilder ProtocolMappers { get => + new ProtocolMappersRequestBuilder(PathParameters, RequestAdapter); + } + /// The scopeMappings property + public ScopeMappingsRequestBuilder ScopeMappings { get => + new ScopeMappingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientScopeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientScopeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}", rawUrl) { + } + /// + /// Delete the client scope + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get representation of the client scope + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the client scope + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ClientScopeRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ClientScopeRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the client scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get representation of the client scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the client scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ClientScopeRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ClientScopeRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientScopeItemRequestBuilder WithUrl(string rawUrl) { + return new ClientScopeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs new file mode 100644 index 00000000..1d32c378 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.AddModels { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\protocol-mappers\add-models + /// + public class AddModelsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AddModelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/add-models", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AddModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/add-models", rawUrl) { + } + /// + /// Create multiple mappers + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Create multiple mappers + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AddModelsRequestBuilder WithUrl(string rawUrl) { + return new AddModelsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs new file mode 100644 index 00000000..304275af --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs @@ -0,0 +1,139 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.ModelsRequests.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\protocol-mappers\models\{id} + /// + public class ModelsItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ModelsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/models/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ModelsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/models/{id}", rawUrl) { + } + /// + /// Delete the mapper + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mapper by id + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the mapper + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ProtocolMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ProtocolMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the mapper + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get mapper by id + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the mapper + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ProtocolMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ProtocolMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ModelsItemRequestBuilder WithUrl(string rawUrl) { + return new ModelsItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs new file mode 100644 index 00000000..beaf3f0b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.ModelsRequests.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.ModelsRequests { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\protocol-mappers\models + /// + public class ModelsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientScopes.item.protocolMappers.modelsRequests.item collection + /// Mapper id + /// A + public ModelsItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new ModelsItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ModelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/models", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/models", rawUrl) { + } + /// + /// Get mappers + /// + /// A List<ProtocolMapperRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a mapper + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ProtocolMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ProtocolMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mappers + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a mapper + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ProtocolMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ProtocolMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ModelsRequestBuilder WithUrl(string rawUrl) { + return new ModelsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs new file mode 100644 index 00000000..cc6cff0e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.Protocol.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\protocol-mappers\protocol\{protocol} + /// + public class WithProtocolItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProtocolItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/protocol/{protocol}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProtocolItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/protocol/{protocol}", rawUrl) { + } + /// + /// Get mappers by name for a specific protocol + /// + /// A List<ProtocolMapperRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get mappers by name for a specific protocol + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithProtocolItemRequestBuilder WithUrl(string rawUrl) { + return new WithProtocolItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs new file mode 100644 index 00000000..49b71633 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.Protocol.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.Protocol { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\protocol-mappers\protocol + /// + public class ProtocolRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientScopes.item.protocolMappers.protocol.item collection + /// Unique identifier of the item + /// A + public WithProtocolItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("protocol", position); + return new WithProtocolItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtocolRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/protocol", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtocolRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers/protocol", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs new file mode 100644 index 00000000..f4fb6617 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs @@ -0,0 +1,43 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.AddModels; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.ModelsRequests; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers.Protocol; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ProtocolMappers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\protocol-mappers + /// + public class ProtocolMappersRequestBuilder : BaseRequestBuilder { + /// The addModels property + public AddModelsRequestBuilder AddModels { get => + new AddModelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The models property + public ModelsRequestBuilder Models { get => + new ModelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The protocol property + public ProtocolRequestBuilder Protocol { get => + new ProtocolRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/protocol-mappers", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..7ff30528 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientScopes.item.scopeMappings.clients.item collection + /// Unique identifier of the item + /// A + public WithClientItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client", position); + return new WithClientItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..4c6f1481 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients.Item.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings\clients\{client}\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients/{client}/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients/{client}/available", rawUrl) { + } + /// + /// The available client-level roles Returns the roles for the client that can be associated with the client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// The available client-level roles Returns the roles for the client that can be associated with the client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..bf235d25 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients.Item.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings\clients\{client}\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients/{client}/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients/{client}/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs new file mode 100644 index 00000000..83d8d43e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients.Item.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients.Item.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings\clients\{client} + /// + public class WithClientItemRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients/{client}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/clients/{client}", rawUrl) { + } + /// + /// Remove client-level roles from the client's scope. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the roles associated with a client's scope Returns roles for the client. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add client-level roles to the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove client-level roles from the client's scope. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get the roles associated with a client's scope Returns roles for the client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add client-level roles to the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..c7c0e5cb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Realm.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings\realm\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/realm/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/realm/available", rawUrl) { + } + /// + /// Get realm-level roles that are available to attach to this client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles that are available to attach to this client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..fb1c1bc0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Realm.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings\realm\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/realm/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/realm/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..a0fc3211 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/Realm/RealmRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Realm.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Realm.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings/realm", rawUrl) { + } + /// + /// Remove a set of realm-level roles from the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get realm-level roles associated with the client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add a set of realm-level roles to the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove a set of realm-level roles from the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get realm-level roles associated with the client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add a set of realm-level roles to the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs new file mode 100644 index 00000000..8971f1a1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientScopes/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes.Item.ScopeMappings { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-scopes\{client-scope-id}\scope-mappings + /// + public class ScopeMappingsRequestBuilder : BaseRequestBuilder { + /// The clients property + [Obsolete("")] + public ClientsRequestBuilder Clients { get => + new ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + [Obsolete("")] + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-scopes/{client%2Dscope%2Did}/scope-mappings", rawUrl) { + } + /// + /// Get all scope mappings for the client + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, MappingsRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get all scope mappings for the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public ScopeMappingsRequestBuilder WithUrl(string rawUrl) { + return new ScopeMappingsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientSessionStats/ClientSessionStats.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientSessionStats/ClientSessionStats.cs new file mode 100644 index 00000000..c5d5d8af --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientSessionStats/ClientSessionStats.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientSessionStats { + public class ClientSessionStats : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientSessionStats() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientSessionStats CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientSessionStats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientSessionStats/ClientSessionStatsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientSessionStats/ClientSessionStatsRequestBuilder.cs new file mode 100644 index 00000000..60d8ba7c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientSessionStats/ClientSessionStatsRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientSessionStats { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-session-stats + /// + public class ClientSessionStatsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientSessionStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-session-stats", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientSessionStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-session-stats", rawUrl) { + } + /// + /// The key is the client id, the value is the number of sessions that currently are active with that client. Only clients that actually have a session associated with them will be in this map. + /// + /// A List<ClientSessionStats> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientSessionStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// The key is the client id, the value is the number of sessions that currently are active with that client. Only clients that actually have a session associated with them will be in this map. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientSessionStatsRequestBuilder WithUrl(string rawUrl) { + return new ClientSessionStatsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/ClientTemplatesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/ClientTemplatesRequestBuilder.cs new file mode 100644 index 00000000..204bcea3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/ClientTemplatesRequestBuilder.cs @@ -0,0 +1,119 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates + /// + public class ClientTemplatesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientTemplates.item collection + /// Unique identifier of the item + /// A + public ClientScopeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client%2Dscope%2Did", position); + return new ClientScopeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientTemplatesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientTemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates", rawUrl) { + } + /// + /// Get client scopes belonging to the realm Returns a list of client scopes belonging to the realm + /// + /// A List<ClientScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new client scope Client Scopeโ€™s name must be unique! + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ClientScopeRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ClientScopeRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get client scopes belonging to the realm Returns a list of client scopes belonging to the realm + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new client scope Client Scopeโ€™s name must be unique! + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ClientScopeRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ClientScopeRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientTemplatesRequestBuilder WithUrl(string rawUrl) { + return new ClientTemplatesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ClientScopeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ClientScopeItemRequestBuilder.cs new file mode 100644 index 00000000..79d4a31d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ClientScopeItemRequestBuilder.cs @@ -0,0 +1,151 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id} + /// + public class ClientScopeItemRequestBuilder : BaseRequestBuilder { + /// The protocolMappers property + public ProtocolMappersRequestBuilder ProtocolMappers { get => + new ProtocolMappersRequestBuilder(PathParameters, RequestAdapter); + } + /// The scopeMappings property + public ScopeMappingsRequestBuilder ScopeMappings { get => + new ScopeMappingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientScopeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientScopeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}", rawUrl) { + } + /// + /// Delete the client scope + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get representation of the client scope + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the client scope + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ClientScopeRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ClientScopeRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the client scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get representation of the client scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the client scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ClientScopeRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ClientScopeRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientScopeItemRequestBuilder WithUrl(string rawUrl) { + return new ClientScopeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs new file mode 100644 index 00000000..31bb5eee --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.AddModels { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\protocol-mappers\add-models + /// + public class AddModelsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AddModelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/add-models", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AddModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/add-models", rawUrl) { + } + /// + /// Create multiple mappers + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Create multiple mappers + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AddModelsRequestBuilder WithUrl(string rawUrl) { + return new AddModelsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs new file mode 100644 index 00000000..de49c9f5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs @@ -0,0 +1,139 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.ModelsRequests.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\protocol-mappers\models\{id} + /// + public class ModelsItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ModelsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/models/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ModelsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/models/{id}", rawUrl) { + } + /// + /// Delete the mapper + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mapper by id + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the mapper + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ProtocolMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ProtocolMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the mapper + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get mapper by id + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the mapper + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ProtocolMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ProtocolMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ModelsItemRequestBuilder WithUrl(string rawUrl) { + return new ModelsItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs new file mode 100644 index 00000000..9d0c055d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.ModelsRequests.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.ModelsRequests { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\protocol-mappers\models + /// + public class ModelsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientTemplates.item.protocolMappers.modelsRequests.item collection + /// Mapper id + /// A + public ModelsItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new ModelsItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ModelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/models", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/models", rawUrl) { + } + /// + /// Get mappers + /// + /// A List<ProtocolMapperRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a mapper + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ProtocolMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ProtocolMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mappers + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a mapper + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ProtocolMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ProtocolMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ModelsRequestBuilder WithUrl(string rawUrl) { + return new ModelsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs new file mode 100644 index 00000000..22831c7f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.Protocol.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\protocol-mappers\protocol\{protocol} + /// + public class WithProtocolItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProtocolItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/protocol/{protocol}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProtocolItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/protocol/{protocol}", rawUrl) { + } + /// + /// Get mappers by name for a specific protocol + /// + /// A List<ProtocolMapperRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get mappers by name for a specific protocol + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithProtocolItemRequestBuilder WithUrl(string rawUrl) { + return new WithProtocolItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs new file mode 100644 index 00000000..ed3709d5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.Protocol.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.Protocol { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\protocol-mappers\protocol + /// + public class ProtocolRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientTemplates.item.protocolMappers.protocol.item collection + /// Unique identifier of the item + /// A + public WithProtocolItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("protocol", position); + return new WithProtocolItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtocolRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/protocol", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtocolRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers/protocol", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs new file mode 100644 index 00000000..cbe7d046 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs @@ -0,0 +1,43 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.AddModels; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.ModelsRequests; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers.Protocol; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ProtocolMappers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\protocol-mappers + /// + public class ProtocolMappersRequestBuilder : BaseRequestBuilder { + /// The addModels property + public AddModelsRequestBuilder AddModels { get => + new AddModelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The models property + public ModelsRequestBuilder Models { get => + new ModelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The protocol property + public ProtocolRequestBuilder Protocol { get => + new ProtocolRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/protocol-mappers", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..2175a757 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientTemplates.item.scopeMappings.clients.item collection + /// Unique identifier of the item + /// A + public WithClientItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client", position); + return new WithClientItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..ef7318d1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients.Item.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings\clients\{client}\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients/{client}/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients/{client}/available", rawUrl) { + } + /// + /// The available client-level roles Returns the roles for the client that can be associated with the client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// The available client-level roles Returns the roles for the client that can be associated with the client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..34ac2db0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients.Item.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings\clients\{client}\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients/{client}/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients/{client}/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs new file mode 100644 index 00000000..d0b90580 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients.Item.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients.Item.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings\clients\{client} + /// + public class WithClientItemRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients/{client}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/clients/{client}", rawUrl) { + } + /// + /// Remove client-level roles from the client's scope. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the roles associated with a client's scope Returns roles for the client. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add client-level roles to the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove client-level roles from the client's scope. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get the roles associated with a client's scope Returns roles for the client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add client-level roles to the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..559e4e1f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Realm.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings\realm\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/realm/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/realm/available", rawUrl) { + } + /// + /// Get realm-level roles that are available to attach to this client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles that are available to attach to this client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..6ee9dfce --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Realm.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings\realm\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/realm/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/realm/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..fc6474fd --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/Realm/RealmRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Realm.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Realm.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings/realm", rawUrl) { + } + /// + /// Remove a set of realm-level roles from the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get realm-level roles associated with the client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add a set of realm-level roles to the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove a set of realm-level roles from the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get realm-level roles associated with the client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add a set of realm-level roles to the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs new file mode 100644 index 00000000..0385fe96 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientTemplates/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates.Item.ScopeMappings { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\client-templates\{client-scope-id}\scope-mappings + /// + public class ScopeMappingsRequestBuilder : BaseRequestBuilder { + /// The clients property + [Obsolete("")] + public ClientsRequestBuilder Clients { get => + new ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + [Obsolete("")] + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/client-templates/{client%2Dscope%2Did}/scope-mappings", rawUrl) { + } + /// + /// Get all scope mappings for the client + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, MappingsRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get all scope mappings for the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public ScopeMappingsRequestBuilder WithUrl(string rawUrl) { + return new ScopeMappingsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..1c8496e8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,154 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item collection + /// id of client (not client-id!) + /// A + public ClientUuItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client%2Duuid", position); + return new ClientUuItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients{?clientId*,first*,max*,q*,search*,viewableOnly*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients{?clientId*,first*,max*,q*,search*,viewableOnly*}", rawUrl) { + } + /// + /// If a client canโ€™t be retrieved from the storage due to a problem with the underlying storage, it is silently removed from the returned list. This ensures that concurrent modifications to the list donโ€™t prevent callers from retrieving this list. + /// + /// A List<ClientRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new client Clientโ€™s client_id must be unique! + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ClientRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ClientRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// If a client canโ€™t be retrieved from the storage due to a problem with the underlying storage, it is silently removed from the returned list. This ensures that concurrent modifications to the list donโ€™t prevent callers from retrieving this list. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new client Clientโ€™s client_id must be unique! + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ClientRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ClientRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/clients", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientsRequestBuilder WithUrl(string rawUrl) { + return new ClientsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// If a client canโ€™t be retrieved from the storage due to a problem with the underlying storage, it is silently removed from the returned list. This ensures that concurrent modifications to the list donโ€™t prevent callers from retrieving this list. + /// + public class ClientsRequestBuilderGetQueryParameters { + /// filter by clientId +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("clientId")] + public string? ClientId { get; set; } +#nullable restore +#else + [QueryParameter("clientId")] + public string ClientId { get; set; } +#endif + /// the first result + [QueryParameter("first")] + public int? First { get; set; } + /// the max results to return + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// whether this is a search query or a getClientById query + [QueryParameter("search")] + public bool? Search { get; set; } + /// filter clients that cannot be viewed in full by admin + [QueryParameter("viewableOnly")] + public bool? ViewableOnly { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/AuthzRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/AuthzRequestBuilder.cs new file mode 100644 index 00000000..6f290727 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/AuthzRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz + /// + public class AuthzRequestBuilder : BaseRequestBuilder { + /// The resourceServer property + public ResourceServerRequestBuilder ResourceServer { get => + new ResourceServerRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AuthzRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AuthzRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Import/ImportRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Import/ImportRequestBuilder.cs new file mode 100644 index 00000000..fa261302 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Import/ImportRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Import { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\import + /// + public class ImportRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ImportRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/import", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ImportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/import", rawUrl) { + } + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ResourceServerRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ResourceServerRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ResourceServerRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ResourceServerRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ImportRequestBuilder WithUrl(string rawUrl) { + return new ImportRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Evaluate/EvaluateRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Evaluate/EvaluateRequestBuilder.cs new file mode 100644 index 00000000..774100c0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Evaluate/EvaluateRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission.Evaluate { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\permission\evaluate + /// + public class EvaluateRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EvaluateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission/evaluate", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission/evaluate", rawUrl) { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PolicyEvaluationRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PolicyEvaluationRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, PolicyEvaluationResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PolicyEvaluationRequest body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PolicyEvaluationRequest body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public EvaluateRequestBuilder WithUrl(string rawUrl) { + return new EvaluateRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/PermissionRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/PermissionRequestBuilder.cs new file mode 100644 index 00000000..c43ab9ec --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/PermissionRequestBuilder.cs @@ -0,0 +1,183 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission.Evaluate; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission.Providers; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission.Search; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\permission + /// + public class PermissionRequestBuilder : BaseRequestBuilder { + /// The evaluate property + public EvaluateRequestBuilder Evaluate { get => + new EvaluateRequestBuilder(PathParameters, RequestAdapter); + } + /// The providers property + public ProvidersRequestBuilder Providers { get => + new ProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// The search property + public SearchRequestBuilder Search { get => + new SearchRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission{?fields*,first*,max*,name*,owner*,permission*,policyId*,resource*,scope*,type*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission{?fields*,first*,max*,name*,owner*,permission*,policyId*,resource*,scope*,type*}", rawUrl) { + } + /// A List<AbstractPolicyRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, AbstractPolicyRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(string body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(string body, Action> requestConfiguration = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalar(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionRequestBuilder WithUrl(string rawUrl) { + return new PermissionRequestBuilder(rawUrl, RequestAdapter); + } + public class PermissionRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("fields")] + public string? Fields { get; set; } +#nullable restore +#else + [QueryParameter("fields")] + public string Fields { get; set; } +#endif + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif + [QueryParameter("permission")] + public bool? Permission { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("policyId")] + public string? PolicyId { get; set; } +#nullable restore +#else + [QueryParameter("policyId")] + public string PolicyId { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("resource")] + public string? Resource { get; set; } +#nullable restore +#else + [QueryParameter("resource")] + public string Resource { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Providers/ProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Providers/ProvidersRequestBuilder.cs new file mode 100644 index 00000000..6b1260cd --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Providers/ProvidersRequestBuilder.cs @@ -0,0 +1,67 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission.Providers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\permission\providers + /// + public class ProvidersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission/providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission/providers", rawUrl) { + } + /// A List<PolicyProviderRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, PolicyProviderRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ProvidersRequestBuilder WithUrl(string rawUrl) { + return new ProvidersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Search/SearchRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Search/SearchRequestBuilder.cs new file mode 100644 index 00000000..072287b2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Permission/Search/SearchRequestBuilder.cs @@ -0,0 +1,86 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission.Search { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\permission\search + /// + public class SearchRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission/search{?fields*,name*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/permission/search{?fields*,name*}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, AbstractPolicyRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SearchRequestBuilder WithUrl(string rawUrl) { + return new SearchRequestBuilder(rawUrl, RequestAdapter); + } + public class SearchRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("fields")] + public string? Fields { get; set; } +#nullable restore +#else + [QueryParameter("fields")] + public string Fields { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Evaluate/EvaluateRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Evaluate/EvaluateRequestBuilder.cs new file mode 100644 index 00000000..ea4a0d1d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Evaluate/EvaluateRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy.Evaluate { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\policy\evaluate + /// + public class EvaluateRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EvaluateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy/evaluate", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy/evaluate", rawUrl) { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PolicyEvaluationRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PolicyEvaluationRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, PolicyEvaluationResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PolicyEvaluationRequest body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PolicyEvaluationRequest body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public EvaluateRequestBuilder WithUrl(string rawUrl) { + return new EvaluateRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/PolicyRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/PolicyRequestBuilder.cs new file mode 100644 index 00000000..3de8b466 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/PolicyRequestBuilder.cs @@ -0,0 +1,183 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy.Evaluate; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy.Providers; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy.Search; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\policy + /// + public class PolicyRequestBuilder : BaseRequestBuilder { + /// The evaluate property + public EvaluateRequestBuilder Evaluate { get => + new EvaluateRequestBuilder(PathParameters, RequestAdapter); + } + /// The providers property + public ProvidersRequestBuilder Providers { get => + new ProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// The search property + public SearchRequestBuilder Search { get => + new SearchRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PolicyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy{?fields*,first*,max*,name*,owner*,permission*,policyId*,resource*,scope*,type*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PolicyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy{?fields*,first*,max*,name*,owner*,permission*,policyId*,resource*,scope*,type*}", rawUrl) { + } + /// A List<AbstractPolicyRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, AbstractPolicyRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(string body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(string body, Action> requestConfiguration = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalar(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PolicyRequestBuilder WithUrl(string rawUrl) { + return new PolicyRequestBuilder(rawUrl, RequestAdapter); + } + public class PolicyRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("fields")] + public string? Fields { get; set; } +#nullable restore +#else + [QueryParameter("fields")] + public string Fields { get; set; } +#endif + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif + [QueryParameter("permission")] + public bool? Permission { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("policyId")] + public string? PolicyId { get; set; } +#nullable restore +#else + [QueryParameter("policyId")] + public string PolicyId { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("resource")] + public string? Resource { get; set; } +#nullable restore +#else + [QueryParameter("resource")] + public string Resource { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Providers/ProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Providers/ProvidersRequestBuilder.cs new file mode 100644 index 00000000..7e15ec2d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Providers/ProvidersRequestBuilder.cs @@ -0,0 +1,67 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy.Providers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\policy\providers + /// + public class ProvidersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy/providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy/providers", rawUrl) { + } + /// A List<PolicyProviderRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, PolicyProviderRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ProvidersRequestBuilder WithUrl(string rawUrl) { + return new ProvidersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Search/SearchRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Search/SearchRequestBuilder.cs new file mode 100644 index 00000000..3537b7a0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Policy/Search/SearchRequestBuilder.cs @@ -0,0 +1,86 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy.Search { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\policy\search + /// + public class SearchRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy/search{?fields*,name*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/policy/search{?fields*,name*}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, AbstractPolicyRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SearchRequestBuilder WithUrl(string rawUrl) { + return new SearchRequestBuilder(rawUrl, RequestAdapter); + } + public class SearchRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("fields")] + public string? Fields { get; set; } +#nullable restore +#else + [QueryParameter("fields")] + public string Fields { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Attributes/AttributesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Attributes/AttributesRequestBuilder.cs new file mode 100644 index 00000000..9ce72fa9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Attributes/AttributesRequestBuilder.cs @@ -0,0 +1,130 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item.Attributes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\resource\{resource-id}\attributes + /// + public class AttributesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttributesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}/attributes{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttributesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}/attributes{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AttributesRequestBuilder WithUrl(string rawUrl) { + return new AttributesRequestBuilder(rawUrl, RequestAdapter); + } + public class AttributesRequestBuilderGetQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..669e0047 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,133 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\resource\{resource-id}\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}/permissions{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}/permissions{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", rawUrl) { + } + /// A List<PolicyRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, PolicyRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + public class PermissionsRequestBuilderGetQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/ResourceItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/ResourceItemRequestBuilder.cs new file mode 100644 index 00000000..044d41c4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/ResourceItemRequestBuilder.cs @@ -0,0 +1,334 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item.Attributes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item.Permissions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item.Scopes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\resource\{resource-id} + /// + public class ResourceItemRequestBuilder : BaseRequestBuilder { + /// The attributes property + public AttributesRequestBuilder Attributes { get => + new AttributesRequestBuilder(PathParameters, RequestAdapter); + } + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The scopes property + public ScopesRequestBuilder Scopes { get => + new ScopesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResourceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResourceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ResourceRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ResourceRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ResourceRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ResourceRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ResourceRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ResourceItemRequestBuilder WithUrl(string rawUrl) { + return new ResourceItemRequestBuilder(rawUrl, RequestAdapter); + } + public class ResourceItemRequestBuilderDeleteQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + public class ResourceItemRequestBuilderGetQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + public class ResourceItemRequestBuilderPutQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Scopes/ScopesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Scopes/ScopesRequestBuilder.cs new file mode 100644 index 00000000..754ca94c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Item/Scopes/ScopesRequestBuilder.cs @@ -0,0 +1,133 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item.Scopes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\resource\{resource-id}\scopes + /// + public class ScopesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}/scopes{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/{resource%2Did}/scopes{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", rawUrl) { + } + /// A List<ScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ScopesRequestBuilder WithUrl(string rawUrl) { + return new ScopesRequestBuilder(rawUrl, RequestAdapter); + } + public class ScopesRequestBuilderGetQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/ResourceRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/ResourceRequestBuilder.cs new file mode 100644 index 00000000..b0d54476 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/ResourceRequestBuilder.cs @@ -0,0 +1,245 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Search; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\resource + /// + public class ResourceRequestBuilder : BaseRequestBuilder { + /// The search property + public SearchRequestBuilder Search { get => + new SearchRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.authz.resourceServer.resource.item collection + /// Unique identifier of the item + /// A + public ResourceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("resource%2Did", position); + return new ResourceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResourceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResourceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", rawUrl) { + } + /// A List<ResourceRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ResourceRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ResourceRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ResourceRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ResourceRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ResourceRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ResourceRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ResourceRequestBuilder WithUrl(string rawUrl) { + return new ResourceRequestBuilder(rawUrl, RequestAdapter); + } + public class ResourceRequestBuilderGetQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + public class ResourceRequestBuilderPostQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Search/SearchRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Search/SearchRequestBuilder.cs new file mode 100644 index 00000000..2e5ddee5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Resource/Search/SearchRequestBuilder.cs @@ -0,0 +1,132 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource.Search { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\resource\search + /// + public class SearchRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/search{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/resource/search{?_id*,deep*,exactName*,first*,matchingUri*,max*,name*,owner*,scope*,type*,uri*}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ResourceRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SearchRequestBuilder WithUrl(string rawUrl) { + return new SearchRequestBuilder(rawUrl, RequestAdapter); + } + public class SearchRequestBuilderGetQueryParameters { + [QueryParameter("deep")] + public bool? Deep { get; set; } + [QueryParameter("exactName")] + public bool? ExactName { get; set; } + [QueryParameter("first")] + public int? First { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("_id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("_id")] + public string Id { get; set; } +#endif + [QueryParameter("matchingUri")] + public bool? MatchingUri { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string Owner { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("uri")] + public string? Uri { get; set; } +#nullable restore +#else + [QueryParameter("uri")] + public string Uri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/ResourceServerRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/ResourceServerRequestBuilder.cs new file mode 100644 index 00000000..4831af19 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/ResourceServerRequestBuilder.cs @@ -0,0 +1,126 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Import; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Permission; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Policy; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Resource; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Settings; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server + /// + public class ResourceServerRequestBuilder : BaseRequestBuilder { + /// The import property + public ImportRequestBuilder Import { get => + new ImportRequestBuilder(PathParameters, RequestAdapter); + } + /// The permission property + public PermissionRequestBuilder Permission { get => + new PermissionRequestBuilder(PathParameters, RequestAdapter); + } + /// The policy property + public PolicyRequestBuilder Policy { get => + new PolicyRequestBuilder(PathParameters, RequestAdapter); + } + /// The resource property + public ResourceRequestBuilder Resource { get => + new ResourceRequestBuilder(PathParameters, RequestAdapter); + } + /// The scope property + public ScopeRequestBuilder Scope { get => + new ScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// The settings property + public SettingsRequestBuilder Settings { get => + new SettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResourceServerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResourceServerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ResourceServerRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ResourceServerRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ResourceServerRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ResourceServerRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ResourceServerRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ResourceServerRequestBuilder WithUrl(string rawUrl) { + return new ResourceServerRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..4a2df966 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,67 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Item.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\scope\{scope-id}\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/{scope%2Did}/permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/{scope%2Did}/permissions", rawUrl) { + } + /// A List<PolicyRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, PolicyRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/Resources/ResourcesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/Resources/ResourcesRequestBuilder.cs new file mode 100644 index 00000000..04d22e15 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/Resources/ResourcesRequestBuilder.cs @@ -0,0 +1,67 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Item.Resources { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\scope\{scope-id}\resources + /// + public class ResourcesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResourcesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/{scope%2Did}/resources", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/{scope%2Did}/resources", rawUrl) { + } + /// A List<ResourceRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ResourceRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ResourcesRequestBuilder WithUrl(string rawUrl) { + return new ResourcesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/ScopeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/ScopeItemRequestBuilder.cs new file mode 100644 index 00000000..c45efffe --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Item/ScopeItemRequestBuilder.cs @@ -0,0 +1,133 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Item.Permissions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Item.Resources; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\scope\{scope-id} + /// + public class ScopeItemRequestBuilder : BaseRequestBuilder { + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The resources property + public ResourcesRequestBuilder Resources { get => + new ResourcesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/{scope%2Did}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/{scope%2Did}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ScopeRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ScopeRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ScopeRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ScopeRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ScopeItemRequestBuilder WithUrl(string rawUrl) { + return new ScopeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/ScopeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/ScopeRequestBuilder.cs new file mode 100644 index 00000000..4ee24d03 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/ScopeRequestBuilder.cs @@ -0,0 +1,136 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Search; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\scope + /// + public class ScopeRequestBuilder : BaseRequestBuilder { + /// The search property + public SearchRequestBuilder Search { get => + new SearchRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.authz.resourceServer.scope.item collection + /// Unique identifier of the item + /// A + public ScopeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("scope%2Did", position); + return new ScopeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope{?first*,max*,name*,scopeId*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope{?first*,max*,name*,scopeId*}", rawUrl) { + } + /// A List<ScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ScopeRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ScopeRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ScopeRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ScopeRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ScopeRequestBuilder WithUrl(string rawUrl) { + return new ScopeRequestBuilder(rawUrl, RequestAdapter); + } + public class ScopeRequestBuilderGetQueryParameters { + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scopeId")] + public string? ScopeId { get; set; } +#nullable restore +#else + [QueryParameter("scopeId")] + public string ScopeId { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Search/SearchRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Search/SearchRequestBuilder.cs new file mode 100644 index 00000000..2f5e8927 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Scope/Search/SearchRequestBuilder.cs @@ -0,0 +1,78 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Scope.Search { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\scope\search + /// + public class SearchRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/search{?name*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/scope/search{?name*}", rawUrl) { + } + /// A List<ScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SearchRequestBuilder WithUrl(string rawUrl) { + return new SearchRequestBuilder(rawUrl, RequestAdapter); + } + public class SearchRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Settings/SettingsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Settings/SettingsRequestBuilder.cs new file mode 100644 index 00000000..fd346efa --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Authz/ResourceServer/Settings/SettingsRequestBuilder.cs @@ -0,0 +1,66 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz.ResourceServer.Settings { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\authz\resource-server\settings + /// + public class SettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/settings", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/authz/resource-server/settings", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ResourceServerRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SettingsRequestBuilder WithUrl(string rawUrl) { + return new SettingsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/CertificatesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/CertificatesRequestBuilder.cs new file mode 100644 index 00000000..93c2d898 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/CertificatesRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\certificates + /// + public class CertificatesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.certificates.item collection + /// Unique identifier of the item + /// A + public WithAttrItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("attr", position); + return new WithAttrItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CertificatesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CertificatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Download/DownloadRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Download/DownloadRequestBuilder.cs new file mode 100644 index 00000000..9dad70c0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Download/DownloadRequestBuilder.cs @@ -0,0 +1,77 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.Download { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\certificates\{attr}\download + /// + public class DownloadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DownloadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/download", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DownloadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/download", rawUrl) { + } + /// + /// Get a keystore file for the client, containing private key and public certificate + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(KeyStoreConfig body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(KeyStoreConfig body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a keystore file for the client, containing private key and public certificate + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(KeyStoreConfig body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(KeyStoreConfig body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/octet-stream"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public DownloadRequestBuilder WithUrl(string rawUrl) { + return new DownloadRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Generate/GenerateRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Generate/GenerateRequestBuilder.cs new file mode 100644 index 00000000..68186de1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Generate/GenerateRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.Generate { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\certificates\{attr}\generate + /// + public class GenerateRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/generate", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/generate", rawUrl) { + } + /// + /// Generate a new certificate with new key pair + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CertificateRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Generate a new certificate with new key pair + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GenerateRequestBuilder WithUrl(string rawUrl) { + return new GenerateRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/GenerateAndDownload/GenerateAndDownloadRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/GenerateAndDownload/GenerateAndDownloadRequestBuilder.cs new file mode 100644 index 00000000..ce96dff1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/GenerateAndDownload/GenerateAndDownloadRequestBuilder.cs @@ -0,0 +1,77 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.GenerateAndDownload { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\certificates\{attr}\generate-and-download + /// + public class GenerateAndDownloadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateAndDownloadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/generate-and-download", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateAndDownloadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/generate-and-download", rawUrl) { + } + /// + /// Generate a new keypair and certificate, and get the private key fileGenerates a keypair and certificate and serves the private key in a specified keystore format.Only generated public certificate is saved in Keycloak DB - the private key is not. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(KeyStoreConfig body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(KeyStoreConfig body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Generate a new keypair and certificate, and get the private key fileGenerates a keypair and certificate and serves the private key in a specified keystore format.Only generated public certificate is saved in Keycloak DB - the private key is not. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(KeyStoreConfig body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(KeyStoreConfig body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/octet-stream"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GenerateAndDownloadRequestBuilder WithUrl(string rawUrl) { + return new GenerateAndDownloadRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Upload/UploadRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Upload/UploadRequestBuilder.cs new file mode 100644 index 00000000..98bb6a0b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/Upload/UploadRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.Upload { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\certificates\{attr}\upload + /// + public class UploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/upload", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/upload", rawUrl) { + } + /// + /// Upload certificate and eventually private key + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CertificateRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Upload certificate and eventually private key + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UploadRequestBuilder WithUrl(string rawUrl) { + return new UploadRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/UploadCertificate/UploadCertificateRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/UploadCertificate/UploadCertificateRequestBuilder.cs new file mode 100644 index 00000000..b743a255 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/UploadCertificate/UploadCertificateRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.UploadCertificate { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\certificates\{attr}\upload-certificate + /// + public class UploadCertificateRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UploadCertificateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/upload-certificate", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UploadCertificateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}/upload-certificate", rawUrl) { + } + /// + /// Upload only certificate, not private key + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CertificateRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Upload only certificate, not private key + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UploadCertificateRequestBuilder WithUrl(string rawUrl) { + return new UploadCertificateRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/WithAttrItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/WithAttrItemRequestBuilder.cs new file mode 100644 index 00000000..ff6454ca --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Certificates/Item/WithAttrItemRequestBuilder.cs @@ -0,0 +1,97 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.Download; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.Generate; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.GenerateAndDownload; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.Upload; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item.UploadCertificate; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\certificates\{attr} + /// + public class WithAttrItemRequestBuilder : BaseRequestBuilder { + /// The download property + public DownloadRequestBuilder Download { get => + new DownloadRequestBuilder(PathParameters, RequestAdapter); + } + /// The generate property + public GenerateRequestBuilder Generate { get => + new GenerateRequestBuilder(PathParameters, RequestAdapter); + } + /// The generateAndDownload property + public GenerateAndDownloadRequestBuilder GenerateAndDownload { get => + new GenerateAndDownloadRequestBuilder(PathParameters, RequestAdapter); + } + /// The upload property + public UploadRequestBuilder Upload { get => + new UploadRequestBuilder(PathParameters, RequestAdapter); + } + /// The uploadCertificate property + public UploadCertificateRequestBuilder UploadCertificate { get => + new UploadCertificateRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAttrItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAttrItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/certificates/{attr}", rawUrl) { + } + /// + /// Get key info + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CertificateRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get key info + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithAttrItemRequestBuilder WithUrl(string rawUrl) { + return new WithAttrItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientSecret/ClientSecretRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientSecret/ClientSecretRequestBuilder.cs new file mode 100644 index 00000000..0b4eb310 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientSecret/ClientSecretRequestBuilder.cs @@ -0,0 +1,110 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ClientSecret.Rotated; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ClientSecret { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\client-secret + /// + public class ClientSecretRequestBuilder : BaseRequestBuilder { + /// The rotated property + public RotatedRequestBuilder Rotated { get => + new RotatedRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientSecretRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/client-secret", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientSecretRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/client-secret", rawUrl) { + } + /// + /// Get the client secret + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CredentialRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Generate a new secret for the client + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CredentialRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the client secret + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Generate a new secret for the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientSecretRequestBuilder WithUrl(string rawUrl) { + return new ClientSecretRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientSecret/Rotated/RotatedRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientSecret/Rotated/RotatedRequestBuilder.cs new file mode 100644 index 00000000..ce37888b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientSecret/Rotated/RotatedRequestBuilder.cs @@ -0,0 +1,104 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ClientSecret.Rotated { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\client-secret\rotated + /// + public class RotatedRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RotatedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/client-secret/rotated", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RotatedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/client-secret/rotated", rawUrl) { + } + /// + /// Invalidate the rotated secret for the client + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the rotated client secret + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CredentialRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Invalidate the rotated secret for the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get the rotated client secret + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RotatedRequestBuilder WithUrl(string rawUrl) { + return new RotatedRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientUuItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientUuItemRequestBuilder.cs new file mode 100644 index 00000000..0129be30 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ClientUuItemRequestBuilder.cs @@ -0,0 +1,240 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Authz; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Certificates; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ClientSecret; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.DefaultClientScopes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Installation; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Management; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Nodes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OfflineSessionCount; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OfflineSessions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OptionalClientScopes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.PushRevocation; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.RegistrationAccessToken; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ServiceAccountUser; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.SessionCount; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.TestNodesAvailable; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.UserSessions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid} + /// + public class ClientUuItemRequestBuilder : BaseRequestBuilder { + /// The authz property + public AuthzRequestBuilder Authz { get => + new AuthzRequestBuilder(PathParameters, RequestAdapter); + } + /// The certificates property + public CertificatesRequestBuilder Certificates { get => + new CertificatesRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientSecret property + public ClientSecretRequestBuilder ClientSecret { get => + new ClientSecretRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaultClientScopes property + public DefaultClientScopesRequestBuilder DefaultClientScopes { get => + new DefaultClientScopesRequestBuilder(PathParameters, RequestAdapter); + } + /// The evaluateScopes property + public EvaluateScopesRequestBuilder EvaluateScopes { get => + new EvaluateScopesRequestBuilder(PathParameters, RequestAdapter); + } + /// The installation property + public InstallationRequestBuilder Installation { get => + new InstallationRequestBuilder(PathParameters, RequestAdapter); + } + /// The management property + public ManagementRequestBuilder Management { get => + new ManagementRequestBuilder(PathParameters, RequestAdapter); + } + /// The nodes property + public NodesRequestBuilder Nodes { get => + new NodesRequestBuilder(PathParameters, RequestAdapter); + } + /// The offlineSessionCount property + public OfflineSessionCountRequestBuilder OfflineSessionCount { get => + new OfflineSessionCountRequestBuilder(PathParameters, RequestAdapter); + } + /// The offlineSessions property + public OfflineSessionsRequestBuilder OfflineSessions { get => + new OfflineSessionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The optionalClientScopes property + public OptionalClientScopesRequestBuilder OptionalClientScopes { get => + new OptionalClientScopesRequestBuilder(PathParameters, RequestAdapter); + } + /// The protocolMappers property + public ProtocolMappersRequestBuilder ProtocolMappers { get => + new ProtocolMappersRequestBuilder(PathParameters, RequestAdapter); + } + /// The pushRevocation property + public PushRevocationRequestBuilder PushRevocation { get => + new PushRevocationRequestBuilder(PathParameters, RequestAdapter); + } + /// The registrationAccessToken property + public RegistrationAccessTokenRequestBuilder RegistrationAccessToken { get => + new RegistrationAccessTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// The roles property + public RolesRequestBuilder Roles { get => + new RolesRequestBuilder(PathParameters, RequestAdapter); + } + /// The scopeMappings property + public ScopeMappingsRequestBuilder ScopeMappings { get => + new ScopeMappingsRequestBuilder(PathParameters, RequestAdapter); + } + /// The serviceAccountUser property + public ServiceAccountUserRequestBuilder ServiceAccountUser { get => + new ServiceAccountUserRequestBuilder(PathParameters, RequestAdapter); + } + /// The sessionCount property + public SessionCountRequestBuilder SessionCount { get => + new SessionCountRequestBuilder(PathParameters, RequestAdapter); + } + /// The testNodesAvailable property + public TestNodesAvailableRequestBuilder TestNodesAvailable { get => + new TestNodesAvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The userSessions property + public UserSessionsRequestBuilder UserSessions { get => + new UserSessionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientUuItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientUuItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}", rawUrl) { + } + /// + /// Delete the client + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get representation of the client + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the client + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ClientRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ClientRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get representation of the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the client + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ClientRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ClientRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientUuItemRequestBuilder WithUrl(string rawUrl) { + return new ClientUuItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/DefaultClientScopes/DefaultClientScopesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/DefaultClientScopes/DefaultClientScopesRequestBuilder.cs new file mode 100644 index 00000000..c89b4805 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/DefaultClientScopes/DefaultClientScopesRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.DefaultClientScopes.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.DefaultClientScopes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\default-client-scopes + /// + public class DefaultClientScopesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.defaultClientScopes.item collection + /// Unique identifier of the item + /// A + public WithClientScopeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("clientScopeId", position); + return new WithClientScopeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultClientScopesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/default-client-scopes", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultClientScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/default-client-scopes", rawUrl) { + } + /// + /// Get default client scopes. Only name and ids are returned. + /// + /// A List<ClientScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get default client scopes. Only name and ids are returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public DefaultClientScopesRequestBuilder WithUrl(string rawUrl) { + return new DefaultClientScopesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/DefaultClientScopes/Item/WithClientScopeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/DefaultClientScopes/Item/WithClientScopeItemRequestBuilder.cs new file mode 100644 index 00000000..4db64c9e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/DefaultClientScopes/Item/WithClientScopeItemRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.DefaultClientScopes.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\default-client-scopes\{clientScopeId} + /// + public class WithClientScopeItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/default-client-scopes/{clientScopeId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/default-client-scopes/{clientScopeId}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientScopeItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientScopeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/EvaluateScopesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/EvaluateScopesRequestBuilder.cs new file mode 100644 index 00000000..895408f4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/EvaluateScopesRequestBuilder.cs @@ -0,0 +1,53 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.GenerateExampleAccessToken; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.GenerateExampleIdToken; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.GenerateExampleUserinfo; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ProtocolMappers; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes + /// + public class EvaluateScopesRequestBuilder : BaseRequestBuilder { + /// The generateExampleAccessToken property + public GenerateExampleAccessTokenRequestBuilder GenerateExampleAccessToken { get => + new GenerateExampleAccessTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// The generateExampleIdToken property + public GenerateExampleIdTokenRequestBuilder GenerateExampleIdToken { get => + new GenerateExampleIdTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// The generateExampleUserinfo property + public GenerateExampleUserinfoRequestBuilder GenerateExampleUserinfo { get => + new GenerateExampleUserinfoRequestBuilder(PathParameters, RequestAdapter); + } + /// The protocolMappers property + public ProtocolMappersRequestBuilder ProtocolMappers { get => + new ProtocolMappersRequestBuilder(PathParameters, RequestAdapter); + } + /// The scopeMappings property + public ScopeMappingsRequestBuilder ScopeMappings { get => + new ScopeMappingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EvaluateScopesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EvaluateScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleAccessToken/GenerateExampleAccessTokenRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleAccessToken/GenerateExampleAccessTokenRequestBuilder.cs new file mode 100644 index 00000000..6ce63d0c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleAccessToken/GenerateExampleAccessTokenRequestBuilder.cs @@ -0,0 +1,95 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.GenerateExampleAccessToken { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\generate-example-access-token + /// + public class GenerateExampleAccessTokenRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateExampleAccessTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/generate-example-access-token{?scope*,userId*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateExampleAccessTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/generate-example-access-token{?scope*,userId*}", rawUrl) { + } + /// + /// Create JSON with payload of example access token + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, AccessToken.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Create JSON with payload of example access token + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GenerateExampleAccessTokenRequestBuilder WithUrl(string rawUrl) { + return new GenerateExampleAccessTokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Create JSON with payload of example access token + /// + public class GenerateExampleAccessTokenRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("userId")] + public string? UserId { get; set; } +#nullable restore +#else + [QueryParameter("userId")] + public string UserId { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleIdToken/GenerateExampleIdTokenRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleIdToken/GenerateExampleIdTokenRequestBuilder.cs new file mode 100644 index 00000000..4ae20212 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleIdToken/GenerateExampleIdTokenRequestBuilder.cs @@ -0,0 +1,95 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.GenerateExampleIdToken { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\generate-example-id-token + /// + public class GenerateExampleIdTokenRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateExampleIdTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/generate-example-id-token{?scope*,userId*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateExampleIdTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/generate-example-id-token{?scope*,userId*}", rawUrl) { + } + /// + /// Create JSON with payload of example id token + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, IDToken.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Create JSON with payload of example id token + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GenerateExampleIdTokenRequestBuilder WithUrl(string rawUrl) { + return new GenerateExampleIdTokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Create JSON with payload of example id token + /// + public class GenerateExampleIdTokenRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("userId")] + public string? UserId { get; set; } +#nullable restore +#else + [QueryParameter("userId")] + public string UserId { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleUserinfo/GenerateExampleUserinfoGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleUserinfo/GenerateExampleUserinfoGetResponse.cs new file mode 100644 index 00000000..99654249 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleUserinfo/GenerateExampleUserinfoGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.GenerateExampleUserinfo { + public class GenerateExampleUserinfoGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GenerateExampleUserinfoGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static GenerateExampleUserinfoGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GenerateExampleUserinfoGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleUserinfo/GenerateExampleUserinfoRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleUserinfo/GenerateExampleUserinfoRequestBuilder.cs new file mode 100644 index 00000000..5701f438 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/GenerateExampleUserinfo/GenerateExampleUserinfoRequestBuilder.cs @@ -0,0 +1,94 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.GenerateExampleUserinfo { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\generate-example-userinfo + /// + public class GenerateExampleUserinfoRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateExampleUserinfoRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/generate-example-userinfo{?scope*,userId*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateExampleUserinfoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/generate-example-userinfo{?scope*,userId*}", rawUrl) { + } + /// + /// Create JSON with payload of example user info + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, GenerateExampleUserinfoGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Create JSON with payload of example user info + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GenerateExampleUserinfoRequestBuilder WithUrl(string rawUrl) { + return new GenerateExampleUserinfoRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Create JSON with payload of example user info + /// + public class GenerateExampleUserinfoRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("userId")] + public string? UserId { get; set; } +#nullable restore +#else + [QueryParameter("userId")] + public string UserId { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ProtocolMappers/ProtocolMappersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ProtocolMappers/ProtocolMappersRequestBuilder.cs new file mode 100644 index 00000000..881800a7 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ProtocolMappers/ProtocolMappersRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ProtocolMappers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\protocol-mappers + /// + public class ProtocolMappersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/protocol-mappers{?scope*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/protocol-mappers{?scope*}", rawUrl) { + } + /// + /// This means protocol mappers assigned to this client directly and protocol mappers assigned to all client scopes of this client. + /// + /// A List<ProtocolMapperEvaluationRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ProtocolMapperEvaluationRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// This means protocol mappers assigned to this client directly and protocol mappers assigned to all client scopes of this client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ProtocolMappersRequestBuilder WithUrl(string rawUrl) { + return new ProtocolMappersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// This means protocol mappers assigned to this client directly and protocol mappers assigned to all client scopes of this client. + /// + public class ProtocolMappersRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/Granted/GrantedRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/Granted/GrantedRequestBuilder.cs new file mode 100644 index 00000000..4ce9fac5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/Granted/GrantedRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings.Item.Granted { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\scope-mappings\{roleContainerId}\granted + /// + public class GrantedRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GrantedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings/{roleContainerId}/granted{?scope*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GrantedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings/{roleContainerId}/granted{?scope*}", rawUrl) { + } + /// + /// This contains scope mappings, which this client has directly, as well as scope mappings, which are granted to all client scopes, which are linked with this client. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// This contains scope mappings, which this client has directly, as well as scope mappings, which are granted to all client scopes, which are linked with this client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GrantedRequestBuilder WithUrl(string rawUrl) { + return new GrantedRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// This contains scope mappings, which this client has directly, as well as scope mappings, which are granted to all client scopes, which are linked with this client. + /// + public class GrantedRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/NotGranted/NotGrantedRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/NotGranted/NotGrantedRequestBuilder.cs new file mode 100644 index 00000000..841a6d92 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/NotGranted/NotGrantedRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings.Item.NotGranted { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\scope-mappings\{roleContainerId}\not-granted + /// + public class NotGrantedRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NotGrantedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings/{roleContainerId}/not-granted{?scope*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NotGrantedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings/{roleContainerId}/not-granted{?scope*}", rawUrl) { + } + /// + /// Defacto all the other roles of particular role container, which are not in {@link #getGrantedScopeMappings()} + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Defacto all the other roles of particular role container, which are not in {@link #getGrantedScopeMappings()} + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public NotGrantedRequestBuilder WithUrl(string rawUrl) { + return new NotGrantedRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Defacto all the other roles of particular role container, which are not in {@link #getGrantedScopeMappings()} + /// + public class NotGrantedRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/WithRoleContainerItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/WithRoleContainerItemRequestBuilder.cs new file mode 100644 index 00000000..9b3312a9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/Item/WithRoleContainerItemRequestBuilder.cs @@ -0,0 +1,38 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings.Item.Granted; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings.Item.NotGranted; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\scope-mappings\{roleContainerId} + /// + public class WithRoleContainerItemRequestBuilder : BaseRequestBuilder { + /// The granted property + public GrantedRequestBuilder Granted { get => + new GrantedRequestBuilder(PathParameters, RequestAdapter); + } + /// The notGranted property + public NotGrantedRequestBuilder NotGranted { get => + new NotGrantedRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRoleContainerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings/{roleContainerId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRoleContainerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings/{roleContainerId}", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/ScopeMappingsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/ScopeMappingsRequestBuilder.cs new file mode 100644 index 00000000..a9ebdd15 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/EvaluateScopes/ScopeMappings/ScopeMappingsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.EvaluateScopes.ScopeMappings { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\evaluate-scopes\scope-mappings + /// + public class ScopeMappingsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.evaluateScopes.scopeMappings.item collection + /// either realm name OR client UUID + /// A + public WithRoleContainerItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("roleContainerId", position); + return new WithRoleContainerItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/evaluate-scopes/scope-mappings", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/InstallationRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/InstallationRequestBuilder.cs new file mode 100644 index 00000000..9a4fce51 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/InstallationRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Installation.Providers; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Installation { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\installation + /// + public class InstallationRequestBuilder : BaseRequestBuilder { + /// The providers property + public ProvidersRequestBuilder Providers { get => + new ProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/installation", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/installation", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/Providers/Item/WithProviderItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/Providers/Item/WithProviderItemRequestBuilder.cs new file mode 100644 index 00000000..55cb6fed --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/Providers/Item/WithProviderItemRequestBuilder.cs @@ -0,0 +1,64 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Installation.Providers.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\installation\providers\{providerId} + /// + public class WithProviderItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProviderItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/installation/providers/{providerId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProviderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/installation/providers/{providerId}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithProviderItemRequestBuilder WithUrl(string rawUrl) { + return new WithProviderItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/Providers/ProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/Providers/ProvidersRequestBuilder.cs new file mode 100644 index 00000000..262a61c0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Installation/Providers/ProvidersRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Installation.Providers.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Installation.Providers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\installation\providers + /// + public class ProvidersRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.installation.providers.item collection + /// Unique identifier of the item + /// A + public WithProviderItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("providerId", position); + return new WithProviderItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/installation/providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/installation/providers", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Management/ManagementRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Management/ManagementRequestBuilder.cs new file mode 100644 index 00000000..dd5ff9e8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Management/ManagementRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Management.Permissions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Management { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\management + /// + public class ManagementRequestBuilder : BaseRequestBuilder { + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/management", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/management", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Management/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Management/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..8c1e2387 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Management/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Management.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\management\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/management/permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/management/permissions", rawUrl) { + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ManagementPermissionReference body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ManagementPermissionReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/Item/WithNodeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/Item/WithNodeItemRequestBuilder.cs new file mode 100644 index 00000000..4787fd25 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/Item/WithNodeItemRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Nodes.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\nodes\{node} + /// + public class WithNodeItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNodeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/nodes/{node}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNodeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/nodes/{node}", rawUrl) { + } + /// + /// Unregister a cluster node from the client + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Unregister a cluster node from the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithNodeItemRequestBuilder WithUrl(string rawUrl) { + return new WithNodeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/NodesPostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/NodesPostRequestBody.cs new file mode 100644 index 00000000..27ba84d6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/NodesPostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Nodes { + public class NodesPostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NodesPostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static NodesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new NodesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/NodesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/NodesRequestBuilder.cs new file mode 100644 index 00000000..27c543dc --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Nodes/NodesRequestBuilder.cs @@ -0,0 +1,83 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Nodes.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Nodes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\nodes + /// + public class NodesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.nodes.item collection + /// Unique identifier of the item + /// A + public WithNodeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("node", position); + return new WithNodeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NodesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/nodes", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NodesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/nodes", rawUrl) { + } + /// + /// Register a cluster node with the client Manually register cluster node to this client - usually itโ€™s not needed to call this directly as adapter should handle by sending registration request to Keycloak + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(NodesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(NodesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Register a cluster node with the client Manually register cluster node to this client - usually itโ€™s not needed to call this directly as adapter should handle by sending registration request to Keycloak + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(NodesPostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(NodesPostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public NodesRequestBuilder WithUrl(string rawUrl) { + return new NodesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessionCount/OfflineSessionCountGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessionCount/OfflineSessionCountGetResponse.cs new file mode 100644 index 00000000..5d72f8b5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessionCount/OfflineSessionCountGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OfflineSessionCount { + public class OfflineSessionCountGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OfflineSessionCountGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static OfflineSessionCountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OfflineSessionCountGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessionCount/OfflineSessionCountRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessionCount/OfflineSessionCountRequestBuilder.cs new file mode 100644 index 00000000..d5cc58a6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessionCount/OfflineSessionCountRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OfflineSessionCount { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\offline-session-count + /// + public class OfflineSessionCountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OfflineSessionCountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/offline-session-count", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OfflineSessionCountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/offline-session-count", rawUrl) { + } + /// + /// Get application offline session count Returns a number of offline user sessions associated with this client { "count": number } + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, OfflineSessionCountGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get application offline session count Returns a number of offline user sessions associated with this client { "count": number } + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public OfflineSessionCountRequestBuilder WithUrl(string rawUrl) { + return new OfflineSessionCountRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessions/OfflineSessionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessions/OfflineSessionsRequestBuilder.cs new file mode 100644 index 00000000..a8ffb5d5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OfflineSessions/OfflineSessionsRequestBuilder.cs @@ -0,0 +1,84 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OfflineSessions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\offline-sessions + /// + public class OfflineSessionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OfflineSessionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/offline-sessions{?first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OfflineSessionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/offline-sessions{?first*,max*}", rawUrl) { + } + /// + /// Get offline sessions for client Returns a list of offline user sessions associated with this client + /// + /// A List<UserSessionRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserSessionRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get offline sessions for client Returns a list of offline user sessions associated with this client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public OfflineSessionsRequestBuilder WithUrl(string rawUrl) { + return new OfflineSessionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get offline sessions for client Returns a list of offline user sessions associated with this client + /// + public class OfflineSessionsRequestBuilderGetQueryParameters { + /// Paging offset + [QueryParameter("first")] + public int? First { get; set; } + /// Maximum results size (defaults to 100) + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OptionalClientScopes/Item/WithClientScopeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OptionalClientScopes/Item/WithClientScopeItemRequestBuilder.cs new file mode 100644 index 00000000..c809e900 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OptionalClientScopes/Item/WithClientScopeItemRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OptionalClientScopes.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\optional-client-scopes\{clientScopeId} + /// + public class WithClientScopeItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/optional-client-scopes/{clientScopeId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/optional-client-scopes/{clientScopeId}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientScopeItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientScopeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OptionalClientScopes/OptionalClientScopesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OptionalClientScopes/OptionalClientScopesRequestBuilder.cs new file mode 100644 index 00000000..662926f2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/OptionalClientScopes/OptionalClientScopesRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OptionalClientScopes.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.OptionalClientScopes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\optional-client-scopes + /// + public class OptionalClientScopesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.optionalClientScopes.item collection + /// Unique identifier of the item + /// A + public WithClientScopeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("clientScopeId", position); + return new WithClientScopeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OptionalClientScopesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/optional-client-scopes", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OptionalClientScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/optional-client-scopes", rawUrl) { + } + /// + /// Get optional client scopes. Only name and ids are returned. + /// + /// A List<ClientScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get optional client scopes. Only name and ids are returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public OptionalClientScopesRequestBuilder WithUrl(string rawUrl) { + return new OptionalClientScopesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs new file mode 100644 index 00000000..ba54a563 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/AddModels/AddModelsRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.AddModels { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\protocol-mappers\add-models + /// + public class AddModelsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AddModelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/add-models", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AddModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/add-models", rawUrl) { + } + /// + /// Create multiple mappers + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Create multiple mappers + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AddModelsRequestBuilder WithUrl(string rawUrl) { + return new AddModelsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs new file mode 100644 index 00000000..1efd48f0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ModelsRequests/Item/ModelsItemRequestBuilder.cs @@ -0,0 +1,139 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.ModelsRequests.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\protocol-mappers\models\{id} + /// + public class ModelsItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ModelsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/models/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ModelsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/models/{id}", rawUrl) { + } + /// + /// Delete the mapper + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mapper by id + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the mapper + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ProtocolMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ProtocolMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the mapper + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get mapper by id + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the mapper + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ProtocolMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ProtocolMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ModelsItemRequestBuilder WithUrl(string rawUrl) { + return new ModelsItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs new file mode 100644 index 00000000..efd15a34 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ModelsRequests/ModelsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.ModelsRequests.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.ModelsRequests { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\protocol-mappers\models + /// + public class ModelsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.protocolMappers.modelsRequests.item collection + /// Mapper id + /// A + public ModelsItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new ModelsItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ModelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/models", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/models", rawUrl) { + } + /// + /// Get mappers + /// + /// A List<ProtocolMapperRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a mapper + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ProtocolMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ProtocolMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mappers + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a mapper + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ProtocolMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ProtocolMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ModelsRequestBuilder WithUrl(string rawUrl) { + return new ModelsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs new file mode 100644 index 00000000..b5ff15fe --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/Protocol/Item/WithProtocolItemRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.Protocol.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\protocol-mappers\protocol\{protocol} + /// + public class WithProtocolItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProtocolItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/protocol/{protocol}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProtocolItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/protocol/{protocol}", rawUrl) { + } + /// + /// Get mappers by name for a specific protocol + /// + /// A List<ProtocolMapperRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ProtocolMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get mappers by name for a specific protocol + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithProtocolItemRequestBuilder WithUrl(string rawUrl) { + return new WithProtocolItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs new file mode 100644 index 00000000..ab9c3c6b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/Protocol/ProtocolRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.Protocol.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.Protocol { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\protocol-mappers\protocol + /// + public class ProtocolRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.protocolMappers.protocol.item collection + /// Unique identifier of the item + /// A + public WithProtocolItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("protocol", position); + return new WithProtocolItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtocolRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/protocol", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtocolRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers/protocol", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs new file mode 100644 index 00000000..dd82a339 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ProtocolMappers/ProtocolMappersRequestBuilder.cs @@ -0,0 +1,43 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.AddModels; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.ModelsRequests; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers.Protocol; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ProtocolMappers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\protocol-mappers + /// + public class ProtocolMappersRequestBuilder : BaseRequestBuilder { + /// The addModels property + public AddModelsRequestBuilder AddModels { get => + new AddModelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The models property + public ModelsRequestBuilder Models { get => + new ModelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The protocol property + public ProtocolRequestBuilder Protocol { get => + new ProtocolRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtocolMappersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/protocol-mappers", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/PushRevocation/PushRevocationRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/PushRevocation/PushRevocationRequestBuilder.cs new file mode 100644 index 00000000..bf0e80f3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/PushRevocation/PushRevocationRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.PushRevocation { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\push-revocation + /// + public class PushRevocationRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PushRevocationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/push-revocation", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PushRevocationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/push-revocation", rawUrl) { + } + /// + /// Push the client's revocation policy to its admin URL If the client has an admin URL, push revocation policy to it. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, GlobalRequestResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Push the client's revocation policy to its admin URL If the client has an admin URL, push revocation policy to it. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PushRevocationRequestBuilder WithUrl(string rawUrl) { + return new PushRevocationRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/RegistrationAccessToken/RegistrationAccessTokenRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/RegistrationAccessToken/RegistrationAccessTokenRequestBuilder.cs new file mode 100644 index 00000000..a4127a57 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/RegistrationAccessToken/RegistrationAccessTokenRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.RegistrationAccessToken { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\registration-access-token + /// + public class RegistrationAccessTokenRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RegistrationAccessTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/registration-access-token", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RegistrationAccessTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/registration-access-token", rawUrl) { + } + /// + /// Generate a new registration access token for the client + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Generate a new registration access token for the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RegistrationAccessTokenRequestBuilder WithUrl(string rawUrl) { + return new RegistrationAccessTokenRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..e6a7d7bb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\composites\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.roles.item.composites.clients.item collection + /// Unique identifier of the item + /// A + public Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients.Item.ClientUuItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client%2Duuid", position); + return new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients.Item.ClientUuItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Clients/Item/ClientUuItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Clients/Item/ClientUuItemRequestBuilder.cs new file mode 100644 index 00000000..9b903256 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Clients/Item/ClientUuItemRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\composites\clients\{client-uuid} + /// + public class ClientUuItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientUuItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites/clients/{client%2Duuid}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientUuItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites/clients/{client%2Duuid}", rawUrl) { + } + /// + /// Get client-level roles for the client that are in the role's composite + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get client-level roles for the client that are in the role's composite + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientUuItemRequestBuilder WithUrl(string rawUrl) { + return new ClientUuItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/CompositesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/CompositesRequestBuilder.cs new file mode 100644 index 00000000..519f5417 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/CompositesRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\composites + /// + public class CompositesRequestBuilder : BaseRequestBuilder { + /// The clients property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients.ClientsRequestBuilder Clients { get => + new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Clients.ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites", rawUrl) { + } + /// + /// Remove roles from the role's composite + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get composites of the role + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add a composite to the role + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove roles from the role's composite + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get composites of the role + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add a composite to the role + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositesRequestBuilder WithUrl(string rawUrl) { + return new CompositesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..b807c503 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Composites/Realm/RealmRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\composites\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/composites/realm", rawUrl) { + } + /// + /// Get realm-level roles of the role's composite + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles of the role's composite + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Groups/GroupsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Groups/GroupsRequestBuilder.cs new file mode 100644 index 00000000..fb7984f2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Groups/GroupsRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Groups { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\groups + /// + public class GroupsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/groups{?briefRepresentation*,first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/groups{?briefRepresentation*,first*,max*}", rawUrl) { + } + /// + /// Returns a stream of groups that have the specified role name + /// + /// A List<GroupRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Returns a stream of groups that have the specified role name + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GroupsRequestBuilder WithUrl(string rawUrl) { + return new GroupsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns a stream of groups that have the specified role name + /// + public class GroupsRequestBuilderGetQueryParameters { + /// if false, return a full representation of the {@code GroupRepresentation} objects. + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + /// first result to return. Ignored if negative or {@code null}. + [QueryParameter("first")] + public int? First { get; set; } + /// maximum number of results to return. Ignored if negative or {@code null}. + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Management/ManagementRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Management/ManagementRequestBuilder.cs new file mode 100644 index 00000000..f2c9ad0d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Management/ManagementRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Management.Permissions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Management { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\management + /// + public class ManagementRequestBuilder : BaseRequestBuilder { + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/management", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/management", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Management/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Management/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..7facddee --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Management/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Management.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\management\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/management/permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/management/permissions", rawUrl) { + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ManagementPermissionReference body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ManagementPermissionReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/RoleNameItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/RoleNameItemRequestBuilder.cs new file mode 100644 index 00000000..7b6532a8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/RoleNameItemRequestBuilder.cs @@ -0,0 +1,160 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Composites; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Groups; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Management; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Users; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name} + /// + public class RoleNameItemRequestBuilder : BaseRequestBuilder { + /// The composites property + public CompositesRequestBuilder Composites { get => + new CompositesRequestBuilder(PathParameters, RequestAdapter); + } + /// The groups property + public GroupsRequestBuilder Groups { get => + new GroupsRequestBuilder(PathParameters, RequestAdapter); + } + /// The management property + public ManagementRequestBuilder Management { get => + new ManagementRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public UsersRequestBuilder Users { get => + new UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}", rawUrl) { + } + /// + /// Delete a role by name + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a role by name + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a role by name + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(RoleRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(RoleRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a role by name + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get a role by name + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update a role by name + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(RoleRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(RoleRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RoleNameItemRequestBuilder WithUrl(string rawUrl) { + return new RoleNameItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Users/UsersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Users/UsersRequestBuilder.cs new file mode 100644 index 00000000..f872f9d1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/Item/Users/UsersRequestBuilder.cs @@ -0,0 +1,84 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item.Users { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles\{role-name}\users + /// + public class UsersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/users{?first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles/{role%2Dname}/users{?first*,max*}", rawUrl) { + } + /// + /// Returns a stream of users that have the specified role name. + /// + /// A List<UserRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Returns a stream of users that have the specified role name. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UsersRequestBuilder WithUrl(string rawUrl) { + return new UsersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns a stream of users that have the specified role name. + /// + public class UsersRequestBuilderGetQueryParameters { + /// first result to return. Ignored if negative or {@code null}. + [QueryParameter("first")] + public int? First { get; set; } + /// maximum number of results to return. Ignored if negative or {@code null}. + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/RolesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/RolesRequestBuilder.cs new file mode 100644 index 00000000..950b295b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/Roles/RolesRequestBuilder.cs @@ -0,0 +1,139 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.Roles { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\roles + /// + public class RolesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.roles.item collection + /// role's name (not id!) + /// A + public RoleNameItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("role%2Dname", position); + return new RoleNameItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles{?briefRepresentation*,first*,max*,search*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles{?briefRepresentation*,first*,max*,search*}", rawUrl) { + } + /// + /// Get all roles for the realm or client + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new role for the realm or client + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(RoleRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RoleRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get all roles for the realm or client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new role for the realm or client + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(RoleRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RoleRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/roles", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RolesRequestBuilder WithUrl(string rawUrl) { + return new RolesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get all roles for the realm or client + /// + public class RolesRequestBuilderGetQueryParameters { + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..1b2d39d1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clients.item.scopeMappings.clients.item collection + /// Unique identifier of the item + /// A + public WithClientItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client", position); + return new WithClientItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..44e15774 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.Item.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings\clients\{client}\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients/{client}/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients/{client}/available", rawUrl) { + } + /// + /// The available client-level roles Returns the roles for the client that can be associated with the client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// The available client-level roles Returns the roles for the client that can be associated with the client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..9b958156 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.Item.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings\clients\{client}\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients/{client}/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients/{client}/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get effective client roles Returns the roles for the client that are associated with the client's scope. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs new file mode 100644 index 00000000..c455072d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Clients/Item/WithClientItemRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.Item.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.Item.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings\clients\{client} + /// + public class WithClientItemRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients/{client}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/clients/{client}", rawUrl) { + } + /// + /// Remove client-level roles from the client's scope. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the roles associated with a client's scope Returns roles for the client. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add client-level roles to the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove client-level roles from the client's scope. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get the roles associated with a client's scope Returns roles for the client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add client-level roles to the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..4753f11e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Realm.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings\realm\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/realm/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/realm/available", rawUrl) { + } + /// + /// Get realm-level roles that are available to attach to this client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles that are available to attach to this client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..dd7b4fde --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Realm.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings\realm\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/realm/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/realm/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The method is really to show a comprehensive total view of realm-level roles associated with the client. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..80b5ae7c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/Realm/RealmRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Realm.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Realm.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings/realm", rawUrl) { + } + /// + /// Remove a set of realm-level roles from the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get realm-level roles associated with the client's scope + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add a set of realm-level roles to the client's scope + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove a set of realm-level roles from the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get realm-level roles associated with the client's scope + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add a set of realm-level roles to the client's scope + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs new file mode 100644 index 00000000..633aaa35 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ScopeMappings/ScopeMappingsRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\scope-mappings + /// + public class ScopeMappingsRequestBuilder : BaseRequestBuilder { + /// The clients property + [Obsolete("")] + public Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.ClientsRequestBuilder Clients { get => + new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ScopeMappings.Clients.ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + [Obsolete("")] + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopeMappingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/scope-mappings", rawUrl) { + } + /// + /// Get all scope mappings for the client + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, MappingsRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get all scope mappings for the client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public ScopeMappingsRequestBuilder WithUrl(string rawUrl) { + return new ScopeMappingsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ServiceAccountUser/ServiceAccountUserRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ServiceAccountUser/ServiceAccountUserRequestBuilder.cs new file mode 100644 index 00000000..81a3c00d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/ServiceAccountUser/ServiceAccountUserRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.ServiceAccountUser { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\service-account-user + /// + public class ServiceAccountUserRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceAccountUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/service-account-user", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceAccountUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/service-account-user", rawUrl) { + } + /// + /// Get a user dedicated to the service account + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, UserRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a user dedicated to the service account + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ServiceAccountUserRequestBuilder WithUrl(string rawUrl) { + return new ServiceAccountUserRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/SessionCount/SessionCountGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/SessionCount/SessionCountGetResponse.cs new file mode 100644 index 00000000..9c1bdf88 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/SessionCount/SessionCountGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.SessionCount { + public class SessionCountGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SessionCountGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static SessionCountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SessionCountGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/SessionCount/SessionCountRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/SessionCount/SessionCountRequestBuilder.cs new file mode 100644 index 00000000..35be0faa --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/SessionCount/SessionCountRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.SessionCount { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\session-count + /// + public class SessionCountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SessionCountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/session-count", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SessionCountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/session-count", rawUrl) { + } + /// + /// Get application session count Returns a number of user sessions associated with this client { "count": number } + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, SessionCountGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get application session count Returns a number of user sessions associated with this client { "count": number } + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SessionCountRequestBuilder WithUrl(string rawUrl) { + return new SessionCountRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/TestNodesAvailable/TestNodesAvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/TestNodesAvailable/TestNodesAvailableRequestBuilder.cs new file mode 100644 index 00000000..db25a07a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/TestNodesAvailable/TestNodesAvailableRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.TestNodesAvailable { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\test-nodes-available + /// + public class TestNodesAvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TestNodesAvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/test-nodes-available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TestNodesAvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/test-nodes-available", rawUrl) { + } + /// + /// Test if registered cluster nodes are available Tests availability by sending 'ping' request to all cluster nodes. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, GlobalRequestResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Test if registered cluster nodes are available Tests availability by sending 'ping' request to all cluster nodes. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public TestNodesAvailableRequestBuilder WithUrl(string rawUrl) { + return new TestNodesAvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/UserSessions/UserSessionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/UserSessions/UserSessionsRequestBuilder.cs new file mode 100644 index 00000000..5de95948 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Clients/Item/UserSessions/UserSessionsRequestBuilder.cs @@ -0,0 +1,84 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients.Item.UserSessions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients\{client-uuid}\user-sessions + /// + public class UserSessionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserSessionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/user-sessions{?first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserSessionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients/{client%2Duuid}/user-sessions{?first*,max*}", rawUrl) { + } + /// + /// Get user sessions for client Returns a list of user sessions associated with this client + /// + /// A List<UserSessionRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserSessionRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get user sessions for client Returns a list of user sessions associated with this client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UserSessionsRequestBuilder WithUrl(string rawUrl) { + return new UserSessionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get user sessions for client Returns a list of user sessions associated with this client + /// + public class UserSessionsRequestBuilderGetQueryParameters { + /// Paging offset + [QueryParameter("first")] + public int? First { get; set; } + /// Maximum results size (defaults to 100) + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientsInitialAccess/ClientsInitialAccessRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientsInitialAccess/ClientsInitialAccessRequestBuilder.cs new file mode 100644 index 00000000..032622bb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientsInitialAccess/ClientsInitialAccessRequestBuilder.cs @@ -0,0 +1,114 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientsInitialAccess.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientsInitialAccess { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients-initial-access + /// + public class ClientsInitialAccessRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.clientsInitialAccess.item collection + /// Unique identifier of the item + /// A + public ClientsInitialAccessItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new ClientsInitialAccessItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsInitialAccessRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients-initial-access", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsInitialAccessRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients-initial-access", rawUrl) { + } + /// A List<ClientInitialAccessPresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientInitialAccessPresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new initial access token. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ClientInitialAccessCreatePresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ClientInitialAccessCreatePresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ClientInitialAccessCreatePresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new initial access token. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ClientInitialAccessCreatePresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ClientInitialAccessCreatePresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientsInitialAccessRequestBuilder WithUrl(string rawUrl) { + return new ClientsInitialAccessRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientsInitialAccess/Item/ClientsInitialAccessItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientsInitialAccess/Item/ClientsInitialAccessItemRequestBuilder.cs new file mode 100644 index 00000000..978f8d1b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/ClientsInitialAccess/Item/ClientsInitialAccessItemRequestBuilder.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientsInitialAccess.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\clients-initial-access\{id} + /// + public class ClientsInitialAccessItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsInitialAccessItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients-initial-access/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsInitialAccessItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/clients-initial-access/{id}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientsInitialAccessItemRequestBuilder WithUrl(string rawUrl) { + return new ClientsInitialAccessItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/ComponentsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/ComponentsRequestBuilder.cs new file mode 100644 index 00000000..051f1c38 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/ComponentsRequestBuilder.cs @@ -0,0 +1,136 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Components.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Components { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\components + /// + public class ComponentsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.components.item collection + /// Unique identifier of the item + /// A + public ComponentsItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new ComponentsItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ComponentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/components{?name*,parent*,type*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ComponentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/components{?name*,parent*,type*}", rawUrl) { + } + /// A List<ComponentRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ComponentRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ComponentRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ComponentRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ComponentRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ComponentRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/components", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ComponentsRequestBuilder WithUrl(string rawUrl) { + return new ComponentsRequestBuilder(rawUrl, RequestAdapter); + } + public class ComponentsRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("parent")] + public string? Parent { get; set; } +#nullable restore +#else + [QueryParameter("parent")] + public string Parent { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/Item/ComponentsItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/Item/ComponentsItemRequestBuilder.cs new file mode 100644 index 00000000..c533176c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/Item/ComponentsItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Components.Item.SubComponentTypes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Components.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\components\{id} + /// + public class ComponentsItemRequestBuilder : BaseRequestBuilder { + /// The subComponentTypes property + public SubComponentTypesRequestBuilder SubComponentTypes { get => + new SubComponentTypesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ComponentsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/components/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ComponentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/components/{id}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ComponentRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ComponentRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ComponentRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ComponentRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ComponentRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ComponentsItemRequestBuilder WithUrl(string rawUrl) { + return new ComponentsItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/Item/SubComponentTypes/SubComponentTypesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/Item/SubComponentTypes/SubComponentTypesRequestBuilder.cs new file mode 100644 index 00000000..1d123b0d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Components/Item/SubComponentTypes/SubComponentTypesRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Components.Item.SubComponentTypes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\components\{id}\sub-component-types + /// + public class SubComponentTypesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubComponentTypesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/components/{id}/sub-component-types{?type*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubComponentTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/components/{id}/sub-component-types{?type*}", rawUrl) { + } + /// + /// List of subcomponent types that are available to configure for a particular parent component. + /// + /// A List<ComponentTypeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ComponentTypeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// List of subcomponent types that are available to configure for a particular parent component. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SubComponentTypesRequestBuilder WithUrl(string rawUrl) { + return new SubComponentTypesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List of subcomponent types that are available to configure for a particular parent component. + /// + public class SubComponentTypesRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/CredentialRegistrators/CredentialRegistratorsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/CredentialRegistrators/CredentialRegistratorsRequestBuilder.cs new file mode 100644 index 00000000..51a8720e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/CredentialRegistrators/CredentialRegistratorsRequestBuilder.cs @@ -0,0 +1,66 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.CredentialRegistrators { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\credential-registrators + /// + public class CredentialRegistratorsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CredentialRegistratorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/credential-registrators", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CredentialRegistratorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/credential-registrators", rawUrl) { + } + /// A List<string> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CredentialRegistratorsRequestBuilder WithUrl(string rawUrl) { + return new CredentialRegistratorsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultDefaultClientScopes/DefaultDefaultClientScopesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultDefaultClientScopes/DefaultDefaultClientScopesRequestBuilder.cs new file mode 100644 index 00000000..1989dad9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultDefaultClientScopes/DefaultDefaultClientScopesRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultDefaultClientScopes.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultDefaultClientScopes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\default-default-client-scopes + /// + public class DefaultDefaultClientScopesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.defaultDefaultClientScopes.item collection + /// Unique identifier of the item + /// A + public WithClientScopeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("clientScopeId", position); + return new WithClientScopeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultDefaultClientScopesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-default-client-scopes", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultDefaultClientScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-default-client-scopes", rawUrl) { + } + /// + /// Get realm default client scopes. Only name and ids are returned. + /// + /// A List<ClientScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm default client scopes. Only name and ids are returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public DefaultDefaultClientScopesRequestBuilder WithUrl(string rawUrl) { + return new DefaultDefaultClientScopesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultDefaultClientScopes/Item/WithClientScopeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultDefaultClientScopes/Item/WithClientScopeItemRequestBuilder.cs new file mode 100644 index 00000000..3e25e7bd --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultDefaultClientScopes/Item/WithClientScopeItemRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultDefaultClientScopes.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\default-default-client-scopes\{clientScopeId} + /// + public class WithClientScopeItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-default-client-scopes/{clientScopeId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-default-client-scopes/{clientScopeId}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientScopeItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientScopeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultGroups/DefaultGroupsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultGroups/DefaultGroupsRequestBuilder.cs new file mode 100644 index 00000000..42e60cd4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultGroups/DefaultGroupsRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultGroups.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultGroups { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\default-groups + /// + public class DefaultGroupsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.defaultGroups.item collection + /// Unique identifier of the item + /// A + public WithGroupItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("groupId", position); + return new WithGroupItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultGroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-groups", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-groups", rawUrl) { + } + /// + /// Get group hierarchy. Only name and ids are returned. + /// + /// A List<GroupRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get group hierarchy. Only name and ids are returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public DefaultGroupsRequestBuilder WithUrl(string rawUrl) { + return new DefaultGroupsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultGroups/Item/WithGroupItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultGroups/Item/WithGroupItemRequestBuilder.cs new file mode 100644 index 00000000..da29b729 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultGroups/Item/WithGroupItemRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultGroups.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\default-groups\{groupId} + /// + public class WithGroupItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithGroupItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-groups/{groupId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithGroupItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-groups/{groupId}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithGroupItemRequestBuilder WithUrl(string rawUrl) { + return new WithGroupItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultOptionalClientScopes/DefaultOptionalClientScopesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultOptionalClientScopes/DefaultOptionalClientScopesRequestBuilder.cs new file mode 100644 index 00000000..83950407 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultOptionalClientScopes/DefaultOptionalClientScopesRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultOptionalClientScopes.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultOptionalClientScopes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\default-optional-client-scopes + /// + public class DefaultOptionalClientScopesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.defaultOptionalClientScopes.item collection + /// Unique identifier of the item + /// A + public WithClientScopeItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("clientScopeId", position); + return new WithClientScopeItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultOptionalClientScopesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-optional-client-scopes", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultOptionalClientScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-optional-client-scopes", rawUrl) { + } + /// + /// Get realm optional client scopes. Only name and ids are returned. + /// + /// A List<ClientScopeRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, ClientScopeRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm optional client scopes. Only name and ids are returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public DefaultOptionalClientScopesRequestBuilder WithUrl(string rawUrl) { + return new DefaultOptionalClientScopesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultOptionalClientScopes/Item/WithClientScopeItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultOptionalClientScopes/Item/WithClientScopeItemRequestBuilder.cs new file mode 100644 index 00000000..2ad384f8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/DefaultOptionalClientScopes/Item/WithClientScopeItemRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultOptionalClientScopes.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\default-optional-client-scopes\{clientScopeId} + /// + public class WithClientScopeItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-optional-client-scopes/{clientScopeId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientScopeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/default-optional-client-scopes/{clientScopeId}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientScopeItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientScopeItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Events/Config/ConfigRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Events/Config/ConfigRequestBuilder.cs new file mode 100644 index 00000000..e2d42ef5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Events/Config/ConfigRequestBuilder.cs @@ -0,0 +1,108 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Events.Config { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\events\config + /// + public class ConfigRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/events/config", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/events/config", rawUrl) { + } + /// + /// Get the events provider configuration Returns JSON object with events provider configuration + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, RealmEventsConfigRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the events provider Change the events provider and/or its configuration + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(RealmEventsConfigRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(RealmEventsConfigRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the events provider configuration Returns JSON object with events provider configuration + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the events provider Change the events provider and/or its configuration + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(RealmEventsConfigRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(RealmEventsConfigRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ConfigRequestBuilder WithUrl(string rawUrl) { + return new ConfigRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Events/EventsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Events/EventsRequestBuilder.cs new file mode 100644 index 00000000..837def89 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Events/EventsRequestBuilder.cs @@ -0,0 +1,180 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Events.Config; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Events { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\events + /// + public class EventsRequestBuilder : BaseRequestBuilder { + /// The config property + public ConfigRequestBuilder Config { get => + new ConfigRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/events{?client*,dateFrom*,dateTo*,first*,ipAddress*,max*,type*,user*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/events{?client*,dateFrom*,dateTo*,first*,ipAddress*,max*,type*,user*}", rawUrl) { + } + /// + /// Delete all events + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get events Returns all events, or filters them based on URL query parameters listed here + /// + /// A List<EventRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, EventRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Delete all events + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, "{+baseurl}/admin/realms/{realm}/events", PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get events Returns all events, or filters them based on URL query parameters listed here + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public EventsRequestBuilder WithUrl(string rawUrl) { + return new EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get events Returns all events, or filters them based on URL query parameters listed here + /// + public class EventsRequestBuilderGetQueryParameters { + /// App or oauth client name +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("client")] + public string? Client { get; set; } +#nullable restore +#else + [QueryParameter("client")] + public string Client { get; set; } +#endif + /// From date +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("dateFrom")] + public string? DateFrom { get; set; } +#nullable restore +#else + [QueryParameter("dateFrom")] + public string DateFrom { get; set; } +#endif + /// To date +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("dateTo")] + public string? DateTo { get; set; } +#nullable restore +#else + [QueryParameter("dateTo")] + public string DateTo { get; set; } +#endif + /// Paging offset + [QueryParameter("first")] + public int? First { get; set; } + /// IP Address +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ipAddress")] + public string? IpAddress { get; set; } +#nullable restore +#else + [QueryParameter("ipAddress")] + public string IpAddress { get; set; } +#endif + /// Maximum results size (defaults to 100) + [QueryParameter("max")] + public int? Max { get; set; } + /// The types of events to return +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string[]? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string[] Type { get; set; } +#endif + /// User id +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("user")] + public string? User { get; set; } +#nullable restore +#else + [QueryParameter("user")] + public string User { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/GroupByPath/GroupByPathRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/GroupByPath/GroupByPathRequestBuilder.cs new file mode 100644 index 00000000..d58b65a9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/GroupByPath/GroupByPathRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.GroupByPath.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.GroupByPath { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\group-by-path + /// + public class GroupByPathRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.groupByPath.item collection + /// Unique identifier of the item + /// A + public WithPathItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("path", position); + return new WithPathItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupByPathRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/group-by-path", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupByPathRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/group-by-path", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/GroupByPath/Item/WithPathItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/GroupByPath/Item/WithPathItemRequestBuilder.cs new file mode 100644 index 00000000..633b27c0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/GroupByPath/Item/WithPathItemRequestBuilder.cs @@ -0,0 +1,66 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.GroupByPath.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\group-by-path\{path} + /// + public class WithPathItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPathItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/group-by-path/{path}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPathItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/group-by-path/{path}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithPathItemRequestBuilder WithUrl(string rawUrl) { + return new WithPathItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Count/CountGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Count/CountGetResponse.cs new file mode 100644 index 00000000..b8c045ed --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Count/CountGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Count { + public class CountGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CountGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CountGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Count/CountRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..acbc1199 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Count/CountRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Count { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\count + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/count{?search*,top*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/count{?search*,top*}", rawUrl) { + } + /// + /// Returns the groups counts. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CountGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns the groups counts. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns the groups counts. + /// + public class CountRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + [QueryParameter("top")] + public bool? Top { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/GroupsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/GroupsRequestBuilder.cs new file mode 100644 index 00000000..633ecf57 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/GroupsRequestBuilder.cs @@ -0,0 +1,157 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Count; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups + /// + public class GroupsRequestBuilder : BaseRequestBuilder { + /// The count property + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.groups.item collection + /// Unique identifier of the item + /// A + public GroupItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("group%2Did", position); + return new GroupItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups{?briefRepresentation*,exact*,first*,max*,populateHierarchy*,q*,search*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups{?briefRepresentation*,exact*,first*,max*,populateHierarchy*,q*,search*}", rawUrl) { + } + /// + /// Get group hierarchy. Only name and ids are returned. + /// + /// A List<GroupRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// This will update the group and set the parent if it exists. Create it and set the parent if the group doesnโ€™t exist. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(GroupRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(GroupRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get group hierarchy. Only name and ids are returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// This will update the group and set the parent if it exists. Create it and set the parent if the group doesnโ€™t exist. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(GroupRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(GroupRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/groups", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GroupsRequestBuilder WithUrl(string rawUrl) { + return new GroupsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get group hierarchy. Only name and ids are returned. + /// + public class GroupsRequestBuilderGetQueryParameters { + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + [QueryParameter("exact")] + public bool? Exact { get; set; } + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } + [QueryParameter("populateHierarchy")] + public bool? PopulateHierarchy { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Children/ChildrenRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Children/ChildrenRequestBuilder.cs new file mode 100644 index 00000000..f7725057 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Children/ChildrenRequestBuilder.cs @@ -0,0 +1,121 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Children { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\children + /// + public class ChildrenRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ChildrenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/children{?briefRepresentation*,first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/children{?briefRepresentation*,first*,max*}", rawUrl) { + } + /// + /// Return a paginated list of subgroups that have a parent group corresponding to the group on the URL + /// + /// A List<GroupRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// This will just set the parent if it exists. Create it and set the parent if the group doesnโ€™t exist. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(GroupRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(GroupRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return a paginated list of subgroups that have a parent group corresponding to the group on the URL + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// This will just set the parent if it exists. Create it and set the parent if the group doesnโ€™t exist. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(GroupRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(GroupRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/children", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ChildrenRequestBuilder WithUrl(string rawUrl) { + return new ChildrenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Return a paginated list of subgroups that have a parent group corresponding to the group on the URL + /// + public class ChildrenRequestBuilderGetQueryParameters { + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/GroupItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/GroupItemRequestBuilder.cs new file mode 100644 index 00000000..75b83de8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/GroupItemRequestBuilder.cs @@ -0,0 +1,148 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Children; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Management; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Members; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id} + /// + public class GroupItemRequestBuilder : BaseRequestBuilder { + /// The children property + public ChildrenRequestBuilder Children { get => + new ChildrenRequestBuilder(PathParameters, RequestAdapter); + } + /// The management property + public ManagementRequestBuilder Management { get => + new ManagementRequestBuilder(PathParameters, RequestAdapter); + } + /// The members property + public MembersRequestBuilder Members { get => + new MembersRequestBuilder(PathParameters, RequestAdapter); + } + /// The roleMappings property + public RoleMappingsRequestBuilder RoleMappings { get => + new RoleMappingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update group, ignores subgroups. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(GroupRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(GroupRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update group, ignores subgroups. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(GroupRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(GroupRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GroupItemRequestBuilder WithUrl(string rawUrl) { + return new GroupItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Management/ManagementRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Management/ManagementRequestBuilder.cs new file mode 100644 index 00000000..d92233fe --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Management/ManagementRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Management.Permissions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Management { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\management + /// + public class ManagementRequestBuilder : BaseRequestBuilder { + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/management", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/management", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Management/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Management/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..a2417ca2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Management/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Management.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\management\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/management/permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/management/permissions", rawUrl) { + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ManagementPermissionReference body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ManagementPermissionReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Members/MembersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Members/MembersRequestBuilder.cs new file mode 100644 index 00000000..21a3c1e7 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/Members/MembersRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.Members { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\members + /// + public class MembersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/members{?briefRepresentation*,first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/members{?briefRepresentation*,first*,max*}", rawUrl) { + } + /// + /// Get users Returns a stream of users, filtered according to query parameters + /// + /// A List<UserRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get users Returns a stream of users, filtered according to query parameters + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public MembersRequestBuilder WithUrl(string rawUrl) { + return new MembersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get users Returns a stream of users, filtered according to query parameters + /// + public class MembersRequestBuilderGetQueryParameters { + /// Only return basic information (only guaranteed to return id, username, created, first and last name, email, enabled state, email verification state, federation link, and access. Note that it means that namely user attributes, required actions, and not before are not returned.) + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + /// Pagination offset + [QueryParameter("first")] + public int? First { get; set; } + /// Maximum results size (defaults to 100) + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..5ac9acb4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.groups.item.roleMappings.clients.item collection + /// Unique identifier of the item + /// A + public WithClientItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client", position); + return new WithClientItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..d1d1ae5f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients.Item.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings\clients\{client}\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients/{client}/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients/{client}/available", rawUrl) { + } + /// + /// Get available client-level roles that can be mapped to the user + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get available client-level roles that can be mapped to the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..b49a76cd --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients.Item.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings\clients\{client}\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients/{client}/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients/{client}/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// Get effective client-level role mappings This recurses any composite roles + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get effective client-level role mappings This recurses any composite roles + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get effective client-level role mappings This recurses any composite roles + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/WithClientItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/WithClientItemRequestBuilder.cs new file mode 100644 index 00000000..0dedc5c8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Clients/Item/WithClientItemRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients.Item.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients.Item.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings\clients\{client} + /// + public class WithClientItemRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients/{client}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/clients/{client}", rawUrl) { + } + /// + /// Delete client-level roles from user role mapping + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get client-level role mappings for the user, and the app + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add client-level roles to the user role mapping + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete client-level roles from user role mapping + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get client-level role mappings for the user, and the app + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add client-level roles to the user role mapping + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..ef678567 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Realm.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings\realm\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/realm/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/realm/available", rawUrl) { + } + /// + /// Get realm-level roles that can be mapped + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles that can be mapped + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..113e3245 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Realm.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings\realm\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/realm/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/realm/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// Get effective realm-level role mappings This will recurse all composite roles to get the result. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get effective realm-level role mappings This will recurse all composite roles to get the result. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get effective realm-level role mappings This will recurse all composite roles to get the result. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..d8e46a13 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/Realm/RealmRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Realm.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Realm.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings/realm", rawUrl) { + } + /// + /// Delete realm-level role mappings + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get realm-level role mappings + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add realm-level role mappings to the user + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete realm-level role mappings + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get realm-level role mappings + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add realm-level role mappings to the user + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/RoleMappingsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/RoleMappingsRequestBuilder.cs new file mode 100644 index 00000000..fc966ec4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Groups/Item/RoleMappings/RoleMappingsRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups.Item.RoleMappings { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\groups\{group-id}\role-mappings + /// + public class RoleMappingsRequestBuilder : BaseRequestBuilder { + /// The clients property + public ClientsRequestBuilder Clients { get => + new ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleMappingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleMappingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/groups/{group%2Did}/role-mappings", rawUrl) { + } + /// + /// Get role mappings + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, MappingsRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get role mappings + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RoleMappingsRequestBuilder WithUrl(string rawUrl) { + return new RoleMappingsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/IdentityProviderRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/IdentityProviderRequestBuilder.cs new file mode 100644 index 00000000..61fc1253 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/IdentityProviderRequestBuilder.cs @@ -0,0 +1,43 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.ImportConfig; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Providers; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider + /// + public class IdentityProviderRequestBuilder : BaseRequestBuilder { + /// The importConfig property + public ImportConfigRequestBuilder ImportConfig { get => + new ImportConfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The instances property + public InstancesRequestBuilder Instances { get => + new InstancesRequestBuilder(PathParameters, RequestAdapter); + } + /// The providers property + public ProvidersRequestBuilder Providers { get => + new ProvidersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IdentityProviderRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IdentityProviderRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigPostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigPostRequestBody.cs new file mode 100644 index 00000000..67d80cca --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigPostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.ImportConfig { + public class ImportConfigPostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ImportConfigPostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ImportConfigPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ImportConfigPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigPostResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigPostResponse.cs new file mode 100644 index 00000000..bbd4f3ac --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigPostResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.ImportConfig { + public class ImportConfigPostResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ImportConfigPostResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ImportConfigPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ImportConfigPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigRequestBuilder.cs new file mode 100644 index 00000000..bcfbfddb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/ImportConfig/ImportConfigRequestBuilder.cs @@ -0,0 +1,76 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.ImportConfig { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\import-config + /// + public class ImportConfigRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ImportConfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/import-config", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ImportConfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/import-config", rawUrl) { + } + /// + /// Import identity provider from uploaded JSON file + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ImportConfigPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ImportConfigPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ImportConfigPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Import identity provider from uploaded JSON file + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ImportConfigPostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ImportConfigPostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ImportConfigRequestBuilder WithUrl(string rawUrl) { + return new ImportConfigRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/InstancesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/InstancesRequestBuilder.cs new file mode 100644 index 00000000..1e1f79d6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/InstancesRequestBuilder.cs @@ -0,0 +1,143 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances + /// + public class InstancesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.identityProvider.instances.item collection + /// Unique identifier of the item + /// A + public WithAliasItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("alias", position); + return new WithAliasItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstancesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances{?briefRepresentation*,first*,max*,search*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances{?briefRepresentation*,first*,max*,search*}", rawUrl) { + } + /// + /// List identity providers + /// + /// A List<IdentityProviderRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, IdentityProviderRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new identity provider + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(IdentityProviderRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(IdentityProviderRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// List identity providers + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new identity provider + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(IdentityProviderRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(IdentityProviderRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/identity-provider/instances", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public InstancesRequestBuilder WithUrl(string rawUrl) { + return new InstancesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List identity providers + /// + public class InstancesRequestBuilderGetQueryParameters { + /// Boolean which defines whether brief representations are returned (default: false) + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + /// Pagination offset + [QueryParameter("first")] + public int? First { get; set; } + /// Maximum results size (defaults to 100) + [QueryParameter("max")] + public int? Max { get; set; } + /// Filter specific providers by name. Search can be prefix (name*), contains (*name*) or exact ("name"). Default prefixed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Export/ExportRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Export/ExportRequestBuilder.cs new file mode 100644 index 00000000..4695a1e2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Export/ExportRequestBuilder.cs @@ -0,0 +1,85 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Export { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias}\export + /// + public class ExportRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExportRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/export{?format*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/export{?format*}", rawUrl) { + } + /// + /// Export public broker configuration for identity provider + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Export public broker configuration for identity provider + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ExportRequestBuilder WithUrl(string rawUrl) { + return new ExportRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Export public broker configuration for identity provider + /// + public class ExportRequestBuilderGetQueryParameters { + /// Format to use +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("format")] + public string? Format { get; set; } +#nullable restore +#else + [QueryParameter("format")] + public string Format { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Management/ManagementRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Management/ManagementRequestBuilder.cs new file mode 100644 index 00000000..1ba67fef --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Management/ManagementRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Management.Permissions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Management { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias}\management + /// + public class ManagementRequestBuilder : BaseRequestBuilder { + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/management", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/management", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Management/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Management/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..c75b66f9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Management/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Management.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias}\management\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/management/permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/management/permissions", rawUrl) { + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ManagementPermissionReference body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ManagementPermissionReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Return object stating whether client Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/MapperTypes/MapperTypesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/MapperTypes/MapperTypesRequestBuilder.cs new file mode 100644 index 00000000..b867f020 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/MapperTypes/MapperTypesRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.MapperTypes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias}\mapper-types + /// + public class MapperTypesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MapperTypesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/mapper-types", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MapperTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/mapper-types", rawUrl) { + } + /// + /// Get mapper types for identity provider + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mapper types for identity provider + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "*/*"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public MapperTypesRequestBuilder WithUrl(string rawUrl) { + return new MapperTypesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Mappers/Item/MappersItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Mappers/Item/MappersItemRequestBuilder.cs new file mode 100644 index 00000000..2540fb1b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Mappers/Item/MappersItemRequestBuilder.cs @@ -0,0 +1,139 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Mappers.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias}\mappers\{id} + /// + public class MappersItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MappersItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MappersItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/mappers/{id}", rawUrl) { + } + /// + /// Delete a mapper for the identity provider + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mapper by id for the identity provider + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, IdentityProviderMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a mapper for the identity provider + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(IdentityProviderMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(IdentityProviderMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a mapper for the identity provider + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get mapper by id for the identity provider + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update a mapper for the identity provider + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(IdentityProviderMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(IdentityProviderMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public MappersItemRequestBuilder WithUrl(string rawUrl) { + return new MappersItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Mappers/MappersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Mappers/MappersRequestBuilder.cs new file mode 100644 index 00000000..77bf3561 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/Mappers/MappersRequestBuilder.cs @@ -0,0 +1,119 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Mappers.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Mappers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias}\mappers + /// + public class MappersRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.identityProvider.instances.item.mappers.item collection + /// Unique identifier of the item + /// A + public MappersItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new MappersItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MappersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/mappers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MappersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/mappers", rawUrl) { + } + /// + /// Get mappers for identity provider + /// + /// A List<IdentityProviderMapperRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, IdentityProviderMapperRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add a mapper to identity provider + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(IdentityProviderMapperRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(IdentityProviderMapperRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get mappers for identity provider + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add a mapper to identity provider + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(IdentityProviderMapperRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(IdentityProviderMapperRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public MappersRequestBuilder WithUrl(string rawUrl) { + return new MappersRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/ReloadKeys/ReloadKeysRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/ReloadKeys/ReloadKeysRequestBuilder.cs new file mode 100644 index 00000000..e010176f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/ReloadKeys/ReloadKeysRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.ReloadKeys { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias}\reload-keys + /// + public class ReloadKeysRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReloadKeysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/reload-keys", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReloadKeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}/reload-keys", rawUrl) { + } + /// + /// Reaload keys for the identity provider if the provider supports it, "true" is returned if reload was performed, "false" if not. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Reaload keys for the identity provider if the provider supports it, "true" is returned if reload was performed, "false" if not. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ReloadKeysRequestBuilder WithUrl(string rawUrl) { + return new ReloadKeysRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/WithAliasItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/WithAliasItemRequestBuilder.cs new file mode 100644 index 00000000..248b53a5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Instances/Item/WithAliasItemRequestBuilder.cs @@ -0,0 +1,166 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Export; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Management; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.MapperTypes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.Mappers; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item.ReloadKeys; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Instances.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\instances\{alias} + /// + public class WithAliasItemRequestBuilder : BaseRequestBuilder { + /// The export property + public ExportRequestBuilder Export { get => + new ExportRequestBuilder(PathParameters, RequestAdapter); + } + /// The management property + public ManagementRequestBuilder Management { get => + new ManagementRequestBuilder(PathParameters, RequestAdapter); + } + /// The mappers property + public MappersRequestBuilder Mappers { get => + new MappersRequestBuilder(PathParameters, RequestAdapter); + } + /// The mapperTypes property + public MapperTypesRequestBuilder MapperTypes { get => + new MapperTypesRequestBuilder(PathParameters, RequestAdapter); + } + /// The reloadKeys property + public ReloadKeysRequestBuilder ReloadKeys { get => + new ReloadKeysRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAliasItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAliasItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/instances/{alias}", rawUrl) { + } + /// + /// Delete the identity provider + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the identity provider + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, IdentityProviderRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the identity provider + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(IdentityProviderRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(IdentityProviderRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the identity provider + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get the identity provider + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the identity provider + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(IdentityProviderRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(IdentityProviderRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithAliasItemRequestBuilder WithUrl(string rawUrl) { + return new WithAliasItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/Item/WithProvider_GetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/Item/WithProvider_GetResponse.cs new file mode 100644 index 00000000..79916320 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/Item/WithProvider_GetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Providers.Item { + public class WithProvider_GetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithProvider_GetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static WithProvider_GetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WithProvider_GetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/Item/WithProvider_ItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/Item/WithProvider_ItemRequestBuilder.cs new file mode 100644 index 00000000..9feb1d6a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/Item/WithProvider_ItemRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Providers.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\providers\{provider_id} + /// + public class WithProvider_ItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProvider_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/providers/{provider_id}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProvider_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/providers/{provider_id}", rawUrl) { + } + /// + /// Get the identity provider factory for that provider id + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, WithProvider_GetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the identity provider factory for that provider id + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithProvider_ItemRequestBuilder WithUrl(string rawUrl) { + return new WithProvider_ItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/ProvidersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/ProvidersRequestBuilder.cs new file mode 100644 index 00000000..d03b4107 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/IdentityProvider/Providers/ProvidersRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Providers.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider.Providers { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\identity-provider\providers + /// + public class ProvidersRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.identityProvider.providers.item collection + /// The provider id to get the factory + /// A + public WithProvider_ItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("provider_id", position); + return new WithProvider_ItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/providers", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/identity-provider/providers", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Keys/KeysRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Keys/KeysRequestBuilder.cs new file mode 100644 index 00000000..4925d911 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Keys/KeysRequestBuilder.cs @@ -0,0 +1,66 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Keys { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\keys + /// + public class KeysRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/keys", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/keys", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, KeysMetadataRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public KeysRequestBuilder WithUrl(string rawUrl) { + return new KeysRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/Item/WithKeyItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/Item/WithKeyItemRequestBuilder.cs new file mode 100644 index 00000000..010f272d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/Item/WithKeyItemRequestBuilder.cs @@ -0,0 +1,120 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization.Item.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\localization\{locale}\{key} + /// + public class WithKeyItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithKeyItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/localization/{locale}/{key}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithKeyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/localization/{locale}/{key}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(string body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(string body, Action> requestConfiguration = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalar(RequestAdapter, "text/plain", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithKeyItemRequestBuilder WithUrl(string rawUrl) { + return new WithKeyItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocaleGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocaleGetResponse.cs new file mode 100644 index 00000000..37497cfa --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocaleGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization.Item { + public class WithLocaleGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithLocaleGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static WithLocaleGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WithLocaleGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocaleItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocaleItemRequestBuilder.cs new file mode 100644 index 00000000..782322b1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocaleItemRequestBuilder.cs @@ -0,0 +1,140 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization.Item.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\localization\{locale} + /// + public class WithLocaleItemRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.localization.item.item collection + /// Unique identifier of the item + /// A + public WithKeyItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("key", position); + return new WithKeyItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithLocaleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/localization/{locale}{?useRealmDefaultLocaleFallback*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithLocaleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/localization/{locale}{?useRealmDefaultLocaleFallback*}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, WithLocaleGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Import localization from uploaded JSON file + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(WithLocalePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WithLocalePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, "{+baseurl}/admin/realms/{realm}/localization/{locale}", PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Import localization from uploaded JSON file + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(WithLocalePostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WithLocalePostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/localization/{locale}", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithLocaleItemRequestBuilder WithUrl(string rawUrl) { + return new WithLocaleItemRequestBuilder(rawUrl, RequestAdapter); + } + public class WithLocaleItemRequestBuilderGetQueryParameters { + [Obsolete("")] + [QueryParameter("useRealmDefaultLocaleFallback")] + public bool? UseRealmDefaultLocaleFallback { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocalePostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocalePostRequestBody.cs new file mode 100644 index 00000000..6768ad1d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/Item/WithLocalePostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization.Item { + public class WithLocalePostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithLocalePostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static WithLocalePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WithLocalePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/LocalizationRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/LocalizationRequestBuilder.cs new file mode 100644 index 00000000..5d6b617a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Localization/LocalizationRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\localization + /// + public class LocalizationRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.localization.item collection + /// Unique identifier of the item + /// A + public WithLocaleItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("locale", position); + return new WithLocaleItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LocalizationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/localization", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LocalizationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/localization", rawUrl) { + } + /// A List<string> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public LocalizationRequestBuilder WithUrl(string rawUrl) { + return new LocalizationRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/LogoutAll/LogoutAllRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/LogoutAll/LogoutAllRequestBuilder.cs new file mode 100644 index 00000000..9f3314a8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/LogoutAll/LogoutAllRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.LogoutAll { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\logout-all + /// + public class LogoutAllRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogoutAllRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/logout-all", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogoutAllRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/logout-all", rawUrl) { + } + /// + /// Any client that has an admin url will also be told to invalidate any sessions they have. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, GlobalRequestResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Any client that has an admin url will also be told to invalidate any sessions they have. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public LogoutAllRequestBuilder WithUrl(string rawUrl) { + return new LogoutAllRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PartialExport/PartialExportRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PartialExport/PartialExportRequestBuilder.cs new file mode 100644 index 00000000..f9f7a398 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PartialExport/PartialExportRequestBuilder.cs @@ -0,0 +1,79 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.PartialExport { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\partial-export + /// + public class PartialExportRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PartialExportRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/partial-export{?exportClients*,exportGroupsAndRoles*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PartialExportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/partial-export{?exportClients*,exportGroupsAndRoles*}", rawUrl) { + } + /// + /// Partial export of existing realm into a JSON file. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Partial export of existing realm into a JSON file. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PartialExportRequestBuilder WithUrl(string rawUrl) { + return new PartialExportRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Partial export of existing realm into a JSON file. + /// + public class PartialExportRequestBuilderPostQueryParameters { + [QueryParameter("exportClients")] + public bool? ExportClients { get; set; } + [QueryParameter("exportGroupsAndRoles")] + public bool? ExportGroupsAndRoles { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PartialImport/PartialImportRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PartialImport/PartialImportRequestBuilder.cs new file mode 100644 index 00000000..7e4354fb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PartialImport/PartialImportRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.PartialImport { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\partialImport + /// + public class PartialImportRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PartialImportRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/partialImport", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PartialImportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/partialImport", rawUrl) { + } + /// + /// Partial import from a JSON file to an existing realm. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Partial import from a JSON file to an existing realm. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(string body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(string body, Action> requestConfiguration = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalar(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PartialImportRequestBuilder WithUrl(string rawUrl) { + return new PartialImportRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PushRevocation/PushRevocationRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PushRevocation/PushRevocationRequestBuilder.cs new file mode 100644 index 00000000..5c8163b3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/PushRevocation/PushRevocationRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.PushRevocation { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\push-revocation + /// + public class PushRevocationRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PushRevocationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/push-revocation", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PushRevocationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/push-revocation", rawUrl) { + } + /// + /// Push the realm's revocation policy to any client that has an admin url associated with it. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, GlobalRequestResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Push the realm's revocation policy to any client that has an admin url associated with it. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PushRevocationRequestBuilder WithUrl(string rawUrl) { + return new PushRevocationRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..54ab4285 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\composites\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.roles.item.composites.clients.item collection + /// Unique identifier of the item + /// A + public ClientUuItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client%2Duuid", position); + return new ClientUuItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Clients/Item/ClientUuItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Clients/Item/ClientUuItemRequestBuilder.cs new file mode 100644 index 00000000..e4725cfc --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Clients/Item/ClientUuItemRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\composites\clients\{client-uuid} + /// + public class ClientUuItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientUuItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites/clients/{client%2Duuid}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientUuItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites/clients/{client%2Duuid}", rawUrl) { + } + /// + /// Get client-level roles for the client that are in the role's composite + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get client-level roles for the client that are in the role's composite + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ClientUuItemRequestBuilder WithUrl(string rawUrl) { + return new ClientUuItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/CompositesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/CompositesRequestBuilder.cs new file mode 100644 index 00000000..d3879fbe --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/CompositesRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\composites + /// + public class CompositesRequestBuilder : BaseRequestBuilder { + /// The clients property + public ClientsRequestBuilder Clients { get => + new ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites", rawUrl) { + } + /// + /// Remove roles from the role's composite + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get composites of the role + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add a composite to the role + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove roles from the role's composite + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get composites of the role + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add a composite to the role + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositesRequestBuilder WithUrl(string rawUrl) { + return new CompositesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..adf9c322 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Composites/Realm/RealmRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\composites\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/composites/realm", rawUrl) { + } + /// + /// Get realm-level roles of the role's composite + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles of the role's composite + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Groups/GroupsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Groups/GroupsRequestBuilder.cs new file mode 100644 index 00000000..ca048a5a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Groups/GroupsRequestBuilder.cs @@ -0,0 +1,87 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Groups { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\groups + /// + public class GroupsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/groups{?briefRepresentation*,first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/groups{?briefRepresentation*,first*,max*}", rawUrl) { + } + /// + /// Returns a stream of groups that have the specified role name + /// + /// A List<GroupRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Returns a stream of groups that have the specified role name + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GroupsRequestBuilder WithUrl(string rawUrl) { + return new GroupsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns a stream of groups that have the specified role name + /// + public class GroupsRequestBuilderGetQueryParameters { + /// if false, return a full representation of the {@code GroupRepresentation} objects. + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + /// first result to return. Ignored if negative or {@code null}. + [QueryParameter("first")] + public int? First { get; set; } + /// maximum number of results to return. Ignored if negative or {@code null}. + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Management/ManagementRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Management/ManagementRequestBuilder.cs new file mode 100644 index 00000000..4c01a8f5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Management/ManagementRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Management.Permissions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Management { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\management + /// + public class ManagementRequestBuilder : BaseRequestBuilder { + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/management", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/management", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Management/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Management/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..7e401aab --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Management/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Management.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\management\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/management/permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/management/permissions", rawUrl) { + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ManagementPermissionReference body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ManagementPermissionReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/RoleNameItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/RoleNameItemRequestBuilder.cs new file mode 100644 index 00000000..f3838846 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/RoleNameItemRequestBuilder.cs @@ -0,0 +1,160 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Composites; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Groups; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Management; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Users; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name} + /// + public class RoleNameItemRequestBuilder : BaseRequestBuilder { + /// The composites property + public CompositesRequestBuilder Composites { get => + new CompositesRequestBuilder(PathParameters, RequestAdapter); + } + /// The groups property + public GroupsRequestBuilder Groups { get => + new GroupsRequestBuilder(PathParameters, RequestAdapter); + } + /// The management property + public ManagementRequestBuilder Management { get => + new ManagementRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public UsersRequestBuilder Users { get => + new UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}", rawUrl) { + } + /// + /// Delete a role by name + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a role by name + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a role by name + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(RoleRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(RoleRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a role by name + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get a role by name + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update a role by name + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(RoleRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(RoleRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RoleNameItemRequestBuilder WithUrl(string rawUrl) { + return new RoleNameItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Users/UsersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Users/UsersRequestBuilder.cs new file mode 100644 index 00000000..c64e4e1b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/Item/Users/UsersRequestBuilder.cs @@ -0,0 +1,84 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item.Users { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles\{role-name}\users + /// + public class UsersRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/users{?first*,max*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles/{role%2Dname}/users{?first*,max*}", rawUrl) { + } + /// + /// Returns a stream of users that have the specified role name. + /// + /// A List<UserRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Returns a stream of users that have the specified role name. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UsersRequestBuilder WithUrl(string rawUrl) { + return new UsersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns a stream of users that have the specified role name. + /// + public class UsersRequestBuilderGetQueryParameters { + /// first result to return. Ignored if negative or {@code null}. + [QueryParameter("first")] + public int? First { get; set; } + /// maximum number of results to return. Ignored if negative or {@code null}. + [QueryParameter("max")] + public int? Max { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/RolesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/RolesRequestBuilder.cs new file mode 100644 index 00000000..a98cbd94 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Roles/RolesRequestBuilder.cs @@ -0,0 +1,139 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles + /// + public class RolesRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.roles.item collection + /// role's name (not id!) + /// A + public RoleNameItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("role%2Dname", position); + return new RoleNameItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles{?briefRepresentation*,first*,max*,search*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles{?briefRepresentation*,first*,max*,search*}", rawUrl) { + } + /// + /// Get all roles for the realm or client + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new role for the realm or client + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(RoleRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RoleRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get all roles for the realm or client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new role for the realm or client + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(RoleRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RoleRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/roles", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RolesRequestBuilder WithUrl(string rawUrl) { + return new RolesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get all roles for the realm or client + /// + public class RolesRequestBuilderGetQueryParameters { + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..f68e6c2b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id\{role-id}\composites\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.rolesById.item.composites.clients.item collection + /// Unique identifier of the item + /// A + public WithClientUuItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("clientUuid", position); + return new WithClientUuItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Clients/Item/WithClientUuItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Clients/Item/WithClientUuItemRequestBuilder.cs new file mode 100644 index 00000000..fa95d1c3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Clients/Item/WithClientUuItemRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id\{role-id}\composites\clients\{clientUuid} + /// + public class WithClientUuItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientUuItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites/clients/{clientUuid}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientUuItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites/clients/{clientUuid}", rawUrl) { + } + /// + /// Get client-level roles for the client that are in the role's composite + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get client-level roles for the client that are in the role's composite + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientUuItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientUuItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/CompositesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/CompositesRequestBuilder.cs new file mode 100644 index 00000000..0cef59af --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/CompositesRequestBuilder.cs @@ -0,0 +1,173 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id\{role-id}\composites + /// + public class CompositesRequestBuilder : BaseRequestBuilder { + /// The clients property + public ClientsRequestBuilder Clients { get => + new ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites{?first*,max*,search*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites{?first*,max*,search*}", rawUrl) { + } + /// + /// Remove a set of roles from the role's composite + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get role's children Returns a set of role's children provided the role is a composite. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Make the role a composite role by associating some child roles + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove a set of roles from the role's composite + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get role's children Returns a set of role's children provided the role is a composite. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Make the role a composite role by associating some child roles + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositesRequestBuilder WithUrl(string rawUrl) { + return new CompositesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get role's children Returns a set of role's children provided the role is a composite. + /// + public class CompositesRequestBuilderGetQueryParameters { + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..6cf5013b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Composites/Realm/RealmRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id\{role-id}\composites\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/composites/realm", rawUrl) { + } + /// + /// Get realm-level roles that are in the role's composite + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles that are in the role's composite + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Management/ManagementRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Management/ManagementRequestBuilder.cs new file mode 100644 index 00000000..61b53e3c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Management/ManagementRequestBuilder.cs @@ -0,0 +1,33 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Management.Permissions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Management { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id\{role-id}\management + /// + public class ManagementRequestBuilder : BaseRequestBuilder { + /// The permissions property + public PermissionsRequestBuilder Permissions { get => + new PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/management", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/management", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Management/Permissions/PermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Management/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 00000000..beef1556 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/Management/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Management.Permissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id\{role-id}\management\permissions + /// + public class PermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/management/permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}/management/permissions", rawUrl) { + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ManagementPermissionReference body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ManagementPermissionReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Return object stating whether role Authorization permissions have been initialized or not and a reference + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public PermissionsRequestBuilder WithUrl(string rawUrl) { + return new PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/RoleItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/RoleItemRequestBuilder.cs new file mode 100644 index 00000000..1c6eb0bf --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/Item/RoleItemRequestBuilder.cs @@ -0,0 +1,149 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Composites; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item.Management; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id\{role-id} + /// + public class RoleItemRequestBuilder : BaseRequestBuilder { + /// The composites property + public CompositesRequestBuilder Composites { get => + new CompositesRequestBuilder(PathParameters, RequestAdapter); + } + /// The management property + public ManagementRequestBuilder Management { get => + new ManagementRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id/{role%2Did}", rawUrl) { + } + /// + /// Delete the role + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a specific role's representation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the role + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(RoleRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(RoleRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the role + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get a specific role's representation + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the role + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(RoleRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(RoleRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RoleItemRequestBuilder WithUrl(string rawUrl) { + return new RoleItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/RolesByIdRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/RolesByIdRequestBuilder.cs new file mode 100644 index 00000000..3c08ae33 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/RolesById/RolesByIdRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\roles-by-id + /// + public class RolesByIdRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.rolesById.item collection + /// id of role + /// A + public RoleItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("role%2Did", position); + return new RoleItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RolesByIdRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RolesByIdRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/roles-by-id", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Sessions/Item/WithSessionItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Sessions/Item/WithSessionItemRequestBuilder.cs new file mode 100644 index 00000000..7e5d9705 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Sessions/Item/WithSessionItemRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Sessions.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\sessions\{session} + /// + public class WithSessionItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSessionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/sessions/{session}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSessionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/sessions/{session}", rawUrl) { + } + /// + /// Any client that has an admin url will also be told to invalidate this particular session. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Any client that has an admin url will also be told to invalidate this particular session. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithSessionItemRequestBuilder WithUrl(string rawUrl) { + return new WithSessionItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Sessions/SessionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Sessions/SessionsRequestBuilder.cs new file mode 100644 index 00000000..3c98ff6e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Sessions/SessionsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Sessions.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Sessions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\sessions + /// + public class SessionsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.sessions.item collection + /// Unique identifier of the item + /// A + public WithSessionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("session", position); + return new WithSessionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SessionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/sessions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SessionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/sessions", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/TestSMTPConnection/TestSMTPConnectionPostRequestBody.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/TestSMTPConnection/TestSMTPConnectionPostRequestBody.cs new file mode 100644 index 00000000..2606ada9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/TestSMTPConnection/TestSMTPConnectionPostRequestBody.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.TestSMTPConnection { + public class TestSMTPConnectionPostRequestBody : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TestSMTPConnectionPostRequestBody() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static TestSMTPConnectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new TestSMTPConnectionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/TestSMTPConnection/TestSMTPConnectionRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/TestSMTPConnection/TestSMTPConnectionRequestBuilder.cs new file mode 100644 index 00000000..d56829d2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/TestSMTPConnection/TestSMTPConnectionRequestBuilder.cs @@ -0,0 +1,78 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.TestSMTPConnection { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\testSMTPConnection + /// + public class TestSMTPConnectionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TestSMTPConnectionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/testSMTPConnection", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TestSMTPConnectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/testSMTPConnection", rawUrl) { + } + /// + /// Test SMTP connection with current logged in user + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(TestSMTPConnectionPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(TestSMTPConnectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Test SMTP connection with current logged in user + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(TestSMTPConnectionPostRequestBody body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(TestSMTPConnectionPostRequestBody body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public TestSMTPConnectionRequestBuilder WithUrl(string rawUrl) { + return new TestSMTPConnectionRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Count/CountRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..dfbf777e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Count/CountRequestBuilder.cs @@ -0,0 +1,140 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Count { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\count + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/count{?email*,emailVerified*,enabled*,firstName*,lastName*,q*,search*,username*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/count{?email*,emailVerified*,enabled*,firstName*,lastName*,q*,search*,username*}", rawUrl) { + } + /// + /// It can be called in three different ways. 1. Donโ€™t specify any criteria and pass {@code null}. The number of all users within that realm will be returned. <p> 2. If {@code search} is specified other criteria such as {@code last} will be ignored even though you set them. The {@code search} string will be matched against the first and last name, the username and the email of a user. <p> 3. If {@code search} is unspecified but any of {@code last}, {@code first}, {@code email} or {@code username} those criteria are matched against their respective fields on a user entity. Combined with a logical and. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// It can be called in three different ways. 1. Donโ€™t specify any criteria and pass {@code null}. The number of all users within that realm will be returned. <p> 2. If {@code search} is specified other criteria such as {@code last} will be ignored even though you set them. The {@code search} string will be matched against the first and last name, the username and the email of a user. <p> 3. If {@code search} is unspecified but any of {@code last}, {@code first}, {@code email} or {@code username} those criteria are matched against their respective fields on a user entity. Combined with a logical and. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// It can be called in three different ways. 1. Donโ€™t specify any criteria and pass {@code null}. The number of all users within that realm will be returned. <p> 2. If {@code search} is specified other criteria such as {@code last} will be ignored even though you set them. The {@code search} string will be matched against the first and last name, the username and the email of a user. <p> 3. If {@code search} is unspecified but any of {@code last}, {@code first}, {@code email} or {@code username} those criteria are matched against their respective fields on a user entity. Combined with a logical and. + /// + public class CountRequestBuilderGetQueryParameters { + /// email filter +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("email")] + public string? Email { get; set; } +#nullable restore +#else + [QueryParameter("email")] + public string Email { get; set; } +#endif + [QueryParameter("emailVerified")] + public bool? EmailVerified { get; set; } + /// Boolean representing if user is enabled or not + [QueryParameter("enabled")] + public bool? Enabled { get; set; } + /// first name filter +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("firstName")] + public string? FirstName { get; set; } +#nullable restore +#else + [QueryParameter("firstName")] + public string FirstName { get; set; } +#endif + /// last name filter +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("lastName")] + public string? LastName { get; set; } +#nullable restore +#else + [QueryParameter("lastName")] + public string LastName { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// arbitrary search string for all the fields below. Default search behavior is prefix-based (e.g., foo or foo*). Use *foo* for infix search and "foo" for exact search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + /// username filter +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("username")] + public string? Username { get; set; } +#nullable restore +#else + [QueryParameter("username")] + public string Username { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ConfiguredUserStorageCredentialTypes/ConfiguredUserStorageCredentialTypesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ConfiguredUserStorageCredentialTypes/ConfiguredUserStorageCredentialTypesRequestBuilder.cs new file mode 100644 index 00000000..2566efef --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ConfiguredUserStorageCredentialTypes/ConfiguredUserStorageCredentialTypesRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ConfiguredUserStorageCredentialTypes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\configured-user-storage-credential-types + /// + public class ConfiguredUserStorageCredentialTypesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfiguredUserStorageCredentialTypesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/configured-user-storage-credential-types", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfiguredUserStorageCredentialTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/configured-user-storage-credential-types", rawUrl) { + } + /// + /// Returned values can contain for example "password", "otp" etc. This will always return empty list for "local" users, which are not backed by any user storage + /// + /// A List<string> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Returned values can contain for example "password", "otp" etc. This will always return empty list for "local" users, which are not backed by any user storage + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ConfiguredUserStorageCredentialTypesRequestBuilder WithUrl(string rawUrl) { + return new ConfiguredUserStorageCredentialTypesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/Consents.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/Consents.cs new file mode 100644 index 00000000..f26ecc1d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/Consents.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Consents { + public class Consents : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Consents() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Consents CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Consents(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/ConsentsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/ConsentsRequestBuilder.cs new file mode 100644 index 00000000..e53c6122 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/ConsentsRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Consents.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Consents { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\consents + /// + public class ConsentsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item.consents.item collection + /// Client id + /// A + public WithClientItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client", position); + return new WithClientItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConsentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/consents", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConsentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/consents", rawUrl) { + } + /// + /// Get consents granted by the user + /// + /// A List<Consents> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, Consents.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get consents granted by the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ConsentsRequestBuilder WithUrl(string rawUrl) { + return new ConsentsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/Item/WithClientItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/Item/WithClientItemRequestBuilder.cs new file mode 100644 index 00000000..ee479a52 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Consents/Item/WithClientItemRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Consents.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\consents\{client} + /// + public class WithClientItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/consents/{client}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/consents/{client}", rawUrl) { + } + /// + /// Revoke consent and offline tokens for particular client from user + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Revoke consent and offline tokens for particular client from user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/CredentialsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/CredentialsRequestBuilder.cs new file mode 100644 index 00000000..777f526d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/CredentialsRequestBuilder.cs @@ -0,0 +1,76 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\credentials + /// + public class CredentialsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item.credentials.item collection + /// Unique identifier of the item + /// A + public WithCredentialItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("credentialId", position); + return new WithCredentialItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CredentialsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials", rawUrl) { + } + /// A List<CredentialRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, CredentialRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CredentialsRequestBuilder WithUrl(string rawUrl) { + return new CredentialsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveAfter/Item/WithNewPreviousCredentialItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveAfter/Item/WithNewPreviousCredentialItemRequestBuilder.cs new file mode 100644 index 00000000..3d10049b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveAfter/Item/WithNewPreviousCredentialItemRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.MoveAfter.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\credentials\{credentialId}\moveAfter\{newPreviousCredentialId} + /// + public class WithNewPreviousCredentialItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNewPreviousCredentialItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/moveAfter/{newPreviousCredentialId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNewPreviousCredentialItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/moveAfter/{newPreviousCredentialId}", rawUrl) { + } + /// + /// Move a credential to a position behind another credential + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Move a credential to a position behind another credential + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithNewPreviousCredentialItemRequestBuilder WithUrl(string rawUrl) { + return new WithNewPreviousCredentialItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveAfter/MoveAfterRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveAfter/MoveAfterRequestBuilder.cs new file mode 100644 index 00000000..fea65ad2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveAfter/MoveAfterRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.MoveAfter.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.MoveAfter { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\credentials\{credentialId}\moveAfter + /// + public class MoveAfterRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item.credentials.item.moveAfter.item collection + /// The credential that will be the previous element in the list. If set to null, the moved credential will be the first element in the list. + /// A + public WithNewPreviousCredentialItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("newPreviousCredentialId", position); + return new WithNewPreviousCredentialItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MoveAfterRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/moveAfter", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MoveAfterRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/moveAfter", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveToFirst/MoveToFirstRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveToFirst/MoveToFirstRequestBuilder.cs new file mode 100644 index 00000000..adb3eeac --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/MoveToFirst/MoveToFirstRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.MoveToFirst { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\credentials\{credentialId}\moveToFirst + /// + public class MoveToFirstRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MoveToFirstRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/moveToFirst", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MoveToFirstRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/moveToFirst", rawUrl) { + } + /// + /// Move a credential to a first position in the credentials list of the user + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Move a credential to a first position in the credentials list of the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public MoveToFirstRequestBuilder WithUrl(string rawUrl) { + return new MoveToFirstRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/UserLabel/UserLabelRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/UserLabel/UserLabelRequestBuilder.cs new file mode 100644 index 00000000..5e136a14 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/UserLabel/UserLabelRequestBuilder.cs @@ -0,0 +1,74 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.UserLabel { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\credentials\{credentialId}\userLabel + /// + public class UserLabelRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserLabelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/userLabel", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserLabelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}/userLabel", rawUrl) { + } + /// + /// Update a credential label for a user + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a credential label for a user + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(string body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(string body, Action> requestConfiguration = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalar(RequestAdapter, "text/plain", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UserLabelRequestBuilder WithUrl(string rawUrl) { + return new UserLabelRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/WithCredentialItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/WithCredentialItemRequestBuilder.cs new file mode 100644 index 00000000..95b60ff6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Credentials/Item/WithCredentialItemRequestBuilder.cs @@ -0,0 +1,84 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.MoveAfter; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.MoveToFirst; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item.UserLabel; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\credentials\{credentialId} + /// + public class WithCredentialItemRequestBuilder : BaseRequestBuilder { + /// The moveAfter property + public MoveAfterRequestBuilder MoveAfter { get => + new MoveAfterRequestBuilder(PathParameters, RequestAdapter); + } + /// The moveToFirst property + public MoveToFirstRequestBuilder MoveToFirst { get => + new MoveToFirstRequestBuilder(PathParameters, RequestAdapter); + } + /// The userLabel property + public UserLabelRequestBuilder UserLabel { get => + new UserLabelRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCredentialItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCredentialItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/credentials/{credentialId}", rawUrl) { + } + /// + /// Remove a credential for a user + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove a credential for a user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithCredentialItemRequestBuilder WithUrl(string rawUrl) { + return new WithCredentialItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/DisableCredentialTypes/DisableCredentialTypesRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/DisableCredentialTypes/DisableCredentialTypesRequestBuilder.cs new file mode 100644 index 00000000..2ae1bf54 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/DisableCredentialTypes/DisableCredentialTypesRequestBuilder.cs @@ -0,0 +1,74 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.DisableCredentialTypes { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\disable-credential-types + /// + public class DisableCredentialTypesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DisableCredentialTypesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/disable-credential-types", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DisableCredentialTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/disable-credential-types", rawUrl) { + } + /// + /// Disable all credentials for a user of a specific type + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Disable all credentials for a user of a specific type + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalarCollection(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public DisableCredentialTypesRequestBuilder WithUrl(string rawUrl) { + return new DisableCredentialTypesRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ExecuteActionsEmail/ExecuteActionsEmailRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ExecuteActionsEmail/ExecuteActionsEmailRequestBuilder.cs new file mode 100644 index 00000000..3ea17bcc --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ExecuteActionsEmail/ExecuteActionsEmailRequestBuilder.cs @@ -0,0 +1,103 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ExecuteActionsEmail { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\execute-actions-email + /// + public class ExecuteActionsEmailRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExecuteActionsEmailRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/execute-actions-email{?client_id*,lifespan*,redirect_uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExecuteActionsEmailRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/execute-actions-email{?client_id*,lifespan*,redirect_uri*}", rawUrl) { + } + /// + /// An email contains a link the user can click to perform a set of required actions. The redirectUri and clientId parameters are optional. If no redirect is given, then there will be no link back to click after actions have completed. Redirect uri must be a valid uri for the particular clientId. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// An email contains a link the user can click to perform a set of required actions. The redirectUri and clientId parameters are optional. If no redirect is given, then there will be no link back to click after actions have completed. Redirect uri must be a valid uri for the particular clientId. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalarCollection(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ExecuteActionsEmailRequestBuilder WithUrl(string rawUrl) { + return new ExecuteActionsEmailRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// An email contains a link the user can click to perform a set of required actions. The redirectUri and clientId parameters are optional. If no redirect is given, then there will be no link back to click after actions have completed. Redirect uri must be a valid uri for the particular clientId. + /// + public class ExecuteActionsEmailRequestBuilderPutQueryParameters { + /// Client id +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("client_id")] + public string? ClientId { get; set; } +#nullable restore +#else + [QueryParameter("client_id")] + public string ClientId { get; set; } +#endif + /// Number of seconds after which the generated token expires + [QueryParameter("lifespan")] + public int? Lifespan { get; set; } + /// Redirect uri +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("redirect_uri")] + public string? RedirectUri { get; set; } +#nullable restore +#else + [QueryParameter("redirect_uri")] + public string RedirectUri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/FederatedIdentity/FederatedIdentityRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/FederatedIdentity/FederatedIdentityRequestBuilder.cs new file mode 100644 index 00000000..f53260ab --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/FederatedIdentity/FederatedIdentityRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.FederatedIdentity.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.FederatedIdentity { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\federated-identity + /// + public class FederatedIdentityRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item.federatedIdentity.item collection + /// Social login provider id + /// A + public WithProviderItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("provider", position); + return new WithProviderItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FederatedIdentityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/federated-identity", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FederatedIdentityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/federated-identity", rawUrl) { + } + /// + /// Get social logins associated with the user + /// + /// A List<FederatedIdentityRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, FederatedIdentityRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get social logins associated with the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public FederatedIdentityRequestBuilder WithUrl(string rawUrl) { + return new FederatedIdentityRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/FederatedIdentity/Item/WithProviderItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/FederatedIdentity/Item/WithProviderItemRequestBuilder.cs new file mode 100644 index 00000000..07abe02b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/FederatedIdentity/Item/WithProviderItemRequestBuilder.cs @@ -0,0 +1,101 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.FederatedIdentity.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\federated-identity\{provider} + /// + public class WithProviderItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProviderItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/federated-identity/{provider}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProviderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/federated-identity/{provider}", rawUrl) { + } + /// + /// Remove a social login provider from user + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Add a social login provider to the user + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove a social login provider from user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Add a social login provider to the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithProviderItemRequestBuilder WithUrl(string rawUrl) { + return new WithProviderItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Count/CountGetResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Count/CountGetResponse.cs new file mode 100644 index 00000000..c73e708e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Count/CountGetResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Groups.Count { + public class CountGetResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CountGetResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CountGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Count/CountRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..72355044 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Count/CountRequestBuilder.cs @@ -0,0 +1,76 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Groups.Count { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\groups\count + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/groups/count{?search*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/groups/count{?search*}", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, CountGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + public class CountRequestBuilderGetQueryParameters { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/GroupsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/GroupsRequestBuilder.cs new file mode 100644 index 00000000..718a39a3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/GroupsRequestBuilder.cs @@ -0,0 +1,98 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Groups.Count; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Groups.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Groups { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\groups + /// + public class GroupsRequestBuilder : BaseRequestBuilder { + /// The count property + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item.groups.item collection + /// Unique identifier of the item + /// A + public WithGroupItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("groupId", position); + return new WithGroupItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/groups{?briefRepresentation*,first*,max*,search*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/groups{?briefRepresentation*,first*,max*,search*}", rawUrl) { + } + /// A List<GroupRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, GroupRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public GroupsRequestBuilder WithUrl(string rawUrl) { + return new GroupsRequestBuilder(rawUrl, RequestAdapter); + } + public class GroupsRequestBuilderGetQueryParameters { + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + [QueryParameter("first")] + public int? First { get; set; } + [QueryParameter("max")] + public int? Max { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Item/WithGroupItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Item/WithGroupItemRequestBuilder.cs new file mode 100644 index 00000000..c5f8a9cf --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Groups/Item/WithGroupItemRequestBuilder.cs @@ -0,0 +1,88 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Groups.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\groups\{groupId} + /// + public class WithGroupItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithGroupItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/groups/{groupId}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithGroupItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/groups/{groupId}", rawUrl) { + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithGroupItemRequestBuilder WithUrl(string rawUrl) { + return new WithGroupItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Impersonation/ImpersonationPostResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Impersonation/ImpersonationPostResponse.cs new file mode 100644 index 00000000..4e0f1f8b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Impersonation/ImpersonationPostResponse.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Impersonation { + public class ImpersonationPostResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ImpersonationPostResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ImpersonationPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ImpersonationPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Impersonation/ImpersonationRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Impersonation/ImpersonationRequestBuilder.cs new file mode 100644 index 00000000..c947bdea --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Impersonation/ImpersonationRequestBuilder.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Impersonation { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\impersonation + /// + public class ImpersonationRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ImpersonationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/impersonation", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ImpersonationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/impersonation", rawUrl) { + } + /// + /// Impersonate the user + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ImpersonationPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Impersonate the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ImpersonationRequestBuilder WithUrl(string rawUrl) { + return new ImpersonationRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Logout/LogoutRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Logout/LogoutRequestBuilder.cs new file mode 100644 index 00000000..a87e30d3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Logout/LogoutRequestBuilder.cs @@ -0,0 +1,69 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Logout { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\logout + /// + public class LogoutRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogoutRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/logout", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogoutRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/logout", rawUrl) { + } + /// + /// Remove all user sessions associated with the user Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove all user sessions associated with the user Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public LogoutRequestBuilder WithUrl(string rawUrl) { + return new LogoutRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/OfflineSessions/Item/WithClientUuItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/OfflineSessions/Item/WithClientUuItemRequestBuilder.cs new file mode 100644 index 00000000..a73a69fc --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/OfflineSessions/Item/WithClientUuItemRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.OfflineSessions.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\offline-sessions\{clientUuid} + /// + public class WithClientUuItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientUuItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/offline-sessions/{clientUuid}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientUuItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/offline-sessions/{clientUuid}", rawUrl) { + } + /// + /// Get offline sessions associated with the user and client + /// + /// A List<UserSessionRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserSessionRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get offline sessions associated with the user and client + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientUuItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientUuItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/OfflineSessions/OfflineSessionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/OfflineSessions/OfflineSessionsRequestBuilder.cs new file mode 100644 index 00000000..1a60fc2f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/OfflineSessions/OfflineSessionsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.OfflineSessions.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.OfflineSessions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\offline-sessions + /// + public class OfflineSessionsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item.offlineSessions.item collection + /// Unique identifier of the item + /// A + public WithClientUuItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("clientUuid", position); + return new WithClientUuItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OfflineSessionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/offline-sessions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OfflineSessionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/offline-sessions", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ResetPassword/ResetPasswordRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ResetPassword/ResetPasswordRequestBuilder.cs new file mode 100644 index 00000000..e8c93582 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ResetPassword/ResetPasswordRequestBuilder.cs @@ -0,0 +1,75 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ResetPassword { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\reset-password + /// + public class ResetPasswordRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResetPasswordRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/reset-password", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResetPasswordRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/reset-password", rawUrl) { + } + /// + /// Set up a new password for the user. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(CredentialRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(CredentialRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Set up a new password for the user. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(CredentialRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(CredentialRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ResetPasswordRequestBuilder WithUrl(string rawUrl) { + return new ResetPasswordRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ResetPasswordEmail/ResetPasswordEmailRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ResetPasswordEmail/ResetPasswordEmailRequestBuilder.cs new file mode 100644 index 00000000..cfc29488 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/ResetPasswordEmail/ResetPasswordEmailRequestBuilder.cs @@ -0,0 +1,98 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ResetPasswordEmail { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\reset-password-email + /// + public class ResetPasswordEmailRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResetPasswordEmailRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/reset-password-email{?client_id*,redirect_uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResetPasswordEmailRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/reset-password-email{?client_id*,redirect_uri*}", rawUrl) { + } + /// + /// The redirectUri and clientId parameters are optional. The default for the redirect is the account client. This endpoint has been deprecated. Please use the execute-actions-email passing a list with UPDATE_PASSWORD within it. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// The redirectUri and clientId parameters are optional. The default for the redirect is the account client. This endpoint has been deprecated. Please use the execute-actions-email passing a list with UPDATE_PASSWORD within it. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public ResetPasswordEmailRequestBuilder WithUrl(string rawUrl) { + return new ResetPasswordEmailRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The redirectUri and clientId parameters are optional. The default for the redirect is the account client. This endpoint has been deprecated. Please use the execute-actions-email passing a list with UPDATE_PASSWORD within it. + /// + public class ResetPasswordEmailRequestBuilderPutQueryParameters { + /// client id +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("client_id")] + public string? ClientId { get; set; } +#nullable restore +#else + [QueryParameter("client_id")] + public string ClientId { get; set; } +#endif + /// redirect uri +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("redirect_uri")] + public string? RedirectUri { get; set; } +#nullable restore +#else + [QueryParameter("redirect_uri")] + public string RedirectUri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/ClientsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/ClientsRequestBuilder.cs new file mode 100644 index 00000000..d3ea3204 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/ClientsRequestBuilder.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients.Item; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings\clients + /// + public class ClientsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item.roleMappings.clients.item collection + /// Unique identifier of the item + /// A + public WithClientItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client", position); + return new WithClientItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients", rawUrl) { + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..cf55a45a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients.Item.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings\clients\{client}\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients/{client}/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients/{client}/available", rawUrl) { + } + /// + /// Get available client-level roles that can be mapped to the user + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get available client-level roles that can be mapped to the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..4f853c1e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients.Item.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings\clients\{client}\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients/{client}/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients/{client}/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// Get effective client-level role mappings This recurses any composite roles + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get effective client-level role mappings This recurses any composite roles + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get effective client-level role mappings This recurses any composite roles + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/WithClientItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/WithClientItemRequestBuilder.cs new file mode 100644 index 00000000..93e539bf --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Clients/Item/WithClientItemRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients.Item.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients.Item.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings\clients\{client} + /// + public class WithClientItemRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients/{client}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClientItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/clients/{client}", rawUrl) { + } + /// + /// Delete client-level roles from user role mapping + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get client-level role mappings for the user, and the app + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add client-level roles to the user role mapping + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete client-level roles from user role mapping + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get client-level role mappings for the user, and the app + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add client-level roles to the user role mapping + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithClientItemRequestBuilder WithUrl(string rawUrl) { + return new WithClientItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/Available/AvailableRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/Available/AvailableRequestBuilder.cs new file mode 100644 index 00000000..40a6ba41 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/Available/AvailableRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Realm.Available { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings\realm\available + /// + public class AvailableRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/realm/available", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AvailableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/realm/available", rawUrl) { + } + /// + /// Get realm-level roles that can be mapped + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get realm-level roles that can be mapped + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public AvailableRequestBuilder WithUrl(string rawUrl) { + return new AvailableRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/Composite/CompositeRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/Composite/CompositeRequestBuilder.cs new file mode 100644 index 00000000..d0baa362 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/Composite/CompositeRequestBuilder.cs @@ -0,0 +1,81 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Realm.Composite { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings\realm\composite + /// + public class CompositeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/realm/composite{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompositeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/realm/composite{?briefRepresentation*}", rawUrl) { + } + /// + /// Get effective realm-level role mappings This will recurse all composite roles to get the result. + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get effective realm-level role mappings This will recurse all composite roles to get the result. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public CompositeRequestBuilder WithUrl(string rawUrl) { + return new CompositeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get effective realm-level role mappings This will recurse all composite roles to get the result. + /// + public class CompositeRequestBuilderGetQueryParameters { + /// if false, return roles with their attributes + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/RealmRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/RealmRequestBuilder.cs new file mode 100644 index 00000000..39ad85c8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/Realm/RealmRequestBuilder.cs @@ -0,0 +1,155 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Realm.Available; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Realm.Composite; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Realm { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings\realm + /// + public class RealmRequestBuilder : BaseRequestBuilder { + /// The available property + public AvailableRequestBuilder Available { get => + new AvailableRequestBuilder(PathParameters, RequestAdapter); + } + /// The composite property + public CompositeRequestBuilder Composite { get => + new CompositeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/realm", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings/realm", rawUrl) { + } + /// + /// Delete realm-level role mappings + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get realm-level role mappings + /// + /// A List<RoleRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RoleRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Add realm-level role mappings to the user + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(List body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete realm-level role mappings + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Get realm-level role mappings + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Add realm-level role mappings to the user + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(List body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(List body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmRequestBuilder WithUrl(string rawUrl) { + return new RealmRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/RoleMappingsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/RoleMappingsRequestBuilder.cs new file mode 100644 index 00000000..7ed5ffb7 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/RoleMappings/RoleMappingsRequestBuilder.cs @@ -0,0 +1,82 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings.Realm; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\role-mappings + /// + public class RoleMappingsRequestBuilder : BaseRequestBuilder { + /// The clients property + public ClientsRequestBuilder Clients { get => + new ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The realm property + public RealmRequestBuilder Realm { get => + new RealmRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleMappingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleMappingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/role-mappings", rawUrl) { + } + /// + /// Get role mappings + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, MappingsRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get role mappings + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RoleMappingsRequestBuilder WithUrl(string rawUrl) { + return new RoleMappingsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/SendVerifyEmail/SendVerifyEmailRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/SendVerifyEmail/SendVerifyEmailRequestBuilder.cs new file mode 100644 index 00000000..ea6d2afe --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/SendVerifyEmail/SendVerifyEmailRequestBuilder.cs @@ -0,0 +1,98 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.SendVerifyEmail { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\send-verify-email + /// + public class SendVerifyEmailRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SendVerifyEmailRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/send-verify-email{?client_id*,lifespan*,redirect_uri*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SendVerifyEmailRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/send-verify-email{?client_id*,lifespan*,redirect_uri*}", rawUrl) { + } + /// + /// The redirectUri, clientId and lifespan parameters are optional. The default for the redirect is the account client. The default for the lifespan is 12 hours + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// The redirectUri, clientId and lifespan parameters are optional. The default for the redirect is the account client. The default for the lifespan is 12 hours + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SendVerifyEmailRequestBuilder WithUrl(string rawUrl) { + return new SendVerifyEmailRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The redirectUri, clientId and lifespan parameters are optional. The default for the redirect is the account client. The default for the lifespan is 12 hours + /// + public class SendVerifyEmailRequestBuilderPutQueryParameters { + /// Client id +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("client_id")] + public string? ClientId { get; set; } +#nullable restore +#else + [QueryParameter("client_id")] + public string ClientId { get; set; } +#endif + /// Number of seconds after which the generated token expires + [QueryParameter("lifespan")] + public int? Lifespan { get; set; } + /// Redirect uri +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("redirect_uri")] + public string? RedirectUri { get; set; } +#nullable restore +#else + [QueryParameter("redirect_uri")] + public string RedirectUri { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Sessions/SessionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Sessions/SessionsRequestBuilder.cs new file mode 100644 index 00000000..43160532 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/Sessions/SessionsRequestBuilder.cs @@ -0,0 +1,73 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Sessions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id}\sessions + /// + public class SessionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SessionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/sessions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SessionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}/sessions", rawUrl) { + } + /// + /// Get sessions associated with the user + /// + /// A List<UserSessionRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserSessionRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Get sessions associated with the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public SessionsRequestBuilder WithUrl(string rawUrl) { + return new SessionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/UserItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/UserItemRequestBuilder.cs new file mode 100644 index 00000000..914c810f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Item/UserItemRequestBuilder.cs @@ -0,0 +1,224 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ConfiguredUserStorageCredentialTypes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Consents; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Credentials; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.DisableCredentialTypes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ExecuteActionsEmail; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.FederatedIdentity; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Groups; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Impersonation; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Logout; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.OfflineSessions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ResetPassword; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.ResetPasswordEmail; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.RoleMappings; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.SendVerifyEmail; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item.Sessions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\{user-id} + /// + public class UserItemRequestBuilder : BaseRequestBuilder { + /// The configuredUserStorageCredentialTypes property + public ConfiguredUserStorageCredentialTypesRequestBuilder ConfiguredUserStorageCredentialTypes { get => + new ConfiguredUserStorageCredentialTypesRequestBuilder(PathParameters, RequestAdapter); + } + /// The consents property + public ConsentsRequestBuilder Consents { get => + new ConsentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The credentials property + public CredentialsRequestBuilder Credentials { get => + new CredentialsRequestBuilder(PathParameters, RequestAdapter); + } + /// The disableCredentialTypes property + public DisableCredentialTypesRequestBuilder DisableCredentialTypes { get => + new DisableCredentialTypesRequestBuilder(PathParameters, RequestAdapter); + } + /// The executeActionsEmail property + public ExecuteActionsEmailRequestBuilder ExecuteActionsEmail { get => + new ExecuteActionsEmailRequestBuilder(PathParameters, RequestAdapter); + } + /// The federatedIdentity property + public FederatedIdentityRequestBuilder FederatedIdentity { get => + new FederatedIdentityRequestBuilder(PathParameters, RequestAdapter); + } + /// The groups property + public GroupsRequestBuilder Groups { get => + new GroupsRequestBuilder(PathParameters, RequestAdapter); + } + /// The impersonation property + public ImpersonationRequestBuilder Impersonation { get => + new ImpersonationRequestBuilder(PathParameters, RequestAdapter); + } + /// The logout property + public LogoutRequestBuilder Logout { get => + new LogoutRequestBuilder(PathParameters, RequestAdapter); + } + /// The offlineSessions property + public OfflineSessionsRequestBuilder OfflineSessions { get => + new OfflineSessionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The resetPassword property + public ResetPasswordRequestBuilder ResetPassword { get => + new ResetPasswordRequestBuilder(PathParameters, RequestAdapter); + } + /// The resetPasswordEmail property + public ResetPasswordEmailRequestBuilder ResetPasswordEmail { get => + new ResetPasswordEmailRequestBuilder(PathParameters, RequestAdapter); + } + /// The roleMappings property + public RoleMappingsRequestBuilder RoleMappings { get => + new RoleMappingsRequestBuilder(PathParameters, RequestAdapter); + } + /// The sendVerifyEmail property + public SendVerifyEmailRequestBuilder SendVerifyEmail { get => + new SendVerifyEmailRequestBuilder(PathParameters, RequestAdapter); + } + /// The sessions property + public SessionsRequestBuilder Sessions { get => + new SessionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}{?userProfileMetadata*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}{?userProfileMetadata*}", rawUrl) { + } + /// + /// Delete the user + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get representation of the user + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, UserRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the user + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(UserRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(UserRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}", PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get representation of the user + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the user + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(UserRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(UserRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, "{+baseurl}/admin/realms/{realm}/users/{user%2Did}", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UserItemRequestBuilder WithUrl(string rawUrl) { + return new UserItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get representation of the user + /// + public class UserItemRequestBuilderGetQueryParameters { + /// Indicates if the user profile metadata should be added to the response + [QueryParameter("userProfileMetadata")] + public bool? UserProfileMetadata { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Profile/Metadata/MetadataRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Profile/Metadata/MetadataRequestBuilder.cs new file mode 100644 index 00000000..8d063adf --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Profile/Metadata/MetadataRequestBuilder.cs @@ -0,0 +1,72 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Profile.Metadata { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\profile\metadata + /// + public class MetadataRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MetadataRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/profile/metadata", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MetadataRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/profile/metadata", rawUrl) { + } + /// + /// Get the UserProfileMetadata from the configuration + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, UserProfileMetadata.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the UserProfileMetadata from the configuration + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public MetadataRequestBuilder WithUrl(string rawUrl) { + return new MetadataRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Profile/ProfileRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Profile/ProfileRequestBuilder.cs new file mode 100644 index 00000000..01e78257 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/Profile/ProfileRequestBuilder.cs @@ -0,0 +1,115 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Profile.Metadata; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Profile { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users\profile + /// + public class ProfileRequestBuilder : BaseRequestBuilder { + /// The metadata property + public MetadataRequestBuilder Metadata { get => + new MetadataRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProfileRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/profile", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProfileRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users/profile", rawUrl) { + } + /// + /// Get the configuration for the user profile + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, UPConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Set the configuration for the user profile + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(UPConfig body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(UPConfig body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, UPConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the configuration for the user profile + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Set the configuration for the user profile + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(UPConfig body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(UPConfig body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public ProfileRequestBuilder WithUrl(string rawUrl) { + return new ProfileRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/UsersRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/UsersRequestBuilder.cs new file mode 100644 index 00000000..8d3b4440 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/Users/UsersRequestBuilder.cs @@ -0,0 +1,232 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Count; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users.Profile; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users + /// + public class UsersRequestBuilder : BaseRequestBuilder { + /// The count property + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// The profile property + public ProfileRequestBuilder Profile { get => + new ProfileRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item.users.item collection + /// Unique identifier of the item + /// A + public UserItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("user%2Did", position); + return new UserItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users{?briefRepresentation*,email*,emailVerified*,enabled*,exact*,first*,firstName*,idpAlias*,idpUserId*,lastName*,max*,q*,search*,username*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users{?briefRepresentation*,email*,emailVerified*,enabled*,exact*,first*,firstName*,idpAlias*,idpUserId*,lastName*,max*,q*,search*,username*}", rawUrl) { + } + /// + /// Get users Returns a stream of users, filtered according to query parameters. + /// + /// A List<UserRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, UserRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Create a new user Username must be unique. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(UserRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get users Returns a stream of users, filtered according to query parameters. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new user Username must be unique. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(UserRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms/{realm}/users", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UsersRequestBuilder WithUrl(string rawUrl) { + return new UsersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get users Returns a stream of users, filtered according to query parameters. + /// + public class UsersRequestBuilderGetQueryParameters { + /// Boolean which defines whether brief representations are returned (default: false) + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + /// A String contained in email, or the complete email, if param "exact" is true +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("email")] + public string? Email { get; set; } +#nullable restore +#else + [QueryParameter("email")] + public string Email { get; set; } +#endif + /// whether the email has been verified + [QueryParameter("emailVerified")] + public bool? EmailVerified { get; set; } + /// Boolean representing if user is enabled or not + [QueryParameter("enabled")] + public bool? Enabled { get; set; } + /// Boolean which defines whether the params "last", "first", "email" and "username" must match exactly + [QueryParameter("exact")] + public bool? Exact { get; set; } + /// Pagination offset + [QueryParameter("first")] + public int? First { get; set; } + /// A String contained in firstName, or the complete firstName, if param "exact" is true +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("firstName")] + public string? FirstName { get; set; } +#nullable restore +#else + [QueryParameter("firstName")] + public string FirstName { get; set; } +#endif + /// The alias of an Identity Provider linked to the user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("idpAlias")] + public string? IdpAlias { get; set; } +#nullable restore +#else + [QueryParameter("idpAlias")] + public string IdpAlias { get; set; } +#endif + /// The userId at an Identity Provider linked to the user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("idpUserId")] + public string? IdpUserId { get; set; } +#nullable restore +#else + [QueryParameter("idpUserId")] + public string IdpUserId { get; set; } +#endif + /// A String contained in lastName, or the complete lastName, if param "exact" is true +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("lastName")] + public string? LastName { get; set; } +#nullable restore +#else + [QueryParameter("lastName")] + public string LastName { get; set; } +#endif + /// Maximum results size (defaults to 100) + [QueryParameter("max")] + public int? Max { get; set; } + /// A query to search for custom attributes, in the format 'key1:value2 key2:value2' +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// A String contained in username, first or last name, or email. Default search behavior is prefix-based (e.g., foo or foo*). Use *foo* for infix search and "foo" for exact search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("search")] + public string Search { get; set; } +#endif + /// A String contained in username, or the complete username, if param "exact" is true +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("username")] + public string? Username { get; set; } +#nullable restore +#else + [QueryParameter("username")] + public string Username { get; set; } +#endif + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/UsersManagementPermissions/UsersManagementPermissionsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/UsersManagementPermissions/UsersManagementPermissionsRequestBuilder.cs new file mode 100644 index 00000000..329007dd --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/UsersManagementPermissions/UsersManagementPermissionsRequestBuilder.cs @@ -0,0 +1,98 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.UsersManagementPermissions { + /// + /// Builds and executes requests for operations under \admin\realms\{realm}\users-management-permissions + /// + public class UsersManagementPermissionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersManagementPermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users-management-permissions", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersManagementPermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/users-management-permissions", rawUrl) { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(ManagementPermissionReference body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(ManagementPermissionReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, ManagementPermissionReference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(ManagementPermissionReference body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public UsersManagementPermissionsRequestBuilder WithUrl(string rawUrl) { + return new UsersManagementPermissionsRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/WithRealmItemRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/WithRealmItemRequestBuilder.cs new file mode 100644 index 00000000..5655f822 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/Item/WithRealmItemRequestBuilder.cs @@ -0,0 +1,300 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Authentication; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientDescriptionConverter; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientPolicies; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientRegistrationPolicy; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientScopes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientSessionStats; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientTemplates; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Clients; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.ClientsInitialAccess; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Components; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.CredentialRegistrators; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultDefaultClientScopes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultGroups; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.DefaultOptionalClientScopes; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Events; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.GroupByPath; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Groups; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.IdentityProvider; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Keys; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Localization; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.LogoutAll; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.PartialExport; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.PartialImport; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.PushRevocation; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Roles; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.RolesById; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Sessions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.TestSMTPConnection; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.Users; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.UsersManagementPermissions; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item { + /// + /// Builds and executes requests for operations under \admin\realms\{realm} + /// + public class WithRealmItemRequestBuilder : BaseRequestBuilder { + /// The adminEvents property + public AdminEventsRequestBuilder AdminEvents { get => + new AdminEventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The attackDetection property + public AttackDetectionRequestBuilder AttackDetection { get => + new AttackDetectionRequestBuilder(PathParameters, RequestAdapter); + } + /// The authentication property + public AuthenticationRequestBuilder Authentication { get => + new AuthenticationRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientDescriptionConverter property + public ClientDescriptionConverterRequestBuilder ClientDescriptionConverter { get => + new ClientDescriptionConverterRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientPolicies property + public ClientPoliciesRequestBuilder ClientPolicies { get => + new ClientPoliciesRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientRegistrationPolicy property + public ClientRegistrationPolicyRequestBuilder ClientRegistrationPolicy { get => + new ClientRegistrationPolicyRequestBuilder(PathParameters, RequestAdapter); + } + /// The clients property + public ClientsRequestBuilder Clients { get => + new ClientsRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientScopes property + public ClientScopesRequestBuilder ClientScopes { get => + new ClientScopesRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientSessionStats property + public ClientSessionStatsRequestBuilder ClientSessionStats { get => + new ClientSessionStatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientsInitialAccess property + public ClientsInitialAccessRequestBuilder ClientsInitialAccess { get => + new ClientsInitialAccessRequestBuilder(PathParameters, RequestAdapter); + } + /// The clientTemplates property + public ClientTemplatesRequestBuilder ClientTemplates { get => + new ClientTemplatesRequestBuilder(PathParameters, RequestAdapter); + } + /// The components property + public ComponentsRequestBuilder Components { get => + new ComponentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The credentialRegistrators property + public CredentialRegistratorsRequestBuilder CredentialRegistrators { get => + new CredentialRegistratorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaultDefaultClientScopes property + public DefaultDefaultClientScopesRequestBuilder DefaultDefaultClientScopes { get => + new DefaultDefaultClientScopesRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaultGroups property + public DefaultGroupsRequestBuilder DefaultGroups { get => + new DefaultGroupsRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaultOptionalClientScopes property + public DefaultOptionalClientScopesRequestBuilder DefaultOptionalClientScopes { get => + new DefaultOptionalClientScopesRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public EventsRequestBuilder Events { get => + new EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The groupByPath property + public GroupByPathRequestBuilder GroupByPath { get => + new GroupByPathRequestBuilder(PathParameters, RequestAdapter); + } + /// The groups property + public GroupsRequestBuilder Groups { get => + new GroupsRequestBuilder(PathParameters, RequestAdapter); + } + /// The identityProvider property + public IdentityProviderRequestBuilder IdentityProvider { get => + new IdentityProviderRequestBuilder(PathParameters, RequestAdapter); + } + /// The keys property + public KeysRequestBuilder Keys { get => + new KeysRequestBuilder(PathParameters, RequestAdapter); + } + /// The localization property + public LocalizationRequestBuilder Localization { get => + new LocalizationRequestBuilder(PathParameters, RequestAdapter); + } + /// The logoutAll property + public LogoutAllRequestBuilder LogoutAll { get => + new LogoutAllRequestBuilder(PathParameters, RequestAdapter); + } + /// The partialExport property + public PartialExportRequestBuilder PartialExport { get => + new PartialExportRequestBuilder(PathParameters, RequestAdapter); + } + /// The partialImport property + public PartialImportRequestBuilder PartialImport { get => + new PartialImportRequestBuilder(PathParameters, RequestAdapter); + } + /// The pushRevocation property + public PushRevocationRequestBuilder PushRevocation { get => + new PushRevocationRequestBuilder(PathParameters, RequestAdapter); + } + /// The roles property + public RolesRequestBuilder Roles { get => + new RolesRequestBuilder(PathParameters, RequestAdapter); + } + /// The rolesById property + public RolesByIdRequestBuilder RolesById { get => + new RolesByIdRequestBuilder(PathParameters, RequestAdapter); + } + /// The sessions property + public SessionsRequestBuilder Sessions { get => + new SessionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The testSMTPConnection property + public TestSMTPConnectionRequestBuilder TestSMTPConnection { get => + new TestSMTPConnectionRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public UsersRequestBuilder Users { get => + new UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// The usersManagementPermissions property + public UsersManagementPermissionsRequestBuilder UsersManagementPermissions { get => + new UsersManagementPermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRealmItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRealmItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}", rawUrl) { + } + /// + /// Delete the realm + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the top-level representation of the realm It will not include nested information like User and Client representations. + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, RealmRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// This will only update top-level attributes of the realm. + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(RealmRepresentation body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(RealmRepresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete the realm + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Get the top-level representation of the realm It will not include nested information like User and Client representations. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// This will only update top-level attributes of the realm. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(RealmRepresentation body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(RealmRepresentation body, Action> requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithRealmItemRequestBuilder WithUrl(string rawUrl) { + return new WithRealmItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/RealmsRequestBuilder.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/RealmsRequestBuilder.cs new file mode 100644 index 00000000..e4ff91c3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Admin/Realms/RealmsRequestBuilder.cs @@ -0,0 +1,125 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item; +using Keycloak.AuthServices.Sdk.Kiota.Admin.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms { + /// + /// Builds and executes requests for operations under \admin\realms + /// + public class RealmsRequestBuilder : BaseRequestBuilder { + /// Gets an item from the Keycloak.AuthServices.Sdk.Kiota.Admin.admin.realms.item collection + /// realm name (not id!) + /// A + public WithRealmItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("realm", position); + return new WithRealmItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RealmsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms{?briefRepresentation*}", pathParameters) { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RealmsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms{?briefRepresentation*}", rawUrl) { + } + /// + /// Get accessible realms Returns a list of accessible realms. The list is filtered based on what realms the caller is allowed to view. + /// + /// A List<RealmRepresentation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, RealmRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.ToList(); + } + /// + /// Realm name must be unique. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get accessible realms Returns a list of accessible realms. The list is filtered based on what realms the caller is allowed to view. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Realm name must be unique. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(string body, Action>? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(string body, Action> requestConfiguration = default) { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/admin/realms", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromScalar(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public RealmsRequestBuilder WithUrl(string rawUrl) { + return new RealmsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get accessible realms Returns a list of accessible realms. The list is filtered based on what realms the caller is allowed to view. + /// + public class RealmsRequestBuilderGetQueryParameters { + [QueryParameter("briefRepresentation")] + public bool? BriefRepresentation { get; set; } + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Keycloak.AuthServices.Sdk.Kiota.csproj b/src/Keycloak.AuthServices.Sdk.Kiota/Keycloak.AuthServices.Sdk.Kiota.csproj new file mode 100644 index 00000000..04e21eb7 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Keycloak.AuthServices.Sdk.Kiota.csproj @@ -0,0 +1,32 @@ +๏ปฟ + + + Keycloak.AuthServices.Sdk.Kiota + CS1591;CS0618 + + + + Keycloak.AuthServices.Sdk.Kiota + Keycloak HTTP Admin API generated by Kiota + Keycloak;KeycloakAdminAPI;HttpClient + true + 24.0.1 + + + + + + + + + + + + + + + + + + + diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/KeycloakAdminApiClient.cs b/src/Keycloak.AuthServices.Sdk.Kiota/KeycloakAdminApiClient.cs new file mode 100644 index 00000000..f96147ec --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/KeycloakAdminApiClient.cs @@ -0,0 +1,37 @@ +// +using Keycloak.AuthServices.Sdk.Kiota.Admin.Admin; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Serialization.Form; +using Microsoft.Kiota.Serialization.Json; +using Microsoft.Kiota.Serialization.Multipart; +using Microsoft.Kiota.Serialization.Text; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin { + /// + /// The main entry point of the SDK, exposes the configuration and the fluent API. + /// + public class KeycloakAdminApiClient : BaseRequestBuilder { + /// The admin property + public AdminRequestBuilder Admin { get => + new AdminRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// The request adapter to use to execute the requests. + public KeycloakAdminApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary()) { + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/KeycloakAdminClientOptions.cs b/src/Keycloak.AuthServices.Sdk.Kiota/KeycloakAdminClientOptions.cs new file mode 100644 index 00000000..cc298a4a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/KeycloakAdminClientOptions.cs @@ -0,0 +1,14 @@ +๏ปฟnamespace Keycloak.AuthServices.Sdk.Kiota; + +using Common; + +/// +/// Defines a set of options used to perform Admin HTTP Client calls +/// +public sealed class KeycloakAdminClientOptions : KeycloakInstallationOptions +{ + /// + /// Default section name + /// + public const string Section = ConfigurationConstants.ConfigurationPrefix; +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/.editorconfig b/src/Keycloak.AuthServices.Sdk.Kiota/Models/.editorconfig new file mode 100644 index 00000000..1c949236 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/.editorconfig @@ -0,0 +1,5 @@ + +# CS1591: Missing XML comment for publicly visible type or member +dotnet_diagnostic.CS1591.severity = none +# CS0618: 'member' is obsolete +dotnet_diagnostic.CS0618.severity = none diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AbstractPolicyRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AbstractPolicyRepresentation.cs new file mode 100644 index 00000000..136e6b3c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AbstractPolicyRepresentation.cs @@ -0,0 +1,151 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AbstractPolicyRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The decisionStrategy property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.DecisionStrategy? DecisionStrategy { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The logic property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Logic? Logic { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The owner property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Owner { get; set; } +#nullable restore +#else + public string Owner { get; set; } +#endif + /// The policies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Policies { get; set; } +#nullable restore +#else + public List Policies { get; set; } +#endif + /// The resources property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Resources { get; set; } +#nullable restore +#else + public List Resources { get; set; } +#endif + /// The resourcesData property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ResourcesData { get; set; } +#nullable restore +#else + public List ResourcesData { get; set; } +#endif + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// The scopesData property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ScopesData { get; set; } +#nullable restore +#else + public List ScopesData { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AbstractPolicyRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AbstractPolicyRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AbstractPolicyRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"decisionStrategy", n => { DecisionStrategy = n.GetEnumValue(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"logic", n => { Logic = n.GetEnumValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"owner", n => { Owner = n.GetStringValue(); } }, + {"policies", n => { Policies = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"resources", n => { Resources = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"resourcesData", n => { ResourcesData = n.GetCollectionOfObjectValues(ResourceRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"scopes", n => { Scopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"scopesData", n => { ScopesData = n.GetCollectionOfObjectValues(ScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("decisionStrategy", DecisionStrategy); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("id", Id); + writer.WriteEnumValue("logic", Logic); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("owner", Owner); + writer.WriteCollectionOfPrimitiveValues("policies", Policies); + writer.WriteCollectionOfPrimitiveValues("resources", Resources); + writer.WriteCollectionOfObjectValues("resourcesData", ResourcesData); + writer.WriteCollectionOfPrimitiveValues("scopes", Scopes); + writer.WriteCollectionOfObjectValues("scopesData", ScopesData); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Access.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Access.cs new file mode 100644 index 00000000..394df3e9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Access.cs @@ -0,0 +1,57 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class Access : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The roles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Roles { get; set; } +#nullable restore +#else + public List Roles { get; set; } +#endif + /// The verify_caller property + public bool? VerifyCaller { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Access() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Access CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Access(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"roles", n => { Roles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"verify_caller", n => { VerifyCaller = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("roles", Roles); + writer.WriteBoolValue("verify_caller", VerifyCaller); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken.cs new file mode 100644 index 00000000..5d2aadb4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken.cs @@ -0,0 +1,446 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AccessToken : IAdditionalDataHolder, IParsable { + /// The acr property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Acr { get; set; } +#nullable restore +#else + public string Acr { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The address property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AddressClaimSet? Address { get; set; } +#nullable restore +#else + public AddressClaimSet Address { get; set; } +#endif + /// The allowedOrigins property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedOrigins { get; set; } +#nullable restore +#else + public List AllowedOrigins { get; set; } +#endif + /// The at_hash property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AtHash { get; set; } +#nullable restore +#else + public string AtHash { get; set; } +#endif + /// The auth_time property + public long? Auth_time { get; set; } + /// The authorization property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Authorization? Authorization { get; set; } +#nullable restore +#else + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Authorization Authorization { get; set; } +#endif + /// The authTime property + [Obsolete("")] + public int? AuthTime { get; set; } + /// The azp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Azp { get; set; } +#nullable restore +#else + public string Azp { get; set; } +#endif + /// The birthdate property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Birthdate { get; set; } +#nullable restore +#else + public string Birthdate { get; set; } +#endif + /// The c_hash property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CHash { get; set; } +#nullable restore +#else + public string CHash { get; set; } +#endif + /// The claims_locales property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClaimsLocales { get; set; } +#nullable restore +#else + public string ClaimsLocales { get; set; } +#endif + /// The cnf property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Confirmation? Cnf { get; set; } +#nullable restore +#else + public Confirmation Cnf { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The email_verified property + public bool? EmailVerified { get; set; } + /// The exp property + public long? Exp { get; set; } + /// The family_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FamilyName { get; set; } +#nullable restore +#else + public string FamilyName { get; set; } +#endif + /// The gender property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Gender { get; set; } +#nullable restore +#else + public string Gender { get; set; } +#endif + /// The given_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GivenName { get; set; } +#nullable restore +#else + public string GivenName { get; set; } +#endif + /// The iat property + public long? Iat { get; set; } + /// The iss property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Iss { get; set; } +#nullable restore +#else + public string Iss { get; set; } +#endif + /// The jti property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Jti { get; set; } +#nullable restore +#else + public string Jti { get; set; } +#endif + /// The locale property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Locale { get; set; } +#nullable restore +#else + public string Locale { get; set; } +#endif + /// The middle_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MiddleName { get; set; } +#nullable restore +#else + public string MiddleName { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The nbf property + public long? Nbf { get; set; } + /// The nickname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Nickname { get; set; } +#nullable restore +#else + public string Nickname { get; set; } +#endif + /// The nonce property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Nonce { get; set; } +#nullable restore +#else + public string Nonce { get; set; } +#endif + /// The otherClaims property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AccessToken_otherClaims? OtherClaims { get; set; } +#nullable restore +#else + public AccessToken_otherClaims OtherClaims { get; set; } +#endif + /// The phone_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PhoneNumber { get; set; } +#nullable restore +#else + public string PhoneNumber { get; set; } +#endif + /// The phone_number_verified property + public bool? PhoneNumberVerified { get; set; } + /// The picture property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Picture { get; set; } +#nullable restore +#else + public string Picture { get; set; } +#endif + /// The preferred_username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreferredUsername { get; set; } +#nullable restore +#else + public string PreferredUsername { get; set; } +#endif + /// The profile property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Profile { get; set; } +#nullable restore +#else + public string Profile { get; set; } +#endif + /// The realm_access property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Access? RealmAccess { get; set; } +#nullable restore +#else + public Access RealmAccess { get; set; } +#endif + /// The resource_access property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AccessToken_resource_access? ResourceAccess { get; set; } +#nullable restore +#else + public AccessToken_resource_access ResourceAccess { get; set; } +#endif + /// The scope property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Scope { get; set; } +#nullable restore +#else + public string Scope { get; set; } +#endif + /// The session_state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SessionState { get; set; } +#nullable restore +#else + public string SessionState { get; set; } +#endif + /// The s_hash property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SHash { get; set; } +#nullable restore +#else + public string SHash { get; set; } +#endif + /// The sid property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sid { get; set; } +#nullable restore +#else + public string Sid { get; set; } +#endif + /// The sub property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sub { get; set; } +#nullable restore +#else + public string Sub { get; set; } +#endif + /// The trustedCerts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TrustedCerts { get; set; } +#nullable restore +#else + public List TrustedCerts { get; set; } +#endif + /// The typ property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Typ { get; set; } +#nullable restore +#else + public string Typ { get; set; } +#endif + /// The updated_at property + public long? UpdatedAt { get; set; } + /// The website property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Website { get; set; } +#nullable restore +#else + public string Website { get; set; } +#endif + /// The zoneinfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Zoneinfo { get; set; } +#nullable restore +#else + public string Zoneinfo { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AccessToken() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AccessToken CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessToken(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"acr", n => { Acr = n.GetStringValue(); } }, + {"address", n => { Address = n.GetObjectValue(AddressClaimSet.CreateFromDiscriminatorValue); } }, + {"allowed-origins", n => { AllowedOrigins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"at_hash", n => { AtHash = n.GetStringValue(); } }, + {"authTime", n => { AuthTime = n.GetIntValue(); } }, + {"authorization", n => { Authorization = n.GetObjectValue(Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Authorization.CreateFromDiscriminatorValue); } }, + {"azp", n => { Azp = n.GetStringValue(); } }, + {"birthdate", n => { Birthdate = n.GetStringValue(); } }, + {"c_hash", n => { CHash = n.GetStringValue(); } }, + {"claims_locales", n => { ClaimsLocales = n.GetStringValue(); } }, + {"cnf", n => { Cnf = n.GetObjectValue(Confirmation.CreateFromDiscriminatorValue); } }, + {"email", n => { Email = n.GetStringValue(); } }, + {"email_verified", n => { EmailVerified = n.GetBoolValue(); } }, + {"exp", n => { Exp = n.GetLongValue(); } }, + {"family_name", n => { FamilyName = n.GetStringValue(); } }, + {"gender", n => { Gender = n.GetStringValue(); } }, + {"given_name", n => { GivenName = n.GetStringValue(); } }, + {"iat", n => { Iat = n.GetLongValue(); } }, + {"iss", n => { Iss = n.GetStringValue(); } }, + {"jti", n => { Jti = n.GetStringValue(); } }, + {"locale", n => { Locale = n.GetStringValue(); } }, + {"middle_name", n => { MiddleName = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"nbf", n => { Nbf = n.GetLongValue(); } }, + {"nickname", n => { Nickname = n.GetStringValue(); } }, + {"nonce", n => { Nonce = n.GetStringValue(); } }, + {"otherClaims", n => { OtherClaims = n.GetObjectValue(AccessToken_otherClaims.CreateFromDiscriminatorValue); } }, + {"phone_number", n => { PhoneNumber = n.GetStringValue(); } }, + {"phone_number_verified", n => { PhoneNumberVerified = n.GetBoolValue(); } }, + {"picture", n => { Picture = n.GetStringValue(); } }, + {"preferred_username", n => { PreferredUsername = n.GetStringValue(); } }, + {"profile", n => { Profile = n.GetStringValue(); } }, + {"realm_access", n => { RealmAccess = n.GetObjectValue(Access.CreateFromDiscriminatorValue); } }, + {"resource_access", n => { ResourceAccess = n.GetObjectValue(AccessToken_resource_access.CreateFromDiscriminatorValue); } }, + {"s_hash", n => { SHash = n.GetStringValue(); } }, + {"scope", n => { Scope = n.GetStringValue(); } }, + {"session_state", n => { SessionState = n.GetStringValue(); } }, + {"sid", n => { Sid = n.GetStringValue(); } }, + {"sub", n => { Sub = n.GetStringValue(); } }, + {"trusted-certs", n => { TrustedCerts = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"typ", n => { Typ = n.GetStringValue(); } }, + {"updated_at", n => { UpdatedAt = n.GetLongValue(); } }, + {"website", n => { Website = n.GetStringValue(); } }, + {"zoneinfo", n => { Zoneinfo = n.GetStringValue(); } }, + {"auth_time", n => { Auth_time = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("acr", Acr); + writer.WriteObjectValue("address", Address); + writer.WriteCollectionOfPrimitiveValues("allowed-origins", AllowedOrigins); + writer.WriteStringValue("at_hash", AtHash); + writer.WriteLongValue("auth_time", Auth_time); + writer.WriteObjectValue("authorization", Authorization); + writer.WriteIntValue("authTime", AuthTime); + writer.WriteStringValue("azp", Azp); + writer.WriteStringValue("birthdate", Birthdate); + writer.WriteStringValue("c_hash", CHash); + writer.WriteStringValue("claims_locales", ClaimsLocales); + writer.WriteObjectValue("cnf", Cnf); + writer.WriteStringValue("email", Email); + writer.WriteBoolValue("email_verified", EmailVerified); + writer.WriteLongValue("exp", Exp); + writer.WriteStringValue("family_name", FamilyName); + writer.WriteStringValue("gender", Gender); + writer.WriteStringValue("given_name", GivenName); + writer.WriteLongValue("iat", Iat); + writer.WriteStringValue("iss", Iss); + writer.WriteStringValue("jti", Jti); + writer.WriteStringValue("locale", Locale); + writer.WriteStringValue("middle_name", MiddleName); + writer.WriteStringValue("name", Name); + writer.WriteLongValue("nbf", Nbf); + writer.WriteStringValue("nickname", Nickname); + writer.WriteStringValue("nonce", Nonce); + writer.WriteObjectValue("otherClaims", OtherClaims); + writer.WriteStringValue("phone_number", PhoneNumber); + writer.WriteBoolValue("phone_number_verified", PhoneNumberVerified); + writer.WriteStringValue("picture", Picture); + writer.WriteStringValue("preferred_username", PreferredUsername); + writer.WriteStringValue("profile", Profile); + writer.WriteObjectValue("realm_access", RealmAccess); + writer.WriteObjectValue("resource_access", ResourceAccess); + writer.WriteStringValue("scope", Scope); + writer.WriteStringValue("session_state", SessionState); + writer.WriteStringValue("s_hash", SHash); + writer.WriteStringValue("sid", Sid); + writer.WriteStringValue("sub", Sub); + writer.WriteCollectionOfPrimitiveValues("trusted-certs", TrustedCerts); + writer.WriteStringValue("typ", Typ); + writer.WriteLongValue("updated_at", UpdatedAt); + writer.WriteStringValue("website", Website); + writer.WriteStringValue("zoneinfo", Zoneinfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken_otherClaims.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken_otherClaims.cs new file mode 100644 index 00000000..00e4c680 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken_otherClaims.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AccessToken_otherClaims : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AccessToken_otherClaims() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AccessToken_otherClaims CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessToken_otherClaims(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken_resource_access.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken_resource_access.cs new file mode 100644 index 00000000..61fe1168 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AccessToken_resource_access.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AccessToken_resource_access : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AccessToken_resource_access() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AccessToken_resource_access CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessToken_resource_access(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AddressClaimSet.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AddressClaimSet.cs new file mode 100644 index 00000000..36fa54a0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AddressClaimSet.cs @@ -0,0 +1,103 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AddressClaimSet : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The country property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Country { get; set; } +#nullable restore +#else + public string Country { get; set; } +#endif + /// The formatted property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Formatted { get; set; } +#nullable restore +#else + public string Formatted { get; set; } +#endif + /// The locality property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Locality { get; set; } +#nullable restore +#else + public string Locality { get; set; } +#endif + /// The postal_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PostalCode { get; set; } +#nullable restore +#else + public string PostalCode { get; set; } +#endif + /// The region property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Region { get; set; } +#nullable restore +#else + public string Region { get; set; } +#endif + /// The street_address property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StreetAddress { get; set; } +#nullable restore +#else + public string StreetAddress { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AddressClaimSet() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AddressClaimSet CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AddressClaimSet(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"country", n => { Country = n.GetStringValue(); } }, + {"formatted", n => { Formatted = n.GetStringValue(); } }, + {"locality", n => { Locality = n.GetStringValue(); } }, + {"postal_code", n => { PostalCode = n.GetStringValue(); } }, + {"region", n => { Region = n.GetStringValue(); } }, + {"street_address", n => { StreetAddress = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("country", Country); + writer.WriteStringValue("formatted", Formatted); + writer.WriteStringValue("locality", Locality); + writer.WriteStringValue("postal_code", PostalCode); + writer.WriteStringValue("region", Region); + writer.WriteStringValue("street_address", StreetAddress); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AdminEventRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AdminEventRepresentation.cs new file mode 100644 index 00000000..623e5695 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AdminEventRepresentation.cs @@ -0,0 +1,117 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AdminEventRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The authDetails property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AuthDetailsRepresentation? AuthDetails { get; set; } +#nullable restore +#else + public AuthDetailsRepresentation AuthDetails { get; set; } +#endif + /// The error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Error { get; set; } +#nullable restore +#else + public string Error { get; set; } +#endif + /// The operationType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OperationType { get; set; } +#nullable restore +#else + public string OperationType { get; set; } +#endif + /// The realmId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RealmId { get; set; } +#nullable restore +#else + public string RealmId { get; set; } +#endif + /// The representation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Representation { get; set; } +#nullable restore +#else + public string Representation { get; set; } +#endif + /// The resourcePath property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ResourcePath { get; set; } +#nullable restore +#else + public string ResourcePath { get; set; } +#endif + /// The resourceType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ResourceType { get; set; } +#nullable restore +#else + public string ResourceType { get; set; } +#endif + /// The time property + public long? Time { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AdminEventRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AdminEventRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AdminEventRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"authDetails", n => { AuthDetails = n.GetObjectValue(AuthDetailsRepresentation.CreateFromDiscriminatorValue); } }, + {"error", n => { Error = n.GetStringValue(); } }, + {"operationType", n => { OperationType = n.GetStringValue(); } }, + {"realmId", n => { RealmId = n.GetStringValue(); } }, + {"representation", n => { Representation = n.GetStringValue(); } }, + {"resourcePath", n => { ResourcePath = n.GetStringValue(); } }, + {"resourceType", n => { ResourceType = n.GetStringValue(); } }, + {"time", n => { Time = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("authDetails", AuthDetails); + writer.WriteStringValue("error", Error); + writer.WriteStringValue("operationType", OperationType); + writer.WriteStringValue("realmId", RealmId); + writer.WriteStringValue("representation", Representation); + writer.WriteStringValue("resourcePath", ResourcePath); + writer.WriteStringValue("resourceType", ResourceType); + writer.WriteLongValue("time", Time); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation.cs new file mode 100644 index 00000000..8d16f3f8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation.cs @@ -0,0 +1,377 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class ApplicationRepresentation : IAdditionalDataHolder, IParsable { + /// The access property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ApplicationRepresentation_access? Access { get; set; } +#nullable restore +#else + public ApplicationRepresentation_access Access { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The adminUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdminUrl { get; set; } +#nullable restore +#else + public string AdminUrl { get; set; } +#endif + /// The alwaysDisplayInConsole property + public bool? AlwaysDisplayInConsole { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ApplicationRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public ApplicationRepresentation_attributes Attributes { get; set; } +#endif + /// The authenticationFlowBindingOverrides property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ApplicationRepresentation_authenticationFlowBindingOverrides? AuthenticationFlowBindingOverrides { get; set; } +#nullable restore +#else + public ApplicationRepresentation_authenticationFlowBindingOverrides AuthenticationFlowBindingOverrides { get; set; } +#endif + /// The authorizationServicesEnabled property + public bool? AuthorizationServicesEnabled { get; set; } + /// The authorizationSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ResourceServerRepresentation? AuthorizationSettings { get; set; } +#nullable restore +#else + public ResourceServerRepresentation AuthorizationSettings { get; set; } +#endif + /// The baseUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BaseUrl { get; set; } +#nullable restore +#else + public string BaseUrl { get; set; } +#endif + /// The bearerOnly property + public bool? BearerOnly { get; set; } + /// The claims property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ApplicationRepresentation_claims? Claims { get; set; } +#nullable restore +#else + public ApplicationRepresentation_claims Claims { get; set; } +#endif + /// The clientAuthenticatorType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientAuthenticatorType { get; set; } +#nullable restore +#else + public string ClientAuthenticatorType { get; set; } +#endif + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The clientTemplate property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientTemplate { get; set; } +#nullable restore +#else + public string ClientTemplate { get; set; } +#endif + /// The consentRequired property + public bool? ConsentRequired { get; set; } + /// The defaultClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultClientScopes { get; set; } +#nullable restore +#else + public List DefaultClientScopes { get; set; } +#endif + /// The defaultRoles property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultRoles { get; set; } +#nullable restore +#else + public List DefaultRoles { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The directAccessGrantsEnabled property + public bool? DirectAccessGrantsEnabled { get; set; } + /// The directGrantsOnly property + [Obsolete("")] + public bool? DirectGrantsOnly { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The frontchannelLogout property + public bool? FrontchannelLogout { get; set; } + /// The fullScopeAllowed property + public bool? FullScopeAllowed { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The implicitFlowEnabled property + public bool? ImplicitFlowEnabled { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The nodeReRegistrationTimeout property + public int? NodeReRegistrationTimeout { get; set; } + /// The notBefore property + public int? NotBefore { get; set; } + /// The optionalClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? OptionalClientScopes { get; set; } +#nullable restore +#else + public List OptionalClientScopes { get; set; } +#endif + /// The origin property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Origin { get; set; } +#nullable restore +#else + public string Origin { get; set; } +#endif + /// The protocol property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Protocol { get; set; } +#nullable restore +#else + public string Protocol { get; set; } +#endif + /// The protocolMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProtocolMappers { get; set; } +#nullable restore +#else + public List ProtocolMappers { get; set; } +#endif + /// The publicClient property + public bool? PublicClient { get; set; } + /// The redirectUris property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RedirectUris { get; set; } +#nullable restore +#else + public List RedirectUris { get; set; } +#endif + /// The registeredNodes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ApplicationRepresentation_registeredNodes? RegisteredNodes { get; set; } +#nullable restore +#else + public ApplicationRepresentation_registeredNodes RegisteredNodes { get; set; } +#endif + /// The registrationAccessToken property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RegistrationAccessToken { get; set; } +#nullable restore +#else + public string RegistrationAccessToken { get; set; } +#endif + /// The rootUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RootUrl { get; set; } +#nullable restore +#else + public string RootUrl { get; set; } +#endif + /// The secret property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The serviceAccountsEnabled property + public bool? ServiceAccountsEnabled { get; set; } + /// The standardFlowEnabled property + public bool? StandardFlowEnabled { get; set; } + /// The surrogateAuthRequired property + public bool? SurrogateAuthRequired { get; set; } + /// The useTemplateConfig property + [Obsolete("")] + public bool? UseTemplateConfig { get; set; } + /// The useTemplateMappers property + [Obsolete("")] + public bool? UseTemplateMappers { get; set; } + /// The useTemplateScope property + [Obsolete("")] + public bool? UseTemplateScope { get; set; } + /// The webOrigins property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebOrigins { get; set; } +#nullable restore +#else + public List WebOrigins { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ApplicationRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ApplicationRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ApplicationRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"access", n => { Access = n.GetObjectValue(ApplicationRepresentation_access.CreateFromDiscriminatorValue); } }, + {"adminUrl", n => { AdminUrl = n.GetStringValue(); } }, + {"alwaysDisplayInConsole", n => { AlwaysDisplayInConsole = n.GetBoolValue(); } }, + {"attributes", n => { Attributes = n.GetObjectValue(ApplicationRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"authenticationFlowBindingOverrides", n => { AuthenticationFlowBindingOverrides = n.GetObjectValue(ApplicationRepresentation_authenticationFlowBindingOverrides.CreateFromDiscriminatorValue); } }, + {"authorizationServicesEnabled", n => { AuthorizationServicesEnabled = n.GetBoolValue(); } }, + {"authorizationSettings", n => { AuthorizationSettings = n.GetObjectValue(ResourceServerRepresentation.CreateFromDiscriminatorValue); } }, + {"baseUrl", n => { BaseUrl = n.GetStringValue(); } }, + {"bearerOnly", n => { BearerOnly = n.GetBoolValue(); } }, + {"claims", n => { Claims = n.GetObjectValue(ApplicationRepresentation_claims.CreateFromDiscriminatorValue); } }, + {"clientAuthenticatorType", n => { ClientAuthenticatorType = n.GetStringValue(); } }, + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"clientTemplate", n => { ClientTemplate = n.GetStringValue(); } }, + {"consentRequired", n => { ConsentRequired = n.GetBoolValue(); } }, + {"defaultClientScopes", n => { DefaultClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"defaultRoles", n => { DefaultRoles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"directAccessGrantsEnabled", n => { DirectAccessGrantsEnabled = n.GetBoolValue(); } }, + {"directGrantsOnly", n => { DirectGrantsOnly = n.GetBoolValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"frontchannelLogout", n => { FrontchannelLogout = n.GetBoolValue(); } }, + {"fullScopeAllowed", n => { FullScopeAllowed = n.GetBoolValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"implicitFlowEnabled", n => { ImplicitFlowEnabled = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"nodeReRegistrationTimeout", n => { NodeReRegistrationTimeout = n.GetIntValue(); } }, + {"notBefore", n => { NotBefore = n.GetIntValue(); } }, + {"optionalClientScopes", n => { OptionalClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"origin", n => { Origin = n.GetStringValue(); } }, + {"protocol", n => { Protocol = n.GetStringValue(); } }, + {"protocolMappers", n => { ProtocolMappers = n.GetCollectionOfObjectValues(ProtocolMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"publicClient", n => { PublicClient = n.GetBoolValue(); } }, + {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"registeredNodes", n => { RegisteredNodes = n.GetObjectValue(ApplicationRepresentation_registeredNodes.CreateFromDiscriminatorValue); } }, + {"registrationAccessToken", n => { RegistrationAccessToken = n.GetStringValue(); } }, + {"rootUrl", n => { RootUrl = n.GetStringValue(); } }, + {"secret", n => { Secret = n.GetStringValue(); } }, + {"serviceAccountsEnabled", n => { ServiceAccountsEnabled = n.GetBoolValue(); } }, + {"standardFlowEnabled", n => { StandardFlowEnabled = n.GetBoolValue(); } }, + {"surrogateAuthRequired", n => { SurrogateAuthRequired = n.GetBoolValue(); } }, + {"useTemplateConfig", n => { UseTemplateConfig = n.GetBoolValue(); } }, + {"useTemplateMappers", n => { UseTemplateMappers = n.GetBoolValue(); } }, + {"useTemplateScope", n => { UseTemplateScope = n.GetBoolValue(); } }, + {"webOrigins", n => { WebOrigins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("access", Access); + writer.WriteStringValue("adminUrl", AdminUrl); + writer.WriteBoolValue("alwaysDisplayInConsole", AlwaysDisplayInConsole); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteObjectValue("authenticationFlowBindingOverrides", AuthenticationFlowBindingOverrides); + writer.WriteBoolValue("authorizationServicesEnabled", AuthorizationServicesEnabled); + writer.WriteObjectValue("authorizationSettings", AuthorizationSettings); + writer.WriteStringValue("baseUrl", BaseUrl); + writer.WriteBoolValue("bearerOnly", BearerOnly); + writer.WriteObjectValue("claims", Claims); + writer.WriteStringValue("clientAuthenticatorType", ClientAuthenticatorType); + writer.WriteStringValue("clientId", ClientId); + writer.WriteStringValue("clientTemplate", ClientTemplate); + writer.WriteBoolValue("consentRequired", ConsentRequired); + writer.WriteCollectionOfPrimitiveValues("defaultClientScopes", DefaultClientScopes); + writer.WriteCollectionOfPrimitiveValues("defaultRoles", DefaultRoles); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("directAccessGrantsEnabled", DirectAccessGrantsEnabled); + writer.WriteBoolValue("directGrantsOnly", DirectGrantsOnly); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteBoolValue("frontchannelLogout", FrontchannelLogout); + writer.WriteBoolValue("fullScopeAllowed", FullScopeAllowed); + writer.WriteStringValue("id", Id); + writer.WriteBoolValue("implicitFlowEnabled", ImplicitFlowEnabled); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("nodeReRegistrationTimeout", NodeReRegistrationTimeout); + writer.WriteIntValue("notBefore", NotBefore); + writer.WriteCollectionOfPrimitiveValues("optionalClientScopes", OptionalClientScopes); + writer.WriteStringValue("origin", Origin); + writer.WriteStringValue("protocol", Protocol); + writer.WriteCollectionOfObjectValues("protocolMappers", ProtocolMappers); + writer.WriteBoolValue("publicClient", PublicClient); + writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); + writer.WriteObjectValue("registeredNodes", RegisteredNodes); + writer.WriteStringValue("registrationAccessToken", RegistrationAccessToken); + writer.WriteStringValue("rootUrl", RootUrl); + writer.WriteStringValue("secret", Secret); + writer.WriteBoolValue("serviceAccountsEnabled", ServiceAccountsEnabled); + writer.WriteBoolValue("standardFlowEnabled", StandardFlowEnabled); + writer.WriteBoolValue("surrogateAuthRequired", SurrogateAuthRequired); + writer.WriteBoolValue("useTemplateConfig", UseTemplateConfig); + writer.WriteBoolValue("useTemplateMappers", UseTemplateMappers); + writer.WriteBoolValue("useTemplateScope", UseTemplateScope); + writer.WriteCollectionOfPrimitiveValues("webOrigins", WebOrigins); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_access.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_access.cs new file mode 100644 index 00000000..05797e99 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_access.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ApplicationRepresentation_access : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApplicationRepresentation_access() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ApplicationRepresentation_access CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ApplicationRepresentation_access(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_attributes.cs new file mode 100644 index 00000000..64da48a3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ApplicationRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApplicationRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ApplicationRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ApplicationRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_authenticationFlowBindingOverrides.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_authenticationFlowBindingOverrides.cs new file mode 100644 index 00000000..bda8820d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_authenticationFlowBindingOverrides.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ApplicationRepresentation_authenticationFlowBindingOverrides : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApplicationRepresentation_authenticationFlowBindingOverrides() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ApplicationRepresentation_authenticationFlowBindingOverrides CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ApplicationRepresentation_authenticationFlowBindingOverrides(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_claims.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_claims.cs new file mode 100644 index 00000000..1e4a372c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_claims.cs @@ -0,0 +1,36 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class ApplicationRepresentation_claims : ClaimRepresentation, IParsable { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new ApplicationRepresentation_claims CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ApplicationRepresentation_claims(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_registeredNodes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_registeredNodes.cs new file mode 100644 index 00000000..8eef3d75 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ApplicationRepresentation_registeredNodes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ApplicationRepresentation_registeredNodes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApplicationRepresentation_registeredNodes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ApplicationRepresentation_registeredNodes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ApplicationRepresentation_registeredNodes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthDetailsRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthDetailsRepresentation.cs new file mode 100644 index 00000000..7d398287 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthDetailsRepresentation.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthDetailsRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The ipAddress property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IpAddress { get; set; } +#nullable restore +#else + public string IpAddress { get; set; } +#endif + /// The realmId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RealmId { get; set; } +#nullable restore +#else + public string RealmId { get; set; } +#endif + /// The userId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthDetailsRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthDetailsRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthDetailsRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"ipAddress", n => { IpAddress = n.GetStringValue(); } }, + {"realmId", n => { RealmId = n.GetStringValue(); } }, + {"userId", n => { UserId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("clientId", ClientId); + writer.WriteStringValue("ipAddress", IpAddress); + writer.WriteStringValue("realmId", RealmId); + writer.WriteStringValue("userId", UserId); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionExportRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionExportRepresentation.cs new file mode 100644 index 00000000..9d460983 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionExportRepresentation.cs @@ -0,0 +1,100 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthenticationExecutionExportRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The authenticator property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Authenticator { get; set; } +#nullable restore +#else + public string Authenticator { get; set; } +#endif + /// The authenticatorConfig property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AuthenticatorConfig { get; set; } +#nullable restore +#else + public string AuthenticatorConfig { get; set; } +#endif + /// The authenticatorFlow property + public bool? AuthenticatorFlow { get; set; } + /// The autheticatorFlow property + [Obsolete("")] + public bool? AutheticatorFlow { get; set; } + /// The flowAlias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FlowAlias { get; set; } +#nullable restore +#else + public string FlowAlias { get; set; } +#endif + /// The priority property + public int? Priority { get; set; } + /// The requirement property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Requirement { get; set; } +#nullable restore +#else + public string Requirement { get; set; } +#endif + /// The userSetupAllowed property + public bool? UserSetupAllowed { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticationExecutionExportRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticationExecutionExportRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticationExecutionExportRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"authenticator", n => { Authenticator = n.GetStringValue(); } }, + {"authenticatorConfig", n => { AuthenticatorConfig = n.GetStringValue(); } }, + {"authenticatorFlow", n => { AuthenticatorFlow = n.GetBoolValue(); } }, + {"autheticatorFlow", n => { AutheticatorFlow = n.GetBoolValue(); } }, + {"flowAlias", n => { FlowAlias = n.GetStringValue(); } }, + {"priority", n => { Priority = n.GetIntValue(); } }, + {"requirement", n => { Requirement = n.GetStringValue(); } }, + {"userSetupAllowed", n => { UserSetupAllowed = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("authenticator", Authenticator); + writer.WriteStringValue("authenticatorConfig", AuthenticatorConfig); + writer.WriteBoolValue("authenticatorFlow", AuthenticatorFlow); + writer.WriteBoolValue("autheticatorFlow", AutheticatorFlow); + writer.WriteStringValue("flowAlias", FlowAlias); + writer.WriteIntValue("priority", Priority); + writer.WriteStringValue("requirement", Requirement); + writer.WriteBoolValue("userSetupAllowed", UserSetupAllowed); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionInfoRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionInfoRepresentation.cs new file mode 100644 index 00000000..c0203552 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionInfoRepresentation.cs @@ -0,0 +1,149 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthenticationExecutionInfoRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The authenticationConfig property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AuthenticationConfig { get; set; } +#nullable restore +#else + public string AuthenticationConfig { get; set; } +#endif + /// The authenticationFlow property + public bool? AuthenticationFlow { get; set; } + /// The configurable property + public bool? Configurable { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The flowId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FlowId { get; set; } +#nullable restore +#else + public string FlowId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The index property + public int? Index { get; set; } + /// The level property + public int? Level { get; set; } + /// The providerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderId { get; set; } +#nullable restore +#else + public string ProviderId { get; set; } +#endif + /// The requirement property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Requirement { get; set; } +#nullable restore +#else + public string Requirement { get; set; } +#endif + /// The requirementChoices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequirementChoices { get; set; } +#nullable restore +#else + public List RequirementChoices { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticationExecutionInfoRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticationExecutionInfoRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticationExecutionInfoRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"alias", n => { Alias = n.GetStringValue(); } }, + {"authenticationConfig", n => { AuthenticationConfig = n.GetStringValue(); } }, + {"authenticationFlow", n => { AuthenticationFlow = n.GetBoolValue(); } }, + {"configurable", n => { Configurable = n.GetBoolValue(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"flowId", n => { FlowId = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"index", n => { Index = n.GetIntValue(); } }, + {"level", n => { Level = n.GetIntValue(); } }, + {"providerId", n => { ProviderId = n.GetStringValue(); } }, + {"requirement", n => { Requirement = n.GetStringValue(); } }, + {"requirementChoices", n => { RequirementChoices = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteStringValue("authenticationConfig", AuthenticationConfig); + writer.WriteBoolValue("authenticationFlow", AuthenticationFlow); + writer.WriteBoolValue("configurable", Configurable); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("flowId", FlowId); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("index", Index); + writer.WriteIntValue("level", Level); + writer.WriteStringValue("providerId", ProviderId); + writer.WriteStringValue("requirement", Requirement); + writer.WriteCollectionOfPrimitiveValues("requirementChoices", RequirementChoices); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionRepresentation.cs new file mode 100644 index 00000000..bc58283f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationExecutionRepresentation.cs @@ -0,0 +1,116 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthenticationExecutionRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The authenticator property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Authenticator { get; set; } +#nullable restore +#else + public string Authenticator { get; set; } +#endif + /// The authenticatorConfig property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AuthenticatorConfig { get; set; } +#nullable restore +#else + public string AuthenticatorConfig { get; set; } +#endif + /// The authenticatorFlow property + public bool? AuthenticatorFlow { get; set; } + /// The autheticatorFlow property + [Obsolete("")] + public bool? AutheticatorFlow { get; set; } + /// The flowId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FlowId { get; set; } +#nullable restore +#else + public string FlowId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The parentFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ParentFlow { get; set; } +#nullable restore +#else + public string ParentFlow { get; set; } +#endif + /// The priority property + public int? Priority { get; set; } + /// The requirement property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Requirement { get; set; } +#nullable restore +#else + public string Requirement { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticationExecutionRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticationExecutionRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticationExecutionRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"authenticator", n => { Authenticator = n.GetStringValue(); } }, + {"authenticatorConfig", n => { AuthenticatorConfig = n.GetStringValue(); } }, + {"authenticatorFlow", n => { AuthenticatorFlow = n.GetBoolValue(); } }, + {"autheticatorFlow", n => { AutheticatorFlow = n.GetBoolValue(); } }, + {"flowId", n => { FlowId = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"parentFlow", n => { ParentFlow = n.GetStringValue(); } }, + {"priority", n => { Priority = n.GetIntValue(); } }, + {"requirement", n => { Requirement = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("authenticator", Authenticator); + writer.WriteStringValue("authenticatorConfig", AuthenticatorConfig); + writer.WriteBoolValue("authenticatorFlow", AuthenticatorFlow); + writer.WriteBoolValue("autheticatorFlow", AutheticatorFlow); + writer.WriteStringValue("flowId", FlowId); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("parentFlow", ParentFlow); + writer.WriteIntValue("priority", Priority); + writer.WriteStringValue("requirement", Requirement); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationFlowRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationFlowRepresentation.cs new file mode 100644 index 00000000..56a2434e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticationFlowRepresentation.cs @@ -0,0 +1,101 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthenticationFlowRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The authenticationExecutions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AuthenticationExecutions { get; set; } +#nullable restore +#else + public List AuthenticationExecutions { get; set; } +#endif + /// The builtIn property + public bool? BuiltIn { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The providerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderId { get; set; } +#nullable restore +#else + public string ProviderId { get; set; } +#endif + /// The topLevel property + public bool? TopLevel { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticationFlowRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticationFlowRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticationFlowRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"alias", n => { Alias = n.GetStringValue(); } }, + {"authenticationExecutions", n => { AuthenticationExecutions = n.GetCollectionOfObjectValues(AuthenticationExecutionExportRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"builtIn", n => { BuiltIn = n.GetBoolValue(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"providerId", n => { ProviderId = n.GetStringValue(); } }, + {"topLevel", n => { TopLevel = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteCollectionOfObjectValues("authenticationExecutions", AuthenticationExecutions); + writer.WriteBoolValue("builtIn", BuiltIn); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("providerId", ProviderId); + writer.WriteBoolValue("topLevel", TopLevel); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigInfoRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigInfoRepresentation.cs new file mode 100644 index 00000000..11fdd8ad --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigInfoRepresentation.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthenticatorConfigInfoRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The helpText property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HelpText { get; set; } +#nullable restore +#else + public string HelpText { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The properties property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { get; set; } +#nullable restore +#else + public List Properties { get; set; } +#endif + /// The providerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderId { get; set; } +#nullable restore +#else + public string ProviderId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticatorConfigInfoRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticatorConfigInfoRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticatorConfigInfoRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"helpText", n => { HelpText = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"properties", n => { Properties = n.GetCollectionOfObjectValues(ConfigPropertyRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"providerId", n => { ProviderId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("helpText", HelpText); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteStringValue("providerId", ProviderId); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigRepresentation.cs new file mode 100644 index 00000000..63823a22 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigRepresentation.cs @@ -0,0 +1,73 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthenticatorConfigRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AuthenticatorConfigRepresentation_config? Config { get; set; } +#nullable restore +#else + public AuthenticatorConfigRepresentation_config Config { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticatorConfigRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticatorConfigRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticatorConfigRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"alias", n => { Alias = n.GetStringValue(); } }, + {"config", n => { Config = n.GetObjectValue(AuthenticatorConfigRepresentation_config.CreateFromDiscriminatorValue); } }, + {"id", n => { Id = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteObjectValue("config", Config); + writer.WriteStringValue("id", Id); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigRepresentation_config.cs new file mode 100644 index 00000000..62e0a75f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/AuthenticatorConfigRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class AuthenticatorConfigRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticatorConfigRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static AuthenticatorConfigRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticatorConfigRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Authorization.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Authorization.cs new file mode 100644 index 00000000..a2da1a01 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Authorization.cs @@ -0,0 +1,53 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class Authorization : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Permissions { get; set; } +#nullable restore +#else + public List Permissions { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Authorization() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Authorization CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Authorization(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"permissions", n => { Permissions = n.GetCollectionOfObjectValues(Permission.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("permissions", Permissions); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/CertificateRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/CertificateRepresentation.cs new file mode 100644 index 00000000..9c1bb214 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/CertificateRepresentation.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class CertificateRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The certificate property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Certificate { get; set; } +#nullable restore +#else + public string Certificate { get; set; } +#endif + /// The kid property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Kid { get; set; } +#nullable restore +#else + public string Kid { get; set; } +#endif + /// The privateKey property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrivateKey { get; set; } +#nullable restore +#else + public string PrivateKey { get; set; } +#endif + /// The publicKey property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicKey { get; set; } +#nullable restore +#else + public string PublicKey { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CertificateRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static CertificateRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CertificateRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"certificate", n => { Certificate = n.GetStringValue(); } }, + {"kid", n => { Kid = n.GetStringValue(); } }, + {"privateKey", n => { PrivateKey = n.GetStringValue(); } }, + {"publicKey", n => { PublicKey = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("certificate", Certificate); + writer.WriteStringValue("kid", Kid); + writer.WriteStringValue("privateKey", PrivateKey); + writer.WriteStringValue("publicKey", PublicKey); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClaimRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClaimRepresentation.cs new file mode 100644 index 00000000..f83a3504 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClaimRepresentation.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClaimRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The address property + public bool? Address { get; set; } + /// The email property + public bool? Email { get; set; } + /// The gender property + public bool? Gender { get; set; } + /// The locale property + public bool? Locale { get; set; } + /// The name property + public bool? Name { get; set; } + /// The phone property + public bool? Phone { get; set; } + /// The picture property + public bool? Picture { get; set; } + /// The profile property + public bool? Profile { get; set; } + /// The username property + public bool? Username { get; set; } + /// The website property + public bool? Website { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClaimRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClaimRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClaimRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"address", n => { Address = n.GetBoolValue(); } }, + {"email", n => { Email = n.GetBoolValue(); } }, + {"gender", n => { Gender = n.GetBoolValue(); } }, + {"locale", n => { Locale = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetBoolValue(); } }, + {"phone", n => { Phone = n.GetBoolValue(); } }, + {"picture", n => { Picture = n.GetBoolValue(); } }, + {"profile", n => { Profile = n.GetBoolValue(); } }, + {"username", n => { Username = n.GetBoolValue(); } }, + {"website", n => { Website = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("address", Address); + writer.WriteBoolValue("email", Email); + writer.WriteBoolValue("gender", Gender); + writer.WriteBoolValue("locale", Locale); + writer.WriteBoolValue("name", Name); + writer.WriteBoolValue("phone", Phone); + writer.WriteBoolValue("picture", Picture); + writer.WriteBoolValue("profile", Profile); + writer.WriteBoolValue("username", Username); + writer.WriteBoolValue("website", Website); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientInitialAccessCreatePresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientInitialAccessCreatePresentation.cs new file mode 100644 index 00000000..9d7d4efc --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientInitialAccessCreatePresentation.cs @@ -0,0 +1,51 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientInitialAccessCreatePresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The count property + public int? Count { get; set; } + /// The expiration property + public int? Expiration { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientInitialAccessCreatePresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientInitialAccessCreatePresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientInitialAccessCreatePresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"count", n => { Count = n.GetIntValue(); } }, + {"expiration", n => { Expiration = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("count", Count); + writer.WriteIntValue("expiration", Expiration); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientInitialAccessPresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientInitialAccessPresentation.cs new file mode 100644 index 00000000..e0b08d88 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientInitialAccessPresentation.cs @@ -0,0 +1,79 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientInitialAccessPresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The count property + public int? Count { get; set; } + /// The expiration property + public int? Expiration { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The remainingCount property + public int? RemainingCount { get; set; } + /// The timestamp property + public int? Timestamp { get; set; } + /// The token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Token { get; set; } +#nullable restore +#else + public string Token { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientInitialAccessPresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientInitialAccessPresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientInitialAccessPresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"count", n => { Count = n.GetIntValue(); } }, + {"expiration", n => { Expiration = n.GetIntValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"remainingCount", n => { RemainingCount = n.GetIntValue(); } }, + {"timestamp", n => { Timestamp = n.GetIntValue(); } }, + {"token", n => { Token = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("count", Count); + writer.WriteIntValue("expiration", Expiration); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("remainingCount", RemainingCount); + writer.WriteIntValue("timestamp", Timestamp); + writer.WriteStringValue("token", Token); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPoliciesRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPoliciesRepresentation.cs new file mode 100644 index 00000000..9249d4ff --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPoliciesRepresentation.cs @@ -0,0 +1,53 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientPoliciesRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The policies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Policies { get; set; } +#nullable restore +#else + public List Policies { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientPoliciesRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientPoliciesRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientPoliciesRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"policies", n => { Policies = n.GetCollectionOfObjectValues(ClientPolicyRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("policies", Policies); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyConditionRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyConditionRepresentation.cs new file mode 100644 index 00000000..596b6013 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyConditionRepresentation.cs @@ -0,0 +1,53 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientPolicyConditionRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The condition property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Condition { get; set; } +#nullable restore +#else + public string Condition { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientPolicyConditionRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientPolicyConditionRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientPolicyConditionRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"condition", n => { Condition = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("condition", Condition); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyExecutorRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyExecutorRepresentation.cs new file mode 100644 index 00000000..6165074c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyExecutorRepresentation.cs @@ -0,0 +1,53 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientPolicyExecutorRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The executor property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Executor { get; set; } +#nullable restore +#else + public string Executor { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientPolicyExecutorRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientPolicyExecutorRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientPolicyExecutorRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"executor", n => { Executor = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("executor", Executor); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyRepresentation.cs new file mode 100644 index 00000000..76991d53 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientPolicyRepresentation.cs @@ -0,0 +1,87 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientPolicyRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The conditions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Conditions { get; set; } +#nullable restore +#else + public List Conditions { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The enabled property + public bool? Enabled { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The profiles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Profiles { get; set; } +#nullable restore +#else + public List Profiles { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientPolicyRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientPolicyRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientPolicyRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"conditions", n => { Conditions = n.GetCollectionOfObjectValues(ClientPolicyConditionRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"profiles", n => { Profiles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("conditions", Conditions); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("profiles", Profiles); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientProfileRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientProfileRepresentation.cs new file mode 100644 index 00000000..d6311426 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientProfileRepresentation.cs @@ -0,0 +1,73 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientProfileRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The executors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Executors { get; set; } +#nullable restore +#else + public List Executors { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientProfileRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientProfileRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientProfileRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"description", n => { Description = n.GetStringValue(); } }, + {"executors", n => { Executors = n.GetCollectionOfObjectValues(ClientPolicyExecutorRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteCollectionOfObjectValues("executors", Executors); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientProfilesRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientProfilesRepresentation.cs new file mode 100644 index 00000000..07594bf3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientProfilesRepresentation.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientProfilesRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The globalProfiles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? GlobalProfiles { get; set; } +#nullable restore +#else + public List GlobalProfiles { get; set; } +#endif + /// The profiles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Profiles { get; set; } +#nullable restore +#else + public List Profiles { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientProfilesRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientProfilesRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientProfilesRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"globalProfiles", n => { GlobalProfiles = n.GetCollectionOfObjectValues(ClientProfileRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"profiles", n => { Profiles = n.GetCollectionOfObjectValues(ClientProfileRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("globalProfiles", GlobalProfiles); + writer.WriteCollectionOfObjectValues("profiles", Profiles); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation.cs new file mode 100644 index 00000000..0ff6e82a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation.cs @@ -0,0 +1,365 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientRepresentation : IAdditionalDataHolder, IParsable { + /// The access property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientRepresentation_access? Access { get; set; } +#nullable restore +#else + public ClientRepresentation_access Access { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The adminUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdminUrl { get; set; } +#nullable restore +#else + public string AdminUrl { get; set; } +#endif + /// The alwaysDisplayInConsole property + public bool? AlwaysDisplayInConsole { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public ClientRepresentation_attributes Attributes { get; set; } +#endif + /// The authenticationFlowBindingOverrides property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientRepresentation_authenticationFlowBindingOverrides? AuthenticationFlowBindingOverrides { get; set; } +#nullable restore +#else + public ClientRepresentation_authenticationFlowBindingOverrides AuthenticationFlowBindingOverrides { get; set; } +#endif + /// The authorizationServicesEnabled property + public bool? AuthorizationServicesEnabled { get; set; } + /// The authorizationSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ResourceServerRepresentation? AuthorizationSettings { get; set; } +#nullable restore +#else + public ResourceServerRepresentation AuthorizationSettings { get; set; } +#endif + /// The baseUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BaseUrl { get; set; } +#nullable restore +#else + public string BaseUrl { get; set; } +#endif + /// The bearerOnly property + public bool? BearerOnly { get; set; } + /// The clientAuthenticatorType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientAuthenticatorType { get; set; } +#nullable restore +#else + public string ClientAuthenticatorType { get; set; } +#endif + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The clientTemplate property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientTemplate { get; set; } +#nullable restore +#else + public string ClientTemplate { get; set; } +#endif + /// The consentRequired property + public bool? ConsentRequired { get; set; } + /// The defaultClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultClientScopes { get; set; } +#nullable restore +#else + public List DefaultClientScopes { get; set; } +#endif + /// The defaultRoles property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultRoles { get; set; } +#nullable restore +#else + public List DefaultRoles { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The directAccessGrantsEnabled property + public bool? DirectAccessGrantsEnabled { get; set; } + /// The directGrantsOnly property + [Obsolete("")] + public bool? DirectGrantsOnly { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The frontchannelLogout property + public bool? FrontchannelLogout { get; set; } + /// The fullScopeAllowed property + public bool? FullScopeAllowed { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The implicitFlowEnabled property + public bool? ImplicitFlowEnabled { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The nodeReRegistrationTimeout property + public int? NodeReRegistrationTimeout { get; set; } + /// The notBefore property + public int? NotBefore { get; set; } + /// The optionalClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? OptionalClientScopes { get; set; } +#nullable restore +#else + public List OptionalClientScopes { get; set; } +#endif + /// The origin property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Origin { get; set; } +#nullable restore +#else + public string Origin { get; set; } +#endif + /// The protocol property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Protocol { get; set; } +#nullable restore +#else + public string Protocol { get; set; } +#endif + /// The protocolMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProtocolMappers { get; set; } +#nullable restore +#else + public List ProtocolMappers { get; set; } +#endif + /// The publicClient property + public bool? PublicClient { get; set; } + /// The redirectUris property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RedirectUris { get; set; } +#nullable restore +#else + public List RedirectUris { get; set; } +#endif + /// The registeredNodes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientRepresentation_registeredNodes? RegisteredNodes { get; set; } +#nullable restore +#else + public ClientRepresentation_registeredNodes RegisteredNodes { get; set; } +#endif + /// The registrationAccessToken property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RegistrationAccessToken { get; set; } +#nullable restore +#else + public string RegistrationAccessToken { get; set; } +#endif + /// The rootUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RootUrl { get; set; } +#nullable restore +#else + public string RootUrl { get; set; } +#endif + /// The secret property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The serviceAccountsEnabled property + public bool? ServiceAccountsEnabled { get; set; } + /// The standardFlowEnabled property + public bool? StandardFlowEnabled { get; set; } + /// The surrogateAuthRequired property + public bool? SurrogateAuthRequired { get; set; } + /// The useTemplateConfig property + [Obsolete("")] + public bool? UseTemplateConfig { get; set; } + /// The useTemplateMappers property + [Obsolete("")] + public bool? UseTemplateMappers { get; set; } + /// The useTemplateScope property + [Obsolete("")] + public bool? UseTemplateScope { get; set; } + /// The webOrigins property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebOrigins { get; set; } +#nullable restore +#else + public List WebOrigins { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"access", n => { Access = n.GetObjectValue(ClientRepresentation_access.CreateFromDiscriminatorValue); } }, + {"adminUrl", n => { AdminUrl = n.GetStringValue(); } }, + {"alwaysDisplayInConsole", n => { AlwaysDisplayInConsole = n.GetBoolValue(); } }, + {"attributes", n => { Attributes = n.GetObjectValue(ClientRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"authenticationFlowBindingOverrides", n => { AuthenticationFlowBindingOverrides = n.GetObjectValue(ClientRepresentation_authenticationFlowBindingOverrides.CreateFromDiscriminatorValue); } }, + {"authorizationServicesEnabled", n => { AuthorizationServicesEnabled = n.GetBoolValue(); } }, + {"authorizationSettings", n => { AuthorizationSettings = n.GetObjectValue(ResourceServerRepresentation.CreateFromDiscriminatorValue); } }, + {"baseUrl", n => { BaseUrl = n.GetStringValue(); } }, + {"bearerOnly", n => { BearerOnly = n.GetBoolValue(); } }, + {"clientAuthenticatorType", n => { ClientAuthenticatorType = n.GetStringValue(); } }, + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"clientTemplate", n => { ClientTemplate = n.GetStringValue(); } }, + {"consentRequired", n => { ConsentRequired = n.GetBoolValue(); } }, + {"defaultClientScopes", n => { DefaultClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"defaultRoles", n => { DefaultRoles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"directAccessGrantsEnabled", n => { DirectAccessGrantsEnabled = n.GetBoolValue(); } }, + {"directGrantsOnly", n => { DirectGrantsOnly = n.GetBoolValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"frontchannelLogout", n => { FrontchannelLogout = n.GetBoolValue(); } }, + {"fullScopeAllowed", n => { FullScopeAllowed = n.GetBoolValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"implicitFlowEnabled", n => { ImplicitFlowEnabled = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"nodeReRegistrationTimeout", n => { NodeReRegistrationTimeout = n.GetIntValue(); } }, + {"notBefore", n => { NotBefore = n.GetIntValue(); } }, + {"optionalClientScopes", n => { OptionalClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"origin", n => { Origin = n.GetStringValue(); } }, + {"protocol", n => { Protocol = n.GetStringValue(); } }, + {"protocolMappers", n => { ProtocolMappers = n.GetCollectionOfObjectValues(ProtocolMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"publicClient", n => { PublicClient = n.GetBoolValue(); } }, + {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"registeredNodes", n => { RegisteredNodes = n.GetObjectValue(ClientRepresentation_registeredNodes.CreateFromDiscriminatorValue); } }, + {"registrationAccessToken", n => { RegistrationAccessToken = n.GetStringValue(); } }, + {"rootUrl", n => { RootUrl = n.GetStringValue(); } }, + {"secret", n => { Secret = n.GetStringValue(); } }, + {"serviceAccountsEnabled", n => { ServiceAccountsEnabled = n.GetBoolValue(); } }, + {"standardFlowEnabled", n => { StandardFlowEnabled = n.GetBoolValue(); } }, + {"surrogateAuthRequired", n => { SurrogateAuthRequired = n.GetBoolValue(); } }, + {"useTemplateConfig", n => { UseTemplateConfig = n.GetBoolValue(); } }, + {"useTemplateMappers", n => { UseTemplateMappers = n.GetBoolValue(); } }, + {"useTemplateScope", n => { UseTemplateScope = n.GetBoolValue(); } }, + {"webOrigins", n => { WebOrigins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("access", Access); + writer.WriteStringValue("adminUrl", AdminUrl); + writer.WriteBoolValue("alwaysDisplayInConsole", AlwaysDisplayInConsole); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteObjectValue("authenticationFlowBindingOverrides", AuthenticationFlowBindingOverrides); + writer.WriteBoolValue("authorizationServicesEnabled", AuthorizationServicesEnabled); + writer.WriteObjectValue("authorizationSettings", AuthorizationSettings); + writer.WriteStringValue("baseUrl", BaseUrl); + writer.WriteBoolValue("bearerOnly", BearerOnly); + writer.WriteStringValue("clientAuthenticatorType", ClientAuthenticatorType); + writer.WriteStringValue("clientId", ClientId); + writer.WriteStringValue("clientTemplate", ClientTemplate); + writer.WriteBoolValue("consentRequired", ConsentRequired); + writer.WriteCollectionOfPrimitiveValues("defaultClientScopes", DefaultClientScopes); + writer.WriteCollectionOfPrimitiveValues("defaultRoles", DefaultRoles); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("directAccessGrantsEnabled", DirectAccessGrantsEnabled); + writer.WriteBoolValue("directGrantsOnly", DirectGrantsOnly); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteBoolValue("frontchannelLogout", FrontchannelLogout); + writer.WriteBoolValue("fullScopeAllowed", FullScopeAllowed); + writer.WriteStringValue("id", Id); + writer.WriteBoolValue("implicitFlowEnabled", ImplicitFlowEnabled); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("nodeReRegistrationTimeout", NodeReRegistrationTimeout); + writer.WriteIntValue("notBefore", NotBefore); + writer.WriteCollectionOfPrimitiveValues("optionalClientScopes", OptionalClientScopes); + writer.WriteStringValue("origin", Origin); + writer.WriteStringValue("protocol", Protocol); + writer.WriteCollectionOfObjectValues("protocolMappers", ProtocolMappers); + writer.WriteBoolValue("publicClient", PublicClient); + writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); + writer.WriteObjectValue("registeredNodes", RegisteredNodes); + writer.WriteStringValue("registrationAccessToken", RegistrationAccessToken); + writer.WriteStringValue("rootUrl", RootUrl); + writer.WriteStringValue("secret", Secret); + writer.WriteBoolValue("serviceAccountsEnabled", ServiceAccountsEnabled); + writer.WriteBoolValue("standardFlowEnabled", StandardFlowEnabled); + writer.WriteBoolValue("surrogateAuthRequired", SurrogateAuthRequired); + writer.WriteBoolValue("useTemplateConfig", UseTemplateConfig); + writer.WriteBoolValue("useTemplateMappers", UseTemplateMappers); + writer.WriteBoolValue("useTemplateScope", UseTemplateScope); + writer.WriteCollectionOfPrimitiveValues("webOrigins", WebOrigins); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_access.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_access.cs new file mode 100644 index 00000000..1d935a9c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_access.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientRepresentation_access : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientRepresentation_access() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientRepresentation_access CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientRepresentation_access(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_attributes.cs new file mode 100644 index 00000000..77bcc55b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_authenticationFlowBindingOverrides.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_authenticationFlowBindingOverrides.cs new file mode 100644 index 00000000..673b414b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_authenticationFlowBindingOverrides.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientRepresentation_authenticationFlowBindingOverrides : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientRepresentation_authenticationFlowBindingOverrides() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientRepresentation_authenticationFlowBindingOverrides CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientRepresentation_authenticationFlowBindingOverrides(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_registeredNodes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_registeredNodes.cs new file mode 100644 index 00000000..bf60c0fb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientRepresentation_registeredNodes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientRepresentation_registeredNodes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientRepresentation_registeredNodes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientRepresentation_registeredNodes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientRepresentation_registeredNodes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientScopeRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientScopeRepresentation.cs new file mode 100644 index 00000000..7ba72c3b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientScopeRepresentation.cs @@ -0,0 +1,103 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientScopeRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientScopeRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public ClientScopeRepresentation_attributes Attributes { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The protocol property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Protocol { get; set; } +#nullable restore +#else + public string Protocol { get; set; } +#endif + /// The protocolMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProtocolMappers { get; set; } +#nullable restore +#else + public List ProtocolMappers { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClientScopeRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientScopeRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientScopeRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributes", n => { Attributes = n.GetObjectValue(ClientScopeRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"protocol", n => { Protocol = n.GetStringValue(); } }, + {"protocolMappers", n => { ProtocolMappers = n.GetCollectionOfObjectValues(ProtocolMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("protocol", Protocol); + writer.WriteCollectionOfObjectValues("protocolMappers", ProtocolMappers); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientScopeRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientScopeRepresentation_attributes.cs new file mode 100644 index 00000000..03650677 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientScopeRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientScopeRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientScopeRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientScopeRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientScopeRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientTemplateRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientTemplateRepresentation.cs new file mode 100644 index 00000000..10f96cd3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientTemplateRepresentation.cs @@ -0,0 +1,140 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class ClientTemplateRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientTemplateRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public ClientTemplateRepresentation_attributes Attributes { get; set; } +#endif + /// The bearerOnly property + public bool? BearerOnly { get; set; } + /// The consentRequired property + public bool? ConsentRequired { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The directAccessGrantsEnabled property + public bool? DirectAccessGrantsEnabled { get; set; } + /// The frontchannelLogout property + public bool? FrontchannelLogout { get; set; } + /// The fullScopeAllowed property + public bool? FullScopeAllowed { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The implicitFlowEnabled property + public bool? ImplicitFlowEnabled { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The protocol property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Protocol { get; set; } +#nullable restore +#else + public string Protocol { get; set; } +#endif + /// The protocolMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProtocolMappers { get; set; } +#nullable restore +#else + public List ProtocolMappers { get; set; } +#endif + /// The publicClient property + public bool? PublicClient { get; set; } + /// The serviceAccountsEnabled property + public bool? ServiceAccountsEnabled { get; set; } + /// The standardFlowEnabled property + public bool? StandardFlowEnabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientTemplateRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientTemplateRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientTemplateRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributes", n => { Attributes = n.GetObjectValue(ClientTemplateRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"bearerOnly", n => { BearerOnly = n.GetBoolValue(); } }, + {"consentRequired", n => { ConsentRequired = n.GetBoolValue(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"directAccessGrantsEnabled", n => { DirectAccessGrantsEnabled = n.GetBoolValue(); } }, + {"frontchannelLogout", n => { FrontchannelLogout = n.GetBoolValue(); } }, + {"fullScopeAllowed", n => { FullScopeAllowed = n.GetBoolValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"implicitFlowEnabled", n => { ImplicitFlowEnabled = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"protocol", n => { Protocol = n.GetStringValue(); } }, + {"protocolMappers", n => { ProtocolMappers = n.GetCollectionOfObjectValues(ProtocolMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"publicClient", n => { PublicClient = n.GetBoolValue(); } }, + {"serviceAccountsEnabled", n => { ServiceAccountsEnabled = n.GetBoolValue(); } }, + {"standardFlowEnabled", n => { StandardFlowEnabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteBoolValue("bearerOnly", BearerOnly); + writer.WriteBoolValue("consentRequired", ConsentRequired); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("directAccessGrantsEnabled", DirectAccessGrantsEnabled); + writer.WriteBoolValue("frontchannelLogout", FrontchannelLogout); + writer.WriteBoolValue("fullScopeAllowed", FullScopeAllowed); + writer.WriteStringValue("id", Id); + writer.WriteBoolValue("implicitFlowEnabled", ImplicitFlowEnabled); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("protocol", Protocol); + writer.WriteCollectionOfObjectValues("protocolMappers", ProtocolMappers); + writer.WriteBoolValue("publicClient", PublicClient); + writer.WriteBoolValue("serviceAccountsEnabled", ServiceAccountsEnabled); + writer.WriteBoolValue("standardFlowEnabled", StandardFlowEnabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientTemplateRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientTemplateRepresentation_attributes.cs new file mode 100644 index 00000000..ddc11bee --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ClientTemplateRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ClientTemplateRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClientTemplateRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ClientTemplateRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ClientTemplateRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentRepresentation.cs new file mode 100644 index 00000000..834de23b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentRepresentation.cs @@ -0,0 +1,113 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ComponentRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public MultivaluedHashMapStringString? Config { get; set; } +#nullable restore +#else + public MultivaluedHashMapStringString Config { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The parentId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ParentId { get; set; } +#nullable restore +#else + public string ParentId { get; set; } +#endif + /// The providerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderId { get; set; } +#nullable restore +#else + public string ProviderId { get; set; } +#endif + /// The providerType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderType { get; set; } +#nullable restore +#else + public string ProviderType { get; set; } +#endif + /// The subType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubType { get; set; } +#nullable restore +#else + public string SubType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ComponentRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ComponentRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ComponentRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"config", n => { Config = n.GetObjectValue(MultivaluedHashMapStringString.CreateFromDiscriminatorValue); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"parentId", n => { ParentId = n.GetStringValue(); } }, + {"providerId", n => { ProviderId = n.GetStringValue(); } }, + {"providerType", n => { ProviderType = n.GetStringValue(); } }, + {"subType", n => { SubType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("config", Config); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("parentId", ParentId); + writer.WriteStringValue("providerId", ProviderId); + writer.WriteStringValue("providerType", ProviderType); + writer.WriteStringValue("subType", SubType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentTypeRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentTypeRepresentation.cs new file mode 100644 index 00000000..6af3da55 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentTypeRepresentation.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ComponentTypeRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The helpText property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HelpText { get; set; } +#nullable restore +#else + public string HelpText { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ComponentTypeRepresentation_metadata? Metadata { get; set; } +#nullable restore +#else + public ComponentTypeRepresentation_metadata Metadata { get; set; } +#endif + /// The properties property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { get; set; } +#nullable restore +#else + public List Properties { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ComponentTypeRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ComponentTypeRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ComponentTypeRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"helpText", n => { HelpText = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"metadata", n => { Metadata = n.GetObjectValue(ComponentTypeRepresentation_metadata.CreateFromDiscriminatorValue); } }, + {"properties", n => { Properties = n.GetCollectionOfObjectValues(ConfigPropertyRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("helpText", HelpText); + writer.WriteStringValue("id", Id); + writer.WriteObjectValue("metadata", Metadata); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentTypeRepresentation_metadata.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentTypeRepresentation_metadata.cs new file mode 100644 index 00000000..2f131fbd --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ComponentTypeRepresentation_metadata.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ComponentTypeRepresentation_metadata : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ComponentTypeRepresentation_metadata() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ComponentTypeRepresentation_metadata CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ComponentTypeRepresentation_metadata(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites.cs new file mode 100644 index 00000000..5008f984 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites.cs @@ -0,0 +1,74 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class Composites : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The application property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Composites_application? Application { get; set; } +#nullable restore +#else + public Composites_application Application { get; set; } +#endif + /// The client property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Composites_client? Client { get; set; } +#nullable restore +#else + public Composites_client Client { get; set; } +#endif + /// The realm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Realm { get; set; } +#nullable restore +#else + public List Realm { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Composites() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Composites CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Composites(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"application", n => { Application = n.GetObjectValue(Composites_application.CreateFromDiscriminatorValue); } }, + {"client", n => { Client = n.GetObjectValue(Composites_client.CreateFromDiscriminatorValue); } }, + {"realm", n => { Realm = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("application", Application); + writer.WriteObjectValue("client", Client); + writer.WriteCollectionOfPrimitiveValues("realm", Realm); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites_application.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites_application.cs new file mode 100644 index 00000000..bb209f63 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites_application.cs @@ -0,0 +1,44 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class Composites_application : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Composites_application() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Composites_application CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Composites_application(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites_client.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites_client.cs new file mode 100644 index 00000000..c40254ca --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Composites_client.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class Composites_client : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Composites_client() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Composites_client CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Composites_client(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ConfigPropertyRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ConfigPropertyRepresentation.cs new file mode 100644 index 00000000..00711f24 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ConfigPropertyRepresentation.cs @@ -0,0 +1,105 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ConfigPropertyRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The helpText property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HelpText { get; set; } +#nullable restore +#else + public string HelpText { get; set; } +#endif + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { get; set; } +#nullable restore +#else + public string Label { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The options property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Options { get; set; } +#nullable restore +#else + public List Options { get; set; } +#endif + /// The readOnly property + public bool? ReadOnly { get; set; } + /// The required property + public bool? Required { get; set; } + /// The secret property + public bool? Secret { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ConfigPropertyRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ConfigPropertyRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ConfigPropertyRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"helpText", n => { HelpText = n.GetStringValue(); } }, + {"label", n => { Label = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"options", n => { Options = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"readOnly", n => { ReadOnly = n.GetBoolValue(); } }, + {"required", n => { Required = n.GetBoolValue(); } }, + {"secret", n => { Secret = n.GetBoolValue(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("helpText", HelpText); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("options", Options); + writer.WriteBoolValue("readOnly", ReadOnly); + writer.WriteBoolValue("required", Required); + writer.WriteBoolValue("secret", Secret); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Confirmation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Confirmation.cs new file mode 100644 index 00000000..dfffbc12 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Confirmation.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class Confirmation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The jkt property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Jkt { get; set; } +#nullable restore +#else + public string Jkt { get; set; } +#endif + /// The x5tS256 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? X5tS256 { get; set; } +#nullable restore +#else + public string X5tS256 { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Confirmation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Confirmation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Confirmation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"jkt", n => { Jkt = n.GetStringValue(); } }, + {"x5t#S256", n => { X5tS256 = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("jkt", Jkt); + writer.WriteStringValue("x5t#S256", X5tS256); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/CredentialRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/CredentialRepresentation.cs new file mode 100644 index 00000000..62a5e6c7 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/CredentialRepresentation.cs @@ -0,0 +1,190 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class CredentialRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The algorithm property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Algorithm { get; set; } +#nullable restore +#else + public string Algorithm { get; set; } +#endif + /// The config property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CredentialRepresentation_config? Config { get; set; } +#nullable restore +#else + public CredentialRepresentation_config Config { get; set; } +#endif + /// The counter property + [Obsolete("")] + public int? Counter { get; set; } + /// The createdDate property + public long? CreatedDate { get; set; } + /// The credentialData property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CredentialData { get; set; } +#nullable restore +#else + public string CredentialData { get; set; } +#endif + /// The device property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Device { get; set; } +#nullable restore +#else + public string Device { get; set; } +#endif + /// The digits property + [Obsolete("")] + public int? Digits { get; set; } + /// The hashedSaltedValue property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HashedSaltedValue { get; set; } +#nullable restore +#else + public string HashedSaltedValue { get; set; } +#endif + /// The hashIterations property + [Obsolete("")] + public int? HashIterations { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The period property + [Obsolete("")] + public int? Period { get; set; } + /// The priority property + public int? Priority { get; set; } + /// The salt property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Salt { get; set; } +#nullable restore +#else + public string Salt { get; set; } +#endif + /// The secretData property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecretData { get; set; } +#nullable restore +#else + public string SecretData { get; set; } +#endif + /// The temporary property + public bool? Temporary { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The userLabel property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserLabel { get; set; } +#nullable restore +#else + public string UserLabel { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CredentialRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static CredentialRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CredentialRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"algorithm", n => { Algorithm = n.GetStringValue(); } }, + {"config", n => { Config = n.GetObjectValue(CredentialRepresentation_config.CreateFromDiscriminatorValue); } }, + {"counter", n => { Counter = n.GetIntValue(); } }, + {"createdDate", n => { CreatedDate = n.GetLongValue(); } }, + {"credentialData", n => { CredentialData = n.GetStringValue(); } }, + {"device", n => { Device = n.GetStringValue(); } }, + {"digits", n => { Digits = n.GetIntValue(); } }, + {"hashIterations", n => { HashIterations = n.GetIntValue(); } }, + {"hashedSaltedValue", n => { HashedSaltedValue = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"period", n => { Period = n.GetIntValue(); } }, + {"priority", n => { Priority = n.GetIntValue(); } }, + {"salt", n => { Salt = n.GetStringValue(); } }, + {"secretData", n => { SecretData = n.GetStringValue(); } }, + {"temporary", n => { Temporary = n.GetBoolValue(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + {"userLabel", n => { UserLabel = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("algorithm", Algorithm); + writer.WriteObjectValue("config", Config); + writer.WriteIntValue("counter", Counter); + writer.WriteLongValue("createdDate", CreatedDate); + writer.WriteStringValue("credentialData", CredentialData); + writer.WriteStringValue("device", Device); + writer.WriteIntValue("digits", Digits); + writer.WriteStringValue("hashedSaltedValue", HashedSaltedValue); + writer.WriteIntValue("hashIterations", HashIterations); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("period", Period); + writer.WriteIntValue("priority", Priority); + writer.WriteStringValue("salt", Salt); + writer.WriteStringValue("secretData", SecretData); + writer.WriteBoolValue("temporary", Temporary); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("userLabel", UserLabel); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/CredentialRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/CredentialRepresentation_config.cs new file mode 100644 index 00000000..af5a04aa --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/CredentialRepresentation_config.cs @@ -0,0 +1,36 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class CredentialRepresentation_config : MultivaluedHashMapStringString, IParsable { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new CredentialRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CredentialRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/DecisionEffect.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/DecisionEffect.cs new file mode 100644 index 00000000..eb4faf66 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/DecisionEffect.cs @@ -0,0 +1,11 @@ +// +using System.Runtime.Serialization; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public enum DecisionEffect { + [EnumMember(Value = "PERMIT")] + PERMIT, + [EnumMember(Value = "DENY")] + DENY, + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/DecisionStrategy.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/DecisionStrategy.cs new file mode 100644 index 00000000..743c0e95 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/DecisionStrategy.cs @@ -0,0 +1,13 @@ +// +using System.Runtime.Serialization; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public enum DecisionStrategy { + [EnumMember(Value = "AFFIRMATIVE")] + AFFIRMATIVE, + [EnumMember(Value = "UNANIMOUS")] + UNANIMOUS, + [EnumMember(Value = "CONSENSUS")] + CONSENSUS, + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/EvaluationResultRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/EvaluationResultRepresentation.cs new file mode 100644 index 00000000..07eba588 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/EvaluationResultRepresentation.cs @@ -0,0 +1,87 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class EvaluationResultRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allowedScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedScopes { get; set; } +#nullable restore +#else + public List AllowedScopes { get; set; } +#endif + /// The policies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Policies { get; set; } +#nullable restore +#else + public List Policies { get; set; } +#endif + /// The resource property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ResourceRepresentation? Resource { get; set; } +#nullable restore +#else + public ResourceRepresentation Resource { get; set; } +#endif + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// The status property + public DecisionEffect? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public EvaluationResultRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static EvaluationResultRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new EvaluationResultRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"allowedScopes", n => { AllowedScopes = n.GetCollectionOfObjectValues(ScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"policies", n => { Policies = n.GetCollectionOfObjectValues(PolicyResultRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"resource", n => { Resource = n.GetObjectValue(ResourceRepresentation.CreateFromDiscriminatorValue); } }, + {"scopes", n => { Scopes = n.GetCollectionOfObjectValues(ScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("allowedScopes", AllowedScopes); + writer.WriteCollectionOfObjectValues("policies", Policies); + writer.WriteObjectValue("resource", Resource); + writer.WriteCollectionOfObjectValues("scopes", Scopes); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/EventRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/EventRepresentation.cs new file mode 100644 index 00000000..55d11a11 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/EventRepresentation.cs @@ -0,0 +1,127 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class EventRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The details property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public EventRepresentation_details? Details { get; set; } +#nullable restore +#else + public EventRepresentation_details Details { get; set; } +#endif + /// The error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Error { get; set; } +#nullable restore +#else + public string Error { get; set; } +#endif + /// The ipAddress property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IpAddress { get; set; } +#nullable restore +#else + public string IpAddress { get; set; } +#endif + /// The realmId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RealmId { get; set; } +#nullable restore +#else + public string RealmId { get; set; } +#endif + /// The sessionId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SessionId { get; set; } +#nullable restore +#else + public string SessionId { get; set; } +#endif + /// The time property + public long? Time { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The userId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EventRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static EventRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new EventRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"details", n => { Details = n.GetObjectValue(EventRepresentation_details.CreateFromDiscriminatorValue); } }, + {"error", n => { Error = n.GetStringValue(); } }, + {"ipAddress", n => { IpAddress = n.GetStringValue(); } }, + {"realmId", n => { RealmId = n.GetStringValue(); } }, + {"sessionId", n => { SessionId = n.GetStringValue(); } }, + {"time", n => { Time = n.GetLongValue(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + {"userId", n => { UserId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("clientId", ClientId); + writer.WriteObjectValue("details", Details); + writer.WriteStringValue("error", Error); + writer.WriteStringValue("ipAddress", IpAddress); + writer.WriteStringValue("realmId", RealmId); + writer.WriteStringValue("sessionId", SessionId); + writer.WriteLongValue("time", Time); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("userId", UserId); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/EventRepresentation_details.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/EventRepresentation_details.cs new file mode 100644 index 00000000..2a678761 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/EventRepresentation_details.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class EventRepresentation_details : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public EventRepresentation_details() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static EventRepresentation_details CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new EventRepresentation_details(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/FederatedIdentityRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/FederatedIdentityRepresentation.cs new file mode 100644 index 00000000..80191d2c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/FederatedIdentityRepresentation.cs @@ -0,0 +1,73 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class FederatedIdentityRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The identityProvider property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IdentityProvider { get; set; } +#nullable restore +#else + public string IdentityProvider { get; set; } +#endif + /// The userId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// The userName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserName { get; set; } +#nullable restore +#else + public string UserName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FederatedIdentityRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static FederatedIdentityRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FederatedIdentityRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"identityProvider", n => { IdentityProvider = n.GetStringValue(); } }, + {"userId", n => { UserId = n.GetStringValue(); } }, + {"userName", n => { UserName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("identityProvider", IdentityProvider); + writer.WriteStringValue("userId", UserId); + writer.WriteStringValue("userName", UserName); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/GlobalRequestResult.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GlobalRequestResult.cs new file mode 100644 index 00000000..703872c5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GlobalRequestResult.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class GlobalRequestResult : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The failedRequests property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? FailedRequests { get; set; } +#nullable restore +#else + public List FailedRequests { get; set; } +#endif + /// The successRequests property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SuccessRequests { get; set; } +#nullable restore +#else + public List SuccessRequests { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GlobalRequestResult() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static GlobalRequestResult CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GlobalRequestResult(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"failedRequests", n => { FailedRequests = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"successRequests", n => { SuccessRequests = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("failedRequests", FailedRequests); + writer.WriteCollectionOfPrimitiveValues("successRequests", SuccessRequests); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation.cs new file mode 100644 index 00000000..9f87d7bb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation.cs @@ -0,0 +1,137 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class GroupRepresentation : IAdditionalDataHolder, IParsable { + /// The access property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public GroupRepresentation_access? Access { get; set; } +#nullable restore +#else + public GroupRepresentation_access Access { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public GroupRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public GroupRepresentation_attributes Attributes { get; set; } +#endif + /// The clientRoles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public GroupRepresentation_clientRoles? ClientRoles { get; set; } +#nullable restore +#else + public GroupRepresentation_clientRoles ClientRoles { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The parentId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ParentId { get; set; } +#nullable restore +#else + public string ParentId { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The realmRoles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RealmRoles { get; set; } +#nullable restore +#else + public List RealmRoles { get; set; } +#endif + /// The subGroupCount property + public long? SubGroupCount { get; set; } + /// The subGroups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SubGroups { get; set; } +#nullable restore +#else + public List SubGroups { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GroupRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static GroupRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GroupRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"access", n => { Access = n.GetObjectValue(GroupRepresentation_access.CreateFromDiscriminatorValue); } }, + {"attributes", n => { Attributes = n.GetObjectValue(GroupRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"clientRoles", n => { ClientRoles = n.GetObjectValue(GroupRepresentation_clientRoles.CreateFromDiscriminatorValue); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"parentId", n => { ParentId = n.GetStringValue(); } }, + {"path", n => { Path = n.GetStringValue(); } }, + {"realmRoles", n => { RealmRoles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"subGroupCount", n => { SubGroupCount = n.GetLongValue(); } }, + {"subGroups", n => { SubGroups = n.GetCollectionOfObjectValues(GroupRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("access", Access); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteObjectValue("clientRoles", ClientRoles); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("parentId", ParentId); + writer.WriteStringValue("path", Path); + writer.WriteCollectionOfPrimitiveValues("realmRoles", RealmRoles); + writer.WriteLongValue("subGroupCount", SubGroupCount); + writer.WriteCollectionOfObjectValues("subGroups", SubGroups); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_access.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_access.cs new file mode 100644 index 00000000..bf843e5d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_access.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class GroupRepresentation_access : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GroupRepresentation_access() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static GroupRepresentation_access CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GroupRepresentation_access(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_attributes.cs new file mode 100644 index 00000000..4780e025 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class GroupRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GroupRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static GroupRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GroupRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_clientRoles.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_clientRoles.cs new file mode 100644 index 00000000..1583824e --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/GroupRepresentation_clientRoles.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class GroupRepresentation_clientRoles : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GroupRepresentation_clientRoles() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static GroupRepresentation_clientRoles CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GroupRepresentation_clientRoles(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/IDToken.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IDToken.cs new file mode 100644 index 00000000..e47008c0 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IDToken.cs @@ -0,0 +1,376 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class IDToken : IAdditionalDataHolder, IParsable { + /// The acr property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Acr { get; set; } +#nullable restore +#else + public string Acr { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The address property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AddressClaimSet? Address { get; set; } +#nullable restore +#else + public AddressClaimSet Address { get; set; } +#endif + /// The at_hash property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AtHash { get; set; } +#nullable restore +#else + public string AtHash { get; set; } +#endif + /// The auth_time property + public long? Auth_time { get; set; } + /// The authTime property + [Obsolete("")] + public int? AuthTime { get; set; } + /// The azp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Azp { get; set; } +#nullable restore +#else + public string Azp { get; set; } +#endif + /// The birthdate property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Birthdate { get; set; } +#nullable restore +#else + public string Birthdate { get; set; } +#endif + /// The c_hash property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CHash { get; set; } +#nullable restore +#else + public string CHash { get; set; } +#endif + /// The claims_locales property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClaimsLocales { get; set; } +#nullable restore +#else + public string ClaimsLocales { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The email_verified property + public bool? EmailVerified { get; set; } + /// The exp property + public long? Exp { get; set; } + /// The family_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FamilyName { get; set; } +#nullable restore +#else + public string FamilyName { get; set; } +#endif + /// The gender property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Gender { get; set; } +#nullable restore +#else + public string Gender { get; set; } +#endif + /// The given_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GivenName { get; set; } +#nullable restore +#else + public string GivenName { get; set; } +#endif + /// The iat property + public long? Iat { get; set; } + /// The iss property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Iss { get; set; } +#nullable restore +#else + public string Iss { get; set; } +#endif + /// The jti property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Jti { get; set; } +#nullable restore +#else + public string Jti { get; set; } +#endif + /// The locale property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Locale { get; set; } +#nullable restore +#else + public string Locale { get; set; } +#endif + /// The middle_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MiddleName { get; set; } +#nullable restore +#else + public string MiddleName { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The nbf property + public long? Nbf { get; set; } + /// The nickname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Nickname { get; set; } +#nullable restore +#else + public string Nickname { get; set; } +#endif + /// The nonce property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Nonce { get; set; } +#nullable restore +#else + public string Nonce { get; set; } +#endif + /// The otherClaims property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IDToken_otherClaims? OtherClaims { get; set; } +#nullable restore +#else + public IDToken_otherClaims OtherClaims { get; set; } +#endif + /// The phone_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PhoneNumber { get; set; } +#nullable restore +#else + public string PhoneNumber { get; set; } +#endif + /// The phone_number_verified property + public bool? PhoneNumberVerified { get; set; } + /// The picture property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Picture { get; set; } +#nullable restore +#else + public string Picture { get; set; } +#endif + /// The preferred_username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreferredUsername { get; set; } +#nullable restore +#else + public string PreferredUsername { get; set; } +#endif + /// The profile property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Profile { get; set; } +#nullable restore +#else + public string Profile { get; set; } +#endif + /// The session_state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SessionState { get; set; } +#nullable restore +#else + public string SessionState { get; set; } +#endif + /// The s_hash property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SHash { get; set; } +#nullable restore +#else + public string SHash { get; set; } +#endif + /// The sid property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sid { get; set; } +#nullable restore +#else + public string Sid { get; set; } +#endif + /// The sub property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sub { get; set; } +#nullable restore +#else + public string Sub { get; set; } +#endif + /// The typ property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Typ { get; set; } +#nullable restore +#else + public string Typ { get; set; } +#endif + /// The updated_at property + public long? UpdatedAt { get; set; } + /// The website property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Website { get; set; } +#nullable restore +#else + public string Website { get; set; } +#endif + /// The zoneinfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Zoneinfo { get; set; } +#nullable restore +#else + public string Zoneinfo { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IDToken() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static IDToken CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IDToken(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"acr", n => { Acr = n.GetStringValue(); } }, + {"address", n => { Address = n.GetObjectValue(AddressClaimSet.CreateFromDiscriminatorValue); } }, + {"at_hash", n => { AtHash = n.GetStringValue(); } }, + {"authTime", n => { AuthTime = n.GetIntValue(); } }, + {"azp", n => { Azp = n.GetStringValue(); } }, + {"birthdate", n => { Birthdate = n.GetStringValue(); } }, + {"c_hash", n => { CHash = n.GetStringValue(); } }, + {"claims_locales", n => { ClaimsLocales = n.GetStringValue(); } }, + {"email", n => { Email = n.GetStringValue(); } }, + {"email_verified", n => { EmailVerified = n.GetBoolValue(); } }, + {"exp", n => { Exp = n.GetLongValue(); } }, + {"family_name", n => { FamilyName = n.GetStringValue(); } }, + {"gender", n => { Gender = n.GetStringValue(); } }, + {"given_name", n => { GivenName = n.GetStringValue(); } }, + {"iat", n => { Iat = n.GetLongValue(); } }, + {"iss", n => { Iss = n.GetStringValue(); } }, + {"jti", n => { Jti = n.GetStringValue(); } }, + {"locale", n => { Locale = n.GetStringValue(); } }, + {"middle_name", n => { MiddleName = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"nbf", n => { Nbf = n.GetLongValue(); } }, + {"nickname", n => { Nickname = n.GetStringValue(); } }, + {"nonce", n => { Nonce = n.GetStringValue(); } }, + {"otherClaims", n => { OtherClaims = n.GetObjectValue(IDToken_otherClaims.CreateFromDiscriminatorValue); } }, + {"phone_number", n => { PhoneNumber = n.GetStringValue(); } }, + {"phone_number_verified", n => { PhoneNumberVerified = n.GetBoolValue(); } }, + {"picture", n => { Picture = n.GetStringValue(); } }, + {"preferred_username", n => { PreferredUsername = n.GetStringValue(); } }, + {"profile", n => { Profile = n.GetStringValue(); } }, + {"s_hash", n => { SHash = n.GetStringValue(); } }, + {"session_state", n => { SessionState = n.GetStringValue(); } }, + {"sid", n => { Sid = n.GetStringValue(); } }, + {"sub", n => { Sub = n.GetStringValue(); } }, + {"typ", n => { Typ = n.GetStringValue(); } }, + {"updated_at", n => { UpdatedAt = n.GetLongValue(); } }, + {"website", n => { Website = n.GetStringValue(); } }, + {"zoneinfo", n => { Zoneinfo = n.GetStringValue(); } }, + {"auth_time", n => { Auth_time = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("acr", Acr); + writer.WriteObjectValue("address", Address); + writer.WriteStringValue("at_hash", AtHash); + writer.WriteLongValue("auth_time", Auth_time); + writer.WriteIntValue("authTime", AuthTime); + writer.WriteStringValue("azp", Azp); + writer.WriteStringValue("birthdate", Birthdate); + writer.WriteStringValue("c_hash", CHash); + writer.WriteStringValue("claims_locales", ClaimsLocales); + writer.WriteStringValue("email", Email); + writer.WriteBoolValue("email_verified", EmailVerified); + writer.WriteLongValue("exp", Exp); + writer.WriteStringValue("family_name", FamilyName); + writer.WriteStringValue("gender", Gender); + writer.WriteStringValue("given_name", GivenName); + writer.WriteLongValue("iat", Iat); + writer.WriteStringValue("iss", Iss); + writer.WriteStringValue("jti", Jti); + writer.WriteStringValue("locale", Locale); + writer.WriteStringValue("middle_name", MiddleName); + writer.WriteStringValue("name", Name); + writer.WriteLongValue("nbf", Nbf); + writer.WriteStringValue("nickname", Nickname); + writer.WriteStringValue("nonce", Nonce); + writer.WriteObjectValue("otherClaims", OtherClaims); + writer.WriteStringValue("phone_number", PhoneNumber); + writer.WriteBoolValue("phone_number_verified", PhoneNumberVerified); + writer.WriteStringValue("picture", Picture); + writer.WriteStringValue("preferred_username", PreferredUsername); + writer.WriteStringValue("profile", Profile); + writer.WriteStringValue("session_state", SessionState); + writer.WriteStringValue("s_hash", SHash); + writer.WriteStringValue("sid", Sid); + writer.WriteStringValue("sub", Sub); + writer.WriteStringValue("typ", Typ); + writer.WriteLongValue("updated_at", UpdatedAt); + writer.WriteStringValue("website", Website); + writer.WriteStringValue("zoneinfo", Zoneinfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/IDToken_otherClaims.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IDToken_otherClaims.cs new file mode 100644 index 00000000..aa356b10 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IDToken_otherClaims.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class IDToken_otherClaims : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public IDToken_otherClaims() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static IDToken_otherClaims CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IDToken_otherClaims(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderMapperRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderMapperRepresentation.cs new file mode 100644 index 00000000..662b05b9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderMapperRepresentation.cs @@ -0,0 +1,93 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class IdentityProviderMapperRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IdentityProviderMapperRepresentation_config? Config { get; set; } +#nullable restore +#else + public IdentityProviderMapperRepresentation_config Config { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The identityProviderAlias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IdentityProviderAlias { get; set; } +#nullable restore +#else + public string IdentityProviderAlias { get; set; } +#endif + /// The identityProviderMapper property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IdentityProviderMapper { get; set; } +#nullable restore +#else + public string IdentityProviderMapper { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IdentityProviderMapperRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static IdentityProviderMapperRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IdentityProviderMapperRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"config", n => { Config = n.GetObjectValue(IdentityProviderMapperRepresentation_config.CreateFromDiscriminatorValue); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"identityProviderAlias", n => { IdentityProviderAlias = n.GetStringValue(); } }, + {"identityProviderMapper", n => { IdentityProviderMapper = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("config", Config); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("identityProviderAlias", IdentityProviderAlias); + writer.WriteStringValue("identityProviderMapper", IdentityProviderMapper); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderMapperRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderMapperRepresentation_config.cs new file mode 100644 index 00000000..9a90585d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderMapperRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class IdentityProviderMapperRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public IdentityProviderMapperRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static IdentityProviderMapperRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IdentityProviderMapperRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderRepresentation.cs new file mode 100644 index 00000000..6672ba5f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderRepresentation.cs @@ -0,0 +1,153 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class IdentityProviderRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The addReadTokenRoleOnCreate property + public bool? AddReadTokenRoleOnCreate { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The authenticateByDefault property + public bool? AuthenticateByDefault { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IdentityProviderRepresentation_config? Config { get; set; } +#nullable restore +#else + public IdentityProviderRepresentation_config Config { get; set; } +#endif + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The enabled property + public bool? Enabled { get; set; } + /// The firstBrokerLoginFlowAlias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FirstBrokerLoginFlowAlias { get; set; } +#nullable restore +#else + public string FirstBrokerLoginFlowAlias { get; set; } +#endif + /// The internalId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InternalId { get; set; } +#nullable restore +#else + public string InternalId { get; set; } +#endif + /// The linkOnly property + public bool? LinkOnly { get; set; } + /// The postBrokerLoginFlowAlias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PostBrokerLoginFlowAlias { get; set; } +#nullable restore +#else + public string PostBrokerLoginFlowAlias { get; set; } +#endif + /// The providerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderId { get; set; } +#nullable restore +#else + public string ProviderId { get; set; } +#endif + /// The storeToken property + public bool? StoreToken { get; set; } + /// The trustEmail property + public bool? TrustEmail { get; set; } + /// The updateProfileFirstLogin property + [Obsolete("")] + public bool? UpdateProfileFirstLogin { get; set; } + /// The updateProfileFirstLoginMode property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdateProfileFirstLoginMode { get; set; } +#nullable restore +#else + public string UpdateProfileFirstLoginMode { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IdentityProviderRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static IdentityProviderRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IdentityProviderRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"addReadTokenRoleOnCreate", n => { AddReadTokenRoleOnCreate = n.GetBoolValue(); } }, + {"alias", n => { Alias = n.GetStringValue(); } }, + {"authenticateByDefault", n => { AuthenticateByDefault = n.GetBoolValue(); } }, + {"config", n => { Config = n.GetObjectValue(IdentityProviderRepresentation_config.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"firstBrokerLoginFlowAlias", n => { FirstBrokerLoginFlowAlias = n.GetStringValue(); } }, + {"internalId", n => { InternalId = n.GetStringValue(); } }, + {"linkOnly", n => { LinkOnly = n.GetBoolValue(); } }, + {"postBrokerLoginFlowAlias", n => { PostBrokerLoginFlowAlias = n.GetStringValue(); } }, + {"providerId", n => { ProviderId = n.GetStringValue(); } }, + {"storeToken", n => { StoreToken = n.GetBoolValue(); } }, + {"trustEmail", n => { TrustEmail = n.GetBoolValue(); } }, + {"updateProfileFirstLogin", n => { UpdateProfileFirstLogin = n.GetBoolValue(); } }, + {"updateProfileFirstLoginMode", n => { UpdateProfileFirstLoginMode = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("addReadTokenRoleOnCreate", AddReadTokenRoleOnCreate); + writer.WriteStringValue("alias", Alias); + writer.WriteBoolValue("authenticateByDefault", AuthenticateByDefault); + writer.WriteObjectValue("config", Config); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("firstBrokerLoginFlowAlias", FirstBrokerLoginFlowAlias); + writer.WriteStringValue("internalId", InternalId); + writer.WriteBoolValue("linkOnly", LinkOnly); + writer.WriteStringValue("postBrokerLoginFlowAlias", PostBrokerLoginFlowAlias); + writer.WriteStringValue("providerId", ProviderId); + writer.WriteBoolValue("storeToken", StoreToken); + writer.WriteBoolValue("trustEmail", TrustEmail); + writer.WriteBoolValue("updateProfileFirstLogin", UpdateProfileFirstLogin); + writer.WriteStringValue("updateProfileFirstLoginMode", UpdateProfileFirstLoginMode); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderRepresentation_config.cs new file mode 100644 index 00000000..32335bc2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/IdentityProviderRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class IdentityProviderRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public IdentityProviderRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static IdentityProviderRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IdentityProviderRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyMetadataRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyMetadataRepresentation.cs new file mode 100644 index 00000000..c2ad0b42 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyMetadataRepresentation.cs @@ -0,0 +1,125 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class KeyMetadataRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The algorithm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Algorithm { get; set; } +#nullable restore +#else + public string Algorithm { get; set; } +#endif + /// The certificate property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Certificate { get; set; } +#nullable restore +#else + public string Certificate { get; set; } +#endif + /// The kid property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Kid { get; set; } +#nullable restore +#else + public string Kid { get; set; } +#endif + /// The providerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderId { get; set; } +#nullable restore +#else + public string ProviderId { get; set; } +#endif + /// The providerPriority property + public long? ProviderPriority { get; set; } + /// The publicKey property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicKey { get; set; } +#nullable restore +#else + public string PublicKey { get; set; } +#endif + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The use property + public KeyUse? Use { get; set; } + /// The validTo property + public long? ValidTo { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public KeyMetadataRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static KeyMetadataRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new KeyMetadataRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"algorithm", n => { Algorithm = n.GetStringValue(); } }, + {"certificate", n => { Certificate = n.GetStringValue(); } }, + {"kid", n => { Kid = n.GetStringValue(); } }, + {"providerId", n => { ProviderId = n.GetStringValue(); } }, + {"providerPriority", n => { ProviderPriority = n.GetLongValue(); } }, + {"publicKey", n => { PublicKey = n.GetStringValue(); } }, + {"status", n => { Status = n.GetStringValue(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + {"use", n => { Use = n.GetEnumValue(); } }, + {"validTo", n => { ValidTo = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("algorithm", Algorithm); + writer.WriteStringValue("certificate", Certificate); + writer.WriteStringValue("kid", Kid); + writer.WriteStringValue("providerId", ProviderId); + writer.WriteLongValue("providerPriority", ProviderPriority); + writer.WriteStringValue("publicKey", PublicKey); + writer.WriteStringValue("status", Status); + writer.WriteStringValue("type", Type); + writer.WriteEnumValue("use", Use); + writer.WriteLongValue("validTo", ValidTo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyStoreConfig.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyStoreConfig.cs new file mode 100644 index 00000000..f713a920 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyStoreConfig.cs @@ -0,0 +1,97 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class KeyStoreConfig : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The format property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Format { get; set; } +#nullable restore +#else + public string Format { get; set; } +#endif + /// The keyAlias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyAlias { get; set; } +#nullable restore +#else + public string KeyAlias { get; set; } +#endif + /// The keyPassword property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyPassword { get; set; } +#nullable restore +#else + public string KeyPassword { get; set; } +#endif + /// The realmAlias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RealmAlias { get; set; } +#nullable restore +#else + public string RealmAlias { get; set; } +#endif + /// The realmCertificate property + public bool? RealmCertificate { get; set; } + /// The storePassword property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StorePassword { get; set; } +#nullable restore +#else + public string StorePassword { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public KeyStoreConfig() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static KeyStoreConfig CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new KeyStoreConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"format", n => { Format = n.GetStringValue(); } }, + {"keyAlias", n => { KeyAlias = n.GetStringValue(); } }, + {"keyPassword", n => { KeyPassword = n.GetStringValue(); } }, + {"realmAlias", n => { RealmAlias = n.GetStringValue(); } }, + {"realmCertificate", n => { RealmCertificate = n.GetBoolValue(); } }, + {"storePassword", n => { StorePassword = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("format", Format); + writer.WriteStringValue("keyAlias", KeyAlias); + writer.WriteStringValue("keyPassword", KeyPassword); + writer.WriteStringValue("realmAlias", RealmAlias); + writer.WriteBoolValue("realmCertificate", RealmCertificate); + writer.WriteStringValue("storePassword", StorePassword); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyUse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyUse.cs new file mode 100644 index 00000000..036e1558 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeyUse.cs @@ -0,0 +1,11 @@ +// +using System.Runtime.Serialization; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public enum KeyUse { + [EnumMember(Value = "SIG")] + SIG, + [EnumMember(Value = "ENC")] + ENC, + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeysMetadataRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeysMetadataRepresentation.cs new file mode 100644 index 00000000..cf0c332b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeysMetadataRepresentation.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class KeysMetadataRepresentation : IAdditionalDataHolder, IParsable { + /// The active property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public KeysMetadataRepresentation_active? Active { get; set; } +#nullable restore +#else + public KeysMetadataRepresentation_active Active { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The keys property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Keys { get; set; } +#nullable restore +#else + public List Keys { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public KeysMetadataRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static KeysMetadataRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new KeysMetadataRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"active", n => { Active = n.GetObjectValue(KeysMetadataRepresentation_active.CreateFromDiscriminatorValue); } }, + {"keys", n => { Keys = n.GetCollectionOfObjectValues(KeyMetadataRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("active", Active); + writer.WriteCollectionOfObjectValues("keys", Keys); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeysMetadataRepresentation_active.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeysMetadataRepresentation_active.cs new file mode 100644 index 00000000..7643f19d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/KeysMetadataRepresentation_active.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class KeysMetadataRepresentation_active : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public KeysMetadataRepresentation_active() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static KeysMetadataRepresentation_active CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new KeysMetadataRepresentation_active(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Logic.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Logic.cs new file mode 100644 index 00000000..47f91103 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Logic.cs @@ -0,0 +1,11 @@ +// +using System.Runtime.Serialization; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public enum Logic { + [EnumMember(Value = "POSITIVE")] + POSITIVE, + [EnumMember(Value = "NEGATIVE")] + NEGATIVE, + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ManagementPermissionReference.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ManagementPermissionReference.cs new file mode 100644 index 00000000..25219986 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ManagementPermissionReference.cs @@ -0,0 +1,67 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ManagementPermissionReference : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The resource property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Resource { get; set; } +#nullable restore +#else + public string Resource { get; set; } +#endif + /// The scopePermissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ManagementPermissionReference_scopePermissions? ScopePermissions { get; set; } +#nullable restore +#else + public ManagementPermissionReference_scopePermissions ScopePermissions { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ManagementPermissionReference() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ManagementPermissionReference CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ManagementPermissionReference(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"resource", n => { Resource = n.GetStringValue(); } }, + {"scopePermissions", n => { ScopePermissions = n.GetObjectValue(ManagementPermissionReference_scopePermissions.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("resource", Resource); + writer.WriteObjectValue("scopePermissions", ScopePermissions); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ManagementPermissionReference_scopePermissions.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ManagementPermissionReference_scopePermissions.cs new file mode 100644 index 00000000..9c7f0e46 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ManagementPermissionReference_scopePermissions.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ManagementPermissionReference_scopePermissions : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ManagementPermissionReference_scopePermissions() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ManagementPermissionReference_scopePermissions CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ManagementPermissionReference_scopePermissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/MappingsRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MappingsRepresentation.cs new file mode 100644 index 00000000..29b6e764 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MappingsRepresentation.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class MappingsRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The clientMappings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public MappingsRepresentation_clientMappings? ClientMappings { get; set; } +#nullable restore +#else + public MappingsRepresentation_clientMappings ClientMappings { get; set; } +#endif + /// The realmMappings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RealmMappings { get; set; } +#nullable restore +#else + public List RealmMappings { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MappingsRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static MappingsRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MappingsRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"clientMappings", n => { ClientMappings = n.GetObjectValue(MappingsRepresentation_clientMappings.CreateFromDiscriminatorValue); } }, + {"realmMappings", n => { RealmMappings = n.GetCollectionOfObjectValues(RoleRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("clientMappings", ClientMappings); + writer.WriteCollectionOfObjectValues("realmMappings", RealmMappings); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/MappingsRepresentation_clientMappings.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MappingsRepresentation_clientMappings.cs new file mode 100644 index 00000000..5844b1ee --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MappingsRepresentation_clientMappings.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class MappingsRepresentation_clientMappings : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MappingsRepresentation_clientMappings() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static MappingsRepresentation_clientMappings CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MappingsRepresentation_clientMappings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/MultivaluedHashMapStringComponentExportRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MultivaluedHashMapStringComponentExportRepresentation.cs new file mode 100644 index 00000000..6fb35845 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MultivaluedHashMapStringComponentExportRepresentation.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class MultivaluedHashMapStringComponentExportRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MultivaluedHashMapStringComponentExportRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static MultivaluedHashMapStringComponentExportRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MultivaluedHashMapStringComponentExportRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/MultivaluedHashMapStringString.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MultivaluedHashMapStringString.cs new file mode 100644 index 00000000..66f7c02c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/MultivaluedHashMapStringString.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class MultivaluedHashMapStringString : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MultivaluedHashMapStringString() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static MultivaluedHashMapStringString CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MultivaluedHashMapStringString(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation.cs new file mode 100644 index 00000000..a5f9b1fc --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation.cs @@ -0,0 +1,377 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class OAuthClientRepresentation : IAdditionalDataHolder, IParsable { + /// The access property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public OAuthClientRepresentation_access? Access { get; set; } +#nullable restore +#else + public OAuthClientRepresentation_access Access { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The adminUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdminUrl { get; set; } +#nullable restore +#else + public string AdminUrl { get; set; } +#endif + /// The alwaysDisplayInConsole property + public bool? AlwaysDisplayInConsole { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public OAuthClientRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public OAuthClientRepresentation_attributes Attributes { get; set; } +#endif + /// The authenticationFlowBindingOverrides property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public OAuthClientRepresentation_authenticationFlowBindingOverrides? AuthenticationFlowBindingOverrides { get; set; } +#nullable restore +#else + public OAuthClientRepresentation_authenticationFlowBindingOverrides AuthenticationFlowBindingOverrides { get; set; } +#endif + /// The authorizationServicesEnabled property + public bool? AuthorizationServicesEnabled { get; set; } + /// The authorizationSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ResourceServerRepresentation? AuthorizationSettings { get; set; } +#nullable restore +#else + public ResourceServerRepresentation AuthorizationSettings { get; set; } +#endif + /// The baseUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BaseUrl { get; set; } +#nullable restore +#else + public string BaseUrl { get; set; } +#endif + /// The bearerOnly property + public bool? BearerOnly { get; set; } + /// The claims property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public OAuthClientRepresentation_claims? Claims { get; set; } +#nullable restore +#else + public OAuthClientRepresentation_claims Claims { get; set; } +#endif + /// The clientAuthenticatorType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientAuthenticatorType { get; set; } +#nullable restore +#else + public string ClientAuthenticatorType { get; set; } +#endif + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The clientTemplate property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientTemplate { get; set; } +#nullable restore +#else + public string ClientTemplate { get; set; } +#endif + /// The consentRequired property + public bool? ConsentRequired { get; set; } + /// The defaultClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultClientScopes { get; set; } +#nullable restore +#else + public List DefaultClientScopes { get; set; } +#endif + /// The defaultRoles property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultRoles { get; set; } +#nullable restore +#else + public List DefaultRoles { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The directAccessGrantsEnabled property + public bool? DirectAccessGrantsEnabled { get; set; } + /// The directGrantsOnly property + [Obsolete("")] + public bool? DirectGrantsOnly { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The frontchannelLogout property + public bool? FrontchannelLogout { get; set; } + /// The fullScopeAllowed property + public bool? FullScopeAllowed { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The implicitFlowEnabled property + public bool? ImplicitFlowEnabled { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The nodeReRegistrationTimeout property + public int? NodeReRegistrationTimeout { get; set; } + /// The notBefore property + public int? NotBefore { get; set; } + /// The optionalClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? OptionalClientScopes { get; set; } +#nullable restore +#else + public List OptionalClientScopes { get; set; } +#endif + /// The origin property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Origin { get; set; } +#nullable restore +#else + public string Origin { get; set; } +#endif + /// The protocol property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Protocol { get; set; } +#nullable restore +#else + public string Protocol { get; set; } +#endif + /// The protocolMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProtocolMappers { get; set; } +#nullable restore +#else + public List ProtocolMappers { get; set; } +#endif + /// The publicClient property + public bool? PublicClient { get; set; } + /// The redirectUris property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RedirectUris { get; set; } +#nullable restore +#else + public List RedirectUris { get; set; } +#endif + /// The registeredNodes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public OAuthClientRepresentation_registeredNodes? RegisteredNodes { get; set; } +#nullable restore +#else + public OAuthClientRepresentation_registeredNodes RegisteredNodes { get; set; } +#endif + /// The registrationAccessToken property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RegistrationAccessToken { get; set; } +#nullable restore +#else + public string RegistrationAccessToken { get; set; } +#endif + /// The rootUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RootUrl { get; set; } +#nullable restore +#else + public string RootUrl { get; set; } +#endif + /// The secret property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The serviceAccountsEnabled property + public bool? ServiceAccountsEnabled { get; set; } + /// The standardFlowEnabled property + public bool? StandardFlowEnabled { get; set; } + /// The surrogateAuthRequired property + public bool? SurrogateAuthRequired { get; set; } + /// The useTemplateConfig property + [Obsolete("")] + public bool? UseTemplateConfig { get; set; } + /// The useTemplateMappers property + [Obsolete("")] + public bool? UseTemplateMappers { get; set; } + /// The useTemplateScope property + [Obsolete("")] + public bool? UseTemplateScope { get; set; } + /// The webOrigins property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebOrigins { get; set; } +#nullable restore +#else + public List WebOrigins { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OAuthClientRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static OAuthClientRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OAuthClientRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"access", n => { Access = n.GetObjectValue(OAuthClientRepresentation_access.CreateFromDiscriminatorValue); } }, + {"adminUrl", n => { AdminUrl = n.GetStringValue(); } }, + {"alwaysDisplayInConsole", n => { AlwaysDisplayInConsole = n.GetBoolValue(); } }, + {"attributes", n => { Attributes = n.GetObjectValue(OAuthClientRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"authenticationFlowBindingOverrides", n => { AuthenticationFlowBindingOverrides = n.GetObjectValue(OAuthClientRepresentation_authenticationFlowBindingOverrides.CreateFromDiscriminatorValue); } }, + {"authorizationServicesEnabled", n => { AuthorizationServicesEnabled = n.GetBoolValue(); } }, + {"authorizationSettings", n => { AuthorizationSettings = n.GetObjectValue(ResourceServerRepresentation.CreateFromDiscriminatorValue); } }, + {"baseUrl", n => { BaseUrl = n.GetStringValue(); } }, + {"bearerOnly", n => { BearerOnly = n.GetBoolValue(); } }, + {"claims", n => { Claims = n.GetObjectValue(OAuthClientRepresentation_claims.CreateFromDiscriminatorValue); } }, + {"clientAuthenticatorType", n => { ClientAuthenticatorType = n.GetStringValue(); } }, + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"clientTemplate", n => { ClientTemplate = n.GetStringValue(); } }, + {"consentRequired", n => { ConsentRequired = n.GetBoolValue(); } }, + {"defaultClientScopes", n => { DefaultClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"defaultRoles", n => { DefaultRoles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"directAccessGrantsEnabled", n => { DirectAccessGrantsEnabled = n.GetBoolValue(); } }, + {"directGrantsOnly", n => { DirectGrantsOnly = n.GetBoolValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"frontchannelLogout", n => { FrontchannelLogout = n.GetBoolValue(); } }, + {"fullScopeAllowed", n => { FullScopeAllowed = n.GetBoolValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"implicitFlowEnabled", n => { ImplicitFlowEnabled = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"nodeReRegistrationTimeout", n => { NodeReRegistrationTimeout = n.GetIntValue(); } }, + {"notBefore", n => { NotBefore = n.GetIntValue(); } }, + {"optionalClientScopes", n => { OptionalClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"origin", n => { Origin = n.GetStringValue(); } }, + {"protocol", n => { Protocol = n.GetStringValue(); } }, + {"protocolMappers", n => { ProtocolMappers = n.GetCollectionOfObjectValues(ProtocolMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"publicClient", n => { PublicClient = n.GetBoolValue(); } }, + {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"registeredNodes", n => { RegisteredNodes = n.GetObjectValue(OAuthClientRepresentation_registeredNodes.CreateFromDiscriminatorValue); } }, + {"registrationAccessToken", n => { RegistrationAccessToken = n.GetStringValue(); } }, + {"rootUrl", n => { RootUrl = n.GetStringValue(); } }, + {"secret", n => { Secret = n.GetStringValue(); } }, + {"serviceAccountsEnabled", n => { ServiceAccountsEnabled = n.GetBoolValue(); } }, + {"standardFlowEnabled", n => { StandardFlowEnabled = n.GetBoolValue(); } }, + {"surrogateAuthRequired", n => { SurrogateAuthRequired = n.GetBoolValue(); } }, + {"useTemplateConfig", n => { UseTemplateConfig = n.GetBoolValue(); } }, + {"useTemplateMappers", n => { UseTemplateMappers = n.GetBoolValue(); } }, + {"useTemplateScope", n => { UseTemplateScope = n.GetBoolValue(); } }, + {"webOrigins", n => { WebOrigins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("access", Access); + writer.WriteStringValue("adminUrl", AdminUrl); + writer.WriteBoolValue("alwaysDisplayInConsole", AlwaysDisplayInConsole); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteObjectValue("authenticationFlowBindingOverrides", AuthenticationFlowBindingOverrides); + writer.WriteBoolValue("authorizationServicesEnabled", AuthorizationServicesEnabled); + writer.WriteObjectValue("authorizationSettings", AuthorizationSettings); + writer.WriteStringValue("baseUrl", BaseUrl); + writer.WriteBoolValue("bearerOnly", BearerOnly); + writer.WriteObjectValue("claims", Claims); + writer.WriteStringValue("clientAuthenticatorType", ClientAuthenticatorType); + writer.WriteStringValue("clientId", ClientId); + writer.WriteStringValue("clientTemplate", ClientTemplate); + writer.WriteBoolValue("consentRequired", ConsentRequired); + writer.WriteCollectionOfPrimitiveValues("defaultClientScopes", DefaultClientScopes); + writer.WriteCollectionOfPrimitiveValues("defaultRoles", DefaultRoles); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("directAccessGrantsEnabled", DirectAccessGrantsEnabled); + writer.WriteBoolValue("directGrantsOnly", DirectGrantsOnly); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteBoolValue("frontchannelLogout", FrontchannelLogout); + writer.WriteBoolValue("fullScopeAllowed", FullScopeAllowed); + writer.WriteStringValue("id", Id); + writer.WriteBoolValue("implicitFlowEnabled", ImplicitFlowEnabled); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("nodeReRegistrationTimeout", NodeReRegistrationTimeout); + writer.WriteIntValue("notBefore", NotBefore); + writer.WriteCollectionOfPrimitiveValues("optionalClientScopes", OptionalClientScopes); + writer.WriteStringValue("origin", Origin); + writer.WriteStringValue("protocol", Protocol); + writer.WriteCollectionOfObjectValues("protocolMappers", ProtocolMappers); + writer.WriteBoolValue("publicClient", PublicClient); + writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); + writer.WriteObjectValue("registeredNodes", RegisteredNodes); + writer.WriteStringValue("registrationAccessToken", RegistrationAccessToken); + writer.WriteStringValue("rootUrl", RootUrl); + writer.WriteStringValue("secret", Secret); + writer.WriteBoolValue("serviceAccountsEnabled", ServiceAccountsEnabled); + writer.WriteBoolValue("standardFlowEnabled", StandardFlowEnabled); + writer.WriteBoolValue("surrogateAuthRequired", SurrogateAuthRequired); + writer.WriteBoolValue("useTemplateConfig", UseTemplateConfig); + writer.WriteBoolValue("useTemplateMappers", UseTemplateMappers); + writer.WriteBoolValue("useTemplateScope", UseTemplateScope); + writer.WriteCollectionOfPrimitiveValues("webOrigins", WebOrigins); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_access.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_access.cs new file mode 100644 index 00000000..f7c8ba15 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_access.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class OAuthClientRepresentation_access : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OAuthClientRepresentation_access() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static OAuthClientRepresentation_access CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OAuthClientRepresentation_access(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_attributes.cs new file mode 100644 index 00000000..1ac797cf --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class OAuthClientRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OAuthClientRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static OAuthClientRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OAuthClientRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_authenticationFlowBindingOverrides.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_authenticationFlowBindingOverrides.cs new file mode 100644 index 00000000..8f46c011 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_authenticationFlowBindingOverrides.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class OAuthClientRepresentation_authenticationFlowBindingOverrides : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OAuthClientRepresentation_authenticationFlowBindingOverrides() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static OAuthClientRepresentation_authenticationFlowBindingOverrides CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OAuthClientRepresentation_authenticationFlowBindingOverrides(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_claims.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_claims.cs new file mode 100644 index 00000000..c506cb36 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_claims.cs @@ -0,0 +1,36 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class OAuthClientRepresentation_claims : ClaimRepresentation, IParsable { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new OAuthClientRepresentation_claims CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OAuthClientRepresentation_claims(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_registeredNodes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_registeredNodes.cs new file mode 100644 index 00000000..68ebee44 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/OAuthClientRepresentation_registeredNodes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class OAuthClientRepresentation_registeredNodes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OAuthClientRepresentation_registeredNodes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static OAuthClientRepresentation_registeredNodes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OAuthClientRepresentation_registeredNodes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Permission.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Permission.cs new file mode 100644 index 00000000..aec44803 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Permission.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class Permission : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The claims property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Permission_claims? Claims { get; set; } +#nullable restore +#else + public Permission_claims Claims { get; set; } +#endif + /// The rsid property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Rsid { get; set; } +#nullable restore +#else + public string Rsid { get; set; } +#endif + /// The rsname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Rsname { get; set; } +#nullable restore +#else + public string Rsname { get; set; } +#endif + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Permission() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Permission CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Permission(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"claims", n => { Claims = n.GetObjectValue(Permission_claims.CreateFromDiscriminatorValue); } }, + {"rsid", n => { Rsid = n.GetStringValue(); } }, + {"rsname", n => { Rsname = n.GetStringValue(); } }, + {"scopes", n => { Scopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("claims", Claims); + writer.WriteStringValue("rsid", Rsid); + writer.WriteStringValue("rsname", Rsname); + writer.WriteCollectionOfPrimitiveValues("scopes", Scopes); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/Permission_claims.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Permission_claims.cs new file mode 100644 index 00000000..81e57f02 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/Permission_claims.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class Permission_claims : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Permission_claims() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static Permission_claims CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Permission_claims(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEnforcementMode.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEnforcementMode.cs new file mode 100644 index 00000000..b90f3c88 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEnforcementMode.cs @@ -0,0 +1,13 @@ +// +using System.Runtime.Serialization; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public enum PolicyEnforcementMode { + [EnumMember(Value = "ENFORCING")] + ENFORCING, + [EnumMember(Value = "PERMISSIVE")] + PERMISSIVE, + [EnumMember(Value = "DISABLED")] + DISABLED, + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationRequest.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationRequest.cs new file mode 100644 index 00000000..7a832ed2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationRequest.cs @@ -0,0 +1,97 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class PolicyEvaluationRequest : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The context property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PolicyEvaluationRequest_context? Context { get; set; } +#nullable restore +#else + public PolicyEvaluationRequest_context Context { get; set; } +#endif + /// The entitlements property + public bool? Entitlements { get; set; } + /// The resources property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Resources { get; set; } +#nullable restore +#else + public List Resources { get; set; } +#endif + /// The roleIds property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RoleIds { get; set; } +#nullable restore +#else + public List RoleIds { get; set; } +#endif + /// The userId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PolicyEvaluationRequest() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PolicyEvaluationRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PolicyEvaluationRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"context", n => { Context = n.GetObjectValue(PolicyEvaluationRequest_context.CreateFromDiscriminatorValue); } }, + {"entitlements", n => { Entitlements = n.GetBoolValue(); } }, + {"resources", n => { Resources = n.GetCollectionOfObjectValues(ResourceRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"roleIds", n => { RoleIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"userId", n => { UserId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("clientId", ClientId); + writer.WriteObjectValue("context", Context); + writer.WriteBoolValue("entitlements", Entitlements); + writer.WriteCollectionOfObjectValues("resources", Resources); + writer.WriteCollectionOfPrimitiveValues("roleIds", RoleIds); + writer.WriteStringValue("userId", UserId); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationRequest_context.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationRequest_context.cs new file mode 100644 index 00000000..7ae7dbcb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationRequest_context.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class PolicyEvaluationRequest_context : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PolicyEvaluationRequest_context() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PolicyEvaluationRequest_context CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PolicyEvaluationRequest_context(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationResponse.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationResponse.cs new file mode 100644 index 00000000..0d14f713 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyEvaluationResponse.cs @@ -0,0 +1,71 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class PolicyEvaluationResponse : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The entitlements property + public bool? Entitlements { get; set; } + /// The results property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Results { get; set; } +#nullable restore +#else + public List Results { get; set; } +#endif + /// The rpt property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AccessToken? Rpt { get; set; } +#nullable restore +#else + public AccessToken Rpt { get; set; } +#endif + /// The status property + public DecisionEffect? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PolicyEvaluationResponse() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PolicyEvaluationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PolicyEvaluationResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"entitlements", n => { Entitlements = n.GetBoolValue(); } }, + {"results", n => { Results = n.GetCollectionOfObjectValues(EvaluationResultRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"rpt", n => { Rpt = n.GetObjectValue(AccessToken.CreateFromDiscriminatorValue); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("entitlements", Entitlements); + writer.WriteCollectionOfObjectValues("results", Results); + writer.WriteObjectValue("rpt", Rpt); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyProviderRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyProviderRepresentation.cs new file mode 100644 index 00000000..1f7c14e9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyProviderRepresentation.cs @@ -0,0 +1,73 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class PolicyProviderRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Group { get; set; } +#nullable restore +#else + public string Group { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PolicyProviderRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PolicyProviderRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PolicyProviderRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"group", n => { Group = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("group", Group); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyRepresentation.cs new file mode 100644 index 00000000..f4842deb --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyRepresentation.cs @@ -0,0 +1,161 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class PolicyRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PolicyRepresentation_config? Config { get; set; } +#nullable restore +#else + public PolicyRepresentation_config Config { get; set; } +#endif + /// The decisionStrategy property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.DecisionStrategy? DecisionStrategy { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The logic property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Logic? Logic { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The owner property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Owner { get; set; } +#nullable restore +#else + public string Owner { get; set; } +#endif + /// The policies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Policies { get; set; } +#nullable restore +#else + public List Policies { get; set; } +#endif + /// The resources property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Resources { get; set; } +#nullable restore +#else + public List Resources { get; set; } +#endif + /// The resourcesData property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ResourcesData { get; set; } +#nullable restore +#else + public List ResourcesData { get; set; } +#endif + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// The scopesData property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ScopesData { get; set; } +#nullable restore +#else + public List ScopesData { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PolicyRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PolicyRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PolicyRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"config", n => { Config = n.GetObjectValue(PolicyRepresentation_config.CreateFromDiscriminatorValue); } }, + {"decisionStrategy", n => { DecisionStrategy = n.GetEnumValue(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"logic", n => { Logic = n.GetEnumValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"owner", n => { Owner = n.GetStringValue(); } }, + {"policies", n => { Policies = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"resources", n => { Resources = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"resourcesData", n => { ResourcesData = n.GetCollectionOfObjectValues(ResourceRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"scopes", n => { Scopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"scopesData", n => { ScopesData = n.GetCollectionOfObjectValues(ScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("config", Config); + writer.WriteEnumValue("decisionStrategy", DecisionStrategy); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("id", Id); + writer.WriteEnumValue("logic", Logic); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("owner", Owner); + writer.WriteCollectionOfPrimitiveValues("policies", Policies); + writer.WriteCollectionOfPrimitiveValues("resources", Resources); + writer.WriteCollectionOfObjectValues("resourcesData", ResourcesData); + writer.WriteCollectionOfPrimitiveValues("scopes", Scopes); + writer.WriteCollectionOfObjectValues("scopesData", ScopesData); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyRepresentation_config.cs new file mode 100644 index 00000000..7054a080 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class PolicyRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PolicyRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PolicyRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PolicyRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyResultRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyResultRepresentation.cs new file mode 100644 index 00000000..cc52c224 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/PolicyResultRepresentation.cs @@ -0,0 +1,77 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class PolicyResultRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The associatedPolicies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AssociatedPolicies { get; set; } +#nullable restore +#else + public List AssociatedPolicies { get; set; } +#endif + /// The policy property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PolicyRepresentation? Policy { get; set; } +#nullable restore +#else + public PolicyRepresentation Policy { get; set; } +#endif + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// The status property + public DecisionEffect? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PolicyResultRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static PolicyResultRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PolicyResultRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"associatedPolicies", n => { AssociatedPolicies = n.GetCollectionOfObjectValues(PolicyResultRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"policy", n => { Policy = n.GetObjectValue(PolicyRepresentation.CreateFromDiscriminatorValue); } }, + {"scopes", n => { Scopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("associatedPolicies", AssociatedPolicies); + writer.WriteObjectValue("policy", Policy); + writer.WriteCollectionOfPrimitiveValues("scopes", Scopes); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperEvaluationRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperEvaluationRepresentation.cs new file mode 100644 index 00000000..644a1273 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperEvaluationRepresentation.cs @@ -0,0 +1,103 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ProtocolMapperEvaluationRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The containerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContainerId { get; set; } +#nullable restore +#else + public string ContainerId { get; set; } +#endif + /// The containerName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContainerName { get; set; } +#nullable restore +#else + public string ContainerName { get; set; } +#endif + /// The containerType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContainerType { get; set; } +#nullable restore +#else + public string ContainerType { get; set; } +#endif + /// The mapperId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MapperId { get; set; } +#nullable restore +#else + public string MapperId { get; set; } +#endif + /// The mapperName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MapperName { get; set; } +#nullable restore +#else + public string MapperName { get; set; } +#endif + /// The protocolMapper property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProtocolMapper { get; set; } +#nullable restore +#else + public string ProtocolMapper { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtocolMapperEvaluationRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ProtocolMapperEvaluationRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ProtocolMapperEvaluationRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"containerId", n => { ContainerId = n.GetStringValue(); } }, + {"containerName", n => { ContainerName = n.GetStringValue(); } }, + {"containerType", n => { ContainerType = n.GetStringValue(); } }, + {"mapperId", n => { MapperId = n.GetStringValue(); } }, + {"mapperName", n => { MapperName = n.GetStringValue(); } }, + {"protocolMapper", n => { ProtocolMapper = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("containerId", ContainerId); + writer.WriteStringValue("containerName", ContainerName); + writer.WriteStringValue("containerType", ContainerType); + writer.WriteStringValue("mapperId", MapperId); + writer.WriteStringValue("mapperName", MapperName); + writer.WriteStringValue("protocolMapper", ProtocolMapper); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperRepresentation.cs new file mode 100644 index 00000000..c12182f2 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperRepresentation.cs @@ -0,0 +1,109 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ProtocolMapperRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ProtocolMapperRepresentation_config? Config { get; set; } +#nullable restore +#else + public ProtocolMapperRepresentation_config Config { get; set; } +#endif + /// The consentRequired property + [Obsolete("")] + public bool? ConsentRequired { get; set; } + /// The consentText property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ConsentText { get; set; } +#nullable restore +#else + public string ConsentText { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The protocol property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Protocol { get; set; } +#nullable restore +#else + public string Protocol { get; set; } +#endif + /// The protocolMapper property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProtocolMapper { get; set; } +#nullable restore +#else + public string ProtocolMapper { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtocolMapperRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ProtocolMapperRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ProtocolMapperRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"config", n => { Config = n.GetObjectValue(ProtocolMapperRepresentation_config.CreateFromDiscriminatorValue); } }, + {"consentRequired", n => { ConsentRequired = n.GetBoolValue(); } }, + {"consentText", n => { ConsentText = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"protocol", n => { Protocol = n.GetStringValue(); } }, + {"protocolMapper", n => { ProtocolMapper = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("config", Config); + writer.WriteBoolValue("consentRequired", ConsentRequired); + writer.WriteStringValue("consentText", ConsentText); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("protocol", Protocol); + writer.WriteStringValue("protocolMapper", ProtocolMapper); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperRepresentation_config.cs new file mode 100644 index 00000000..e5b28d9c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ProtocolMapperRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ProtocolMapperRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ProtocolMapperRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ProtocolMapperRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ProtocolMapperRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmEventsConfigRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmEventsConfigRepresentation.cs new file mode 100644 index 00000000..493dd399 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmEventsConfigRepresentation.cs @@ -0,0 +1,79 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RealmEventsConfigRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The adminEventsDetailsEnabled property + public bool? AdminEventsDetailsEnabled { get; set; } + /// The adminEventsEnabled property + public bool? AdminEventsEnabled { get; set; } + /// The enabledEventTypes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EnabledEventTypes { get; set; } +#nullable restore +#else + public List EnabledEventTypes { get; set; } +#endif + /// The eventsEnabled property + public bool? EventsEnabled { get; set; } + /// The eventsExpiration property + public long? EventsExpiration { get; set; } + /// The eventsListeners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EventsListeners { get; set; } +#nullable restore +#else + public List EventsListeners { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RealmEventsConfigRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmEventsConfigRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmEventsConfigRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"adminEventsDetailsEnabled", n => { AdminEventsDetailsEnabled = n.GetBoolValue(); } }, + {"adminEventsEnabled", n => { AdminEventsEnabled = n.GetBoolValue(); } }, + {"enabledEventTypes", n => { EnabledEventTypes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"eventsEnabled", n => { EventsEnabled = n.GetBoolValue(); } }, + {"eventsExpiration", n => { EventsExpiration = n.GetLongValue(); } }, + {"eventsListeners", n => { EventsListeners = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("adminEventsDetailsEnabled", AdminEventsDetailsEnabled); + writer.WriteBoolValue("adminEventsEnabled", AdminEventsEnabled); + writer.WriteCollectionOfPrimitiveValues("enabledEventTypes", EnabledEventTypes); + writer.WriteBoolValue("eventsEnabled", EventsEnabled); + writer.WriteLongValue("eventsExpiration", EventsExpiration); + writer.WriteCollectionOfPrimitiveValues("eventsListeners", EventsListeners); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation.cs new file mode 100644 index 00000000..5f5189a8 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation.cs @@ -0,0 +1,1131 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RealmRepresentation : IAdditionalDataHolder, IParsable { + /// The accessCodeLifespan property + public int? AccessCodeLifespan { get; set; } + /// The accessCodeLifespanLogin property + public int? AccessCodeLifespanLogin { get; set; } + /// The accessCodeLifespanUserAction property + public int? AccessCodeLifespanUserAction { get; set; } + /// The accessTokenLifespan property + public int? AccessTokenLifespan { get; set; } + /// The accessTokenLifespanForImplicitFlow property + public int? AccessTokenLifespanForImplicitFlow { get; set; } + /// The accountTheme property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccountTheme { get; set; } +#nullable restore +#else + public string AccountTheme { get; set; } +#endif + /// The actionTokenGeneratedByAdminLifespan property + public int? ActionTokenGeneratedByAdminLifespan { get; set; } + /// The actionTokenGeneratedByUserLifespan property + public int? ActionTokenGeneratedByUserLifespan { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The adminEventsDetailsEnabled property + public bool? AdminEventsDetailsEnabled { get; set; } + /// The adminEventsEnabled property + public bool? AdminEventsEnabled { get; set; } + /// The adminTheme property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdminTheme { get; set; } +#nullable restore +#else + public string AdminTheme { get; set; } +#endif + /// The applications property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Applications { get; set; } +#nullable restore +#else + public List Applications { get; set; } +#endif + /// The applicationScopeMappings property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RealmRepresentation_applicationScopeMappings? ApplicationScopeMappings { get; set; } +#nullable restore +#else + public RealmRepresentation_applicationScopeMappings ApplicationScopeMappings { get; set; } +#endif + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RealmRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public RealmRepresentation_attributes Attributes { get; set; } +#endif + /// The authenticationFlows property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AuthenticationFlows { get; set; } +#nullable restore +#else + public List AuthenticationFlows { get; set; } +#endif + /// The authenticatorConfig property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AuthenticatorConfig { get; set; } +#nullable restore +#else + public List AuthenticatorConfig { get; set; } +#endif + /// The browserFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BrowserFlow { get; set; } +#nullable restore +#else + public string BrowserFlow { get; set; } +#endif + /// The browserSecurityHeaders property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RealmRepresentation_browserSecurityHeaders? BrowserSecurityHeaders { get; set; } +#nullable restore +#else + public RealmRepresentation_browserSecurityHeaders BrowserSecurityHeaders { get; set; } +#endif + /// The bruteForceProtected property + public bool? BruteForceProtected { get; set; } + /// The certificate property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Certificate { get; set; } +#nullable restore +#else + public string Certificate { get; set; } +#endif + /// The clientAuthenticationFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientAuthenticationFlow { get; set; } +#nullable restore +#else + public string ClientAuthenticationFlow { get; set; } +#endif + /// The clientOfflineSessionIdleTimeout property + public int? ClientOfflineSessionIdleTimeout { get; set; } + /// The clientOfflineSessionMaxLifespan property + public int? ClientOfflineSessionMaxLifespan { get; set; } + /// The clientPolicies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientPoliciesRepresentation? ClientPolicies { get; set; } +#nullable restore +#else + public ClientPoliciesRepresentation ClientPolicies { get; set; } +#endif + /// The clientProfiles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ClientProfilesRepresentation? ClientProfiles { get; set; } +#nullable restore +#else + public ClientProfilesRepresentation ClientProfiles { get; set; } +#endif + /// The clients property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Clients { get; set; } +#nullable restore +#else + public List Clients { get; set; } +#endif + /// The clientScopeMappings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RealmRepresentation_clientScopeMappings? ClientScopeMappings { get; set; } +#nullable restore +#else + public RealmRepresentation_clientScopeMappings ClientScopeMappings { get; set; } +#endif + /// The clientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ClientScopes { get; set; } +#nullable restore +#else + public List ClientScopes { get; set; } +#endif + /// The clientSessionIdleTimeout property + public int? ClientSessionIdleTimeout { get; set; } + /// The clientSessionMaxLifespan property + public int? ClientSessionMaxLifespan { get; set; } + /// The clientTemplates property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ClientTemplates { get; set; } +#nullable restore +#else + public List ClientTemplates { get; set; } +#endif + /// The codeSecret property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CodeSecret { get; set; } +#nullable restore +#else + public string CodeSecret { get; set; } +#endif + /// The components property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public MultivaluedHashMapStringComponentExportRepresentation? Components { get; set; } +#nullable restore +#else + public MultivaluedHashMapStringComponentExportRepresentation Components { get; set; } +#endif + /// The defaultDefaultClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultDefaultClientScopes { get; set; } +#nullable restore +#else + public List DefaultDefaultClientScopes { get; set; } +#endif + /// The defaultGroups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultGroups { get; set; } +#nullable restore +#else + public List DefaultGroups { get; set; } +#endif + /// The defaultLocale property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultLocale { get; set; } +#nullable restore +#else + public string DefaultLocale { get; set; } +#endif + /// The defaultOptionalClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultOptionalClientScopes { get; set; } +#nullable restore +#else + public List DefaultOptionalClientScopes { get; set; } +#endif + /// The defaultRole property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RoleRepresentation? DefaultRole { get; set; } +#nullable restore +#else + public RoleRepresentation DefaultRole { get; set; } +#endif + /// The defaultRoles property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DefaultRoles { get; set; } +#nullable restore +#else + public List DefaultRoles { get; set; } +#endif + /// The defaultSignatureAlgorithm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultSignatureAlgorithm { get; set; } +#nullable restore +#else + public string DefaultSignatureAlgorithm { get; set; } +#endif + /// The directGrantFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DirectGrantFlow { get; set; } +#nullable restore +#else + public string DirectGrantFlow { get; set; } +#endif + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The displayNameHtml property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayNameHtml { get; set; } +#nullable restore +#else + public string DisplayNameHtml { get; set; } +#endif + /// The dockerAuthenticationFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DockerAuthenticationFlow { get; set; } +#nullable restore +#else + public string DockerAuthenticationFlow { get; set; } +#endif + /// The duplicateEmailsAllowed property + public bool? DuplicateEmailsAllowed { get; set; } + /// The editUsernameAllowed property + public bool? EditUsernameAllowed { get; set; } + /// The emailTheme property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EmailTheme { get; set; } +#nullable restore +#else + public string EmailTheme { get; set; } +#endif + /// The enabled property + public bool? Enabled { get; set; } + /// The enabledEventTypes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EnabledEventTypes { get; set; } +#nullable restore +#else + public List EnabledEventTypes { get; set; } +#endif + /// The eventsEnabled property + public bool? EventsEnabled { get; set; } + /// The eventsExpiration property + public long? EventsExpiration { get; set; } + /// The eventsListeners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EventsListeners { get; set; } +#nullable restore +#else + public List EventsListeners { get; set; } +#endif + /// The failureFactor property + public int? FailureFactor { get; set; } + /// The federatedUsers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? FederatedUsers { get; set; } +#nullable restore +#else + public List FederatedUsers { get; set; } +#endif + /// The firstBrokerLoginFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FirstBrokerLoginFlow { get; set; } +#nullable restore +#else + public string FirstBrokerLoginFlow { get; set; } +#endif + /// The groups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Groups { get; set; } +#nullable restore +#else + public List Groups { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The identityProviderMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IdentityProviderMappers { get; set; } +#nullable restore +#else + public List IdentityProviderMappers { get; set; } +#endif + /// The identityProviders property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IdentityProviders { get; set; } +#nullable restore +#else + public List IdentityProviders { get; set; } +#endif + /// The internationalizationEnabled property + public bool? InternationalizationEnabled { get; set; } + /// The keycloakVersion property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeycloakVersion { get; set; } +#nullable restore +#else + public string KeycloakVersion { get; set; } +#endif + /// The localizationTexts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RealmRepresentation_localizationTexts? LocalizationTexts { get; set; } +#nullable restore +#else + public RealmRepresentation_localizationTexts LocalizationTexts { get; set; } +#endif + /// The loginTheme property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LoginTheme { get; set; } +#nullable restore +#else + public string LoginTheme { get; set; } +#endif + /// The loginWithEmailAllowed property + public bool? LoginWithEmailAllowed { get; set; } + /// The maxDeltaTimeSeconds property + public int? MaxDeltaTimeSeconds { get; set; } + /// The maxFailureWaitSeconds property + public int? MaxFailureWaitSeconds { get; set; } + /// The maxTemporaryLockouts property + public int? MaxTemporaryLockouts { get; set; } + /// The minimumQuickLoginWaitSeconds property + public int? MinimumQuickLoginWaitSeconds { get; set; } + /// The notBefore property + public int? NotBefore { get; set; } + /// The oauth2DeviceCodeLifespan property + public int? Oauth2DeviceCodeLifespan { get; set; } + /// The oauth2DevicePollingInterval property + public int? Oauth2DevicePollingInterval { get; set; } + /// The oauthClients property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? OauthClients { get; set; } +#nullable restore +#else + public List OauthClients { get; set; } +#endif + /// The offlineSessionIdleTimeout property + public int? OfflineSessionIdleTimeout { get; set; } + /// The offlineSessionMaxLifespan property + public int? OfflineSessionMaxLifespan { get; set; } + /// The offlineSessionMaxLifespanEnabled property + public bool? OfflineSessionMaxLifespanEnabled { get; set; } + /// The otpPolicyAlgorithm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OtpPolicyAlgorithm { get; set; } +#nullable restore +#else + public string OtpPolicyAlgorithm { get; set; } +#endif + /// The otpPolicyCodeReusable property + public bool? OtpPolicyCodeReusable { get; set; } + /// The otpPolicyDigits property + public int? OtpPolicyDigits { get; set; } + /// The otpPolicyInitialCounter property + public int? OtpPolicyInitialCounter { get; set; } + /// The otpPolicyLookAheadWindow property + public int? OtpPolicyLookAheadWindow { get; set; } + /// The otpPolicyPeriod property + public int? OtpPolicyPeriod { get; set; } + /// The otpPolicyType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OtpPolicyType { get; set; } +#nullable restore +#else + public string OtpPolicyType { get; set; } +#endif + /// The otpSupportedApplications property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? OtpSupportedApplications { get; set; } +#nullable restore +#else + public List OtpSupportedApplications { get; set; } +#endif + /// The passwordCredentialGrantAllowed property + [Obsolete("")] + public bool? PasswordCredentialGrantAllowed { get; set; } + /// The passwordPolicy property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PasswordPolicy { get; set; } +#nullable restore +#else + public string PasswordPolicy { get; set; } +#endif + /// The permanentLockout property + public bool? PermanentLockout { get; set; } + /// The privateKey property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrivateKey { get; set; } +#nullable restore +#else + public string PrivateKey { get; set; } +#endif + /// The protocolMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProtocolMappers { get; set; } +#nullable restore +#else + public List ProtocolMappers { get; set; } +#endif + /// The publicKey property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicKey { get; set; } +#nullable restore +#else + public string PublicKey { get; set; } +#endif + /// The quickLoginCheckMilliSeconds property + public long? QuickLoginCheckMilliSeconds { get; set; } + /// The realm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Realm { get; set; } +#nullable restore +#else + public string Realm { get; set; } +#endif + /// The realmCacheEnabled property + [Obsolete("")] + public bool? RealmCacheEnabled { get; set; } + /// The oAuth2DeviceCodeLifespan property + public int? RealmRepresentationOAuth2DeviceCodeLifespan { get; set; } + /// The oAuth2DevicePollingInterval property + public int? RealmRepresentationOAuth2DevicePollingInterval { get; set; } + /// The refreshTokenMaxReuse property + public int? RefreshTokenMaxReuse { get; set; } + /// The registrationAllowed property + public bool? RegistrationAllowed { get; set; } + /// The registrationEmailAsUsername property + public bool? RegistrationEmailAsUsername { get; set; } + /// The registrationFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RegistrationFlow { get; set; } +#nullable restore +#else + public string RegistrationFlow { get; set; } +#endif + /// The rememberMe property + public bool? RememberMe { get; set; } + /// The requiredActions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequiredActions { get; set; } +#nullable restore +#else + public List RequiredActions { get; set; } +#endif + /// The requiredCredentials property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequiredCredentials { get; set; } +#nullable restore +#else + public List RequiredCredentials { get; set; } +#endif + /// The resetCredentialsFlow property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ResetCredentialsFlow { get; set; } +#nullable restore +#else + public string ResetCredentialsFlow { get; set; } +#endif + /// The resetPasswordAllowed property + public bool? ResetPasswordAllowed { get; set; } + /// The revokeRefreshToken property + public bool? RevokeRefreshToken { get; set; } + /// The roles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RolesRepresentation? Roles { get; set; } +#nullable restore +#else + public RolesRepresentation Roles { get; set; } +#endif + /// The scopeMappings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ScopeMappings { get; set; } +#nullable restore +#else + public List ScopeMappings { get; set; } +#endif + /// The smtpServer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RealmRepresentation_smtpServer? SmtpServer { get; set; } +#nullable restore +#else + public RealmRepresentation_smtpServer SmtpServer { get; set; } +#endif + /// The social property + [Obsolete("")] + public bool? Social { get; set; } + /// The socialProviders property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RealmRepresentation_socialProviders? SocialProviders { get; set; } +#nullable restore +#else + public RealmRepresentation_socialProviders SocialProviders { get; set; } +#endif + /// The sslRequired property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SslRequired { get; set; } +#nullable restore +#else + public string SslRequired { get; set; } +#endif + /// The ssoSessionIdleTimeout property + public int? SsoSessionIdleTimeout { get; set; } + /// The ssoSessionIdleTimeoutRememberMe property + public int? SsoSessionIdleTimeoutRememberMe { get; set; } + /// The ssoSessionMaxLifespan property + public int? SsoSessionMaxLifespan { get; set; } + /// The ssoSessionMaxLifespanRememberMe property + public int? SsoSessionMaxLifespanRememberMe { get; set; } + /// The supportedLocales property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SupportedLocales { get; set; } +#nullable restore +#else + public List SupportedLocales { get; set; } +#endif + /// The updateProfileOnInitialSocialLogin property + [Obsolete("")] + public bool? UpdateProfileOnInitialSocialLogin { get; set; } + /// The userCacheEnabled property + [Obsolete("")] + public bool? UserCacheEnabled { get; set; } + /// The userFederationMappers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserFederationMappers { get; set; } +#nullable restore +#else + public List UserFederationMappers { get; set; } +#endif + /// The userFederationProviders property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserFederationProviders { get; set; } +#nullable restore +#else + public List UserFederationProviders { get; set; } +#endif + /// The userManagedAccessAllowed property + public bool? UserManagedAccessAllowed { get; set; } + /// The users property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// The verifyEmail property + public bool? VerifyEmail { get; set; } + /// The waitIncrementSeconds property + public int? WaitIncrementSeconds { get; set; } + /// The webAuthnPolicyAcceptableAaguids property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebAuthnPolicyAcceptableAaguids { get; set; } +#nullable restore +#else + public List WebAuthnPolicyAcceptableAaguids { get; set; } +#endif + /// The webAuthnPolicyAttestationConveyancePreference property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyAttestationConveyancePreference { get; set; } +#nullable restore +#else + public string WebAuthnPolicyAttestationConveyancePreference { get; set; } +#endif + /// The webAuthnPolicyAuthenticatorAttachment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyAuthenticatorAttachment { get; set; } +#nullable restore +#else + public string WebAuthnPolicyAuthenticatorAttachment { get; set; } +#endif + /// The webAuthnPolicyAvoidSameAuthenticatorRegister property + public bool? WebAuthnPolicyAvoidSameAuthenticatorRegister { get; set; } + /// The webAuthnPolicyCreateTimeout property + public int? WebAuthnPolicyCreateTimeout { get; set; } + /// The webAuthnPolicyExtraOrigins property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebAuthnPolicyExtraOrigins { get; set; } +#nullable restore +#else + public List WebAuthnPolicyExtraOrigins { get; set; } +#endif + /// The webAuthnPolicyPasswordlessAcceptableAaguids property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebAuthnPolicyPasswordlessAcceptableAaguids { get; set; } +#nullable restore +#else + public List WebAuthnPolicyPasswordlessAcceptableAaguids { get; set; } +#endif + /// The webAuthnPolicyPasswordlessAttestationConveyancePreference property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyPasswordlessAttestationConveyancePreference { get; set; } +#nullable restore +#else + public string WebAuthnPolicyPasswordlessAttestationConveyancePreference { get; set; } +#endif + /// The webAuthnPolicyPasswordlessAuthenticatorAttachment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyPasswordlessAuthenticatorAttachment { get; set; } +#nullable restore +#else + public string WebAuthnPolicyPasswordlessAuthenticatorAttachment { get; set; } +#endif + /// The webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister property + public bool? WebAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister { get; set; } + /// The webAuthnPolicyPasswordlessCreateTimeout property + public int? WebAuthnPolicyPasswordlessCreateTimeout { get; set; } + /// The webAuthnPolicyPasswordlessExtraOrigins property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebAuthnPolicyPasswordlessExtraOrigins { get; set; } +#nullable restore +#else + public List WebAuthnPolicyPasswordlessExtraOrigins { get; set; } +#endif + /// The webAuthnPolicyPasswordlessRequireResidentKey property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyPasswordlessRequireResidentKey { get; set; } +#nullable restore +#else + public string WebAuthnPolicyPasswordlessRequireResidentKey { get; set; } +#endif + /// The webAuthnPolicyPasswordlessRpEntityName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyPasswordlessRpEntityName { get; set; } +#nullable restore +#else + public string WebAuthnPolicyPasswordlessRpEntityName { get; set; } +#endif + /// The webAuthnPolicyPasswordlessRpId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyPasswordlessRpId { get; set; } +#nullable restore +#else + public string WebAuthnPolicyPasswordlessRpId { get; set; } +#endif + /// The webAuthnPolicyPasswordlessSignatureAlgorithms property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebAuthnPolicyPasswordlessSignatureAlgorithms { get; set; } +#nullable restore +#else + public List WebAuthnPolicyPasswordlessSignatureAlgorithms { get; set; } +#endif + /// The webAuthnPolicyPasswordlessUserVerificationRequirement property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyPasswordlessUserVerificationRequirement { get; set; } +#nullable restore +#else + public string WebAuthnPolicyPasswordlessUserVerificationRequirement { get; set; } +#endif + /// The webAuthnPolicyRequireResidentKey property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyRequireResidentKey { get; set; } +#nullable restore +#else + public string WebAuthnPolicyRequireResidentKey { get; set; } +#endif + /// The webAuthnPolicyRpEntityName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyRpEntityName { get; set; } +#nullable restore +#else + public string WebAuthnPolicyRpEntityName { get; set; } +#endif + /// The webAuthnPolicyRpId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyRpId { get; set; } +#nullable restore +#else + public string WebAuthnPolicyRpId { get; set; } +#endif + /// The webAuthnPolicySignatureAlgorithms property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WebAuthnPolicySignatureAlgorithms { get; set; } +#nullable restore +#else + public List WebAuthnPolicySignatureAlgorithms { get; set; } +#endif + /// The webAuthnPolicyUserVerificationRequirement property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebAuthnPolicyUserVerificationRequirement { get; set; } +#nullable restore +#else + public string WebAuthnPolicyUserVerificationRequirement { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"accessCodeLifespan", n => { AccessCodeLifespan = n.GetIntValue(); } }, + {"accessCodeLifespanLogin", n => { AccessCodeLifespanLogin = n.GetIntValue(); } }, + {"accessCodeLifespanUserAction", n => { AccessCodeLifespanUserAction = n.GetIntValue(); } }, + {"accessTokenLifespan", n => { AccessTokenLifespan = n.GetIntValue(); } }, + {"accessTokenLifespanForImplicitFlow", n => { AccessTokenLifespanForImplicitFlow = n.GetIntValue(); } }, + {"accountTheme", n => { AccountTheme = n.GetStringValue(); } }, + {"actionTokenGeneratedByAdminLifespan", n => { ActionTokenGeneratedByAdminLifespan = n.GetIntValue(); } }, + {"actionTokenGeneratedByUserLifespan", n => { ActionTokenGeneratedByUserLifespan = n.GetIntValue(); } }, + {"adminEventsDetailsEnabled", n => { AdminEventsDetailsEnabled = n.GetBoolValue(); } }, + {"adminEventsEnabled", n => { AdminEventsEnabled = n.GetBoolValue(); } }, + {"adminTheme", n => { AdminTheme = n.GetStringValue(); } }, + {"applicationScopeMappings", n => { ApplicationScopeMappings = n.GetObjectValue(RealmRepresentation_applicationScopeMappings.CreateFromDiscriminatorValue); } }, + {"applications", n => { Applications = n.GetCollectionOfObjectValues(ApplicationRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"attributes", n => { Attributes = n.GetObjectValue(RealmRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"authenticationFlows", n => { AuthenticationFlows = n.GetCollectionOfObjectValues(AuthenticationFlowRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"authenticatorConfig", n => { AuthenticatorConfig = n.GetCollectionOfObjectValues(AuthenticatorConfigRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"browserFlow", n => { BrowserFlow = n.GetStringValue(); } }, + {"browserSecurityHeaders", n => { BrowserSecurityHeaders = n.GetObjectValue(RealmRepresentation_browserSecurityHeaders.CreateFromDiscriminatorValue); } }, + {"bruteForceProtected", n => { BruteForceProtected = n.GetBoolValue(); } }, + {"certificate", n => { Certificate = n.GetStringValue(); } }, + {"clientAuthenticationFlow", n => { ClientAuthenticationFlow = n.GetStringValue(); } }, + {"clientOfflineSessionIdleTimeout", n => { ClientOfflineSessionIdleTimeout = n.GetIntValue(); } }, + {"clientOfflineSessionMaxLifespan", n => { ClientOfflineSessionMaxLifespan = n.GetIntValue(); } }, + {"clientPolicies", n => { ClientPolicies = n.GetObjectValue(ClientPoliciesRepresentation.CreateFromDiscriminatorValue); } }, + {"clientProfiles", n => { ClientProfiles = n.GetObjectValue(ClientProfilesRepresentation.CreateFromDiscriminatorValue); } }, + {"clientScopeMappings", n => { ClientScopeMappings = n.GetObjectValue(RealmRepresentation_clientScopeMappings.CreateFromDiscriminatorValue); } }, + {"clientScopes", n => { ClientScopes = n.GetCollectionOfObjectValues(ClientScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"clientSessionIdleTimeout", n => { ClientSessionIdleTimeout = n.GetIntValue(); } }, + {"clientSessionMaxLifespan", n => { ClientSessionMaxLifespan = n.GetIntValue(); } }, + {"clientTemplates", n => { ClientTemplates = n.GetCollectionOfObjectValues(ClientTemplateRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"clients", n => { Clients = n.GetCollectionOfObjectValues(ClientRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"codeSecret", n => { CodeSecret = n.GetStringValue(); } }, + {"components", n => { Components = n.GetObjectValue(MultivaluedHashMapStringComponentExportRepresentation.CreateFromDiscriminatorValue); } }, + {"defaultDefaultClientScopes", n => { DefaultDefaultClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"defaultGroups", n => { DefaultGroups = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"defaultLocale", n => { DefaultLocale = n.GetStringValue(); } }, + {"defaultOptionalClientScopes", n => { DefaultOptionalClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"defaultRole", n => { DefaultRole = n.GetObjectValue(RoleRepresentation.CreateFromDiscriminatorValue); } }, + {"defaultRoles", n => { DefaultRoles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"defaultSignatureAlgorithm", n => { DefaultSignatureAlgorithm = n.GetStringValue(); } }, + {"directGrantFlow", n => { DirectGrantFlow = n.GetStringValue(); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"displayNameHtml", n => { DisplayNameHtml = n.GetStringValue(); } }, + {"dockerAuthenticationFlow", n => { DockerAuthenticationFlow = n.GetStringValue(); } }, + {"duplicateEmailsAllowed", n => { DuplicateEmailsAllowed = n.GetBoolValue(); } }, + {"editUsernameAllowed", n => { EditUsernameAllowed = n.GetBoolValue(); } }, + {"emailTheme", n => { EmailTheme = n.GetStringValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"enabledEventTypes", n => { EnabledEventTypes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"eventsEnabled", n => { EventsEnabled = n.GetBoolValue(); } }, + {"eventsExpiration", n => { EventsExpiration = n.GetLongValue(); } }, + {"eventsListeners", n => { EventsListeners = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"failureFactor", n => { FailureFactor = n.GetIntValue(); } }, + {"federatedUsers", n => { FederatedUsers = n.GetCollectionOfObjectValues(UserRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"firstBrokerLoginFlow", n => { FirstBrokerLoginFlow = n.GetStringValue(); } }, + {"groups", n => { Groups = n.GetCollectionOfObjectValues(GroupRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"identityProviderMappers", n => { IdentityProviderMappers = n.GetCollectionOfObjectValues(IdentityProviderMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"identityProviders", n => { IdentityProviders = n.GetCollectionOfObjectValues(IdentityProviderRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"internationalizationEnabled", n => { InternationalizationEnabled = n.GetBoolValue(); } }, + {"keycloakVersion", n => { KeycloakVersion = n.GetStringValue(); } }, + {"localizationTexts", n => { LocalizationTexts = n.GetObjectValue(RealmRepresentation_localizationTexts.CreateFromDiscriminatorValue); } }, + {"loginTheme", n => { LoginTheme = n.GetStringValue(); } }, + {"loginWithEmailAllowed", n => { LoginWithEmailAllowed = n.GetBoolValue(); } }, + {"maxDeltaTimeSeconds", n => { MaxDeltaTimeSeconds = n.GetIntValue(); } }, + {"maxFailureWaitSeconds", n => { MaxFailureWaitSeconds = n.GetIntValue(); } }, + {"maxTemporaryLockouts", n => { MaxTemporaryLockouts = n.GetIntValue(); } }, + {"minimumQuickLoginWaitSeconds", n => { MinimumQuickLoginWaitSeconds = n.GetIntValue(); } }, + {"notBefore", n => { NotBefore = n.GetIntValue(); } }, + {"oauth2DeviceCodeLifespan", n => { Oauth2DeviceCodeLifespan = n.GetIntValue(); } }, + {"oauth2DevicePollingInterval", n => { Oauth2DevicePollingInterval = n.GetIntValue(); } }, + {"oauthClients", n => { OauthClients = n.GetCollectionOfObjectValues(OAuthClientRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"offlineSessionIdleTimeout", n => { OfflineSessionIdleTimeout = n.GetIntValue(); } }, + {"offlineSessionMaxLifespan", n => { OfflineSessionMaxLifespan = n.GetIntValue(); } }, + {"offlineSessionMaxLifespanEnabled", n => { OfflineSessionMaxLifespanEnabled = n.GetBoolValue(); } }, + {"otpPolicyAlgorithm", n => { OtpPolicyAlgorithm = n.GetStringValue(); } }, + {"otpPolicyCodeReusable", n => { OtpPolicyCodeReusable = n.GetBoolValue(); } }, + {"otpPolicyDigits", n => { OtpPolicyDigits = n.GetIntValue(); } }, + {"otpPolicyInitialCounter", n => { OtpPolicyInitialCounter = n.GetIntValue(); } }, + {"otpPolicyLookAheadWindow", n => { OtpPolicyLookAheadWindow = n.GetIntValue(); } }, + {"otpPolicyPeriod", n => { OtpPolicyPeriod = n.GetIntValue(); } }, + {"otpPolicyType", n => { OtpPolicyType = n.GetStringValue(); } }, + {"otpSupportedApplications", n => { OtpSupportedApplications = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"passwordCredentialGrantAllowed", n => { PasswordCredentialGrantAllowed = n.GetBoolValue(); } }, + {"passwordPolicy", n => { PasswordPolicy = n.GetStringValue(); } }, + {"permanentLockout", n => { PermanentLockout = n.GetBoolValue(); } }, + {"privateKey", n => { PrivateKey = n.GetStringValue(); } }, + {"protocolMappers", n => { ProtocolMappers = n.GetCollectionOfObjectValues(ProtocolMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"publicKey", n => { PublicKey = n.GetStringValue(); } }, + {"quickLoginCheckMilliSeconds", n => { QuickLoginCheckMilliSeconds = n.GetLongValue(); } }, + {"realm", n => { Realm = n.GetStringValue(); } }, + {"realmCacheEnabled", n => { RealmCacheEnabled = n.GetBoolValue(); } }, + {"oAuth2DeviceCodeLifespan", n => { RealmRepresentationOAuth2DeviceCodeLifespan = n.GetIntValue(); } }, + {"oAuth2DevicePollingInterval", n => { RealmRepresentationOAuth2DevicePollingInterval = n.GetIntValue(); } }, + {"refreshTokenMaxReuse", n => { RefreshTokenMaxReuse = n.GetIntValue(); } }, + {"registrationAllowed", n => { RegistrationAllowed = n.GetBoolValue(); } }, + {"registrationEmailAsUsername", n => { RegistrationEmailAsUsername = n.GetBoolValue(); } }, + {"registrationFlow", n => { RegistrationFlow = n.GetStringValue(); } }, + {"rememberMe", n => { RememberMe = n.GetBoolValue(); } }, + {"requiredActions", n => { RequiredActions = n.GetCollectionOfObjectValues(RequiredActionProviderRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"requiredCredentials", n => { RequiredCredentials = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"resetCredentialsFlow", n => { ResetCredentialsFlow = n.GetStringValue(); } }, + {"resetPasswordAllowed", n => { ResetPasswordAllowed = n.GetBoolValue(); } }, + {"revokeRefreshToken", n => { RevokeRefreshToken = n.GetBoolValue(); } }, + {"roles", n => { Roles = n.GetObjectValue(RolesRepresentation.CreateFromDiscriminatorValue); } }, + {"scopeMappings", n => { ScopeMappings = n.GetCollectionOfObjectValues(ScopeMappingRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"smtpServer", n => { SmtpServer = n.GetObjectValue(RealmRepresentation_smtpServer.CreateFromDiscriminatorValue); } }, + {"social", n => { Social = n.GetBoolValue(); } }, + {"socialProviders", n => { SocialProviders = n.GetObjectValue(RealmRepresentation_socialProviders.CreateFromDiscriminatorValue); } }, + {"sslRequired", n => { SslRequired = n.GetStringValue(); } }, + {"ssoSessionIdleTimeout", n => { SsoSessionIdleTimeout = n.GetIntValue(); } }, + {"ssoSessionIdleTimeoutRememberMe", n => { SsoSessionIdleTimeoutRememberMe = n.GetIntValue(); } }, + {"ssoSessionMaxLifespan", n => { SsoSessionMaxLifespan = n.GetIntValue(); } }, + {"ssoSessionMaxLifespanRememberMe", n => { SsoSessionMaxLifespanRememberMe = n.GetIntValue(); } }, + {"supportedLocales", n => { SupportedLocales = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"updateProfileOnInitialSocialLogin", n => { UpdateProfileOnInitialSocialLogin = n.GetBoolValue(); } }, + {"userCacheEnabled", n => { UserCacheEnabled = n.GetBoolValue(); } }, + {"userFederationMappers", n => { UserFederationMappers = n.GetCollectionOfObjectValues(UserFederationMapperRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userFederationProviders", n => { UserFederationProviders = n.GetCollectionOfObjectValues(UserFederationProviderRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userManagedAccessAllowed", n => { UserManagedAccessAllowed = n.GetBoolValue(); } }, + {"users", n => { Users = n.GetCollectionOfObjectValues(UserRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"verifyEmail", n => { VerifyEmail = n.GetBoolValue(); } }, + {"waitIncrementSeconds", n => { WaitIncrementSeconds = n.GetIntValue(); } }, + {"webAuthnPolicyAcceptableAaguids", n => { WebAuthnPolicyAcceptableAaguids = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"webAuthnPolicyAttestationConveyancePreference", n => { WebAuthnPolicyAttestationConveyancePreference = n.GetStringValue(); } }, + {"webAuthnPolicyAuthenticatorAttachment", n => { WebAuthnPolicyAuthenticatorAttachment = n.GetStringValue(); } }, + {"webAuthnPolicyAvoidSameAuthenticatorRegister", n => { WebAuthnPolicyAvoidSameAuthenticatorRegister = n.GetBoolValue(); } }, + {"webAuthnPolicyCreateTimeout", n => { WebAuthnPolicyCreateTimeout = n.GetIntValue(); } }, + {"webAuthnPolicyExtraOrigins", n => { WebAuthnPolicyExtraOrigins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"webAuthnPolicyPasswordlessAcceptableAaguids", n => { WebAuthnPolicyPasswordlessAcceptableAaguids = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"webAuthnPolicyPasswordlessAttestationConveyancePreference", n => { WebAuthnPolicyPasswordlessAttestationConveyancePreference = n.GetStringValue(); } }, + {"webAuthnPolicyPasswordlessAuthenticatorAttachment", n => { WebAuthnPolicyPasswordlessAuthenticatorAttachment = n.GetStringValue(); } }, + {"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister", n => { WebAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister = n.GetBoolValue(); } }, + {"webAuthnPolicyPasswordlessCreateTimeout", n => { WebAuthnPolicyPasswordlessCreateTimeout = n.GetIntValue(); } }, + {"webAuthnPolicyPasswordlessExtraOrigins", n => { WebAuthnPolicyPasswordlessExtraOrigins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"webAuthnPolicyPasswordlessRequireResidentKey", n => { WebAuthnPolicyPasswordlessRequireResidentKey = n.GetStringValue(); } }, + {"webAuthnPolicyPasswordlessRpEntityName", n => { WebAuthnPolicyPasswordlessRpEntityName = n.GetStringValue(); } }, + {"webAuthnPolicyPasswordlessRpId", n => { WebAuthnPolicyPasswordlessRpId = n.GetStringValue(); } }, + {"webAuthnPolicyPasswordlessSignatureAlgorithms", n => { WebAuthnPolicyPasswordlessSignatureAlgorithms = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"webAuthnPolicyPasswordlessUserVerificationRequirement", n => { WebAuthnPolicyPasswordlessUserVerificationRequirement = n.GetStringValue(); } }, + {"webAuthnPolicyRequireResidentKey", n => { WebAuthnPolicyRequireResidentKey = n.GetStringValue(); } }, + {"webAuthnPolicyRpEntityName", n => { WebAuthnPolicyRpEntityName = n.GetStringValue(); } }, + {"webAuthnPolicyRpId", n => { WebAuthnPolicyRpId = n.GetStringValue(); } }, + {"webAuthnPolicySignatureAlgorithms", n => { WebAuthnPolicySignatureAlgorithms = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"webAuthnPolicyUserVerificationRequirement", n => { WebAuthnPolicyUserVerificationRequirement = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("accessCodeLifespan", AccessCodeLifespan); + writer.WriteIntValue("accessCodeLifespanLogin", AccessCodeLifespanLogin); + writer.WriteIntValue("accessCodeLifespanUserAction", AccessCodeLifespanUserAction); + writer.WriteIntValue("accessTokenLifespan", AccessTokenLifespan); + writer.WriteIntValue("accessTokenLifespanForImplicitFlow", AccessTokenLifespanForImplicitFlow); + writer.WriteStringValue("accountTheme", AccountTheme); + writer.WriteIntValue("actionTokenGeneratedByAdminLifespan", ActionTokenGeneratedByAdminLifespan); + writer.WriteIntValue("actionTokenGeneratedByUserLifespan", ActionTokenGeneratedByUserLifespan); + writer.WriteBoolValue("adminEventsDetailsEnabled", AdminEventsDetailsEnabled); + writer.WriteBoolValue("adminEventsEnabled", AdminEventsEnabled); + writer.WriteStringValue("adminTheme", AdminTheme); + writer.WriteCollectionOfObjectValues("applications", Applications); + writer.WriteObjectValue("applicationScopeMappings", ApplicationScopeMappings); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteCollectionOfObjectValues("authenticationFlows", AuthenticationFlows); + writer.WriteCollectionOfObjectValues("authenticatorConfig", AuthenticatorConfig); + writer.WriteStringValue("browserFlow", BrowserFlow); + writer.WriteObjectValue("browserSecurityHeaders", BrowserSecurityHeaders); + writer.WriteBoolValue("bruteForceProtected", BruteForceProtected); + writer.WriteStringValue("certificate", Certificate); + writer.WriteStringValue("clientAuthenticationFlow", ClientAuthenticationFlow); + writer.WriteIntValue("clientOfflineSessionIdleTimeout", ClientOfflineSessionIdleTimeout); + writer.WriteIntValue("clientOfflineSessionMaxLifespan", ClientOfflineSessionMaxLifespan); + writer.WriteObjectValue("clientPolicies", ClientPolicies); + writer.WriteObjectValue("clientProfiles", ClientProfiles); + writer.WriteCollectionOfObjectValues("clients", Clients); + writer.WriteObjectValue("clientScopeMappings", ClientScopeMappings); + writer.WriteCollectionOfObjectValues("clientScopes", ClientScopes); + writer.WriteIntValue("clientSessionIdleTimeout", ClientSessionIdleTimeout); + writer.WriteIntValue("clientSessionMaxLifespan", ClientSessionMaxLifespan); + writer.WriteCollectionOfObjectValues("clientTemplates", ClientTemplates); + writer.WriteStringValue("codeSecret", CodeSecret); + writer.WriteObjectValue("components", Components); + writer.WriteCollectionOfPrimitiveValues("defaultDefaultClientScopes", DefaultDefaultClientScopes); + writer.WriteCollectionOfPrimitiveValues("defaultGroups", DefaultGroups); + writer.WriteStringValue("defaultLocale", DefaultLocale); + writer.WriteCollectionOfPrimitiveValues("defaultOptionalClientScopes", DefaultOptionalClientScopes); + writer.WriteObjectValue("defaultRole", DefaultRole); + writer.WriteCollectionOfPrimitiveValues("defaultRoles", DefaultRoles); + writer.WriteStringValue("defaultSignatureAlgorithm", DefaultSignatureAlgorithm); + writer.WriteStringValue("directGrantFlow", DirectGrantFlow); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("displayNameHtml", DisplayNameHtml); + writer.WriteStringValue("dockerAuthenticationFlow", DockerAuthenticationFlow); + writer.WriteBoolValue("duplicateEmailsAllowed", DuplicateEmailsAllowed); + writer.WriteBoolValue("editUsernameAllowed", EditUsernameAllowed); + writer.WriteStringValue("emailTheme", EmailTheme); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteCollectionOfPrimitiveValues("enabledEventTypes", EnabledEventTypes); + writer.WriteBoolValue("eventsEnabled", EventsEnabled); + writer.WriteLongValue("eventsExpiration", EventsExpiration); + writer.WriteCollectionOfPrimitiveValues("eventsListeners", EventsListeners); + writer.WriteIntValue("failureFactor", FailureFactor); + writer.WriteCollectionOfObjectValues("federatedUsers", FederatedUsers); + writer.WriteStringValue("firstBrokerLoginFlow", FirstBrokerLoginFlow); + writer.WriteCollectionOfObjectValues("groups", Groups); + writer.WriteStringValue("id", Id); + writer.WriteCollectionOfObjectValues("identityProviderMappers", IdentityProviderMappers); + writer.WriteCollectionOfObjectValues("identityProviders", IdentityProviders); + writer.WriteBoolValue("internationalizationEnabled", InternationalizationEnabled); + writer.WriteStringValue("keycloakVersion", KeycloakVersion); + writer.WriteObjectValue("localizationTexts", LocalizationTexts); + writer.WriteStringValue("loginTheme", LoginTheme); + writer.WriteBoolValue("loginWithEmailAllowed", LoginWithEmailAllowed); + writer.WriteIntValue("maxDeltaTimeSeconds", MaxDeltaTimeSeconds); + writer.WriteIntValue("maxFailureWaitSeconds", MaxFailureWaitSeconds); + writer.WriteIntValue("maxTemporaryLockouts", MaxTemporaryLockouts); + writer.WriteIntValue("minimumQuickLoginWaitSeconds", MinimumQuickLoginWaitSeconds); + writer.WriteIntValue("notBefore", NotBefore); + writer.WriteIntValue("oauth2DeviceCodeLifespan", Oauth2DeviceCodeLifespan); + writer.WriteIntValue("oauth2DevicePollingInterval", Oauth2DevicePollingInterval); + writer.WriteCollectionOfObjectValues("oauthClients", OauthClients); + writer.WriteIntValue("offlineSessionIdleTimeout", OfflineSessionIdleTimeout); + writer.WriteIntValue("offlineSessionMaxLifespan", OfflineSessionMaxLifespan); + writer.WriteBoolValue("offlineSessionMaxLifespanEnabled", OfflineSessionMaxLifespanEnabled); + writer.WriteStringValue("otpPolicyAlgorithm", OtpPolicyAlgorithm); + writer.WriteBoolValue("otpPolicyCodeReusable", OtpPolicyCodeReusable); + writer.WriteIntValue("otpPolicyDigits", OtpPolicyDigits); + writer.WriteIntValue("otpPolicyInitialCounter", OtpPolicyInitialCounter); + writer.WriteIntValue("otpPolicyLookAheadWindow", OtpPolicyLookAheadWindow); + writer.WriteIntValue("otpPolicyPeriod", OtpPolicyPeriod); + writer.WriteStringValue("otpPolicyType", OtpPolicyType); + writer.WriteCollectionOfPrimitiveValues("otpSupportedApplications", OtpSupportedApplications); + writer.WriteBoolValue("passwordCredentialGrantAllowed", PasswordCredentialGrantAllowed); + writer.WriteStringValue("passwordPolicy", PasswordPolicy); + writer.WriteBoolValue("permanentLockout", PermanentLockout); + writer.WriteStringValue("privateKey", PrivateKey); + writer.WriteCollectionOfObjectValues("protocolMappers", ProtocolMappers); + writer.WriteStringValue("publicKey", PublicKey); + writer.WriteLongValue("quickLoginCheckMilliSeconds", QuickLoginCheckMilliSeconds); + writer.WriteStringValue("realm", Realm); + writer.WriteBoolValue("realmCacheEnabled", RealmCacheEnabled); + writer.WriteIntValue("oAuth2DeviceCodeLifespan", RealmRepresentationOAuth2DeviceCodeLifespan); + writer.WriteIntValue("oAuth2DevicePollingInterval", RealmRepresentationOAuth2DevicePollingInterval); + writer.WriteIntValue("refreshTokenMaxReuse", RefreshTokenMaxReuse); + writer.WriteBoolValue("registrationAllowed", RegistrationAllowed); + writer.WriteBoolValue("registrationEmailAsUsername", RegistrationEmailAsUsername); + writer.WriteStringValue("registrationFlow", RegistrationFlow); + writer.WriteBoolValue("rememberMe", RememberMe); + writer.WriteCollectionOfObjectValues("requiredActions", RequiredActions); + writer.WriteCollectionOfPrimitiveValues("requiredCredentials", RequiredCredentials); + writer.WriteStringValue("resetCredentialsFlow", ResetCredentialsFlow); + writer.WriteBoolValue("resetPasswordAllowed", ResetPasswordAllowed); + writer.WriteBoolValue("revokeRefreshToken", RevokeRefreshToken); + writer.WriteObjectValue("roles", Roles); + writer.WriteCollectionOfObjectValues("scopeMappings", ScopeMappings); + writer.WriteObjectValue("smtpServer", SmtpServer); + writer.WriteBoolValue("social", Social); + writer.WriteObjectValue("socialProviders", SocialProviders); + writer.WriteStringValue("sslRequired", SslRequired); + writer.WriteIntValue("ssoSessionIdleTimeout", SsoSessionIdleTimeout); + writer.WriteIntValue("ssoSessionIdleTimeoutRememberMe", SsoSessionIdleTimeoutRememberMe); + writer.WriteIntValue("ssoSessionMaxLifespan", SsoSessionMaxLifespan); + writer.WriteIntValue("ssoSessionMaxLifespanRememberMe", SsoSessionMaxLifespanRememberMe); + writer.WriteCollectionOfPrimitiveValues("supportedLocales", SupportedLocales); + writer.WriteBoolValue("updateProfileOnInitialSocialLogin", UpdateProfileOnInitialSocialLogin); + writer.WriteBoolValue("userCacheEnabled", UserCacheEnabled); + writer.WriteCollectionOfObjectValues("userFederationMappers", UserFederationMappers); + writer.WriteCollectionOfObjectValues("userFederationProviders", UserFederationProviders); + writer.WriteBoolValue("userManagedAccessAllowed", UserManagedAccessAllowed); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteBoolValue("verifyEmail", VerifyEmail); + writer.WriteIntValue("waitIncrementSeconds", WaitIncrementSeconds); + writer.WriteCollectionOfPrimitiveValues("webAuthnPolicyAcceptableAaguids", WebAuthnPolicyAcceptableAaguids); + writer.WriteStringValue("webAuthnPolicyAttestationConveyancePreference", WebAuthnPolicyAttestationConveyancePreference); + writer.WriteStringValue("webAuthnPolicyAuthenticatorAttachment", WebAuthnPolicyAuthenticatorAttachment); + writer.WriteBoolValue("webAuthnPolicyAvoidSameAuthenticatorRegister", WebAuthnPolicyAvoidSameAuthenticatorRegister); + writer.WriteIntValue("webAuthnPolicyCreateTimeout", WebAuthnPolicyCreateTimeout); + writer.WriteCollectionOfPrimitiveValues("webAuthnPolicyExtraOrigins", WebAuthnPolicyExtraOrigins); + writer.WriteCollectionOfPrimitiveValues("webAuthnPolicyPasswordlessAcceptableAaguids", WebAuthnPolicyPasswordlessAcceptableAaguids); + writer.WriteStringValue("webAuthnPolicyPasswordlessAttestationConveyancePreference", WebAuthnPolicyPasswordlessAttestationConveyancePreference); + writer.WriteStringValue("webAuthnPolicyPasswordlessAuthenticatorAttachment", WebAuthnPolicyPasswordlessAuthenticatorAttachment); + writer.WriteBoolValue("webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister", WebAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister); + writer.WriteIntValue("webAuthnPolicyPasswordlessCreateTimeout", WebAuthnPolicyPasswordlessCreateTimeout); + writer.WriteCollectionOfPrimitiveValues("webAuthnPolicyPasswordlessExtraOrigins", WebAuthnPolicyPasswordlessExtraOrigins); + writer.WriteStringValue("webAuthnPolicyPasswordlessRequireResidentKey", WebAuthnPolicyPasswordlessRequireResidentKey); + writer.WriteStringValue("webAuthnPolicyPasswordlessRpEntityName", WebAuthnPolicyPasswordlessRpEntityName); + writer.WriteStringValue("webAuthnPolicyPasswordlessRpId", WebAuthnPolicyPasswordlessRpId); + writer.WriteCollectionOfPrimitiveValues("webAuthnPolicyPasswordlessSignatureAlgorithms", WebAuthnPolicyPasswordlessSignatureAlgorithms); + writer.WriteStringValue("webAuthnPolicyPasswordlessUserVerificationRequirement", WebAuthnPolicyPasswordlessUserVerificationRequirement); + writer.WriteStringValue("webAuthnPolicyRequireResidentKey", WebAuthnPolicyRequireResidentKey); + writer.WriteStringValue("webAuthnPolicyRpEntityName", WebAuthnPolicyRpEntityName); + writer.WriteStringValue("webAuthnPolicyRpId", WebAuthnPolicyRpId); + writer.WriteCollectionOfPrimitiveValues("webAuthnPolicySignatureAlgorithms", WebAuthnPolicySignatureAlgorithms); + writer.WriteStringValue("webAuthnPolicyUserVerificationRequirement", WebAuthnPolicyUserVerificationRequirement); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_applicationScopeMappings.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_applicationScopeMappings.cs new file mode 100644 index 00000000..99383af5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_applicationScopeMappings.cs @@ -0,0 +1,44 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class RealmRepresentation_applicationScopeMappings : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation_applicationScopeMappings() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation_applicationScopeMappings CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation_applicationScopeMappings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_attributes.cs new file mode 100644 index 00000000..91d13e3f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RealmRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_browserSecurityHeaders.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_browserSecurityHeaders.cs new file mode 100644 index 00000000..dfe85799 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_browserSecurityHeaders.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RealmRepresentation_browserSecurityHeaders : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation_browserSecurityHeaders() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation_browserSecurityHeaders CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation_browserSecurityHeaders(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_clientScopeMappings.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_clientScopeMappings.cs new file mode 100644 index 00000000..5c6036ec --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_clientScopeMappings.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RealmRepresentation_clientScopeMappings : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation_clientScopeMappings() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation_clientScopeMappings CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation_clientScopeMappings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_localizationTexts.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_localizationTexts.cs new file mode 100644 index 00000000..ceac6ca3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_localizationTexts.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RealmRepresentation_localizationTexts : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation_localizationTexts() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation_localizationTexts CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation_localizationTexts(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_smtpServer.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_smtpServer.cs new file mode 100644 index 00000000..e40427cf --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_smtpServer.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RealmRepresentation_smtpServer : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation_smtpServer() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation_smtpServer CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation_smtpServer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_socialProviders.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_socialProviders.cs new file mode 100644 index 00000000..41d05d00 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RealmRepresentation_socialProviders.cs @@ -0,0 +1,44 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class RealmRepresentation_socialProviders : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RealmRepresentation_socialProviders() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RealmRepresentation_socialProviders CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RealmRepresentation_socialProviders(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RequiredActionProviderRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RequiredActionProviderRepresentation.cs new file mode 100644 index 00000000..5bb737a7 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RequiredActionProviderRepresentation.cs @@ -0,0 +1,95 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RequiredActionProviderRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequiredActionProviderRepresentation_config? Config { get; set; } +#nullable restore +#else + public RequiredActionProviderRepresentation_config Config { get; set; } +#endif + /// The defaultAction property + public bool? DefaultAction { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The priority property + public int? Priority { get; set; } + /// The providerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderId { get; set; } +#nullable restore +#else + public string ProviderId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RequiredActionProviderRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RequiredActionProviderRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RequiredActionProviderRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"alias", n => { Alias = n.GetStringValue(); } }, + {"config", n => { Config = n.GetObjectValue(RequiredActionProviderRepresentation_config.CreateFromDiscriminatorValue); } }, + {"defaultAction", n => { DefaultAction = n.GetBoolValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"priority", n => { Priority = n.GetIntValue(); } }, + {"providerId", n => { ProviderId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteObjectValue("config", Config); + writer.WriteBoolValue("defaultAction", DefaultAction); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("priority", Priority); + writer.WriteStringValue("providerId", ProviderId); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RequiredActionProviderRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RequiredActionProviderRepresentation_config.cs new file mode 100644 index 00000000..e76c1458 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RequiredActionProviderRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RequiredActionProviderRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RequiredActionProviderRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RequiredActionProviderRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RequiredActionProviderRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceOwnerRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceOwnerRepresentation.cs new file mode 100644 index 00000000..18002d6a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceOwnerRepresentation.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ResourceOwnerRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ResourceOwnerRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ResourceOwnerRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResourceOwnerRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation.cs new file mode 100644 index 00000000..b73ab2ec --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation.cs @@ -0,0 +1,157 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ResourceRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ResourceRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public ResourceRepresentation_attributes Attributes { get; set; } +#endif + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The icon_uri property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IconUri { get; set; } +#nullable restore +#else + public string IconUri { get; set; } +#endif + /// The _id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The owner property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ResourceRepresentation_owner? Owner { get; private set; } +#nullable restore +#else + public ResourceRepresentation_owner Owner { get; private set; } +#endif + /// The ownerManagedAccess property + public bool? OwnerManagedAccess { get; set; } + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// The scopesUma property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ScopesUma { get; set; } +#nullable restore +#else + public List ScopesUma { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The uri property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Uri { get; set; } +#nullable restore +#else + public string Uri { get; set; } +#endif + /// The uris property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Uris { get; set; } +#nullable restore +#else + public List Uris { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ResourceRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ResourceRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResourceRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributes", n => { Attributes = n.GetObjectValue(ResourceRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"icon_uri", n => { IconUri = n.GetStringValue(); } }, + {"_id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"owner", n => { Owner = n.GetObjectValue(ResourceRepresentation_owner.CreateFromDiscriminatorValue); } }, + {"ownerManagedAccess", n => { OwnerManagedAccess = n.GetBoolValue(); } }, + {"scopes", n => { Scopes = n.GetCollectionOfObjectValues(ScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"scopesUma", n => { ScopesUma = n.GetCollectionOfObjectValues(ScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"type", n => { Type = n.GetStringValue(); } }, + {"uri", n => { Uri = n.GetStringValue(); } }, + {"uris", n => { Uris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("icon_uri", IconUri); + writer.WriteStringValue("_id", Id); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("ownerManagedAccess", OwnerManagedAccess); + writer.WriteCollectionOfObjectValues("scopes", Scopes); + writer.WriteCollectionOfObjectValues("scopesUma", ScopesUma); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("uri", Uri); + writer.WriteCollectionOfPrimitiveValues("uris", Uris); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation_attributes.cs new file mode 100644 index 00000000..aefc3641 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ResourceRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ResourceRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ResourceRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResourceRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation_owner.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation_owner.cs new file mode 100644 index 00000000..3a89d43a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceRepresentation_owner.cs @@ -0,0 +1,35 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ResourceRepresentation_owner : ResourceOwnerRepresentation, IParsable { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new ResourceRepresentation_owner CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResourceRepresentation_owner(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceServerRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceServerRepresentation.cs new file mode 100644 index 00000000..6161ee3b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ResourceServerRepresentation.cs @@ -0,0 +1,115 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ResourceServerRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allowRemoteResourceManagement property + public bool? AllowRemoteResourceManagement { get; set; } + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The decisionStrategy property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.DecisionStrategy? DecisionStrategy { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The policies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Policies { get; set; } +#nullable restore +#else + public List Policies { get; set; } +#endif + /// The policyEnforcementMode property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.PolicyEnforcementMode? PolicyEnforcementMode { get; set; } + /// The resources property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Resources { get; set; } +#nullable restore +#else + public List Resources { get; set; } +#endif + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ResourceServerRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ResourceServerRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResourceServerRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"allowRemoteResourceManagement", n => { AllowRemoteResourceManagement = n.GetBoolValue(); } }, + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"decisionStrategy", n => { DecisionStrategy = n.GetEnumValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"policies", n => { Policies = n.GetCollectionOfObjectValues(PolicyRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"policyEnforcementMode", n => { PolicyEnforcementMode = n.GetEnumValue(); } }, + {"resources", n => { Resources = n.GetCollectionOfObjectValues(ResourceRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"scopes", n => { Scopes = n.GetCollectionOfObjectValues(ScopeRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allowRemoteResourceManagement", AllowRemoteResourceManagement); + writer.WriteStringValue("clientId", ClientId); + writer.WriteEnumValue("decisionStrategy", DecisionStrategy); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("policies", Policies); + writer.WriteEnumValue("policyEnforcementMode", PolicyEnforcementMode); + writer.WriteCollectionOfObjectValues("resources", Resources); + writer.WriteCollectionOfObjectValues("scopes", Scopes); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RoleRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RoleRepresentation.cs new file mode 100644 index 00000000..c79a8eb4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RoleRepresentation.cs @@ -0,0 +1,116 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RoleRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RoleRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public RoleRepresentation_attributes Attributes { get; set; } +#endif + /// The clientRole property + public bool? ClientRole { get; set; } + /// The composite property + public bool? Composite { get; set; } + /// The composites property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Composites? Composites { get; set; } +#nullable restore +#else + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Composites Composites { get; set; } +#endif + /// The containerId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContainerId { get; set; } +#nullable restore +#else + public string ContainerId { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The scopeParamRequired property + [Obsolete("")] + public bool? ScopeParamRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RoleRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RoleRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RoleRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributes", n => { Attributes = n.GetObjectValue(RoleRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"clientRole", n => { ClientRole = n.GetBoolValue(); } }, + {"composite", n => { Composite = n.GetBoolValue(); } }, + {"composites", n => { Composites = n.GetObjectValue(Keycloak.AuthServices.Sdk.Kiota.Admin.Models.Composites.CreateFromDiscriminatorValue); } }, + {"containerId", n => { ContainerId = n.GetStringValue(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"scopeParamRequired", n => { ScopeParamRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteBoolValue("clientRole", ClientRole); + writer.WriteBoolValue("composite", Composite); + writer.WriteObjectValue("composites", Composites); + writer.WriteStringValue("containerId", ContainerId); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("scopeParamRequired", ScopeParamRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RoleRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RoleRepresentation_attributes.cs new file mode 100644 index 00000000..870e13f1 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RoleRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RoleRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RoleRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RoleRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RoleRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation.cs new file mode 100644 index 00000000..50c73283 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation.cs @@ -0,0 +1,74 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RolesRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The application property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RolesRepresentation_application? Application { get; set; } +#nullable restore +#else + public RolesRepresentation_application Application { get; set; } +#endif + /// The client property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RolesRepresentation_client? Client { get; set; } +#nullable restore +#else + public RolesRepresentation_client Client { get; set; } +#endif + /// The realm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Realm { get; set; } +#nullable restore +#else + public List Realm { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RolesRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RolesRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RolesRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"application", n => { Application = n.GetObjectValue(RolesRepresentation_application.CreateFromDiscriminatorValue); } }, + {"client", n => { Client = n.GetObjectValue(RolesRepresentation_client.CreateFromDiscriminatorValue); } }, + {"realm", n => { Realm = n.GetCollectionOfObjectValues(RoleRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("application", Application); + writer.WriteObjectValue("client", Client); + writer.WriteCollectionOfObjectValues("realm", Realm); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation_application.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation_application.cs new file mode 100644 index 00000000..e65f5226 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation_application.cs @@ -0,0 +1,44 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class RolesRepresentation_application : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RolesRepresentation_application() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RolesRepresentation_application CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RolesRepresentation_application(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation_client.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation_client.cs new file mode 100644 index 00000000..cf9390aa --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/RolesRepresentation_client.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class RolesRepresentation_client : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RolesRepresentation_client() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static RolesRepresentation_client CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RolesRepresentation_client(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ScopeMappingRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ScopeMappingRepresentation.cs new file mode 100644 index 00000000..c7d56389 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ScopeMappingRepresentation.cs @@ -0,0 +1,94 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ScopeMappingRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The client property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Client { get; set; } +#nullable restore +#else + public string Client { get; set; } +#endif + /// The clientScope property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientScope { get; set; } +#nullable restore +#else + public string ClientScope { get; set; } +#endif + /// The clientTemplate property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientTemplate { get; set; } +#nullable restore +#else + public string ClientTemplate { get; set; } +#endif + /// The roles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Roles { get; set; } +#nullable restore +#else + public List Roles { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ScopeMappingRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ScopeMappingRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ScopeMappingRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"client", n => { Client = n.GetStringValue(); } }, + {"clientScope", n => { ClientScope = n.GetStringValue(); } }, + {"clientTemplate", n => { ClientTemplate = n.GetStringValue(); } }, + {"roles", n => { Roles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"self", n => { Self = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client", Client); + writer.WriteStringValue("clientScope", ClientScope); + writer.WriteStringValue("clientTemplate", ClientTemplate); + writer.WriteCollectionOfPrimitiveValues("roles", Roles); + writer.WriteStringValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/ScopeRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ScopeRepresentation.cs new file mode 100644 index 00000000..985638f5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/ScopeRepresentation.cs @@ -0,0 +1,103 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class ScopeRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The iconUri property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IconUri { get; set; } +#nullable restore +#else + public string IconUri { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The policies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Policies { get; set; } +#nullable restore +#else + public List Policies { get; set; } +#endif + /// The resources property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Resources { get; set; } +#nullable restore +#else + public List Resources { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ScopeRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static ScopeRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ScopeRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"iconUri", n => { IconUri = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"policies", n => { Policies = n.GetCollectionOfObjectValues(PolicyRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"resources", n => { Resources = n.GetCollectionOfObjectValues(ResourceRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("iconUri", IconUri); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("policies", Policies); + writer.WriteCollectionOfObjectValues("resources", Resources); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/SocialLinkRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/SocialLinkRepresentation.cs new file mode 100644 index 00000000..10c1cdde --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/SocialLinkRepresentation.cs @@ -0,0 +1,73 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class SocialLinkRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The socialProvider property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SocialProvider { get; set; } +#nullable restore +#else + public string SocialProvider { get; set; } +#endif + /// The socialUserId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SocialUserId { get; set; } +#nullable restore +#else + public string SocialUserId { get; set; } +#endif + /// The socialUsername property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SocialUsername { get; set; } +#nullable restore +#else + public string SocialUsername { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SocialLinkRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static SocialLinkRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SocialLinkRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"socialProvider", n => { SocialProvider = n.GetStringValue(); } }, + {"socialUserId", n => { SocialUserId = n.GetStringValue(); } }, + {"socialUsername", n => { SocialUsername = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("socialProvider", SocialProvider); + writer.WriteStringValue("socialUserId", SocialUserId); + writer.WriteStringValue("socialUsername", SocialUsername); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute.cs new file mode 100644 index 00000000..e0c0acb4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute.cs @@ -0,0 +1,127 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPAttribute : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The annotations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UPAttribute_annotations? Annotations { get; set; } +#nullable restore +#else + public UPAttribute_annotations Annotations { get; set; } +#endif + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Group { get; set; } +#nullable restore +#else + public string Group { get; set; } +#endif + /// The multivalued property + public bool? Multivalued { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UPAttributePermissions? Permissions { get; set; } +#nullable restore +#else + public UPAttributePermissions Permissions { get; set; } +#endif + /// The required property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UPAttributeRequired? Required { get; set; } +#nullable restore +#else + public UPAttributeRequired Required { get; set; } +#endif + /// The selector property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UPAttributeSelector? Selector { get; set; } +#nullable restore +#else + public UPAttributeSelector Selector { get; set; } +#endif + /// The validations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UPAttribute_validations? Validations { get; set; } +#nullable restore +#else + public UPAttribute_validations Validations { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UPAttribute() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPAttribute(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"annotations", n => { Annotations = n.GetObjectValue(UPAttribute_annotations.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"group", n => { Group = n.GetStringValue(); } }, + {"multivalued", n => { Multivalued = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"permissions", n => { Permissions = n.GetObjectValue(UPAttributePermissions.CreateFromDiscriminatorValue); } }, + {"required", n => { Required = n.GetObjectValue(UPAttributeRequired.CreateFromDiscriminatorValue); } }, + {"selector", n => { Selector = n.GetObjectValue(UPAttributeSelector.CreateFromDiscriminatorValue); } }, + {"validations", n => { Validations = n.GetObjectValue(UPAttribute_validations.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("annotations", Annotations); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("group", Group); + writer.WriteBoolValue("multivalued", Multivalued); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteObjectValue("required", Required); + writer.WriteObjectValue("selector", Selector); + writer.WriteObjectValue("validations", Validations); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributePermissions.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributePermissions.cs new file mode 100644 index 00000000..1e592760 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributePermissions.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPAttributePermissions : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The edit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Edit { get; set; } +#nullable restore +#else + public List Edit { get; set; } +#endif + /// The view property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? View { get; set; } +#nullable restore +#else + public List View { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UPAttributePermissions() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPAttributePermissions CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPAttributePermissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"edit", n => { Edit = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"view", n => { View = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("edit", Edit); + writer.WriteCollectionOfPrimitiveValues("view", View); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributeRequired.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributeRequired.cs new file mode 100644 index 00000000..eb041b3a --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributeRequired.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPAttributeRequired : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The roles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Roles { get; set; } +#nullable restore +#else + public List Roles { get; set; } +#endif + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UPAttributeRequired() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPAttributeRequired CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPAttributeRequired(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"roles", n => { Roles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"scopes", n => { Scopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("roles", Roles); + writer.WriteCollectionOfPrimitiveValues("scopes", Scopes); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributeSelector.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributeSelector.cs new file mode 100644 index 00000000..6f9668f9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttributeSelector.cs @@ -0,0 +1,53 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPAttributeSelector : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The scopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UPAttributeSelector() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPAttributeSelector CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPAttributeSelector(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"scopes", n => { Scopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("scopes", Scopes); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute_annotations.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute_annotations.cs new file mode 100644 index 00000000..ad604d1c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute_annotations.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPAttribute_annotations : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UPAttribute_annotations() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPAttribute_annotations CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPAttribute_annotations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute_validations.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute_validations.cs new file mode 100644 index 00000000..f21b5252 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPAttribute_validations.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPAttribute_validations : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UPAttribute_validations() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPAttribute_validations CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPAttribute_validations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPConfig.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPConfig.cs new file mode 100644 index 00000000..80afb562 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPConfig.cs @@ -0,0 +1,67 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPConfig : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Attributes { get; set; } +#nullable restore +#else + public List Attributes { get; set; } +#endif + /// The groups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Groups { get; set; } +#nullable restore +#else + public List Groups { get; set; } +#endif + /// The unmanagedAttributePolicy property + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.UnmanagedAttributePolicy? UnmanagedAttributePolicy { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UPConfig() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPConfig CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributes", n => { Attributes = n.GetCollectionOfObjectValues(UPAttribute.CreateFromDiscriminatorValue)?.ToList(); } }, + {"groups", n => { Groups = n.GetCollectionOfObjectValues(UPGroup.CreateFromDiscriminatorValue)?.ToList(); } }, + {"unmanagedAttributePolicy", n => { UnmanagedAttributePolicy = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("attributes", Attributes); + writer.WriteCollectionOfObjectValues("groups", Groups); + writer.WriteEnumValue("unmanagedAttributePolicy", UnmanagedAttributePolicy); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPGroup.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPGroup.cs new file mode 100644 index 00000000..1c83ee02 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPGroup.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPGroup : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The annotations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UPGroup_annotations? Annotations { get; set; } +#nullable restore +#else + public UPGroup_annotations Annotations { get; set; } +#endif + /// The displayDescription property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayDescription { get; set; } +#nullable restore +#else + public string DisplayDescription { get; set; } +#endif + /// The displayHeader property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayHeader { get; set; } +#nullable restore +#else + public string DisplayHeader { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UPGroup() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPGroup(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"annotations", n => { Annotations = n.GetObjectValue(UPGroup_annotations.CreateFromDiscriminatorValue); } }, + {"displayDescription", n => { DisplayDescription = n.GetStringValue(); } }, + {"displayHeader", n => { DisplayHeader = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("annotations", Annotations); + writer.WriteStringValue("displayDescription", DisplayDescription); + writer.WriteStringValue("displayHeader", DisplayHeader); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPGroup_annotations.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPGroup_annotations.cs new file mode 100644 index 00000000..c05216f9 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UPGroup_annotations.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UPGroup_annotations : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UPGroup_annotations() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UPGroup_annotations CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UPGroup_annotations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UnmanagedAttributePolicy.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UnmanagedAttributePolicy.cs new file mode 100644 index 00000000..cad824b4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UnmanagedAttributePolicy.cs @@ -0,0 +1,13 @@ +// +using System.Runtime.Serialization; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public enum UnmanagedAttributePolicy { + [EnumMember(Value = "ENABLED")] + ENABLED, + [EnumMember(Value = "ADMIN_VIEW")] + ADMIN_VIEW, + [EnumMember(Value = "ADMIN_EDIT")] + ADMIN_EDIT, + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserConsentRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserConsentRepresentation.cs new file mode 100644 index 00000000..ee20e2c3 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserConsentRepresentation.cs @@ -0,0 +1,82 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserConsentRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The clientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The createdDate property + public long? CreatedDate { get; set; } + /// The grantedClientScopes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? GrantedClientScopes { get; set; } +#nullable restore +#else + public List GrantedClientScopes { get; set; } +#endif + /// The grantedRealmRoles property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? GrantedRealmRoles { get; set; } +#nullable restore +#else + public List GrantedRealmRoles { get; set; } +#endif + /// The lastUpdatedDate property + public long? LastUpdatedDate { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserConsentRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserConsentRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserConsentRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"clientId", n => { ClientId = n.GetStringValue(); } }, + {"createdDate", n => { CreatedDate = n.GetLongValue(); } }, + {"grantedClientScopes", n => { GrantedClientScopes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"grantedRealmRoles", n => { GrantedRealmRoles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"lastUpdatedDate", n => { LastUpdatedDate = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("clientId", ClientId); + writer.WriteLongValue("createdDate", CreatedDate); + writer.WriteCollectionOfPrimitiveValues("grantedClientScopes", GrantedClientScopes); + writer.WriteCollectionOfPrimitiveValues("grantedRealmRoles", GrantedRealmRoles); + writer.WriteLongValue("lastUpdatedDate", LastUpdatedDate); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationMapperRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationMapperRepresentation.cs new file mode 100644 index 00000000..a16ac773 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationMapperRepresentation.cs @@ -0,0 +1,93 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserFederationMapperRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserFederationMapperRepresentation_config? Config { get; set; } +#nullable restore +#else + public UserFederationMapperRepresentation_config Config { get; set; } +#endif + /// The federationMapperType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FederationMapperType { get; set; } +#nullable restore +#else + public string FederationMapperType { get; set; } +#endif + /// The federationProviderDisplayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FederationProviderDisplayName { get; set; } +#nullable restore +#else + public string FederationProviderDisplayName { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserFederationMapperRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserFederationMapperRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserFederationMapperRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"config", n => { Config = n.GetObjectValue(UserFederationMapperRepresentation_config.CreateFromDiscriminatorValue); } }, + {"federationMapperType", n => { FederationMapperType = n.GetStringValue(); } }, + {"federationProviderDisplayName", n => { FederationProviderDisplayName = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("config", Config); + writer.WriteStringValue("federationMapperType", FederationMapperType); + writer.WriteStringValue("federationProviderDisplayName", FederationProviderDisplayName); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationMapperRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationMapperRepresentation_config.cs new file mode 100644 index 00000000..54939013 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationMapperRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserFederationMapperRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserFederationMapperRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserFederationMapperRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserFederationMapperRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationProviderRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationProviderRepresentation.cs new file mode 100644 index 00000000..f1d115a4 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationProviderRepresentation.cs @@ -0,0 +1,99 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserFederationProviderRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The changedSyncPeriod property + public int? ChangedSyncPeriod { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserFederationProviderRepresentation_config? Config { get; set; } +#nullable restore +#else + public UserFederationProviderRepresentation_config Config { get; set; } +#endif + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The fullSyncPeriod property + public int? FullSyncPeriod { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The lastSync property + public int? LastSync { get; set; } + /// The priority property + public int? Priority { get; set; } + /// The providerName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProviderName { get; set; } +#nullable restore +#else + public string ProviderName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserFederationProviderRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserFederationProviderRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserFederationProviderRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"changedSyncPeriod", n => { ChangedSyncPeriod = n.GetIntValue(); } }, + {"config", n => { Config = n.GetObjectValue(UserFederationProviderRepresentation_config.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"fullSyncPeriod", n => { FullSyncPeriod = n.GetIntValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"lastSync", n => { LastSync = n.GetIntValue(); } }, + {"priority", n => { Priority = n.GetIntValue(); } }, + {"providerName", n => { ProviderName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("changedSyncPeriod", ChangedSyncPeriod); + writer.WriteObjectValue("config", Config); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteIntValue("fullSyncPeriod", FullSyncPeriod); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("lastSync", LastSync); + writer.WriteIntValue("priority", Priority); + writer.WriteStringValue("providerName", ProviderName); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationProviderRepresentation_config.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationProviderRepresentation_config.cs new file mode 100644 index 00000000..871c822d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserFederationProviderRepresentation_config.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserFederationProviderRepresentation_config : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserFederationProviderRepresentation_config() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserFederationProviderRepresentation_config CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserFederationProviderRepresentation_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeGroupMetadata.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeGroupMetadata.cs new file mode 100644 index 00000000..ecc1808d --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeGroupMetadata.cs @@ -0,0 +1,83 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserProfileAttributeGroupMetadata : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The annotations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserProfileAttributeGroupMetadata_annotations? Annotations { get; set; } +#nullable restore +#else + public UserProfileAttributeGroupMetadata_annotations Annotations { get; set; } +#endif + /// The displayDescription property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayDescription { get; set; } +#nullable restore +#else + public string DisplayDescription { get; set; } +#endif + /// The displayHeader property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayHeader { get; set; } +#nullable restore +#else + public string DisplayHeader { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserProfileAttributeGroupMetadata() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserProfileAttributeGroupMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserProfileAttributeGroupMetadata(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"annotations", n => { Annotations = n.GetObjectValue(UserProfileAttributeGroupMetadata_annotations.CreateFromDiscriminatorValue); } }, + {"displayDescription", n => { DisplayDescription = n.GetStringValue(); } }, + {"displayHeader", n => { DisplayHeader = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("annotations", Annotations); + writer.WriteStringValue("displayDescription", DisplayDescription); + writer.WriteStringValue("displayHeader", DisplayHeader); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeGroupMetadata_annotations.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeGroupMetadata_annotations.cs new file mode 100644 index 00000000..1f66174b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeGroupMetadata_annotations.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserProfileAttributeGroupMetadata_annotations : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserProfileAttributeGroupMetadata_annotations() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserProfileAttributeGroupMetadata_annotations CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserProfileAttributeGroupMetadata_annotations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata.cs new file mode 100644 index 00000000..5db21e75 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata.cs @@ -0,0 +1,105 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserProfileAttributeMetadata : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The annotations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserProfileAttributeMetadata_annotations? Annotations { get; set; } +#nullable restore +#else + public UserProfileAttributeMetadata_annotations Annotations { get; set; } +#endif + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Group { get; set; } +#nullable restore +#else + public string Group { get; set; } +#endif + /// The multivalued property + public bool? Multivalued { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The readOnly property + public bool? ReadOnly { get; set; } + /// The required property + public bool? Required { get; set; } + /// The validators property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserProfileAttributeMetadata_validators? Validators { get; set; } +#nullable restore +#else + public UserProfileAttributeMetadata_validators Validators { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserProfileAttributeMetadata() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserProfileAttributeMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserProfileAttributeMetadata(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"annotations", n => { Annotations = n.GetObjectValue(UserProfileAttributeMetadata_annotations.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"group", n => { Group = n.GetStringValue(); } }, + {"multivalued", n => { Multivalued = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"readOnly", n => { ReadOnly = n.GetBoolValue(); } }, + {"required", n => { Required = n.GetBoolValue(); } }, + {"validators", n => { Validators = n.GetObjectValue(UserProfileAttributeMetadata_validators.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("annotations", Annotations); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("group", Group); + writer.WriteBoolValue("multivalued", Multivalued); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("readOnly", ReadOnly); + writer.WriteBoolValue("required", Required); + writer.WriteObjectValue("validators", Validators); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata_annotations.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata_annotations.cs new file mode 100644 index 00000000..3fe8ef66 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata_annotations.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserProfileAttributeMetadata_annotations : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserProfileAttributeMetadata_annotations() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserProfileAttributeMetadata_annotations CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserProfileAttributeMetadata_annotations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata_validators.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata_validators.cs new file mode 100644 index 00000000..c7e9fff7 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileAttributeMetadata_validators.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserProfileAttributeMetadata_validators : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserProfileAttributeMetadata_validators() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserProfileAttributeMetadata_validators CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserProfileAttributeMetadata_validators(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileMetadata.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileMetadata.cs new file mode 100644 index 00000000..9b90d3a5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserProfileMetadata.cs @@ -0,0 +1,63 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserProfileMetadata : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Attributes { get; set; } +#nullable restore +#else + public List Attributes { get; set; } +#endif + /// The groups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Groups { get; set; } +#nullable restore +#else + public List Groups { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserProfileMetadata() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserProfileMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserProfileMetadata(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributes", n => { Attributes = n.GetCollectionOfObjectValues(UserProfileAttributeMetadata.CreateFromDiscriminatorValue)?.ToList(); } }, + {"groups", n => { Groups = n.GetCollectionOfObjectValues(UserProfileAttributeGroupMetadata.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("attributes", Attributes); + writer.WriteCollectionOfObjectValues("groups", Groups); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation.cs new file mode 100644 index 00000000..320bd400 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation.cs @@ -0,0 +1,285 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserRepresentation : IAdditionalDataHolder, IParsable { + /// The access property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserRepresentation_access? Access { get; set; } +#nullable restore +#else + public UserRepresentation_access Access { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The applicationRoles property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserRepresentation_applicationRoles? ApplicationRoles { get; set; } +#nullable restore +#else + public UserRepresentation_applicationRoles ApplicationRoles { get; set; } +#endif + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserRepresentation_attributes? Attributes { get; set; } +#nullable restore +#else + public UserRepresentation_attributes Attributes { get; set; } +#endif + /// The clientConsents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ClientConsents { get; set; } +#nullable restore +#else + public List ClientConsents { get; set; } +#endif + /// The clientRoles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserRepresentation_clientRoles? ClientRoles { get; set; } +#nullable restore +#else + public UserRepresentation_clientRoles ClientRoles { get; set; } +#endif + /// The createdTimestamp property + public long? CreatedTimestamp { get; set; } + /// The credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { get; set; } +#nullable restore +#else + public List Credentials { get; set; } +#endif + /// The disableableCredentialTypes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DisableableCredentialTypes { get; set; } +#nullable restore +#else + public List DisableableCredentialTypes { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The emailVerified property + public bool? EmailVerified { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The federatedIdentities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? FederatedIdentities { get; set; } +#nullable restore +#else + public List FederatedIdentities { get; set; } +#endif + /// The federationLink property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FederationLink { get; set; } +#nullable restore +#else + public string FederationLink { get; set; } +#endif + /// The firstName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FirstName { get; set; } +#nullable restore +#else + public string FirstName { get; set; } +#endif + /// The groups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Groups { get; set; } +#nullable restore +#else + public List Groups { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The lastName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastName { get; set; } +#nullable restore +#else + public string LastName { get; set; } +#endif + /// The notBefore property + public int? NotBefore { get; set; } + /// The origin property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Origin { get; set; } +#nullable restore +#else + public string Origin { get; set; } +#endif + /// The realmRoles property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RealmRoles { get; set; } +#nullable restore +#else + public List RealmRoles { get; set; } +#endif + /// The requiredActions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequiredActions { get; set; } +#nullable restore +#else + public List RequiredActions { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// The serviceAccountClientId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ServiceAccountClientId { get; set; } +#nullable restore +#else + public string ServiceAccountClientId { get; set; } +#endif + /// The socialLinks property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SocialLinks { get; set; } +#nullable restore +#else + public List SocialLinks { get; set; } +#endif + /// The totp property + public bool? Totp { get; set; } + /// The username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// The userProfileMetadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.UserProfileMetadata? UserProfileMetadata { get; set; } +#nullable restore +#else + public Keycloak.AuthServices.Sdk.Kiota.Admin.Models.UserProfileMetadata UserProfileMetadata { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"access", n => { Access = n.GetObjectValue(UserRepresentation_access.CreateFromDiscriminatorValue); } }, + {"applicationRoles", n => { ApplicationRoles = n.GetObjectValue(UserRepresentation_applicationRoles.CreateFromDiscriminatorValue); } }, + {"attributes", n => { Attributes = n.GetObjectValue(UserRepresentation_attributes.CreateFromDiscriminatorValue); } }, + {"clientConsents", n => { ClientConsents = n.GetCollectionOfObjectValues(UserConsentRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"clientRoles", n => { ClientRoles = n.GetObjectValue(UserRepresentation_clientRoles.CreateFromDiscriminatorValue); } }, + {"createdTimestamp", n => { CreatedTimestamp = n.GetLongValue(); } }, + {"credentials", n => { Credentials = n.GetCollectionOfObjectValues(CredentialRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"disableableCredentialTypes", n => { DisableableCredentialTypes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"email", n => { Email = n.GetStringValue(); } }, + {"emailVerified", n => { EmailVerified = n.GetBoolValue(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"federatedIdentities", n => { FederatedIdentities = n.GetCollectionOfObjectValues(FederatedIdentityRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"federationLink", n => { FederationLink = n.GetStringValue(); } }, + {"firstName", n => { FirstName = n.GetStringValue(); } }, + {"groups", n => { Groups = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"lastName", n => { LastName = n.GetStringValue(); } }, + {"notBefore", n => { NotBefore = n.GetIntValue(); } }, + {"origin", n => { Origin = n.GetStringValue(); } }, + {"realmRoles", n => { RealmRoles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"requiredActions", n => { RequiredActions = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"self", n => { Self = n.GetStringValue(); } }, + {"serviceAccountClientId", n => { ServiceAccountClientId = n.GetStringValue(); } }, + {"socialLinks", n => { SocialLinks = n.GetCollectionOfObjectValues(SocialLinkRepresentation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"totp", n => { Totp = n.GetBoolValue(); } }, + {"userProfileMetadata", n => { UserProfileMetadata = n.GetObjectValue(Keycloak.AuthServices.Sdk.Kiota.Admin.Models.UserProfileMetadata.CreateFromDiscriminatorValue); } }, + {"username", n => { Username = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("access", Access); + writer.WriteObjectValue("applicationRoles", ApplicationRoles); + writer.WriteObjectValue("attributes", Attributes); + writer.WriteCollectionOfObjectValues("clientConsents", ClientConsents); + writer.WriteObjectValue("clientRoles", ClientRoles); + writer.WriteLongValue("createdTimestamp", CreatedTimestamp); + writer.WriteCollectionOfObjectValues("credentials", Credentials); + writer.WriteCollectionOfPrimitiveValues("disableableCredentialTypes", DisableableCredentialTypes); + writer.WriteStringValue("email", Email); + writer.WriteBoolValue("emailVerified", EmailVerified); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteCollectionOfObjectValues("federatedIdentities", FederatedIdentities); + writer.WriteStringValue("federationLink", FederationLink); + writer.WriteStringValue("firstName", FirstName); + writer.WriteCollectionOfPrimitiveValues("groups", Groups); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("lastName", LastName); + writer.WriteIntValue("notBefore", NotBefore); + writer.WriteStringValue("origin", Origin); + writer.WriteCollectionOfPrimitiveValues("realmRoles", RealmRoles); + writer.WriteCollectionOfPrimitiveValues("requiredActions", RequiredActions); + writer.WriteStringValue("self", Self); + writer.WriteStringValue("serviceAccountClientId", ServiceAccountClientId); + writer.WriteCollectionOfObjectValues("socialLinks", SocialLinks); + writer.WriteBoolValue("totp", Totp); + writer.WriteStringValue("username", Username); + writer.WriteObjectValue("userProfileMetadata", UserProfileMetadata); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_access.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_access.cs new file mode 100644 index 00000000..a5f6496f --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_access.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserRepresentation_access : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserRepresentation_access() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserRepresentation_access CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRepresentation_access(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_applicationRoles.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_applicationRoles.cs new file mode 100644 index 00000000..98798a86 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_applicationRoles.cs @@ -0,0 +1,44 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + [Obsolete("")] + public class UserRepresentation_applicationRoles : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserRepresentation_applicationRoles() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserRepresentation_applicationRoles CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRepresentation_applicationRoles(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_attributes.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_attributes.cs new file mode 100644 index 00000000..d4b86a72 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_attributes.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserRepresentation_attributes : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserRepresentation_attributes() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserRepresentation_attributes CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRepresentation_attributes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_clientRoles.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_clientRoles.cs new file mode 100644 index 00000000..b475d9f6 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserRepresentation_clientRoles.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserRepresentation_clientRoles : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserRepresentation_clientRoles() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserRepresentation_clientRoles CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRepresentation_clientRoles(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserSessionRepresentation.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserSessionRepresentation.cs new file mode 100644 index 00000000..ae28a74b --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserSessionRepresentation.cs @@ -0,0 +1,105 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserSessionRepresentation : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The clients property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserSessionRepresentation_clients? Clients { get; set; } +#nullable restore +#else + public UserSessionRepresentation_clients Clients { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The ipAddress property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IpAddress { get; set; } +#nullable restore +#else + public string IpAddress { get; set; } +#endif + /// The lastAccess property + public long? LastAccess { get; set; } + /// The rememberMe property + public bool? RememberMe { get; set; } + /// The start property + public long? Start { get; set; } + /// The userId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// The username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserSessionRepresentation() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserSessionRepresentation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserSessionRepresentation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"clients", n => { Clients = n.GetObjectValue(UserSessionRepresentation_clients.CreateFromDiscriminatorValue); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"ipAddress", n => { IpAddress = n.GetStringValue(); } }, + {"lastAccess", n => { LastAccess = n.GetLongValue(); } }, + {"rememberMe", n => { RememberMe = n.GetBoolValue(); } }, + {"start", n => { Start = n.GetLongValue(); } }, + {"userId", n => { UserId = n.GetStringValue(); } }, + {"username", n => { Username = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("clients", Clients); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("ipAddress", IpAddress); + writer.WriteLongValue("lastAccess", LastAccess); + writer.WriteBoolValue("rememberMe", RememberMe); + writer.WriteLongValue("start", Start); + writer.WriteStringValue("userId", UserId); + writer.WriteStringValue("username", Username); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserSessionRepresentation_clients.cs b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserSessionRepresentation_clients.cs new file mode 100644 index 00000000..bd032fc5 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/Models/UserSessionRepresentation_clients.cs @@ -0,0 +1,43 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Models { + public class UserSessionRepresentation_clients : IAdditionalDataHolder, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserSessionRepresentation_clients() { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static UserSessionRepresentation_clients CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserSessionRepresentation_clients(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() { + return new Dictionary> { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/README.md b/src/Keycloak.AuthServices.Sdk.Kiota/README.md new file mode 100644 index 00000000..6ce3436c --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/README.md @@ -0,0 +1,14 @@ +# Keycloak.AuthServices.Sdk.Kiota + +## Generate Client + +```bash +export KEYCLOAK_API_VERSION=24.0.1 +kiota generate -l CSharp \ + --log-level trace \ + --output ./ \ + --namespace-name Keycloak.AuthServices.Sdk.Kiota.Admin \ + --class-name KeycloakAdminApiClient \ + --exclude-backward-compatible \ + --openapi https://www.keycloak.org/docs-api/$KEYCLOAK_API_VERSION/rest-api/openapi.json +``` diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/ServiceCollectionExtensions.cs b/src/Keycloak.AuthServices.Sdk.Kiota/ServiceCollectionExtensions.cs new file mode 100644 index 00000000..ef7a1051 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/ServiceCollectionExtensions.cs @@ -0,0 +1,130 @@ +namespace Keycloak.AuthServices.Sdk.Kiota; + +using Keycloak.AuthServices.Common; +using Keycloak.AuthServices.Sdk.Kiota.Admin; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Microsoft.Kiota.Abstractions.Authentication; +using Microsoft.Kiota.Http.HttpClientLibrary; + +/// +/// Adds HTTP Client SDKs +/// +public static class ServiceCollectionExtensions +{ + /// + /// Adds for Keycloak Admin API. + /// + /// The IServiceCollection to add the HttpClient to. + /// The IConfiguration instance to bind the Keycloak options from. + /// An optional action to configure the HttpClient. + /// The name of the configuration section containing the Keycloak client options. + /// The IHttpClientBuilder for further configuration. + public static IHttpClientBuilder AddKeycloakAdminHttpClient( + this IServiceCollection services, + IConfiguration configuration, + Action? configureClient = default, + string keycloakClientSectionName = KeycloakAdminClientOptions.Section + ) => + services.AddKeycloakAdminHttpClient( + options => configuration.BindKeycloakOptions(options, keycloakClientSectionName), + configureClient + ); + + /// + /// Adds for Keycloak Admin API. + /// + /// The IServiceCollection to add the HttpClient to. + /// The IConfigurationSection to bind the Keycloak options from. + /// An optional action to configure the HttpClient. + /// The IHttpClientBuilder for further configuration. + public static IHttpClientBuilder AddKeycloakAdminHttpClient( + this IServiceCollection services, + IConfigurationSection configurationSection, + Action? configureClient = default + ) => + services.AddKeycloakAdminHttpClient( + options => configurationSection.BindKeycloakOptions(options), + configureClient + ); + + /// + /// Adds for Keycloak Admin API. + /// + /// The IServiceCollection to add the HttpClient to. + /// An action to configure the Keycloak client options. + /// An optional action to configure the HttpClient. + /// The IHttpClientBuilder for further configuration. + public static IHttpClientBuilder AddKeycloakAdminHttpClient( + this IServiceCollection services, + Action configureKeycloakOptions, + Action? configureClient = default + ) + { + services.Configure(configureKeycloakOptions); + + return services + .AddHttpClient( + "keycloak_admin_api_kiota", + (sp, http) => + { + var keycloakOptions = sp.GetRequiredService< + IOptions + >(); + + http.BaseAddress = new Uri(keycloakOptions.Value.AuthServerUrl); + configureClient?.Invoke(http); + } + ) + .AddTypedClient( + (httpClient, sp) => + { + var requestAdapter = new HttpClientRequestAdapter( + new AnonymousAuthenticationProvider(), + httpClient: httpClient + ); + + return new KeycloakAdminApiClient(requestAdapter); + } + ) + .ConfigurePrimaryHttpMessageHandler(_ => + { + var defaultHandlers = KiotaClientFactory.CreateDefaultHandlers(); + var defaultHttpMessageHandler = KiotaClientFactory.GetDefaultHttpMessageHandler(); + + return KiotaClientFactory.ChainHandlersCollectionAndGetFirstLink( + defaultHttpMessageHandler, + defaultHandlers.ToArray() + )!; + }); + } + + /// + /// Adds for Keycloak Admin API. + /// + /// The IServiceCollection to add the HttpClient to. + /// The Keycloak client options. + /// An optional action to configure the HttpClient. + /// The IHttpClientBuilder for further configuration. + public static IHttpClientBuilder AddKeycloakAdminHttpClient( + this IServiceCollection services, + KeycloakAdminClientOptions keycloakOptions, + Action? configureClient = default + ) + { + void configureKeycloakOptions(KeycloakAdminClientOptions options) + { + options.Realm = keycloakOptions.Realm; + options.AuthServerUrl = keycloakOptions.AuthServerUrl; + options.Resource = keycloakOptions.Resource; + options.Credentials = keycloakOptions.Credentials; + // redundant + options.SslRequired = keycloakOptions.SslRequired; + options.VerifyTokenAudience = keycloakOptions.VerifyTokenAudience; + options.TokenClockSkew = keycloakOptions.TokenClockSkew; + } + + return services.AddKeycloakAdminHttpClient(configureKeycloakOptions, configureClient); + } +} diff --git a/src/Keycloak.AuthServices.Sdk.Kiota/kiota-lock.json b/src/Keycloak.AuthServices.Sdk.Kiota/kiota-lock.json new file mode 100644 index 00000000..fd176107 --- /dev/null +++ b/src/Keycloak.AuthServices.Sdk.Kiota/kiota-lock.json @@ -0,0 +1,32 @@ +{ + "descriptionHash": "0C850ED5B6555F46112A623464E3147D6F0AC5FE9147E377E032FFFCE81E392305975F60B0D57EB8419E3DF834B6E54B1140F4C52C11B796016C62A89B15AB02", + "descriptionLocation": "https://www.keycloak.org/docs-api/24.0.1/rest-api/openapi.json", + "lockFileVersion": "1.0.0", + "kiotaVersion": "1.12.0", + "clientClassName": "KeycloakAdminApiClient", + "clientNamespaceName": "Keycloak.AuthServices.Sdk.Kiota.Admin", + "language": "CSharp", + "usesBackingStore": false, + "excludeBackwardCompatible": true, + "includeAdditionalData": true, + "serializers": [ + "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory" + ], + "deserializers": [ + "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory", + "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory", + "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory" + ], + "structuredMimeTypes": [ + "application/json", + "text/plain;q=0.9", + "application/x-www-form-urlencoded;q=0.2", + "multipart/form-data;q=0.1" + ], + "includePatterns": [], + "excludePatterns": [], + "disabledValidationRules": [] +} \ No newline at end of file diff --git a/src/Keycloak.AuthServices.Sdk/Keycloak.AuthServices.Sdk.csproj b/src/Keycloak.AuthServices.Sdk/Keycloak.AuthServices.Sdk.csproj index dc5971f1..c2f72a71 100644 --- a/src/Keycloak.AuthServices.Sdk/Keycloak.AuthServices.Sdk.csproj +++ b/src/Keycloak.AuthServices.Sdk/Keycloak.AuthServices.Sdk.csproj @@ -6,8 +6,8 @@ Keycloak.AuthServices.Sdk - HttpClient integration with Keycloak. HTTP Client SDK - Keycloak;authserver;http-sdk + HttpClient integration with Keycloak. Includes HTTP Admin REST API, Protection API. + Keycloak;KeycloakAdminAPI;ProtectionAPI;HttpClient diff --git a/src/Keycloak.AuthServices.Sdk/ServiceCollectionExtensions.cs b/src/Keycloak.AuthServices.Sdk/ServiceCollectionExtensions.cs index 4ed06515..aec3f018 100644 --- a/src/Keycloak.AuthServices.Sdk/ServiceCollectionExtensions.cs +++ b/src/Keycloak.AuthServices.Sdk/ServiceCollectionExtensions.cs @@ -13,7 +13,7 @@ namespace Keycloak.AuthServices.Sdk; public static class ServiceCollectionExtensions { /// - /// Adds an HttpClient for Keycloak Admin API to the service collection. + /// Adds , , , HTTP clients for Keycloak Admin API. /// /// The IServiceCollection to add the HttpClient to. /// The IConfiguration instance to bind the Keycloak options from. @@ -32,7 +32,7 @@ public static IHttpClientBuilder AddKeycloakAdminHttpClient( ); /// - /// Adds an HttpClient for Keycloak Admin API to the service collection. + /// Adds , , , HTTP clients for Keycloak Admin API. /// /// The IServiceCollection to add the HttpClient to. /// The IConfigurationSection to bind the Keycloak options from. @@ -49,7 +49,7 @@ public static IHttpClientBuilder AddKeycloakAdminHttpClient( ); /// - /// Adds an HttpClient for Keycloak Admin API to the service collection. + /// Adds , , , for Keycloak Admin API. /// /// The IServiceCollection to add the HttpClient to. /// An action to configure the Keycloak client options. @@ -84,7 +84,7 @@ public static IHttpClientBuilder AddKeycloakAdminHttpClient( } /// - /// Adds an HttpClient for Keycloak Admin API to the service collection. + /// Adds , , , HTTP clients for Keycloak Admin API. /// /// The IServiceCollection to add the HttpClient to. /// The Keycloak client options. @@ -112,7 +112,7 @@ void configureKeycloakOptions(KeycloakAdminClientOptions options) } /// - /// Adds an HttpClient for Keycloak Protection API to the service collection. + /// Adds , , HTTP clients for Protection API. /// /// The IServiceCollection to add the HttpClient to. /// The IConfiguration instance to bind the Keycloak options from. @@ -131,7 +131,7 @@ public static IHttpClientBuilder AddKeycloakProtectionHttpClient( ); /// - /// Adds an HttpClient for Keycloak Protection API to the service collection. + /// Adds , , HTTP clients for Protection API. /// /// The IServiceCollection to add the HttpClient to. /// The IConfigurationSection to bind the Keycloak options from. @@ -148,7 +148,7 @@ public static IHttpClientBuilder AddKeycloakProtectionHttpClient( ); /// - /// Adds an HttpClient for Keycloak Protection API to the service collection. + /// Adds , , HTTP clients for Protection API. /// /// The IServiceCollection to add the HttpClient to. /// An action to configure the Keycloak client options. @@ -186,7 +186,7 @@ public static IHttpClientBuilder AddKeycloakProtectionHttpClient( } /// - /// Adds an HttpClient for Keycloak Protection API to the service collection. + /// Adds , , HTTP clients for Protection API. /// /// The IServiceCollection to add the HttpClient to. /// The Keycloak client options. diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 345c8c88..e12d6f55 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -29,6 +29,6 @@ - false + true diff --git a/tests/Keycloak.AuthServices.IntegrationTests/Admin/KeycloakRealmClientTests.cs b/tests/Keycloak.AuthServices.IntegrationTests/Admin/KeycloakRealmClientTests.cs index 191fe782..e5a92b26 100644 --- a/tests/Keycloak.AuthServices.IntegrationTests/Admin/KeycloakRealmClientTests.cs +++ b/tests/Keycloak.AuthServices.IntegrationTests/Admin/KeycloakRealmClientTests.cs @@ -85,7 +85,7 @@ public async Task GetRealmAsync_RealmExists_Success() ); services - .AddKeycloakAdminHttpClient(options) + .AddKeycloakAdminHttpClient(configuration) .AddClientCredentialsTokenHandler(tokenClientName); var sp = services.BuildServiceProvider(); diff --git a/tests/Keycloak.AuthServices.IntegrationTests/AdminKiota/KeycloakRealmKiotaClientTests.cs b/tests/Keycloak.AuthServices.IntegrationTests/AdminKiota/KeycloakRealmKiotaClientTests.cs new file mode 100644 index 00000000..d7076cce --- /dev/null +++ b/tests/Keycloak.AuthServices.IntegrationTests/AdminKiota/KeycloakRealmKiotaClientTests.cs @@ -0,0 +1,56 @@ +namespace Keycloak.AuthServices.IntegrationTests; + +using Keycloak.AuthServices.Common; +using Keycloak.AuthServices.Sdk.Kiota; +using Keycloak.AuthServices.Sdk.Kiota.Admin; +using Microsoft.Extensions.DependencyInjection; +using static Keycloak.AuthServices.IntegrationTests.Utils; + +/// +/// Used for demonstration/docs, this is why this class is so verbose +/// +public class KeycloakRealmKiotaClientTests(ITestOutputHelper testOutputHelper) + : AuthenticationScenarioNoKeycloak() +{ + private static readonly string AppSettings = "appsettings.Master.json"; + + [Fact] + public async Task GetRealmAsyncKiota_RealmExists_Success() + { + // NOTE, Used for demonstration/docs, this is why this class is so verbose + var (services, configuration) = KeycloakSetup(AppSettings, testOutputHelper); + var tokenClientName = "keycloak_admin_api_token"; + + #region GetRealmAsyncKiota_RealmExists_Success + var options = configuration.GetKeycloakOptions()!; + + services.AddDistributedMemoryCache(); + services + .AddClientCredentialsTokenManagement() + .AddClient( + tokenClientName, + client => + { + client.ClientId = options.Resource; + client.ClientSecret = options.Credentials.Secret; + client.TokenEndpoint = options.KeycloakTokenEndpoint; + } + ); + + services + .AddKeycloakAdminHttpClient(configuration) + .AddClientCredentialsTokenHandler(tokenClientName); + + var sp = services.BuildServiceProvider(); + var client = sp.GetRequiredService(); + + var realmName = "Test"; + var realm = await client.Admin.Realms[realmName].GetAsync(); + + realm.Should().NotBeNull(); + realm!.Realm.Should().Be(realmName); + + #endregion GetRealmAsyncKiota_RealmExists_Success + + } +} diff --git a/tests/Keycloak.AuthServices.IntegrationTests/Keycloak.AuthServices.IntegrationTests.csproj b/tests/Keycloak.AuthServices.IntegrationTests/Keycloak.AuthServices.IntegrationTests.csproj index ae436419..1a62662a 100644 --- a/tests/Keycloak.AuthServices.IntegrationTests/Keycloak.AuthServices.IntegrationTests.csproj +++ b/tests/Keycloak.AuthServices.IntegrationTests/Keycloak.AuthServices.IntegrationTests.csproj @@ -1,10 +1,4 @@ - - - false - true - - @@ -38,6 +32,7 @@ +