diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
index 9456e65f629..caf67257462 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
@@ -216,6 +216,53 @@ internal static class ApiUrlLookup
internal static ApiUrls QueryRulesListRulesets = new ApiUrls(new[] { "_query_rules" });
internal static ApiUrls QueryRulesPutRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" });
internal static ApiUrls QueryRulesPutRuleset = new ApiUrls(new[] { "_query_rules/{ruleset_id}" });
+ internal static ApiUrls SecurityActivateUserProfile = new ApiUrls(new[] { "_security/profile/_activate" });
+ internal static ApiUrls SecurityAuthenticate = new ApiUrls(new[] { "_security/_authenticate" });
+ internal static ApiUrls SecurityBulkDeleteRole = new ApiUrls(new[] { "_security/role" });
+ internal static ApiUrls SecurityBulkPutRole = new ApiUrls(new[] { "_security/role" });
+ internal static ApiUrls SecurityClearApiKeyCache = new ApiUrls(new[] { "_security/api_key/{ids}/_clear_cache" });
+ internal static ApiUrls SecurityClearCachedPrivileges = new ApiUrls(new[] { "_security/privilege/{application}/_clear_cache" });
+ internal static ApiUrls SecurityClearCachedRealms = new ApiUrls(new[] { "_security/realm/{realms}/_clear_cache" });
+ internal static ApiUrls SecurityClearCachedRoles = new ApiUrls(new[] { "_security/role/{name}/_clear_cache" });
+ internal static ApiUrls SecurityClearCachedServiceTokens = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache" });
+ internal static ApiUrls SecurityCreateApiKey = new ApiUrls(new[] { "_security/api_key" });
+ internal static ApiUrls SecurityCreateServiceToken = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential/token/{name}", "_security/service/{namespace}/{service}/credential/token" });
+ internal static ApiUrls SecurityDeletePrivileges = new ApiUrls(new[] { "_security/privilege/{application}/{name}" });
+ internal static ApiUrls SecurityDeleteRole = new ApiUrls(new[] { "_security/role/{name}" });
+ internal static ApiUrls SecurityDeleteRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}" });
+ internal static ApiUrls SecurityDeleteServiceToken = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential/token/{name}" });
+ internal static ApiUrls SecurityDisableUserProfile = new ApiUrls(new[] { "_security/profile/{uid}/_disable" });
+ internal static ApiUrls SecurityEnableUserProfile = new ApiUrls(new[] { "_security/profile/{uid}/_enable" });
+ internal static ApiUrls SecurityGetApiKey = new ApiUrls(new[] { "_security/api_key" });
+ internal static ApiUrls SecurityGetBuiltinPrivileges = new ApiUrls(new[] { "_security/privilege/_builtin" });
+ internal static ApiUrls SecurityGetPrivileges = new ApiUrls(new[] { "_security/privilege", "_security/privilege/{application}", "_security/privilege/{application}/{name}" });
+ internal static ApiUrls SecurityGetRole = new ApiUrls(new[] { "_security/role/{name}", "_security/role" });
+ internal static ApiUrls SecurityGetRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}", "_security/role_mapping" });
+ internal static ApiUrls SecurityGetServiceAccounts = new ApiUrls(new[] { "_security/service/{namespace}/{service}", "_security/service/{namespace}", "_security/service" });
+ internal static ApiUrls SecurityGetServiceCredentials = new ApiUrls(new[] { "_security/service/{namespace}/{service}/credential" });
+ internal static ApiUrls SecurityGetToken = new ApiUrls(new[] { "_security/oauth2/token" });
+ internal static ApiUrls SecurityGetUserPrivileges = new ApiUrls(new[] { "_security/user/_privileges" });
+ internal static ApiUrls SecurityGetUserProfile = new ApiUrls(new[] { "_security/profile/{uid}" });
+ internal static ApiUrls SecurityGrantApiKey = new ApiUrls(new[] { "_security/api_key/grant" });
+ internal static ApiUrls SecurityHasPrivileges = new ApiUrls(new[] { "_security/user/_has_privileges", "_security/user/{user}/_has_privileges" });
+ internal static ApiUrls SecurityHasPrivilegesUserProfile = new ApiUrls(new[] { "_security/profile/_has_privileges" });
+ internal static ApiUrls SecurityInvalidateApiKey = new ApiUrls(new[] { "_security/api_key" });
+ internal static ApiUrls SecurityInvalidateToken = new ApiUrls(new[] { "_security/oauth2/token" });
+ internal static ApiUrls SecurityPutPrivileges = new ApiUrls(new[] { "_security/privilege" });
+ internal static ApiUrls SecurityPutRole = new ApiUrls(new[] { "_security/role/{name}" });
+ internal static ApiUrls SecurityPutRoleMapping = new ApiUrls(new[] { "_security/role_mapping/{name}" });
+ internal static ApiUrls SecurityQueryApiKeys = new ApiUrls(new[] { "_security/_query/api_key" });
+ internal static ApiUrls SecurityQueryRole = new ApiUrls(new[] { "_security/_query/role" });
+ internal static ApiUrls SecurityQueryUser = new ApiUrls(new[] { "_security/_query/user" });
+ internal static ApiUrls SecuritySamlAuthenticate = new ApiUrls(new[] { "_security/saml/authenticate" });
+ internal static ApiUrls SecuritySamlCompleteLogout = new ApiUrls(new[] { "_security/saml/complete_logout" });
+ internal static ApiUrls SecuritySamlInvalidate = new ApiUrls(new[] { "_security/saml/invalidate" });
+ internal static ApiUrls SecuritySamlLogout = new ApiUrls(new[] { "_security/saml/logout" });
+ internal static ApiUrls SecuritySamlPrepareAuthentication = new ApiUrls(new[] { "_security/saml/prepare" });
+ internal static ApiUrls SecuritySamlServiceProviderMetadata = new ApiUrls(new[] { "_security/saml/metadata/{realm_name}" });
+ internal static ApiUrls SecuritySuggestUserProfiles = new ApiUrls(new[] { "_security/profile/_suggest" });
+ internal static ApiUrls SecurityUpdateApiKey = new ApiUrls(new[] { "_security/api_key/{id}" });
+ internal static ApiUrls SecurityUpdateUserProfileData = new ApiUrls(new[] { "_security/profile/{uid}/_data" });
internal static ApiUrls SnapshotCleanupRepository = new ApiUrls(new[] { "_snapshot/{repository}/_cleanup" });
internal static ApiUrls SnapshotClone = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}" });
internal static ApiUrls SnapshotCreate = new ApiUrls(new[] { "_snapshot/{repository}/{snapshot}" });
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileRequest.g.cs
new file mode 100644
index 00000000000..9b7d53c88ad
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileRequest.g.cs
@@ -0,0 +1,136 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ActivateUserProfileRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Creates or updates a user profile on behalf of another user.
+///
+///
+public sealed partial class ActivateUserProfileRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityActivateUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.activate_user_profile";
+
+ [JsonInclude, JsonPropertyName("access_token")]
+ public string? AccessToken { get; set; }
+ [JsonInclude, JsonPropertyName("grant_type")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.GrantType GrantType { get; set; }
+ [JsonInclude, JsonPropertyName("password")]
+ public string? Password { get; set; }
+ [JsonInclude, JsonPropertyName("username")]
+ public string? Username { get; set; }
+}
+
+///
+///
+/// Creates or updates a user profile on behalf of another user.
+///
+///
+public sealed partial class ActivateUserProfileRequestDescriptor : RequestDescriptor
+{
+ internal ActivateUserProfileRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public ActivateUserProfileRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityActivateUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.activate_user_profile";
+
+ private string? AccessTokenValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.GrantType GrantTypeValue { get; set; }
+ private string? PasswordValue { get; set; }
+ private string? UsernameValue { get; set; }
+
+ public ActivateUserProfileRequestDescriptor AccessToken(string? accessToken)
+ {
+ AccessTokenValue = accessToken;
+ return Self;
+ }
+
+ public ActivateUserProfileRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.GrantType grantType)
+ {
+ GrantTypeValue = grantType;
+ return Self;
+ }
+
+ public ActivateUserProfileRequestDescriptor Password(string? password)
+ {
+ PasswordValue = password;
+ return Self;
+ }
+
+ public ActivateUserProfileRequestDescriptor Username(string? username)
+ {
+ UsernameValue = username;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (!string.IsNullOrEmpty(AccessTokenValue))
+ {
+ writer.WritePropertyName("access_token");
+ writer.WriteStringValue(AccessTokenValue);
+ }
+
+ writer.WritePropertyName("grant_type");
+ JsonSerializer.Serialize(writer, GrantTypeValue, options);
+ if (!string.IsNullOrEmpty(PasswordValue))
+ {
+ writer.WritePropertyName("password");
+ writer.WriteStringValue(PasswordValue);
+ }
+
+ if (!string.IsNullOrEmpty(UsernameValue))
+ {
+ writer.WritePropertyName("username");
+ writer.WriteStringValue(UsernameValue);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileResponse.g.cs
new file mode 100644
index 00000000000..eef852bd9c6
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ActivateUserProfileResponse.g.cs
@@ -0,0 +1,45 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ActivateUserProfileResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("data")]
+ public IReadOnlyDictionary Data { get; init; }
+ [JsonInclude, JsonPropertyName("_doc")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.UserProfileHitMetadata Doc { get; init; }
+ [JsonInclude, JsonPropertyName("enabled")]
+ public bool? Enabled { get; init; }
+ [JsonInclude, JsonPropertyName("labels")]
+ public IReadOnlyDictionary Labels { get; init; }
+ [JsonInclude, JsonPropertyName("last_synchronized")]
+ public long LastSynchronized { get; init; }
+ [JsonInclude, JsonPropertyName("uid")]
+ public string Uid { get; init; }
+ [JsonInclude, JsonPropertyName("user")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.UserProfileUser User { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateRequest.g.cs
new file mode 100644
index 00000000000..8788e7dc1ed
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateRequest.g.cs
@@ -0,0 +1,84 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class AuthenticateRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Authenticate a user.
+/// Authenticates a user and returns information about the authenticated user.
+/// Include the user information in a basic auth header.
+/// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.
+/// If the user cannot be authenticated, this API returns a 401 status code.
+///
+///
+public sealed partial class AuthenticateRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityAuthenticate;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.authenticate";
+}
+
+///
+///
+/// Authenticate a user.
+/// Authenticates a user and returns information about the authenticated user.
+/// Include the user information in a basic auth header.
+/// A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.
+/// If the user cannot be authenticated, this API returns a 401 status code.
+///
+///
+public sealed partial class AuthenticateRequestDescriptor : RequestDescriptor
+{
+ internal AuthenticateRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public AuthenticateRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityAuthenticate;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.authenticate";
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateResponse.g.cs
new file mode 100644
index 00000000000..653805273f8
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/AuthenticateResponse.g.cs
@@ -0,0 +1,53 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class AuthenticateResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("api_key")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.ApiKey? ApiKey { get; init; }
+ [JsonInclude, JsonPropertyName("authentication_realm")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.RealmInfo AuthenticationRealm { get; init; }
+ [JsonInclude, JsonPropertyName("authentication_type")]
+ public string AuthenticationType { get; init; }
+ [JsonInclude, JsonPropertyName("email")]
+ public string? Email { get; init; }
+ [JsonInclude, JsonPropertyName("enabled")]
+ public bool Enabled { get; init; }
+ [JsonInclude, JsonPropertyName("full_name")]
+ public string? FullName { get; init; }
+ [JsonInclude, JsonPropertyName("lookup_realm")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.RealmInfo LookupRealm { get; init; }
+ [JsonInclude, JsonPropertyName("metadata")]
+ public IReadOnlyDictionary Metadata { get; init; }
+ [JsonInclude, JsonPropertyName("roles")]
+ public IReadOnlyCollection Roles { get; init; }
+ [JsonInclude, JsonPropertyName("token")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.AuthenticateToken? Token { get; init; }
+ [JsonInclude, JsonPropertyName("username")]
+ public string Username { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleRequest.g.cs
new file mode 100644
index 00000000000..49545b0f963
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleRequest.g.cs
@@ -0,0 +1,119 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class BulkDeleteRoleRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+/// The bulk delete roles API cannot delete roles that are defined in roles files.
+///
+///
+public sealed partial class BulkDeleteRoleRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkDeleteRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.bulk_delete_role";
+
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+
+ ///
+ ///
+ /// An array of role names to delete
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("names")]
+ public ICollection Names { get; set; }
+}
+
+///
+///
+/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+/// The bulk delete roles API cannot delete roles that are defined in roles files.
+///
+///
+public sealed partial class BulkDeleteRoleRequestDescriptor : RequestDescriptor
+{
+ internal BulkDeleteRoleRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public BulkDeleteRoleRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkDeleteRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.bulk_delete_role";
+
+ public BulkDeleteRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ private ICollection NamesValue { get; set; }
+
+ ///
+ ///
+ /// An array of role names to delete
+ ///
+ ///
+ public BulkDeleteRoleRequestDescriptor Names(ICollection names)
+ {
+ NamesValue = names;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("names");
+ JsonSerializer.Serialize(writer, NamesValue, options);
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleResponse.g.cs
new file mode 100644
index 00000000000..4334b626ee3
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkDeleteRoleResponse.g.cs
@@ -0,0 +1,54 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class BulkDeleteRoleResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// Array of deleted roles
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("deleted")]
+ public IReadOnlyCollection? Deleted { get; init; }
+
+ ///
+ ///
+ /// Present if any deletes resulted in errors
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("errors")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.BulkError? Errors { get; init; }
+
+ ///
+ ///
+ /// Array of roles that could not be found
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("not_found")]
+ public IReadOnlyCollection? NotFound { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleRequest.g.cs
new file mode 100644
index 00000000000..0a15f6d6413
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleRequest.g.cs
@@ -0,0 +1,165 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class BulkPutRoleRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+/// The bulk create or update roles API cannot update roles that are defined in roles files.
+///
+///
+public sealed partial class BulkPutRoleRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkPutRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.bulk_put_role";
+
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+
+ ///
+ ///
+ /// A dictionary of role name to RoleDescriptor objects to add or update
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("roles")]
+ public IDictionary Roles { get; set; }
+}
+
+///
+///
+/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+/// The bulk create or update roles API cannot update roles that are defined in roles files.
+///
+///
+public sealed partial class BulkPutRoleRequestDescriptor : RequestDescriptor, BulkPutRoleRequestParameters>
+{
+ internal BulkPutRoleRequestDescriptor(Action> configure) => configure.Invoke(this);
+
+ public BulkPutRoleRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkPutRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.bulk_put_role";
+
+ public BulkPutRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ private IDictionary> RolesValue { get; set; }
+
+ ///
+ ///
+ /// A dictionary of role name to RoleDescriptor objects to add or update
+ ///
+ ///
+ public BulkPutRoleRequestDescriptor Roles(Func>, FluentDescriptorDictionary>> selector)
+ {
+ RolesValue = selector?.Invoke(new FluentDescriptorDictionary>());
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("roles");
+ JsonSerializer.Serialize(writer, RolesValue, options);
+ writer.WriteEndObject();
+ }
+}
+
+///
+///
+/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+/// The bulk create or update roles API cannot update roles that are defined in roles files.
+///
+///
+public sealed partial class BulkPutRoleRequestDescriptor : RequestDescriptor
+{
+ internal BulkPutRoleRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public BulkPutRoleRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityBulkPutRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.bulk_put_role";
+
+ public BulkPutRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ private IDictionary RolesValue { get; set; }
+
+ ///
+ ///
+ /// A dictionary of role name to RoleDescriptor objects to add or update
+ ///
+ ///
+ public BulkPutRoleRequestDescriptor Roles(Func, FluentDescriptorDictionary> selector)
+ {
+ RolesValue = selector?.Invoke(new FluentDescriptorDictionary());
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("roles");
+ JsonSerializer.Serialize(writer, RolesValue, options);
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleResponse.g.cs
new file mode 100644
index 00000000000..85ff7db5a44
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/BulkPutRoleResponse.g.cs
@@ -0,0 +1,62 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class BulkPutRoleResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// Array of created roles
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("created")]
+ public IReadOnlyCollection? Created { get; init; }
+
+ ///
+ ///
+ /// Present if any updates resulted in errors
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("errors")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.BulkError? Errors { get; init; }
+
+ ///
+ ///
+ /// Array of role names without any changes
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("noop")]
+ public IReadOnlyCollection? Noop { get; init; }
+
+ ///
+ ///
+ /// Array of updated roles
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("updated")]
+ public IReadOnlyCollection? Updated { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheRequest.g.cs
new file mode 100644
index 00000000000..4647a129f1b
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheRequest.g.cs
@@ -0,0 +1,88 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearApiKeyCacheRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Evicts a subset of all entries from the API key cache.
+/// The cache is also automatically cleared on state changes of the security index.
+///
+///
+public sealed partial class ClearApiKeyCacheRequest : PlainRequest
+{
+ public ClearApiKeyCacheRequest(Elastic.Clients.Elasticsearch.Serverless.Ids ids) : base(r => r.Required("ids", ids))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearApiKeyCache;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_api_key_cache";
+}
+
+///
+///
+/// Evicts a subset of all entries from the API key cache.
+/// The cache is also automatically cleared on state changes of the security index.
+///
+///
+public sealed partial class ClearApiKeyCacheRequestDescriptor : RequestDescriptor
+{
+ internal ClearApiKeyCacheRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public ClearApiKeyCacheRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Ids ids) : base(r => r.Required("ids", ids))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearApiKeyCache;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_api_key_cache";
+
+ public ClearApiKeyCacheRequestDescriptor Ids(Elastic.Clients.Elasticsearch.Serverless.Ids ids)
+ {
+ RouteValues.Required("ids", ids);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheResponse.g.cs
new file mode 100644
index 00000000000..e7dd4705bee
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearApiKeyCacheResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearApiKeyCacheResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("cluster_name")]
+ public string ClusterName { get; init; }
+ [JsonInclude, JsonPropertyName("nodes")]
+ public IReadOnlyDictionary Nodes { get; init; }
+ [JsonInclude, JsonPropertyName("_nodes")]
+ public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesRequest.g.cs
new file mode 100644
index 00000000000..cef156ee080
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesRequest.g.cs
@@ -0,0 +1,86 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedPrivilegesRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Evicts application privileges from the native application privileges cache.
+///
+///
+public sealed partial class ClearCachedPrivilegesRequest : PlainRequest
+{
+ public ClearCachedPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name application) : base(r => r.Required("application", application))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_privileges";
+}
+
+///
+///
+/// Evicts application privileges from the native application privileges cache.
+///
+///
+public sealed partial class ClearCachedPrivilegesRequestDescriptor : RequestDescriptor
+{
+ internal ClearCachedPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public ClearCachedPrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name application) : base(r => r.Required("application", application))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_privileges";
+
+ public ClearCachedPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name application)
+ {
+ RouteValues.Required("application", application);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesResponse.g.cs
new file mode 100644
index 00000000000..80153dbf93b
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedPrivilegesResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedPrivilegesResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("cluster_name")]
+ public string ClusterName { get; init; }
+ [JsonInclude, JsonPropertyName("nodes")]
+ public IReadOnlyDictionary Nodes { get; init; }
+ [JsonInclude, JsonPropertyName("_nodes")]
+ public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs
new file mode 100644
index 00000000000..38ff7ca998b
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsRequest.g.cs
@@ -0,0 +1,102 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedRealmsRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// Comma-separated list of usernames to clear from the cache
+ ///
+ ///
+ public ICollection? Usernames { get => Q?>("usernames"); set => Q("usernames", value); }
+}
+
+///
+///
+/// Evicts users from the user cache. Can completely clear the cache or evict specific users.
+///
+///
+public sealed partial class ClearCachedRealmsRequest : PlainRequest
+{
+ public ClearCachedRealmsRequest(Elastic.Clients.Elasticsearch.Serverless.Names realms) : base(r => r.Required("realms", realms))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRealms;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_realms";
+
+ ///
+ ///
+ /// Comma-separated list of usernames to clear from the cache
+ ///
+ ///
+ [JsonIgnore]
+ public ICollection? Usernames { get => Q?>("usernames"); set => Q("usernames", value); }
+}
+
+///
+///
+/// Evicts users from the user cache. Can completely clear the cache or evict specific users.
+///
+///
+public sealed partial class ClearCachedRealmsRequestDescriptor : RequestDescriptor
+{
+ internal ClearCachedRealmsRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public ClearCachedRealmsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names realms) : base(r => r.Required("realms", realms))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRealms;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_realms";
+
+ public ClearCachedRealmsRequestDescriptor Usernames(ICollection? usernames) => Qs("usernames", usernames);
+
+ public ClearCachedRealmsRequestDescriptor Realms(Elastic.Clients.Elasticsearch.Serverless.Names realms)
+ {
+ RouteValues.Required("realms", realms);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsResponse.g.cs
new file mode 100644
index 00000000000..efe1c3411eb
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRealmsResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedRealmsResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("cluster_name")]
+ public string ClusterName { get; init; }
+ [JsonInclude, JsonPropertyName("nodes")]
+ public IReadOnlyDictionary Nodes { get; init; }
+ [JsonInclude, JsonPropertyName("_nodes")]
+ public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesRequest.g.cs
new file mode 100644
index 00000000000..38e07e69001
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesRequest.g.cs
@@ -0,0 +1,86 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedRolesRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Evicts roles from the native role cache.
+///
+///
+public sealed partial class ClearCachedRolesRequest : PlainRequest
+{
+ public ClearCachedRolesRequest(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRoles;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_roles";
+}
+
+///
+///
+/// Evicts roles from the native role cache.
+///
+///
+public sealed partial class ClearCachedRolesRequestDescriptor : RequestDescriptor
+{
+ internal ClearCachedRolesRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public ClearCachedRolesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedRoles;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_roles";
+
+ public ClearCachedRolesRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name)
+ {
+ RouteValues.Required("name", name);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesResponse.g.cs
new file mode 100644
index 00000000000..e28b91f8337
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedRolesResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedRolesResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("cluster_name")]
+ public string ClusterName { get; init; }
+ [JsonInclude, JsonPropertyName("nodes")]
+ public IReadOnlyDictionary Nodes { get; init; }
+ [JsonInclude, JsonPropertyName("_nodes")]
+ public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs
new file mode 100644
index 00000000000..5bb0d3a44d7
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensRequest.g.cs
@@ -0,0 +1,98 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedServiceTokensRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Evicts tokens from the service account token caches.
+///
+///
+public sealed partial class ClearCachedServiceTokensRequest : PlainRequest
+{
+ public ClearCachedServiceTokensRequest(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedServiceTokens;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_service_tokens";
+}
+
+///
+///
+/// Evicts tokens from the service account token caches.
+///
+///
+public sealed partial class ClearCachedServiceTokensRequestDescriptor : RequestDescriptor
+{
+ internal ClearCachedServiceTokensRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public ClearCachedServiceTokensRequestDescriptor(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityClearCachedServiceTokens;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.clear_cached_service_tokens";
+
+ public ClearCachedServiceTokensRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name)
+ {
+ RouteValues.Required("name", name);
+ return Self;
+ }
+
+ public ClearCachedServiceTokensRequestDescriptor Namespace(string ns)
+ {
+ RouteValues.Required("namespace", ns);
+ return Self;
+ }
+
+ public ClearCachedServiceTokensRequestDescriptor Service(string service)
+ {
+ RouteValues.Required("service", service);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensResponse.g.cs
new file mode 100644
index 00000000000..a97f7495f65
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/ClearCachedServiceTokensResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class ClearCachedServiceTokensResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("cluster_name")]
+ public string ClusterName { get; init; }
+ [JsonInclude, JsonPropertyName("nodes")]
+ public IReadOnlyDictionary Nodes { get; init; }
+ [JsonInclude, JsonPropertyName("_nodes")]
+ public Elastic.Clients.Elasticsearch.Serverless.NodeStatistics NodeStats { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyRequest.g.cs
new file mode 100644
index 00000000000..1eee8df99aa
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyRequest.g.cs
@@ -0,0 +1,314 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class CreateApiKeyRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Create an API key.
+/// Creates an API key for access without requiring basic authentication.
+/// A successful request returns a JSON structure that contains the API key, its unique id, and its name.
+/// If applicable, it also returns expiration information for the API key in milliseconds.
+/// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
+///
+///
+public sealed partial class CreateApiKeyRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.create_api_key";
+
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+
+ ///
+ ///
+ /// Expiration time for the API key. By default, API keys never expire.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("expiration")]
+ public Elastic.Clients.Elasticsearch.Serverless.Duration? Expiration { get; set; }
+
+ ///
+ ///
+ /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("metadata")]
+ public IDictionary? Metadata { get; set; }
+
+ ///
+ ///
+ /// Specifies the name for this API key.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("name")]
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; }
+
+ ///
+ ///
+ /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("role_descriptors")]
+ public IDictionary? RoleDescriptors { get; set; }
+}
+
+///
+///
+/// Create an API key.
+/// Creates an API key for access without requiring basic authentication.
+/// A successful request returns a JSON structure that contains the API key, its unique id, and its name.
+/// If applicable, it also returns expiration information for the API key in milliseconds.
+/// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
+///
+///
+public sealed partial class CreateApiKeyRequestDescriptor : RequestDescriptor, CreateApiKeyRequestParameters>
+{
+ internal CreateApiKeyRequestDescriptor(Action> configure) => configure.Invoke(this);
+
+ public CreateApiKeyRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.create_api_key";
+
+ public CreateApiKeyRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ private Elastic.Clients.Elasticsearch.Serverless.Duration? ExpirationValue { get; set; }
+ private IDictionary? MetadataValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; }
+ private IDictionary> RoleDescriptorsValue { get; set; }
+
+ ///
+ ///
+ /// Expiration time for the API key. By default, API keys never expire.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Serverless.Duration? expiration)
+ {
+ ExpirationValue = expiration;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector)
+ {
+ MetadataValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ ///
+ ///
+ /// Specifies the name for this API key.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name)
+ {
+ NameValue = name;
+ return Self;
+ }
+
+ ///
+ ///
+ /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor RoleDescriptors(Func>, FluentDescriptorDictionary>> selector)
+ {
+ RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary>());
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (ExpirationValue is not null)
+ {
+ writer.WritePropertyName("expiration");
+ JsonSerializer.Serialize(writer, ExpirationValue, options);
+ }
+
+ if (MetadataValue is not null)
+ {
+ writer.WritePropertyName("metadata");
+ JsonSerializer.Serialize(writer, MetadataValue, options);
+ }
+
+ if (NameValue is not null)
+ {
+ writer.WritePropertyName("name");
+ JsonSerializer.Serialize(writer, NameValue, options);
+ }
+
+ if (RoleDescriptorsValue is not null)
+ {
+ writer.WritePropertyName("role_descriptors");
+ JsonSerializer.Serialize(writer, RoleDescriptorsValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+///
+///
+/// Create an API key.
+/// Creates an API key for access without requiring basic authentication.
+/// A successful request returns a JSON structure that contains the API key, its unique id, and its name.
+/// If applicable, it also returns expiration information for the API key in milliseconds.
+/// NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
+///
+///
+public sealed partial class CreateApiKeyRequestDescriptor : RequestDescriptor
+{
+ internal CreateApiKeyRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public CreateApiKeyRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.create_api_key";
+
+ public CreateApiKeyRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ private Elastic.Clients.Elasticsearch.Serverless.Duration? ExpirationValue { get; set; }
+ private IDictionary? MetadataValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; }
+ private IDictionary RoleDescriptorsValue { get; set; }
+
+ ///
+ ///
+ /// Expiration time for the API key. By default, API keys never expire.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor Expiration(Elastic.Clients.Elasticsearch.Serverless.Duration? expiration)
+ {
+ ExpirationValue = expiration;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor Metadata(Func, FluentDictionary> selector)
+ {
+ MetadataValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ ///
+ ///
+ /// Specifies the name for this API key.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name)
+ {
+ NameValue = name;
+ return Self;
+ }
+
+ ///
+ ///
+ /// An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
+ ///
+ ///
+ public CreateApiKeyRequestDescriptor RoleDescriptors(Func, FluentDescriptorDictionary> selector)
+ {
+ RoleDescriptorsValue = selector?.Invoke(new FluentDescriptorDictionary());
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (ExpirationValue is not null)
+ {
+ writer.WritePropertyName("expiration");
+ JsonSerializer.Serialize(writer, ExpirationValue, options);
+ }
+
+ if (MetadataValue is not null)
+ {
+ writer.WritePropertyName("metadata");
+ JsonSerializer.Serialize(writer, MetadataValue, options);
+ }
+
+ if (NameValue is not null)
+ {
+ writer.WritePropertyName("name");
+ JsonSerializer.Serialize(writer, NameValue, options);
+ }
+
+ if (RoleDescriptorsValue is not null)
+ {
+ writer.WritePropertyName("role_descriptors");
+ JsonSerializer.Serialize(writer, RoleDescriptorsValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyResponse.g.cs
new file mode 100644
index 00000000000..841689b990c
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateApiKeyResponse.g.cs
@@ -0,0 +1,72 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class CreateApiKeyResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// Generated API key.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("api_key")]
+ public string ApiKey { get; init; }
+
+ ///
+ ///
+ /// API key credentials which is the base64-encoding of
+ /// the UTF-8 representation of id and api_key joined
+ /// by a colon (:).
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("encoded")]
+ public string Encoded { get; init; }
+
+ ///
+ ///
+ /// Expiration in milliseconds for the API key.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("expiration")]
+ public long? Expiration { get; init; }
+
+ ///
+ ///
+ /// Unique ID for this API key.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("id")]
+ public string Id { get; init; }
+
+ ///
+ ///
+ /// Specifies the name for this API key.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("name")]
+ public string Name { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenRequest.g.cs
new file mode 100644
index 00000000000..fd4f499ab0a
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenRequest.g.cs
@@ -0,0 +1,122 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class CreateServiceTokenRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Creates a service accounts token for access without requiring basic authentication.
+///
+///
+public sealed partial class CreateServiceTokenRequest : PlainRequest
+{
+ public CreateServiceTokenRequest(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Required("namespace", ns).Required("service", service).Optional("name", name))
+ {
+ }
+
+ public CreateServiceTokenRequest(string ns, string service) : base(r => r.Required("namespace", ns).Required("service", service))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateServiceToken;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.create_service_token";
+
+ ///
+ ///
+ /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Creates a service accounts token for access without requiring basic authentication.
+///
+///
+public sealed partial class CreateServiceTokenRequestDescriptor : RequestDescriptor
+{
+ internal CreateServiceTokenRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public CreateServiceTokenRequestDescriptor(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name? name) : base(r => r.Required("namespace", ns).Required("service", service).Optional("name", name))
+ {
+ }
+
+ public CreateServiceTokenRequestDescriptor(string ns, string service) : base(r => r.Required("namespace", ns).Required("service", service))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityCreateServiceToken;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.create_service_token";
+
+ public CreateServiceTokenRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ public CreateServiceTokenRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name)
+ {
+ RouteValues.Optional("name", name);
+ return Self;
+ }
+
+ public CreateServiceTokenRequestDescriptor Namespace(string ns)
+ {
+ RouteValues.Required("namespace", ns);
+ return Self;
+ }
+
+ public CreateServiceTokenRequestDescriptor Service(string service)
+ {
+ RouteValues.Required("service", service);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenResponse.g.cs
new file mode 100644
index 00000000000..14ddc24ddc3
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/CreateServiceTokenResponse.g.cs
@@ -0,0 +1,35 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class CreateServiceTokenResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("created")]
+ public bool Created { get; init; }
+ [JsonInclude, JsonPropertyName("token")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.ServiceToken Token { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesRequest.g.cs
new file mode 100644
index 00000000000..3ba1aaaa1cf
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesRequest.g.cs
@@ -0,0 +1,108 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeletePrivilegesRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Removes application privileges.
+///
+///
+public sealed partial class DeletePrivilegesRequest : PlainRequest
+{
+ public DeletePrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name application, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("application", application).Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeletePrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_privileges";
+
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Removes application privileges.
+///
+///
+public sealed partial class DeletePrivilegesRequestDescriptor : RequestDescriptor
+{
+ internal DeletePrivilegesRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public DeletePrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name application, Elastic.Clients.Elasticsearch.Serverless.Names name) : base(r => r.Required("application", application).Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeletePrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_privileges";
+
+ public DeletePrivilegesRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ public DeletePrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name application)
+ {
+ RouteValues.Required("application", application);
+ return Self;
+ }
+
+ public DeletePrivilegesRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names name)
+ {
+ RouteValues.Required("name", name);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesResponse.g.cs
new file mode 100644
index 00000000000..71fa169150a
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeletePrivilegesResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeletePrivilegesResponse : DictionaryResponse>
+{
+ public DeletePrivilegesResponse(IReadOnlyDictionary> dictionary) : base(dictionary)
+ {
+ }
+
+ public DeletePrivilegesResponse() : base()
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs
new file mode 100644
index 00000000000..b9f237e97a6
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingRequest.g.cs
@@ -0,0 +1,102 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeleteRoleMappingRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Removes role mappings.
+///
+///
+public sealed partial class DeleteRoleMappingRequest : PlainRequest
+{
+ public DeleteRoleMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRoleMapping;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_role_mapping";
+
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Removes role mappings.
+///
+///
+public sealed partial class DeleteRoleMappingRequestDescriptor : RequestDescriptor
+{
+ internal DeleteRoleMappingRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public DeleteRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRoleMapping;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_role_mapping";
+
+ public DeleteRoleMappingRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ public DeleteRoleMappingRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name)
+ {
+ RouteValues.Required("name", name);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs
new file mode 100644
index 00000000000..69ec38d8224
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleMappingResponse.g.cs
@@ -0,0 +1,33 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeleteRoleMappingResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("found")]
+ public bool Found { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleRequest.g.cs
new file mode 100644
index 00000000000..50ac48cefc1
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleRequest.g.cs
@@ -0,0 +1,102 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeleteRoleRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Removes roles in the native realm.
+///
+///
+public sealed partial class DeleteRoleRequest : PlainRequest
+{
+ public DeleteRoleRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_role";
+
+ ///
+ ///
+ /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Removes roles in the native realm.
+///
+///
+public sealed partial class DeleteRoleRequestDescriptor : RequestDescriptor
+{
+ internal DeleteRoleRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public DeleteRoleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_role";
+
+ public DeleteRoleRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ public DeleteRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name)
+ {
+ RouteValues.Required("name", name);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleResponse.g.cs
new file mode 100644
index 00000000000..e7fc61a464e
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteRoleResponse.g.cs
@@ -0,0 +1,33 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeleteRoleResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("found")]
+ public bool Found { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenRequest.g.cs
new file mode 100644
index 00000000000..11073804c2b
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenRequest.g.cs
@@ -0,0 +1,114 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeleteServiceTokenRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Deletes a service account token.
+///
+///
+public sealed partial class DeleteServiceTokenRequest : PlainRequest
+{
+ public DeleteServiceTokenRequest(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteServiceToken;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_service_token";
+
+ ///
+ ///
+ /// If true then refresh the affected shards to make this operation visible to search, if wait_for (the default) then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Deletes a service account token.
+///
+///
+public sealed partial class DeleteServiceTokenRequestDescriptor : RequestDescriptor
+{
+ internal DeleteServiceTokenRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public DeleteServiceTokenRequestDescriptor(string ns, string service, Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("namespace", ns).Required("service", service).Required("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDeleteServiceToken;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.delete_service_token";
+
+ public DeleteServiceTokenRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ public DeleteServiceTokenRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name)
+ {
+ RouteValues.Required("name", name);
+ return Self;
+ }
+
+ public DeleteServiceTokenRequestDescriptor Namespace(string ns)
+ {
+ RouteValues.Required("namespace", ns);
+ return Self;
+ }
+
+ public DeleteServiceTokenRequestDescriptor Service(string service)
+ {
+ RouteValues.Required("service", service);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs
new file mode 100644
index 00000000000..26b35f9f977
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DeleteServiceTokenResponse.g.cs
@@ -0,0 +1,33 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DeleteServiceTokenResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("found")]
+ public bool Found { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileRequest.g.cs
new file mode 100644
index 00000000000..fc3ed9282be
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileRequest.g.cs
@@ -0,0 +1,106 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DisableUserProfileRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If 'true', Elasticsearch refreshes the affected shards to make this operation
+ /// visible to search, if 'wait_for' then wait for a refresh to make this operation
+ /// visible to search, if 'false' do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Disables a user profile so it's not visible in user profile searches.
+///
+///
+public sealed partial class DisableUserProfileRequest : PlainRequest
+{
+ public DisableUserProfileRequest(string uid) : base(r => r.Required("uid", uid))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDisableUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.disable_user_profile";
+
+ ///
+ ///
+ /// If 'true', Elasticsearch refreshes the affected shards to make this operation
+ /// visible to search, if 'wait_for' then wait for a refresh to make this operation
+ /// visible to search, if 'false' do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Disables a user profile so it's not visible in user profile searches.
+///
+///
+public sealed partial class DisableUserProfileRequestDescriptor : RequestDescriptor
+{
+ internal DisableUserProfileRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public DisableUserProfileRequestDescriptor(string uid) : base(r => r.Required("uid", uid))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityDisableUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.disable_user_profile";
+
+ public DisableUserProfileRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ public DisableUserProfileRequestDescriptor Uid(string uid)
+ {
+ RouteValues.Required("uid", uid);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileResponse.g.cs
new file mode 100644
index 00000000000..13e6c139b7f
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/DisableUserProfileResponse.g.cs
@@ -0,0 +1,38 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class DisableUserProfileResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// For a successful response, this value is always true. On failure, an exception is returned instead.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("acknowledged")]
+ public bool Acknowledged { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileRequest.g.cs
new file mode 100644
index 00000000000..2263cb4aa2b
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileRequest.g.cs
@@ -0,0 +1,106 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class EnableUserProfileRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// If 'true', Elasticsearch refreshes the affected shards to make this operation
+ /// visible to search, if 'wait_for' then wait for a refresh to make this operation
+ /// visible to search, if 'false' do nothing with refreshes.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Enables a user profile so it's visible in user profile searches.
+///
+///
+public sealed partial class EnableUserProfileRequest : PlainRequest
+{
+ public EnableUserProfileRequest(string uid) : base(r => r.Required("uid", uid))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityEnableUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.enable_user_profile";
+
+ ///
+ ///
+ /// If 'true', Elasticsearch refreshes the affected shards to make this operation
+ /// visible to search, if 'wait_for' then wait for a refresh to make this operation
+ /// visible to search, if 'false' do nothing with refreshes.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Refresh? Refresh { get => Q("refresh"); set => Q("refresh", value); }
+}
+
+///
+///
+/// Enables a user profile so it's visible in user profile searches.
+///
+///
+public sealed partial class EnableUserProfileRequestDescriptor : RequestDescriptor
+{
+ internal EnableUserProfileRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public EnableUserProfileRequestDescriptor(string uid) : base(r => r.Required("uid", uid))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityEnableUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.enable_user_profile";
+
+ public EnableUserProfileRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Serverless.Refresh? refresh) => Qs("refresh", refresh);
+
+ public EnableUserProfileRequestDescriptor Uid(string uid)
+ {
+ RouteValues.Required("uid", uid);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileResponse.g.cs
new file mode 100644
index 00000000000..4296ea9afc1
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/EnableUserProfileResponse.g.cs
@@ -0,0 +1,38 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class EnableUserProfileResponse : ElasticsearchResponse
+{
+ ///
+ ///
+ /// For a successful response, this value is always true. On failure, an exception is returned instead.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("acknowledged")]
+ public bool Acknowledged { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyRequest.g.cs
new file mode 100644
index 00000000000..ab5a750f0b6
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyRequest.g.cs
@@ -0,0 +1,228 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetApiKeyRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as owner or name. If active_only is false, the response will include both active and inactive (expired or invalidated) keys.
+ ///
+ ///
+ public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); }
+
+ ///
+ ///
+ /// An API key id.
+ /// This parameter cannot be used with any of name, realm_name or username.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get => Q("id"); set => Q("id", value); }
+
+ ///
+ ///
+ /// An API key name.
+ /// This parameter cannot be used with any of id, realm_name or username.
+ /// It supports prefix search with wildcard.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get => Q("name"); set => Q("name", value); }
+
+ ///
+ ///
+ /// A boolean flag that can be used to query API keys owned by the currently authenticated user.
+ /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones.
+ ///
+ ///
+ public bool? Owner { get => Q("owner"); set => Q("owner", value); }
+
+ ///
+ ///
+ /// The name of an authentication realm.
+ /// This parameter cannot be used with either id or name or when owner flag is set to true.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Name? RealmName { get => Q("realm_name"); set => Q("realm_name", value); }
+
+ ///
+ ///
+ /// The username of a user.
+ /// This parameter cannot be used with either id or name or when owner flag is set to true.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get => Q("username"); set => Q("username", value); }
+
+ ///
+ ///
+ /// Return the snapshot of the owner user's role descriptors
+ /// associated with the API key. An API key's actual
+ /// permission is the intersection of its assigned role
+ /// descriptors and the owner user's role descriptors.
+ ///
+ ///
+ public bool? WithLimitedBy { get => Q("with_limited_by"); set => Q("with_limited_by", value); }
+
+ ///
+ ///
+ /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
+ ///
+ ///
+ public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); }
+}
+
+///
+///
+/// Get API key information.
+/// Retrieves information for one or more API keys.
+/// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own.
+/// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership.
+///
+///
+public sealed partial class GetApiKeyRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_api_key";
+
+ ///
+ ///
+ /// A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as owner or name. If active_only is false, the response will include both active and inactive (expired or invalidated) keys.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? ActiveOnly { get => Q("active_only"); set => Q("active_only", value); }
+
+ ///
+ ///
+ /// An API key id.
+ /// This parameter cannot be used with any of name, realm_name or username.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Id? Id { get => Q("id"); set => Q("id", value); }
+
+ ///
+ ///
+ /// An API key name.
+ /// This parameter cannot be used with any of id, realm_name or username.
+ /// It supports prefix search with wildcard.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get => Q("name"); set => Q("name", value); }
+
+ ///
+ ///
+ /// A boolean flag that can be used to query API keys owned by the currently authenticated user.
+ /// The realm_name or username parameters cannot be specified when this parameter is set to true as they are assumed to be the currently authenticated ones.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? Owner { get => Q("owner"); set => Q("owner", value); }
+
+ ///
+ ///
+ /// The name of an authentication realm.
+ /// This parameter cannot be used with either id or name or when owner flag is set to true.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Name? RealmName { get => Q("realm_name"); set => Q("realm_name", value); }
+
+ ///
+ ///
+ /// The username of a user.
+ /// This parameter cannot be used with either id or name or when owner flag is set to true.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get => Q("username"); set => Q("username", value); }
+
+ ///
+ ///
+ /// Return the snapshot of the owner user's role descriptors
+ /// associated with the API key. An API key's actual
+ /// permission is the intersection of its assigned role
+ /// descriptors and the owner user's role descriptors.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? WithLimitedBy { get => Q("with_limited_by"); set => Q("with_limited_by", value); }
+
+ ///
+ ///
+ /// Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
+ ///
+ ///
+ [JsonIgnore]
+ public bool? WithProfileUid { get => Q("with_profile_uid"); set => Q("with_profile_uid", value); }
+}
+
+///
+///
+/// Get API key information.
+/// Retrieves information for one or more API keys.
+/// NOTE: If you have only the manage_own_api_key privilege, this API returns only the API keys that you own.
+/// If you have read_security, manage_api_key or greater privileges (including manage_security), this API returns all API keys regardless of ownership.
+///
+///
+public sealed partial class GetApiKeyRequestDescriptor : RequestDescriptor
+{
+ internal GetApiKeyRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetApiKeyRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_api_key";
+
+ public GetApiKeyRequestDescriptor ActiveOnly(bool? activeOnly = true) => Qs("active_only", activeOnly);
+ public GetApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id) => Qs("id", id);
+ public GetApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) => Qs("name", name);
+ public GetApiKeyRequestDescriptor Owner(bool? owner = true) => Qs("owner", owner);
+ public GetApiKeyRequestDescriptor RealmName(Elastic.Clients.Elasticsearch.Serverless.Name? realmName) => Qs("realm_name", realmName);
+ public GetApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username) => Qs("username", username);
+ public GetApiKeyRequestDescriptor WithLimitedBy(bool? withLimitedBy = true) => Qs("with_limited_by", withLimitedBy);
+ public GetApiKeyRequestDescriptor WithProfileUid(bool? withProfileUid = true) => Qs("with_profile_uid", withProfileUid);
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyResponse.g.cs
new file mode 100644
index 00000000000..38a73ca81a9
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetApiKeyResponse.g.cs
@@ -0,0 +1,33 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetApiKeyResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("api_keys")]
+ public IReadOnlyCollection ApiKeys { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesRequest.g.cs
new file mode 100644
index 00000000000..26bff95de4f
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesRequest.g.cs
@@ -0,0 +1,76 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetBuiltinPrivilegesRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
+///
+///
+public sealed partial class GetBuiltinPrivilegesRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetBuiltinPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_builtin_privileges";
+}
+
+///
+///
+/// Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
+///
+///
+public sealed partial class GetBuiltinPrivilegesRequestDescriptor : RequestDescriptor
+{
+ internal GetBuiltinPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetBuiltinPrivilegesRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetBuiltinPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_builtin_privileges";
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs
new file mode 100644
index 00000000000..36890a6be56
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs
@@ -0,0 +1,36 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetBuiltinPrivilegesResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("cluster")]
+ public IReadOnlyCollection Cluster { get; init; }
+ [JsonInclude, JsonPropertyName("index")]
+ [SingleOrManyCollectionConverter(typeof(string))]
+ public IReadOnlyCollection Indices { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesRequest.g.cs
new file mode 100644
index 00000000000..ec87394ca9e
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesRequest.g.cs
@@ -0,0 +1,104 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetPrivilegesRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Retrieves application privileges.
+///
+///
+public sealed partial class GetPrivilegesRequest : PlainRequest
+{
+ public GetPrivilegesRequest()
+ {
+ }
+
+ public GetPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name? application) : base(r => r.Optional("application", application))
+ {
+ }
+
+ public GetPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name? application, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("application", application).Optional("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_privileges";
+}
+
+///
+///
+/// Retrieves application privileges.
+///
+///
+public sealed partial class GetPrivilegesRequestDescriptor : RequestDescriptor
+{
+ internal GetPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetPrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? application, Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("application", application).Optional("name", name))
+ {
+ }
+
+ public GetPrivilegesRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_privileges";
+
+ public GetPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name? application)
+ {
+ RouteValues.Optional("application", application);
+ return Self;
+ }
+
+ public GetPrivilegesRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name)
+ {
+ RouteValues.Optional("name", name);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesResponse.g.cs
new file mode 100644
index 00000000000..90136141d25
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetPrivilegesResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetPrivilegesResponse : DictionaryResponse>
+{
+ public GetPrivilegesResponse(IReadOnlyDictionary> dictionary) : base(dictionary)
+ {
+ }
+
+ public GetPrivilegesResponse() : base()
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingRequest.g.cs
new file mode 100644
index 00000000000..a1a2f9bf581
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingRequest.g.cs
@@ -0,0 +1,94 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetRoleMappingRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Retrieves role mappings.
+///
+///
+public sealed partial class GetRoleMappingRequest : PlainRequest
+{
+ public GetRoleMappingRequest()
+ {
+ }
+
+ public GetRoleMappingRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRoleMapping;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_role_mapping";
+}
+
+///
+///
+/// Retrieves role mappings.
+///
+///
+public sealed partial class GetRoleMappingRequestDescriptor : RequestDescriptor
+{
+ internal GetRoleMappingRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name))
+ {
+ }
+
+ public GetRoleMappingRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRoleMapping;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_role_mapping";
+
+ public GetRoleMappingRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name)
+ {
+ RouteValues.Optional("name", name);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingResponse.g.cs
new file mode 100644
index 00000000000..f7780fbe01a
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleMappingResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetRoleMappingResponse : DictionaryResponse
+{
+ public GetRoleMappingResponse(IReadOnlyDictionary dictionary) : base(dictionary)
+ {
+ }
+
+ public GetRoleMappingResponse() : base()
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleRequest.g.cs
new file mode 100644
index 00000000000..3b86f9ba8c9
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleRequest.g.cs
@@ -0,0 +1,96 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetRoleRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+/// The get roles API cannot retrieve roles that are defined in roles files.
+///
+///
+public sealed partial class GetRoleRequest : PlainRequest
+{
+ public GetRoleRequest()
+ {
+ }
+
+ public GetRoleRequest(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_role";
+}
+
+///
+///
+/// The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
+/// The get roles API cannot retrieve roles that are defined in roles files.
+///
+///
+public sealed partial class GetRoleRequestDescriptor : RequestDescriptor
+{
+ internal GetRoleRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetRoleRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Names? name) : base(r => r.Optional("name", name))
+ {
+ }
+
+ public GetRoleRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetRole;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_role";
+
+ public GetRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Names? name)
+ {
+ RouteValues.Optional("name", name);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleResponse.g.cs
new file mode 100644
index 00000000000..4cca8aab744
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetRoleResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetRoleResponse : DictionaryResponse
+{
+ public GetRoleResponse(IReadOnlyDictionary dictionary) : base(dictionary)
+ {
+ }
+
+ public GetRoleResponse() : base()
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsRequest.g.cs
new file mode 100644
index 00000000000..af9fd73de29
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsRequest.g.cs
@@ -0,0 +1,104 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetServiceAccountsRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// This API returns a list of service accounts that match the provided path parameter(s).
+///
+///
+public sealed partial class GetServiceAccountsRequest : PlainRequest
+{
+ public GetServiceAccountsRequest()
+ {
+ }
+
+ public GetServiceAccountsRequest(string? ns, string? service) : base(r => r.Optional("namespace", ns).Optional("service", service))
+ {
+ }
+
+ public GetServiceAccountsRequest(string? ns) : base(r => r.Optional("namespace", ns))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceAccounts;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_service_accounts";
+}
+
+///
+///
+/// This API returns a list of service accounts that match the provided path parameter(s).
+///
+///
+public sealed partial class GetServiceAccountsRequestDescriptor : RequestDescriptor
+{
+ internal GetServiceAccountsRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetServiceAccountsRequestDescriptor(string? ns, string? service) : base(r => r.Optional("namespace", ns).Optional("service", service))
+ {
+ }
+
+ public GetServiceAccountsRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceAccounts;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_service_accounts";
+
+ public GetServiceAccountsRequestDescriptor Namespace(string? ns)
+ {
+ RouteValues.Optional("namespace", ns);
+ return Self;
+ }
+
+ public GetServiceAccountsRequestDescriptor Service(string? service)
+ {
+ RouteValues.Optional("service", service);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsResponse.g.cs
new file mode 100644
index 00000000000..0a2df0874be
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceAccountsResponse.g.cs
@@ -0,0 +1,37 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetServiceAccountsResponse : DictionaryResponse
+{
+ public GetServiceAccountsResponse(IReadOnlyDictionary dictionary) : base(dictionary)
+ {
+ }
+
+ public GetServiceAccountsResponse() : base()
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs
new file mode 100644
index 00000000000..f790f6794c9
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsRequest.g.cs
@@ -0,0 +1,92 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetServiceCredentialsRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Retrieves information of all service credentials for a service account.
+///
+///
+public sealed partial class GetServiceCredentialsRequest : PlainRequest
+{
+ public GetServiceCredentialsRequest(string ns, Elastic.Clients.Elasticsearch.Serverless.Name service) : base(r => r.Required("namespace", ns).Required("service", service))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceCredentials;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_service_credentials";
+}
+
+///
+///
+/// Retrieves information of all service credentials for a service account.
+///
+///
+public sealed partial class GetServiceCredentialsRequestDescriptor : RequestDescriptor
+{
+ internal GetServiceCredentialsRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetServiceCredentialsRequestDescriptor(string ns, Elastic.Clients.Elasticsearch.Serverless.Name service) : base(r => r.Required("namespace", ns).Required("service", service))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetServiceCredentials;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_service_credentials";
+
+ public GetServiceCredentialsRequestDescriptor Namespace(string ns)
+ {
+ RouteValues.Required("namespace", ns);
+ return Self;
+ }
+
+ public GetServiceCredentialsRequestDescriptor Service(Elastic.Clients.Elasticsearch.Serverless.Name service)
+ {
+ RouteValues.Required("service", service);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs
new file mode 100644
index 00000000000..02af7395fcc
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetServiceCredentialsResponse.g.cs
@@ -0,0 +1,45 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetServiceCredentialsResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("count")]
+ public int Count { get; init; }
+
+ ///
+ ///
+ /// Contains service account credentials collected from all nodes of the cluster
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("nodes_credentials")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.NodesCredentials NodesCredentials { get; init; }
+ [JsonInclude, JsonPropertyName("service_account")]
+ public string ServiceAccount { get; init; }
+ [JsonInclude, JsonPropertyName("tokens")]
+ public IReadOnlyDictionary> Tokens { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenRequest.g.cs
new file mode 100644
index 00000000000..3b89a43486b
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenRequest.g.cs
@@ -0,0 +1,170 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetTokenRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Creates a bearer token for access without requiring basic authentication.
+///
+///
+public sealed partial class GetTokenRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetToken;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.get_token";
+
+ [JsonInclude, JsonPropertyName("grant_type")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.AccessTokenGrantType? GrantType { get; set; }
+ [JsonInclude, JsonPropertyName("kerberos_ticket")]
+ public string? KerberosTicket { get; set; }
+ [JsonInclude, JsonPropertyName("password")]
+ public string? Password { get; set; }
+ [JsonInclude, JsonPropertyName("refresh_token")]
+ public string? RefreshToken { get; set; }
+ [JsonInclude, JsonPropertyName("scope")]
+ public string? Scope { get; set; }
+ [JsonInclude, JsonPropertyName("username")]
+ public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get; set; }
+}
+
+///
+///
+/// Creates a bearer token for access without requiring basic authentication.
+///
+///
+public sealed partial class GetTokenRequestDescriptor : RequestDescriptor
+{
+ internal GetTokenRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetTokenRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetToken;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.get_token";
+
+ private Elastic.Clients.Elasticsearch.Serverless.Security.AccessTokenGrantType? GrantTypeValue { get; set; }
+ private string? KerberosTicketValue { get; set; }
+ private string? PasswordValue { get; set; }
+ private string? RefreshTokenValue { get; set; }
+ private string? ScopeValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; }
+
+ public GetTokenRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.AccessTokenGrantType? grantType)
+ {
+ GrantTypeValue = grantType;
+ return Self;
+ }
+
+ public GetTokenRequestDescriptor KerberosTicket(string? kerberosTicket)
+ {
+ KerberosTicketValue = kerberosTicket;
+ return Self;
+ }
+
+ public GetTokenRequestDescriptor Password(string? password)
+ {
+ PasswordValue = password;
+ return Self;
+ }
+
+ public GetTokenRequestDescriptor RefreshToken(string? refreshToken)
+ {
+ RefreshTokenValue = refreshToken;
+ return Self;
+ }
+
+ public GetTokenRequestDescriptor Scope(string? scope)
+ {
+ ScopeValue = scope;
+ return Self;
+ }
+
+ public GetTokenRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username)
+ {
+ UsernameValue = username;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (GrantTypeValue is not null)
+ {
+ writer.WritePropertyName("grant_type");
+ JsonSerializer.Serialize(writer, GrantTypeValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(KerberosTicketValue))
+ {
+ writer.WritePropertyName("kerberos_ticket");
+ writer.WriteStringValue(KerberosTicketValue);
+ }
+
+ if (!string.IsNullOrEmpty(PasswordValue))
+ {
+ writer.WritePropertyName("password");
+ writer.WriteStringValue(PasswordValue);
+ }
+
+ if (!string.IsNullOrEmpty(RefreshTokenValue))
+ {
+ writer.WritePropertyName("refresh_token");
+ writer.WriteStringValue(RefreshTokenValue);
+ }
+
+ if (!string.IsNullOrEmpty(ScopeValue))
+ {
+ writer.WritePropertyName("scope");
+ writer.WriteStringValue(ScopeValue);
+ }
+
+ if (UsernameValue is not null)
+ {
+ writer.WritePropertyName("username");
+ JsonSerializer.Serialize(writer, UsernameValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenResponse.g.cs
new file mode 100644
index 00000000000..36728c4b664
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetTokenResponse.g.cs
@@ -0,0 +1,45 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetTokenResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("access_token")]
+ public string AccessToken { get; init; }
+ [JsonInclude, JsonPropertyName("authentication")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.AuthenticatedUser Authentication { get; init; }
+ [JsonInclude, JsonPropertyName("expires_in")]
+ public long ExpiresIn { get; init; }
+ [JsonInclude, JsonPropertyName("kerberos_authentication_response_token")]
+ public string? KerberosAuthenticationResponseToken { get; init; }
+ [JsonInclude, JsonPropertyName("refresh_token")]
+ public string? RefreshToken { get; init; }
+ [JsonInclude, JsonPropertyName("scope")]
+ public string? Scope { get; init; }
+ [JsonInclude, JsonPropertyName("type")]
+ public string Type { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs
new file mode 100644
index 00000000000..9b3f5475ff9
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesRequest.g.cs
@@ -0,0 +1,112 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetUserPrivilegesRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Application { get => Q("application"); set => Q("application", value); }
+
+ ///
+ ///
+ /// The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application.
+ ///
+ ///
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Priviledge { get => Q("priviledge"); set => Q("priviledge", value); }
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Username { get => Q("username"); set => Q("username", value); }
+}
+
+///
+///
+/// Retrieves security privileges for the logged in user.
+///
+///
+public sealed partial class GetUserPrivilegesRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_user_privileges";
+
+ ///
+ ///
+ /// The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Application { get => Q("application"); set => Q("application", value); }
+
+ ///
+ ///
+ /// The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application.
+ ///
+ ///
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Priviledge { get => Q("priviledge"); set => Q("priviledge", value); }
+ [JsonIgnore]
+ public Elastic.Clients.Elasticsearch.Serverless.Name? Username { get => Q("username"); set => Q("username", value); }
+}
+
+///
+///
+/// Retrieves security privileges for the logged in user.
+///
+///
+public sealed partial class GetUserPrivilegesRequestDescriptor : RequestDescriptor
+{
+ internal GetUserPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetUserPrivilegesRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_user_privileges";
+
+ public GetUserPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Name? application) => Qs("application", application);
+ public GetUserPrivilegesRequestDescriptor Priviledge(Elastic.Clients.Elasticsearch.Serverless.Name? priviledge) => Qs("priviledge", priviledge);
+ public GetUserPrivilegesRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Name? username) => Qs("username", username);
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs
new file mode 100644
index 00000000000..308ab397b53
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserPrivilegesResponse.g.cs
@@ -0,0 +1,41 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetUserPrivilegesResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("applications")]
+ public IReadOnlyCollection Applications { get; init; }
+ [JsonInclude, JsonPropertyName("cluster")]
+ public IReadOnlyCollection Cluster { get; init; }
+ [JsonInclude, JsonPropertyName("global")]
+ public IReadOnlyCollection Global { get; init; }
+ [JsonInclude, JsonPropertyName("indices")]
+ public IReadOnlyCollection Indices { get; init; }
+ [JsonInclude, JsonPropertyName("run_as")]
+ public IReadOnlyCollection RunAs { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileRequest.g.cs
new file mode 100644
index 00000000000..d1fdb32c053
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileRequest.g.cs
@@ -0,0 +1,108 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetUserProfileRequestParameters : RequestParameters
+{
+ ///
+ ///
+ /// List of filters for the data field of the profile document.
+ /// To return all content use data=*. To return a subset of content
+ /// use data=<key> to retrieve content nested under the specified <key>.
+ /// By default returns no data content.
+ ///
+ ///
+ public ICollection? Data { get => Q?>("data"); set => Q("data", value); }
+}
+
+///
+///
+/// Retrieves a user's profile using the unique profile ID.
+///
+///
+public sealed partial class GetUserProfileRequest : PlainRequest
+{
+ public GetUserProfileRequest(IReadOnlyCollection uid) : base(r => r.Required("uid", uid))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_user_profile";
+
+ ///
+ ///
+ /// List of filters for the data field of the profile document.
+ /// To return all content use data=*. To return a subset of content
+ /// use data=<key> to retrieve content nested under the specified <key>.
+ /// By default returns no data content.
+ ///
+ ///
+ [JsonIgnore]
+ public ICollection? Data { get => Q?>("data"); set => Q("data", value); }
+}
+
+///
+///
+/// Retrieves a user's profile using the unique profile ID.
+///
+///
+public sealed partial class GetUserProfileRequestDescriptor : RequestDescriptor
+{
+ internal GetUserProfileRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GetUserProfileRequestDescriptor(IReadOnlyCollection uid) : base(r => r.Required("uid", uid))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGetUserProfile;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.GET;
+
+ internal override bool SupportsBody => false;
+
+ internal override string OperationName => "security.get_user_profile";
+
+ public GetUserProfileRequestDescriptor Data(ICollection? data) => Qs("data", data);
+
+ public GetUserProfileRequestDescriptor Uid(IReadOnlyCollection uid)
+ {
+ RouteValues.Required("uid", uid);
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileResponse.g.cs
new file mode 100644
index 00000000000..de77684beab
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetUserProfileResponse.g.cs
@@ -0,0 +1,35 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GetUserProfileResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("errors")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.GetUserProfileErrors? Errors { get; init; }
+ [JsonInclude, JsonPropertyName("profiles")]
+ public IReadOnlyCollection Profiles { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyRequest.g.cs
new file mode 100644
index 00000000000..dc869cec5ba
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyRequest.g.cs
@@ -0,0 +1,484 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GrantApiKeyRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Creates an API key on behalf of another user.
+/// This API is similar to Create API keys, however it creates the API key for a user that is different than the user that runs the API.
+/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created.
+/// It is not possible to use this API to create an API key without that user’s credentials.
+/// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user.
+/// In this case, the API key will be created on behalf of the impersonated user.
+///
+///
+/// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
+///
+///
+/// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.
+/// If applicable, it also returns expiration information for the API key in milliseconds.
+///
+///
+/// By default, API keys never expire. You can specify expiration information when you create the API keys.
+///
+///
+public sealed partial class GrantApiKeyRequest : PlainRequest
+{
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGrantApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.grant_api_key";
+
+ ///
+ ///
+ /// The user’s access token.
+ /// If you specify the access_token grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("access_token")]
+ public string? AccessToken { get; set; }
+
+ ///
+ ///
+ /// Defines the API key.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("api_key")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey ApiKey { get; set; }
+
+ ///
+ ///
+ /// The type of grant. Supported grant types are: access_token, password.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("grant_type")]
+ public Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType GrantType { get; set; }
+
+ ///
+ ///
+ /// The user’s password. If you specify the password grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("password")]
+ public string? Password { get; set; }
+
+ ///
+ ///
+ /// The name of the user to be impersonated.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("run_as")]
+ public Elastic.Clients.Elasticsearch.Serverless.Username? RunAs { get; set; }
+
+ ///
+ ///
+ /// The user name that identifies the user.
+ /// If you specify the password grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("username")]
+ public Elastic.Clients.Elasticsearch.Serverless.Username? Username { get; set; }
+}
+
+///
+///
+/// Creates an API key on behalf of another user.
+/// This API is similar to Create API keys, however it creates the API key for a user that is different than the user that runs the API.
+/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created.
+/// It is not possible to use this API to create an API key without that user’s credentials.
+/// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user.
+/// In this case, the API key will be created on behalf of the impersonated user.
+///
+///
+/// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
+///
+///
+/// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.
+/// If applicable, it also returns expiration information for the API key in milliseconds.
+///
+///
+/// By default, API keys never expire. You can specify expiration information when you create the API keys.
+///
+///
+public sealed partial class GrantApiKeyRequestDescriptor : RequestDescriptor, GrantApiKeyRequestParameters>
+{
+ internal GrantApiKeyRequestDescriptor(Action> configure) => configure.Invoke(this);
+
+ public GrantApiKeyRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGrantApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.grant_api_key";
+
+ private string? AccessTokenValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey ApiKeyValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor ApiKeyDescriptor { get; set; }
+ private Action> ApiKeyDescriptorAction { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType GrantTypeValue { get; set; }
+ private string? PasswordValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Username? RunAsValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; }
+
+ ///
+ ///
+ /// The user’s access token.
+ /// If you specify the access_token grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor AccessToken(string? accessToken)
+ {
+ AccessTokenValue = accessToken;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Defines the API key.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey apiKey)
+ {
+ ApiKeyDescriptor = null;
+ ApiKeyDescriptorAction = null;
+ ApiKeyValue = apiKey;
+ return Self;
+ }
+
+ public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor descriptor)
+ {
+ ApiKeyValue = null;
+ ApiKeyDescriptorAction = null;
+ ApiKeyDescriptor = descriptor;
+ return Self;
+ }
+
+ public GrantApiKeyRequestDescriptor ApiKey(Action> configure)
+ {
+ ApiKeyValue = null;
+ ApiKeyDescriptor = null;
+ ApiKeyDescriptorAction = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The type of grant. Supported grant types are: access_token, password.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType grantType)
+ {
+ GrantTypeValue = grantType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The user’s password. If you specify the password grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor Password(string? password)
+ {
+ PasswordValue = password;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The name of the user to be impersonated.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor RunAs(Elastic.Clients.Elasticsearch.Serverless.Username? runAs)
+ {
+ RunAsValue = runAs;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The user name that identifies the user.
+ /// If you specify the password grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username)
+ {
+ UsernameValue = username;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (!string.IsNullOrEmpty(AccessTokenValue))
+ {
+ writer.WritePropertyName("access_token");
+ writer.WriteStringValue(AccessTokenValue);
+ }
+
+ if (ApiKeyDescriptor is not null)
+ {
+ writer.WritePropertyName("api_key");
+ JsonSerializer.Serialize(writer, ApiKeyDescriptor, options);
+ }
+ else if (ApiKeyDescriptorAction is not null)
+ {
+ writer.WritePropertyName("api_key");
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor(ApiKeyDescriptorAction), options);
+ }
+ else
+ {
+ writer.WritePropertyName("api_key");
+ JsonSerializer.Serialize(writer, ApiKeyValue, options);
+ }
+
+ writer.WritePropertyName("grant_type");
+ JsonSerializer.Serialize(writer, GrantTypeValue, options);
+ if (!string.IsNullOrEmpty(PasswordValue))
+ {
+ writer.WritePropertyName("password");
+ writer.WriteStringValue(PasswordValue);
+ }
+
+ if (RunAsValue is not null)
+ {
+ writer.WritePropertyName("run_as");
+ JsonSerializer.Serialize(writer, RunAsValue, options);
+ }
+
+ if (UsernameValue is not null)
+ {
+ writer.WritePropertyName("username");
+ JsonSerializer.Serialize(writer, UsernameValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+///
+///
+/// Creates an API key on behalf of another user.
+/// This API is similar to Create API keys, however it creates the API key for a user that is different than the user that runs the API.
+/// The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created.
+/// It is not possible to use this API to create an API key without that user’s credentials.
+/// The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user.
+/// In this case, the API key will be created on behalf of the impersonated user.
+///
+///
+/// This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
+///
+///
+/// A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.
+/// If applicable, it also returns expiration information for the API key in milliseconds.
+///
+///
+/// By default, API keys never expire. You can specify expiration information when you create the API keys.
+///
+///
+public sealed partial class GrantApiKeyRequestDescriptor : RequestDescriptor
+{
+ internal GrantApiKeyRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public GrantApiKeyRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityGrantApiKey;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.grant_api_key";
+
+ private string? AccessTokenValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey ApiKeyValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor ApiKeyDescriptor { get; set; }
+ private Action ApiKeyDescriptorAction { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType GrantTypeValue { get; set; }
+ private string? PasswordValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Username? RunAsValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Username? UsernameValue { get; set; }
+
+ ///
+ ///
+ /// The user’s access token.
+ /// If you specify the access_token grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor AccessToken(string? accessToken)
+ {
+ AccessTokenValue = accessToken;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Defines the API key.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKey apiKey)
+ {
+ ApiKeyDescriptor = null;
+ ApiKeyDescriptorAction = null;
+ ApiKeyValue = apiKey;
+ return Self;
+ }
+
+ public GrantApiKeyRequestDescriptor ApiKey(Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor descriptor)
+ {
+ ApiKeyValue = null;
+ ApiKeyDescriptorAction = null;
+ ApiKeyDescriptor = descriptor;
+ return Self;
+ }
+
+ public GrantApiKeyRequestDescriptor ApiKey(Action configure)
+ {
+ ApiKeyValue = null;
+ ApiKeyDescriptor = null;
+ ApiKeyDescriptorAction = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The type of grant. Supported grant types are: access_token, password.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor GrantType(Elastic.Clients.Elasticsearch.Serverless.Security.ApiKeyGrantType grantType)
+ {
+ GrantTypeValue = grantType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The user’s password. If you specify the password grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor Password(string? password)
+ {
+ PasswordValue = password;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The name of the user to be impersonated.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor RunAs(Elastic.Clients.Elasticsearch.Serverless.Username? runAs)
+ {
+ RunAsValue = runAs;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The user name that identifies the user.
+ /// If you specify the password grant type, this parameter is required.
+ /// It is not valid with other grant types.
+ ///
+ ///
+ public GrantApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Serverless.Username? username)
+ {
+ UsernameValue = username;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (!string.IsNullOrEmpty(AccessTokenValue))
+ {
+ writer.WritePropertyName("access_token");
+ writer.WriteStringValue(AccessTokenValue);
+ }
+
+ if (ApiKeyDescriptor is not null)
+ {
+ writer.WritePropertyName("api_key");
+ JsonSerializer.Serialize(writer, ApiKeyDescriptor, options);
+ }
+ else if (ApiKeyDescriptorAction is not null)
+ {
+ writer.WritePropertyName("api_key");
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.GrantApiKeyDescriptor(ApiKeyDescriptorAction), options);
+ }
+ else
+ {
+ writer.WritePropertyName("api_key");
+ JsonSerializer.Serialize(writer, ApiKeyValue, options);
+ }
+
+ writer.WritePropertyName("grant_type");
+ JsonSerializer.Serialize(writer, GrantTypeValue, options);
+ if (!string.IsNullOrEmpty(PasswordValue))
+ {
+ writer.WritePropertyName("password");
+ writer.WriteStringValue(PasswordValue);
+ }
+
+ if (RunAsValue is not null)
+ {
+ writer.WritePropertyName("run_as");
+ JsonSerializer.Serialize(writer, RunAsValue, options);
+ }
+
+ if (UsernameValue is not null)
+ {
+ writer.WritePropertyName("username");
+ JsonSerializer.Serialize(writer, UsernameValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyResponse.g.cs
new file mode 100644
index 00000000000..60f9d7f83b5
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GrantApiKeyResponse.g.cs
@@ -0,0 +1,41 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class GrantApiKeyResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("api_key")]
+ public string ApiKey { get; init; }
+ [JsonInclude, JsonPropertyName("encoded")]
+ public string Encoded { get; init; }
+ [JsonInclude, JsonPropertyName("expiration")]
+ public long? Expiration { get; init; }
+ [JsonInclude, JsonPropertyName("id")]
+ public string Id { get; init; }
+ [JsonInclude, JsonPropertyName("name")]
+ public string Name { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesRequest.g.cs
new file mode 100644
index 00000000000..75358b5db25
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesRequest.g.cs
@@ -0,0 +1,272 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Requests;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class HasPrivilegesRequestParameters : RequestParameters
+{
+}
+
+///
+///
+/// Check user privileges.
+/// Determines whether the specified user has a specified list of privileges.
+///
+///
+public sealed partial class HasPrivilegesRequest : PlainRequest
+{
+ public HasPrivilegesRequest()
+ {
+ }
+
+ public HasPrivilegesRequest(Elastic.Clients.Elasticsearch.Serverless.Name? user) : base(r => r.Optional("user", user))
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityHasPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.has_privileges";
+
+ [JsonInclude, JsonPropertyName("application")]
+ public ICollection? Application { get; set; }
+
+ ///
+ ///
+ /// A list of the cluster privileges that you want to check.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("cluster")]
+ public ICollection? Cluster { get; set; }
+ [JsonInclude, JsonPropertyName("index")]
+ public ICollection? Index { get; set; }
+}
+
+///
+///
+/// Check user privileges.
+/// Determines whether the specified user has a specified list of privileges.
+///
+///
+public sealed partial class HasPrivilegesRequestDescriptor : RequestDescriptor
+{
+ internal HasPrivilegesRequestDescriptor(Action configure) => configure.Invoke(this);
+
+ public HasPrivilegesRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name? user) : base(r => r.Optional("user", user))
+ {
+ }
+
+ public HasPrivilegesRequestDescriptor()
+ {
+ }
+
+ internal override ApiUrls ApiUrls => ApiUrlLookup.SecurityHasPrivileges;
+
+ protected override HttpMethod StaticHttpMethod => HttpMethod.POST;
+
+ internal override bool SupportsBody => true;
+
+ internal override string OperationName => "security.has_privileges";
+
+ public HasPrivilegesRequestDescriptor User(Elastic.Clients.Elasticsearch.Serverless.Name? user)
+ {
+ RouteValues.Optional("user", user);
+ return Self;
+ }
+
+ private ICollection? ApplicationValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor ApplicationDescriptor { get; set; }
+ private Action ApplicationDescriptorAction { get; set; }
+ private Action[] ApplicationDescriptorActions { get; set; }
+ private ICollection? ClusterValue { get; set; }
+ private ICollection? IndexValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor IndexDescriptor { get; set; }
+ private Action IndexDescriptorAction { get; set; }
+ private Action[] IndexDescriptorActions { get; set; }
+
+ public HasPrivilegesRequestDescriptor Application(ICollection? application)
+ {
+ ApplicationDescriptor = null;
+ ApplicationDescriptorAction = null;
+ ApplicationDescriptorActions = null;
+ ApplicationValue = application;
+ return Self;
+ }
+
+ public HasPrivilegesRequestDescriptor Application(Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor descriptor)
+ {
+ ApplicationValue = null;
+ ApplicationDescriptorAction = null;
+ ApplicationDescriptorActions = null;
+ ApplicationDescriptor = descriptor;
+ return Self;
+ }
+
+ public HasPrivilegesRequestDescriptor Application(Action configure)
+ {
+ ApplicationValue = null;
+ ApplicationDescriptor = null;
+ ApplicationDescriptorActions = null;
+ ApplicationDescriptorAction = configure;
+ return Self;
+ }
+
+ public HasPrivilegesRequestDescriptor Application(params Action[] configure)
+ {
+ ApplicationValue = null;
+ ApplicationDescriptor = null;
+ ApplicationDescriptorAction = null;
+ ApplicationDescriptorActions = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// A list of the cluster privileges that you want to check.
+ ///
+ ///
+ public HasPrivilegesRequestDescriptor Cluster(ICollection? cluster)
+ {
+ ClusterValue = cluster;
+ return Self;
+ }
+
+ public HasPrivilegesRequestDescriptor Index(ICollection? index)
+ {
+ IndexDescriptor = null;
+ IndexDescriptorAction = null;
+ IndexDescriptorActions = null;
+ IndexValue = index;
+ return Self;
+ }
+
+ public HasPrivilegesRequestDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor descriptor)
+ {
+ IndexValue = null;
+ IndexDescriptorAction = null;
+ IndexDescriptorActions = null;
+ IndexDescriptor = descriptor;
+ return Self;
+ }
+
+ public HasPrivilegesRequestDescriptor Index(Action configure)
+ {
+ IndexValue = null;
+ IndexDescriptor = null;
+ IndexDescriptorActions = null;
+ IndexDescriptorAction = configure;
+ return Self;
+ }
+
+ public HasPrivilegesRequestDescriptor Index(params Action[] configure)
+ {
+ IndexValue = null;
+ IndexDescriptor = null;
+ IndexDescriptorAction = null;
+ IndexDescriptorActions = configure;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (ApplicationDescriptor is not null)
+ {
+ writer.WritePropertyName("application");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, ApplicationDescriptor, options);
+ writer.WriteEndArray();
+ }
+ else if (ApplicationDescriptorAction is not null)
+ {
+ writer.WritePropertyName("application");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor(ApplicationDescriptorAction), options);
+ writer.WriteEndArray();
+ }
+ else if (ApplicationDescriptorActions is not null)
+ {
+ writer.WritePropertyName("application");
+ writer.WriteStartArray();
+ foreach (var action in ApplicationDescriptorActions)
+ {
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.ApplicationPrivilegesCheckDescriptor(action), options);
+ }
+
+ writer.WriteEndArray();
+ }
+ else if (ApplicationValue is not null)
+ {
+ writer.WritePropertyName("application");
+ JsonSerializer.Serialize(writer, ApplicationValue, options);
+ }
+
+ if (ClusterValue is not null)
+ {
+ writer.WritePropertyName("cluster");
+ JsonSerializer.Serialize(writer, ClusterValue, options);
+ }
+
+ if (IndexDescriptor is not null)
+ {
+ writer.WritePropertyName("index");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, IndexDescriptor, options);
+ writer.WriteEndArray();
+ }
+ else if (IndexDescriptorAction is not null)
+ {
+ writer.WritePropertyName("index");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor(IndexDescriptorAction), options);
+ writer.WriteEndArray();
+ }
+ else if (IndexDescriptorActions is not null)
+ {
+ writer.WritePropertyName("index");
+ writer.WriteStartArray();
+ foreach (var action in IndexDescriptorActions)
+ {
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Security.IndexPrivilegesCheckDescriptor(action), options);
+ }
+
+ writer.WriteEndArray();
+ }
+ else if (IndexValue is not null)
+ {
+ writer.WritePropertyName("index");
+ JsonSerializer.Serialize(writer, IndexValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesResponse.g.cs
new file mode 100644
index 00000000000..4411a6e4215
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/HasPrivilegesResponse.g.cs
@@ -0,0 +1,42 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using Elastic.Transport.Products.Elasticsearch;
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Security;
+
+public sealed partial class HasPrivilegesResponse : ElasticsearchResponse
+{
+ [JsonInclude, JsonPropertyName("application")]
+ public IReadOnlyDictionary