Skip to content

Commit

Permalink
feat: update Kiota SDK to Keycloak 25.0.0. (#119)
Browse files Browse the repository at this point in the history
* Update Kiota SDK to Keycloak 25.0.0.
* Add kiota tool
  • Loading branch information
kanpov authored Jun 15, 2024
1 parent f26dec4 commit 5ff66a5
Show file tree
Hide file tree
Showing 467 changed files with 7,942 additions and 5,951 deletions.
18 changes: 14 additions & 4 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,29 @@
"version": "1.0.52",
"commands": [
"central-pkg-converter"
]
],
"rollForward": false
},
"cake.tool": {
"version": "2.0.0",
"commands": [
"dotnet-cake"
]
],
"rollForward": false
},
"csharpier": {
"version": "0.28.2",
"commands": [
"dotnet-csharpier"
]
],
"rollForward": false
},
"microsoft.openapi.kiota": {
"version": "1.15.0",
"commands": [
"kiota"
],
"rollForward": false
}
}
}
}
13 changes: 7 additions & 6 deletions src/Keycloak.AuthServices.Sdk.Kiota/Admin/AdminRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,28 @@
using System.Linq;
using System.Threading.Tasks;
using System;
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin {
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin
{
/// <summary>
/// Builds and executes requests for operations under \admin
/// </summary>
public class AdminRequestBuilder : BaseRequestBuilder
public class AdminRequestBuilder : BaseRequestBuilder
{
/// <summary>The realms property</summary>
public RealmsRequestBuilder Realms
public Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.RealmsRequestBuilder Realms
{
get => new RealmsRequestBuilder(PathParameters, RequestAdapter);
get => new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.RealmsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="AdminRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.AdminRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public AdminRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="AdminRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.AdminRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@
using System.Threading.Tasks;
using System.Threading;
using System;
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents {
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents
{
/// <summary>
/// Builds and executes requests for operations under \admin\realms\{realm}\admin-events
/// </summary>
public class AdminEventsRequestBuilder : BaseRequestBuilder
public class AdminEventsRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new <see cref="AdminEventsRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public AdminEventsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/admin-events{?authClient*,authIpAddress*,authRealm*,authUser*,dateFrom*,dateTo*,first*,max*,operationTypes*,resourcePath*,resourceTypes*}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="AdminEventsRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
Expand All @@ -50,20 +51,20 @@ public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters
/// <summary>
/// Get admin events Returns all admin events, or filters events based on URL query parameters listed here
/// </summary>
/// <returns>A List&lt;AdminEventRepresentation&gt;</returns>
/// <returns>A List&lt;Keycloak.AuthServices.Sdk.Kiota.Admin.Models.AdminEventRepresentation&gt;</returns>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<List<AdminEventRepresentation>?> GetAsync(Action<RequestConfiguration<AdminEventsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<List<Keycloak.AuthServices.Sdk.Kiota.Admin.Models.AdminEventRepresentation>?> GetAsync(Action<RequestConfiguration<Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder.AdminEventsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<List<AdminEventRepresentation>> GetAsync(Action<RequestConfiguration<AdminEventsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<List<Keycloak.AuthServices.Sdk.Kiota.Admin.Models.AdminEventRepresentation>> GetAsync(Action<RequestConfiguration<Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder.AdminEventsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var collectionResult = await RequestAdapter.SendCollectionAsync<AdminEventRepresentation>(requestInfo, AdminEventRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
var collectionResult = await RequestAdapter.SendCollectionAsync<Keycloak.AuthServices.Sdk.Kiota.Admin.Models.AdminEventRepresentation>(requestInfo, Keycloak.AuthServices.Sdk.Kiota.Admin.Models.AdminEventRepresentation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
}
/// <summary>
Expand Down Expand Up @@ -91,11 +92,11 @@ public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AdminEventsRequestBuilderGetQueryParameters>>? requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder.AdminEventsRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AdminEventsRequestBuilderGetQueryParameters>> requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder.AdminEventsRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
Expand All @@ -106,11 +107,11 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Ad
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <returns>A <see cref="AdminEventsRequestBuilder"/></returns>
/// <returns>A <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public AdminEventsRequestBuilder WithUrl(string rawUrl)
public Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder WithUrl(string rawUrl)
{
return new AdminEventsRequestBuilder(rawUrl, RequestAdapter);
return new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AdminEvents.AdminEventsRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Get admin events Returns all admin events, or filters events based on URL query parameters listed here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,28 @@
using System.Linq;
using System.Threading.Tasks;
using System;
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection {
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection
{
/// <summary>
/// Builds and executes requests for operations under \admin\realms\{realm}\attack-detection
/// </summary>
public class AttackDetectionRequestBuilder : BaseRequestBuilder
public class AttackDetectionRequestBuilder : BaseRequestBuilder
{
/// <summary>The bruteForce property</summary>
public BruteForceRequestBuilder BruteForce
public Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.BruteForceRequestBuilder BruteForce
{
get => new BruteForceRequestBuilder(PathParameters, RequestAdapter);
get => new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.BruteForceRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="AttackDetectionRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.AttackDetectionRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public AttackDetectionRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="AttackDetectionRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.AttackDetectionRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,28 @@
using System.Linq;
using System.Threading.Tasks;
using System;
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce {
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce
{
/// <summary>
/// Builds and executes requests for operations under \admin\realms\{realm}\attack-detection\brute-force
/// </summary>
public class BruteForceRequestBuilder : BaseRequestBuilder
public class BruteForceRequestBuilder : BaseRequestBuilder
{
/// <summary>The users property</summary>
public UsersRequestBuilder Users
public Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.UsersRequestBuilder Users
{
get => new UsersRequestBuilder(PathParameters, RequestAdapter);
get => new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.UsersRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="BruteForceRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.BruteForceRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public BruteForceRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/realms/{realm}/attack-detection/brute-force", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="BruteForceRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.BruteForceRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
using System.IO;
using System.Linq;
using System;
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item {
namespace Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item
{
#pragma warning disable CS1591
public class WithUserGetResponse : IAdditionalDataHolder, IParsable
public class WithUserGetResponse : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
/// <summary>
/// Instantiates a new <see cref="WithUserGetResponse"/> and sets the default values.
/// Instantiates a new <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item.WithUserGetResponse"/> and sets the default values.
/// </summary>
public WithUserGetResponse()
{
Expand All @@ -21,12 +22,12 @@ public WithUserGetResponse()
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="WithUserGetResponse"/></returns>
/// <returns>A <see cref="Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item.WithUserGetResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static WithUserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode)
public static Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item.WithUserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new WithUserGetResponse();
return new Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.Realms.Item.AttackDetection.BruteForce.Users.Item.WithUserGetResponse();
}
/// <summary>
/// The deserialization information for the current model
Expand Down
Loading

0 comments on commit 5ff66a5

Please sign in to comment.