diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java index 6fe24823d2..ea5ad24ae3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java @@ -197,8 +197,9 @@ public final Long primaryTerm() { } /** - * The result of the operation. Successful values are created, - * deleted, and updated. + * The result of the operation. Possible values are created, + * updated, deleted, noop, and + * not_found. *

* API name: {@code result} */ @@ -475,8 +476,9 @@ public final Builder primaryTerm(@Nullable Long value) { } /** - * The result of the operation. Successful values are created, - * deleted, and updated. + * The result of the operation. Possible values are created, + * updated, deleted, noop, and + * not_found. *

* API name: {@code result} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index 92e862680e..46bb79f1a4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -1450,7 +1450,7 @@ 'eql.search.ResultPosition': 'eql/search/types.ts#L20-L32', 'esql._types.TableValuesContainer': 'esql/_types/TableValuesContainer.ts#L22-L28', 'esql.query.EsqlFormat': 'esql/query/QueryParameters.ts#L20-L29', -'esql.query.Request': 'esql/query/QueryRequest.ts#L27-L118', +'esql.query.Request': 'esql/query/QueryRequest.ts#L28-L119', 'esql.query.Response': 'esql/query/QueryResponse.ts#L22-L25', 'features._types.Feature': 'features/_types/Feature.ts#L20-L23', 'features.get_features.Request': 'features/get_features/GetFeaturesRequest.ts#L24-L55', @@ -2752,26 +2752,26 @@ 'security._types.Access': 'security/_types/Access.ts#L22-L31', 'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L113', 'security._types.ApiKeyType': 'security/_types/ApiKey.ts#L115-L118', -'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L434-L436', -'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L27-L40', +'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L398-L400', +'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L28-L41', 'security._types.BulkError': 'security/_types/Bulk.ts#L24-L33', 'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24', -'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L42-L199', +'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L43-L200', 'security._types.CreatedStatus': 'security/_types/CreatedStatus.ts#L20-L22', 'security._types.FieldRule': 'security/_types/RoleMappingRule.ts#L35-L43', 'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25', -'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L430-L432', +'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L394-L396', 'security._types.GrantType': 'security/_types/GrantType.ts#L20-L30', -'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L386-L428', -'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L216-L242', -'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L341-L349', -'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L438-L440', +'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L350-L392', +'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L244-L244', +'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L305-L313', +'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L402-L404', 'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25', -'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L201-L213', -'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L278-L290', -'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L244-L276', -'security._types.RemoteUserIndicesPrivileges': 'security/_types/Privileges.ts#L316-L339', -'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L442-L452', +'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L202-L214', +'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L258-L270', +'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L246-L256', +'security._types.RemoteUserIndicesPrivileges': 'security/_types/Privileges.ts#L299-L303', +'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L406-L416', 'security._types.Restriction': 'security/_types/RoleDescriptor.ts#L90-L96', 'security._types.RestrictionWorkflow': 'security/_types/RoleDescriptor.ts#L98-L101', 'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L33-L83', @@ -2779,14 +2779,14 @@ 'security._types.RoleMapping': 'security/_types/RoleMapping.ts#L25-L33', 'security._types.RoleMappingRule': 'security/_types/RoleMappingRule.ts#L22-L33', 'security._types.RoleTemplate': 'security/_types/RoleTemplate.ts#L28-L31', -'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L383-L384', -'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L351-L361', -'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L363-L381', -'security._types.SearchAccess': 'security/_types/Privileges.ts#L454-L474', +'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L347-L348', +'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L315-L325', +'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L327-L345', +'security._types.SearchAccess': 'security/_types/Privileges.ts#L418-L438', 'security._types.SecuritySettings': 'security/_types/SecuritySettings.ts#L22-L24', 'security._types.TemplateFormat': 'security/_types/RoleTemplate.ts#L22-L25', 'security._types.User': 'security/_types/User.ts#L23-L31', -'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L292-L314', +'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L296-L297', 'security._types.UserProfile': 'security/_types/UserProfile.ts#L41-L47', 'security._types.UserProfileHitMetadata': 'security/_types/UserProfile.ts#L27-L30', 'security._types.UserProfileUser': 'security/_types/UserProfile.ts#L32-L39', @@ -3132,10 +3132,10 @@ 'transform._types.PivotGroupByContainer': 'transform/_types/Transform.ts#L70-L78', 'transform._types.RetentionPolicy': 'transform/_types/Transform.ts#L88-L96', 'transform._types.RetentionPolicyContainer': 'transform/_types/Transform.ts#L80-L86', -'transform._types.Settings': 'transform/_types/Transform.ts#L98-L154', -'transform._types.Source': 'transform/_types/Transform.ts#L156-L175', -'transform._types.SyncContainer': 'transform/_types/Transform.ts#L179-L185', -'transform._types.TimeSync': 'transform/_types/Transform.ts#L187-L199', +'transform._types.Settings': 'transform/_types/Transform.ts#L98-L166', +'transform._types.Source': 'transform/_types/Transform.ts#L168-L187', +'transform._types.SyncContainer': 'transform/_types/Transform.ts#L191-L197', +'transform._types.TimeSync': 'transform/_types/Transform.ts#L199-L211', 'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L65', 'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L24', 'transform.get_node_stats.Request': 'transform/get_node_stats/GetNodeStatsRequest.ts#L23-L40', @@ -3378,10 +3378,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/3666dcf13c05c73516c9dd5fc0fcaeed0e557da2/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/6ee016a765be615b0205fc209d3d3c515044689d/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteUserIndicesPrivileges.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteUserIndicesPrivileges.java index bf97f1e51a..e2b1ce91ec 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteUserIndicesPrivileges.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteUserIndicesPrivileges.java @@ -63,6 +63,8 @@ */ @JsonpDeserializable public class RemoteUserIndicesPrivileges implements JsonpSerializable { + private final List clusters; + private final List fieldSecurity; private final List names; @@ -73,19 +75,17 @@ public class RemoteUserIndicesPrivileges implements JsonpSerializable { private final boolean allowRestrictedIndices; - private final List clusters; - // --------------------------------------------------------------------------------------------- private RemoteUserIndicesPrivileges(Builder builder) { + this.clusters = ApiTypeHelper.unmodifiableRequired(builder.clusters, this, "clusters"); this.fieldSecurity = ApiTypeHelper.unmodifiable(builder.fieldSecurity); this.names = ApiTypeHelper.unmodifiableRequired(builder.names, this, "names"); this.privileges = ApiTypeHelper.unmodifiableRequired(builder.privileges, this, "privileges"); this.query = ApiTypeHelper.unmodifiable(builder.query); this.allowRestrictedIndices = ApiTypeHelper.requireNonNull(builder.allowRestrictedIndices, this, "allowRestrictedIndices", false); - this.clusters = ApiTypeHelper.unmodifiableRequired(builder.clusters, this, "clusters"); } @@ -93,6 +93,13 @@ public static RemoteUserIndicesPrivileges of(Function clusters() { + return this.clusters; + } + /** * The document fields that the owners of the role have read access to. *

@@ -147,13 +154,6 @@ public final boolean allowRestrictedIndices() { return this.allowRestrictedIndices; } - /** - * Required - API name: {@code clusters} - */ - public final List clusters() { - return this.clusters; - } - /** * Serialize this object to JSON. */ @@ -165,6 +165,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (ApiTypeHelper.isDefined(this.clusters)) { + generator.writeKey("clusters"); + generator.writeStartArray(); + for (String item0 : this.clusters) { + generator.write(item0); + + } + generator.writeEnd(); + + } if (ApiTypeHelper.isDefined(this.fieldSecurity)) { generator.writeKey("field_security"); generator.writeStartArray(); @@ -208,17 +218,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("allow_restricted_indices"); generator.write(this.allowRestrictedIndices); - if (ApiTypeHelper.isDefined(this.clusters)) { - generator.writeKey("clusters"); - generator.writeStartArray(); - for (String item0 : this.clusters) { - generator.write(item0); - - } - generator.writeEnd(); - - } - } @Override @@ -235,6 +234,8 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private List clusters; + @Nullable private List fieldSecurity; @@ -247,19 +248,37 @@ public static class Builder extends WithJsonObjectBuilderBase private Boolean allowRestrictedIndices; - private List clusters; - public Builder() { } private Builder(RemoteUserIndicesPrivileges instance) { + this.clusters = instance.clusters; this.fieldSecurity = instance.fieldSecurity; this.names = instance.names; this.privileges = instance.privileges; this.query = instance.query; this.allowRestrictedIndices = instance.allowRestrictedIndices; - this.clusters = instance.clusters; } + /** + * Required - API name: {@code clusters} + *

+ * Adds all elements of list to clusters. + */ + public final Builder clusters(List list) { + this.clusters = _listAddAll(this.clusters, list); + return this; + } + + /** + * Required - API name: {@code clusters} + *

+ * Adds one or more values to clusters. + */ + public final Builder clusters(String value, String... values) { + this.clusters = _listAdd(this.clusters, value, values); + return this; + } + /** * The document fields that the owners of the role have read access to. *

@@ -417,26 +436,6 @@ public final Builder allowRestrictedIndices(boolean value) { return this; } - /** - * Required - API name: {@code clusters} - *

- * Adds all elements of list to clusters. - */ - public final Builder clusters(List list) { - this.clusters = _listAddAll(this.clusters, list); - return this; - } - - /** - * Required - API name: {@code clusters} - *

- * Adds one or more values to clusters. - */ - public final Builder clusters(String value, String... values) { - this.clusters = _listAdd(this.clusters, value, values); - return this; - } - @Override protected Builder self() { return this; @@ -472,6 +471,8 @@ public Builder rebuild() { protected static void setupRemoteUserIndicesPrivilegesDeserializer( ObjectDeserializer op) { + op.add(Builder::clusters, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "clusters"); op.add(Builder::fieldSecurity, JsonpDeserializer.arrayDeserializer(FieldSecurity._DESERIALIZER), "field_security"); op.add(Builder::names, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "names"); @@ -479,8 +480,6 @@ protected static void setupRemoteUserIndicesPrivilegesDeserializer( "privileges"); op.add(Builder::query, JsonpDeserializer.arrayDeserializer(IndicesPrivilegesQuery._DESERIALIZER), "query"); op.add(Builder::allowRestrictedIndices, JsonpDeserializer.booleanDeserializer(), "allow_restricted_indices"); - op.add(Builder::clusters, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), - "clusters"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java index fe1a77cc03..05bb5b7313 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java @@ -79,6 +79,9 @@ public class Settings implements JsonpSerializable { @Nullable private final Boolean usePointInTime; + @Nullable + private final Integer numFailureRetries; + @Nullable private final Boolean unattended; @@ -92,6 +95,7 @@ private Settings(Builder builder) { this.docsPerSecond = builder.docsPerSecond; this.maxPageSearchSize = builder.maxPageSearchSize; this.usePointInTime = builder.usePointInTime; + this.numFailureRetries = builder.numFailureRetries; this.unattended = builder.unattended; } @@ -179,6 +183,23 @@ public final Boolean usePointInTime() { return this.usePointInTime; } + /** + * Defines the number of retries on a recoverable failure before the transform + * task is marked as failed. The minimum value is 0 + * and the maximum is 100, where -1 indicates that the + * transform retries indefinitely. If unset, the cluster-level setting + * num_transform_failure_retries is used. + *

+ * This setting cannot be specified when unattended is + * true, because unattended transforms always retry indefinitely. + *

+ * API name: {@code num_failure_retries} + */ + @Nullable + public final Integer numFailureRetries() { + return this.numFailureRetries; + } + /** * If true, the transform runs in unattended mode. In unattended * mode, the transform retries indefinitely in case of an error which means the @@ -232,6 +253,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("use_point_in_time"); generator.write(this.usePointInTime); + } + if (this.numFailureRetries != null) { + generator.writeKey("num_failure_retries"); + generator.write(this.numFailureRetries); + } if (this.unattended != null) { generator.writeKey("unattended"); @@ -271,6 +297,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean usePointInTime; + @Nullable + private Integer numFailureRetries; + @Nullable private Boolean unattended; @@ -283,6 +312,7 @@ private Builder(Settings instance) { this.docsPerSecond = instance.docsPerSecond; this.maxPageSearchSize = instance.maxPageSearchSize; this.usePointInTime = instance.usePointInTime; + this.numFailureRetries = instance.numFailureRetries; this.unattended = instance.unattended; } @@ -365,6 +395,23 @@ public final Builder usePointInTime(@Nullable Boolean value) { return this; } + /** + * Defines the number of retries on a recoverable failure before the transform + * task is marked as failed. The minimum value is 0 + * and the maximum is 100, where -1 indicates that the + * transform retries indefinitely. If unset, the cluster-level setting + * num_transform_failure_retries is used. + *

+ * This setting cannot be specified when unattended is + * true, because unattended transforms always retry indefinitely. + *

+ * API name: {@code num_failure_retries} + */ + public final Builder numFailureRetries(@Nullable Integer value) { + this.numFailureRetries = value; + return this; + } + /** * If true, the transform runs in unattended mode. In unattended * mode, the transform retries indefinitely in case of an error which means the @@ -418,6 +465,7 @@ protected static void setupSettingsDeserializer(ObjectDeserializer