Skip to content

Commit 500de42

Browse files
committed
[codegen] update to latest spec
1 parent 788d688 commit 500de42

File tree

6 files changed

+690
-72
lines changed

6 files changed

+690
-72
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
'_types.StoreStats': '_types/Stats.ts#L371-L398',
359359
'_types.StoredScript': '_types/Scripting.ts#L47-L59',
360360
'_types.SuggestMode': '_types/common.ts#L286-L299',
361-
'_types.TaskFailure': '_types/Errors.ts#L68-L73',
361+
'_types.TaskFailure': '_types/Errors.ts#L67-L72',
362362
'_types.TextEmbedding': '_types/Knn.ts#L79-L82',
363363
'_types.TextSimilarityReranker': '_types/Retriever.ts#L88-L99',
364364
'_types.ThreadType': '_types/common.ts#L301-L307',
@@ -1417,7 +1417,7 @@
14171417
'ilm.stop.Response': 'ilm/stop/StopIlmResponse.ts#L22-L24',
14181418
'indices._types.Alias': 'indices/_types/Alias.ts#L23-L53',
14191419
'indices._types.AliasDefinition': 'indices/_types/AliasDefinition.ts#L22-L54',
1420-
'indices._types.CacheQueries': 'indices/_types/IndexSettings.ts#L414-L416',
1420+
'indices._types.CacheQueries': 'indices/_types/IndexSettings.ts#L415-L417',
14211421
'indices._types.DataStream': 'indices/_types/DataStream.ts#L45-L127',
14221422
'indices._types.DataStreamIndex': 'indices/_types/DataStream.ts#L136-L157',
14231423
'indices._types.DataStreamLifecycle': 'indices/_types/DataStreamLifecycle.ts#L25-L31',
@@ -1430,7 +1430,7 @@
14301430
'indices._types.DownsamplingRound': 'indices/_types/DownsamplingRound.ts#L23-L32',
14311431
'indices._types.FailureStore': 'indices/_types/DataStream.ts#L39-L43',
14321432
'indices._types.FielddataFrequencyFilter': 'indices/_types/FielddataFrequencyFilter.ts#L22-L26',
1433-
'indices._types.IndexCheckOnStartup': 'indices/_types/IndexSettings.ts#L263-L270',
1433+
'indices._types.IndexCheckOnStartup': 'indices/_types/IndexSettings.ts#L264-L271',
14341434
'indices._types.IndexRouting': 'indices/_types/IndexRouting.ts#L22-L25',
14351435
'indices._types.IndexRoutingAllocation': 'indices/_types/IndexRouting.ts#L27-L32',
14361436
'indices._types.IndexRoutingAllocationDisk': 'indices/_types/IndexRouting.ts#L62-L64',
@@ -1440,64 +1440,64 @@
14401440
'indices._types.IndexRoutingRebalance': 'indices/_types/IndexRouting.ts#L34-L36',
14411441
'indices._types.IndexRoutingRebalanceOptions': 'indices/_types/IndexRouting.ts#L45-L50',
14421442
'indices._types.IndexSegmentSort': 'indices/_types/IndexSegmentSort.ts#L22-L27',
1443-
'indices._types.IndexSettingBlocks': 'indices/_types/IndexSettings.ts#L255-L261',
1444-
'indices._types.IndexSettings': 'indices/_types/IndexSettings.ts#L69-L169',
1445-
'indices._types.IndexSettingsAnalysis': 'indices/_types/IndexSettings.ts#L326-L332',
1446-
'indices._types.IndexSettingsLifecycle': 'indices/_types/IndexSettings.ts#L277-L316',
1447-
'indices._types.IndexSettingsLifecycleStep': 'indices/_types/IndexSettings.ts#L318-L324',
1448-
'indices._types.IndexSettingsTimeSeries': 'indices/_types/IndexSettings.ts#L334-L337',
1443+
'indices._types.IndexSettingBlocks': 'indices/_types/IndexSettings.ts#L256-L262',
1444+
'indices._types.IndexSettings': 'indices/_types/IndexSettings.ts#L70-L170',
1445+
'indices._types.IndexSettingsAnalysis': 'indices/_types/IndexSettings.ts#L327-L333',
1446+
'indices._types.IndexSettingsLifecycle': 'indices/_types/IndexSettings.ts#L278-L317',
1447+
'indices._types.IndexSettingsLifecycleStep': 'indices/_types/IndexSettings.ts#L319-L325',
1448+
'indices._types.IndexSettingsTimeSeries': 'indices/_types/IndexSettings.ts#L335-L338',
14491449
'indices._types.IndexState': 'indices/_types/IndexState.ts#L27-L40',
14501450
'indices._types.IndexTemplate': 'indices/_types/IndexTemplate.ts#L28-L81',
14511451
'indices._types.IndexTemplateDataStreamConfiguration': 'indices/_types/IndexTemplate.ts#L83-L94',
14521452
'indices._types.IndexTemplateSummary': 'indices/_types/IndexTemplate.ts#L96-L118',
1453-
'indices._types.IndexVersioning': 'indices/_types/IndexSettings.ts#L272-L275',
1454-
'indices._types.IndexingPressure': 'indices/_types/IndexSettings.ts#L568-L570',
1455-
'indices._types.IndexingPressureMemory': 'indices/_types/IndexSettings.ts#L572-L579',
1456-
'indices._types.IndexingSlowlogSettings': 'indices/_types/IndexSettings.ts#L581-L586',
1457-
'indices._types.IndexingSlowlogTresholds': 'indices/_types/IndexSettings.ts#L588-L595',
1453+
'indices._types.IndexVersioning': 'indices/_types/IndexSettings.ts#L273-L276',
1454+
'indices._types.IndexingPressure': 'indices/_types/IndexSettings.ts#L569-L571',
1455+
'indices._types.IndexingPressureMemory': 'indices/_types/IndexSettings.ts#L573-L580',
1456+
'indices._types.IndexingSlowlogSettings': 'indices/_types/IndexSettings.ts#L582-L587',
1457+
'indices._types.IndexingSlowlogTresholds': 'indices/_types/IndexSettings.ts#L589-L596',
14581458
'indices._types.ManagedBy': 'indices/_types/DataStream.ts#L32-L37',
1459-
'indices._types.MappingLimitSettings': 'indices/_types/IndexSettings.ts#L418-L432',
1460-
'indices._types.MappingLimitSettingsDepth': 'indices/_types/IndexSettings.ts#L453-L460',
1461-
'indices._types.MappingLimitSettingsDimensionFields': 'indices/_types/IndexSettings.ts#L490-L496',
1462-
'indices._types.MappingLimitSettingsFieldNameLength': 'indices/_types/IndexSettings.ts#L481-L488',
1463-
'indices._types.MappingLimitSettingsNestedFields': 'indices/_types/IndexSettings.ts#L462-L470',
1464-
'indices._types.MappingLimitSettingsNestedObjects': 'indices/_types/IndexSettings.ts#L472-L479',
1465-
'indices._types.MappingLimitSettingsSourceFields': 'indices/_types/IndexSettings.ts#L498-L500',
1466-
'indices._types.MappingLimitSettingsTotalFields': 'indices/_types/IndexSettings.ts#L434-L451',
1467-
'indices._types.Merge': 'indices/_types/IndexSettings.ts#L339-L341',
1468-
'indices._types.MergeScheduler': 'indices/_types/IndexSettings.ts#L343-L346',
1459+
'indices._types.MappingLimitSettings': 'indices/_types/IndexSettings.ts#L419-L433',
1460+
'indices._types.MappingLimitSettingsDepth': 'indices/_types/IndexSettings.ts#L454-L461',
1461+
'indices._types.MappingLimitSettingsDimensionFields': 'indices/_types/IndexSettings.ts#L491-L497',
1462+
'indices._types.MappingLimitSettingsFieldNameLength': 'indices/_types/IndexSettings.ts#L482-L489',
1463+
'indices._types.MappingLimitSettingsNestedFields': 'indices/_types/IndexSettings.ts#L463-L471',
1464+
'indices._types.MappingLimitSettingsNestedObjects': 'indices/_types/IndexSettings.ts#L473-L480',
1465+
'indices._types.MappingLimitSettingsSourceFields': 'indices/_types/IndexSettings.ts#L499-L501',
1466+
'indices._types.MappingLimitSettingsTotalFields': 'indices/_types/IndexSettings.ts#L435-L452',
1467+
'indices._types.Merge': 'indices/_types/IndexSettings.ts#L340-L342',
1468+
'indices._types.MergeScheduler': 'indices/_types/IndexSettings.ts#L344-L347',
14691469
'indices._types.NumericFielddata': 'indices/_types/NumericFielddata.ts#L22-L24',
14701470
'indices._types.NumericFielddataFormat': 'indices/_types/NumericFielddataFormat.ts#L20-L23',
1471-
'indices._types.Queries': 'indices/_types/IndexSettings.ts#L410-L412',
1472-
'indices._types.RetentionLease': 'indices/_types/IndexSettings.ts#L65-L67',
1473-
'indices._types.SearchIdle': 'indices/_types/IndexSettings.ts#L246-L249',
1471+
'indices._types.Queries': 'indices/_types/IndexSettings.ts#L411-L413',
1472+
'indices._types.RetentionLease': 'indices/_types/IndexSettings.ts#L66-L68',
1473+
'indices._types.SearchIdle': 'indices/_types/IndexSettings.ts#L247-L250',
14741474
'indices._types.SegmentSortMissing': 'indices/_types/IndexSegmentSort.ts#L43-L46',
14751475
'indices._types.SegmentSortMode': 'indices/_types/IndexSegmentSort.ts#L36-L41',
14761476
'indices._types.SegmentSortOrder': 'indices/_types/IndexSegmentSort.ts#L29-L34',
1477-
'indices._types.SettingsAnalyze': 'indices/_types/IndexSettings.ts#L236-L239',
1478-
'indices._types.SettingsHighlight': 'indices/_types/IndexSettings.ts#L231-L234',
1479-
'indices._types.SettingsQueryString': 'indices/_types/IndexSettings.ts#L251-L253',
1480-
'indices._types.SettingsSearch': 'indices/_types/IndexSettings.ts#L241-L244',
1481-
'indices._types.SettingsSimilarity': 'indices/_types/IndexSettings.ts#L171-L183',
1482-
'indices._types.SettingsSimilarityBm25': 'indices/_types/IndexSettings.ts#L189-L194',
1483-
'indices._types.SettingsSimilarityBoolean': 'indices/_types/IndexSettings.ts#L185-L187',
1484-
'indices._types.SettingsSimilarityDfi': 'indices/_types/IndexSettings.ts#L196-L199',
1485-
'indices._types.SettingsSimilarityDfr': 'indices/_types/IndexSettings.ts#L201-L206',
1486-
'indices._types.SettingsSimilarityIb': 'indices/_types/IndexSettings.ts#L208-L213',
1487-
'indices._types.SettingsSimilarityLmd': 'indices/_types/IndexSettings.ts#L215-L218',
1488-
'indices._types.SettingsSimilarityLmj': 'indices/_types/IndexSettings.ts#L220-L223',
1489-
'indices._types.SettingsSimilarityScripted': 'indices/_types/IndexSettings.ts#L225-L229',
1490-
'indices._types.SlowlogSettings': 'indices/_types/IndexSettings.ts#L508-L513',
1491-
'indices._types.SlowlogTresholdLevels': 'indices/_types/IndexSettings.ts#L520-L525',
1492-
'indices._types.SlowlogTresholds': 'indices/_types/IndexSettings.ts#L515-L518',
1493-
'indices._types.SoftDeletes': 'indices/_types/IndexSettings.ts#L50-L63',
1494-
'indices._types.SourceMode': 'indices/_types/IndexSettings.ts#L502-L506',
1495-
'indices._types.Storage': 'indices/_types/IndexSettings.ts#L527-L536',
1496-
'indices._types.StorageType': 'indices/_types/IndexSettings.ts#L538-L566',
1477+
'indices._types.SettingsAnalyze': 'indices/_types/IndexSettings.ts#L237-L240',
1478+
'indices._types.SettingsHighlight': 'indices/_types/IndexSettings.ts#L232-L235',
1479+
'indices._types.SettingsQueryString': 'indices/_types/IndexSettings.ts#L252-L254',
1480+
'indices._types.SettingsSearch': 'indices/_types/IndexSettings.ts#L242-L245',
1481+
'indices._types.SettingsSimilarity': 'indices/_types/IndexSettings.ts#L172-L184',
1482+
'indices._types.SettingsSimilarityBm25': 'indices/_types/IndexSettings.ts#L190-L195',
1483+
'indices._types.SettingsSimilarityBoolean': 'indices/_types/IndexSettings.ts#L186-L188',
1484+
'indices._types.SettingsSimilarityDfi': 'indices/_types/IndexSettings.ts#L197-L200',
1485+
'indices._types.SettingsSimilarityDfr': 'indices/_types/IndexSettings.ts#L202-L207',
1486+
'indices._types.SettingsSimilarityIb': 'indices/_types/IndexSettings.ts#L209-L214',
1487+
'indices._types.SettingsSimilarityLmd': 'indices/_types/IndexSettings.ts#L216-L219',
1488+
'indices._types.SettingsSimilarityLmj': 'indices/_types/IndexSettings.ts#L221-L224',
1489+
'indices._types.SettingsSimilarityScripted': 'indices/_types/IndexSettings.ts#L226-L230',
1490+
'indices._types.SlowlogSettings': 'indices/_types/IndexSettings.ts#L509-L514',
1491+
'indices._types.SlowlogTresholdLevels': 'indices/_types/IndexSettings.ts#L521-L526',
1492+
'indices._types.SlowlogTresholds': 'indices/_types/IndexSettings.ts#L516-L519',
1493+
'indices._types.SoftDeletes': 'indices/_types/IndexSettings.ts#L51-L64',
1494+
'indices._types.SourceMode': 'indices/_types/IndexSettings.ts#L503-L507',
1495+
'indices._types.Storage': 'indices/_types/IndexSettings.ts#L528-L537',
1496+
'indices._types.StorageType': 'indices/_types/IndexSettings.ts#L539-L567',
14971497
'indices._types.TemplateMapping': 'indices/_types/TemplateMapping.ts#L27-L34',
1498-
'indices._types.Translog': 'indices/_types/IndexSettings.ts#L348-L370',
1499-
'indices._types.TranslogDurability': 'indices/_types/IndexSettings.ts#L372-L387',
1500-
'indices._types.TranslogRetention': 'indices/_types/IndexSettings.ts#L389-L408',
1498+
'indices._types.Translog': 'indices/_types/IndexSettings.ts#L349-L371',
1499+
'indices._types.TranslogDurability': 'indices/_types/IndexSettings.ts#L373-L388',
1500+
'indices._types.TranslogRetention': 'indices/_types/IndexSettings.ts#L390-L409',
15011501
'indices.add_block.IndicesBlockOptions': 'indices/add_block/IndicesAddBlockRequest.ts#L45-L50',
15021502
'indices.add_block.IndicesBlockStatus': 'indices/add_block/IndicesAddBlockResponse.ts#L30-L33',
15031503
'indices.add_block.Request': 'indices/add_block/IndicesAddBlockRequest.ts#L24-L43',
@@ -1605,7 +1605,7 @@
16051605
'indices.put_index_template.IndexTemplateMapping': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L152-L174',
16061606
'indices.put_index_template.Request': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L150',
16071607
'indices.put_index_template.Response': 'indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L24',
1608-
'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L41-L177',
1608+
'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L41-L175',
16091609
'indices.put_mapping.Response': 'indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24',
16101610
'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L108',
16111611
'indices.put_settings.Response': 'indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24',
@@ -2433,36 +2433,37 @@
24332433
'security._types.Access': 'security/_types/Access.ts#L22-L31',
24342434
'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L113',
24352435
'security._types.ApiKeyType': 'security/_types/ApiKey.ts#L115-L118',
2436-
'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L410-L412',
2436+
'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L435-L437',
24372437
'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L27-L40',
24382438
'security._types.BulkError': 'security/_types/Bulk.ts#L24-L33',
24392439
'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24',
24402440
'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L42-L199',
24412441
'security._types.CreatedStatus': 'security/_types/CreatedStatus.ts#L20-L22',
24422442
'security._types.FieldRule': 'security/_types/RoleMappingRule.ts#L35-L43',
24432443
'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25',
2444-
'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L406-L408',
2444+
'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L431-L433',
24452445
'security._types.GrantType': 'security/_types/GrantType.ts#L20-L30',
2446-
'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L362-L404',
2446+
'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L387-L429',
24472447
'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L217-L243',
2448-
'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L317-L325',
2449-
'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L414-L416',
2448+
'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L342-L350',
2449+
'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L439-L441',
24502450
'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25',
24512451
'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L201-L214',
24522452
'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L279-L291',
24532453
'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L245-L277',
2454-
'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L418-L428',
2454+
'security._types.RemoteUserIndicesPrivileges': 'security/_types/Privileges.ts#L317-L340',
2455+
'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L443-L453',
24552456
'security._types.Restriction': 'security/_types/RoleDescriptor.ts#L135-L141',
24562457
'security._types.RestrictionWorkflow': 'security/_types/RoleDescriptor.ts#L143-L146',
24572458
'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L33-L83',
24582459
'security._types.RoleDescriptorRead': 'security/_types/RoleDescriptor.ts#L85-L133',
24592460
'security._types.RoleMapping': 'security/_types/RoleMapping.ts#L25-L33',
24602461
'security._types.RoleMappingRule': 'security/_types/RoleMappingRule.ts#L22-L33',
24612462
'security._types.RoleTemplate': 'security/_types/RoleTemplate.ts#L28-L31',
2462-
'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L359-L360',
2463-
'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L327-L337',
2464-
'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L339-L357',
2465-
'security._types.SearchAccess': 'security/_types/Privileges.ts#L430-L450',
2463+
'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L384-L385',
2464+
'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L352-L362',
2465+
'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L364-L382',
2466+
'security._types.SearchAccess': 'security/_types/Privileges.ts#L455-L475',
24662467
'security._types.SecuritySettings': 'security/_types/SecuritySettings.ts#L22-L24',
24672468
'security._types.TemplateFormat': 'security/_types/RoleTemplate.ts#L22-L25',
24682469
'security._types.User': 'security/_types/User.ts#L23-L31',
@@ -2538,7 +2539,7 @@
25382539
'security.get_privileges.Response': 'security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L29',
25392540
'security.get_role.Request': 'security/get_role/SecurityGetRoleRequest.ts#L23-L44',
25402541
'security.get_role.Response': 'security/get_role/SecurityGetRoleResponse.ts#L23-L31',
2541-
'security.get_role.Role': 'security/get_role/types.ts#L32-L53',
2542+
'security.get_role.Role': 'security/get_role/types.ts#L32-L54',
25422543
'security.get_role_mapping.Request': 'security/get_role_mapping/SecurityGetRoleMappingRequest.ts#L23-L43',
25432544
'security.get_role_mapping.Response': 'security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L29',
25442545
'security.get_service_accounts.Request': 'security/get_service_accounts/GetServiceAccountsRequest.ts#L23-L50',
@@ -2559,7 +2560,7 @@
25592560
'security.get_user.Request': 'security/get_user/SecurityGetUserRequest.ts#L23-L46',
25602561
'security.get_user.Response': 'security/get_user/SecurityGetUserResponse.ts#L23-L30',
25612562
'security.get_user_privileges.Request': 'security/get_user_privileges/SecurityGetUserPrivilegesRequest.ts#L23-L43',
2562-
'security.get_user_privileges.Response': 'security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L26-L34',
2563+
'security.get_user_privileges.Response': 'security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L28-L38',
25632564
'security.get_user_profile.GetUserProfileErrors': 'security/get_user_profile/types.ts#L25-L28',
25642565
'security.get_user_profile.Request': 'security/get_user_profile/Request.ts#L23-L53',
25652566
'security.get_user_profile.Response': 'security/get_user_profile/Response.ts#L23-L33',
@@ -3042,10 +3043,10 @@
30423043
if (hash.length > 1) {
30433044
hash = hash.substring(1);
30443045
}
3045-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/7325c4238d52ed0719422074adfada371cb0b031/specification/" + (paths[hash] || "");
3046+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/97380c530a4522f3199d6ab4ae6adfa142662301/specification/" + (paths[hash] || "");
30463047
</script>
30473048
</head>
30483049
<body>
3049-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/7325c4238d52ed0719422074adfada371cb0b031/specification/">Elasticsearch API specification</a>.
3050+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/97380c530a4522f3199d6ab4ae6adfa142662301/specification/">Elasticsearch API specification</a>.
30503051
</body>
30513052
</html>

java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import co.elastic.clients.util.DateTime;
3333
import co.elastic.clients.util.ObjectBuilder;
3434
import co.elastic.clients.util.WithJsonObjectBuilderBase;
35+
import jakarta.json.JsonValue;
3536
import jakarta.json.stream.JsonGenerator;
3637
import java.lang.Boolean;
3738
import java.lang.Integer;
@@ -114,6 +115,8 @@ public class IndexSettings implements JsonpSerializable {
114115
@Nullable
115116
private final String autoExpandReplicas;
116117

118+
private final boolean isExpNullAutoExpandReplicas;
119+
117120
@Nullable
118121
private final Merge merge;
119122

@@ -259,6 +262,7 @@ private IndexSettings(Builder builder) {
259262
this.loadFixedBitsetFiltersEagerly = builder.loadFixedBitsetFiltersEagerly;
260263
this.hidden = builder.hidden;
261264
this.autoExpandReplicas = builder.autoExpandReplicas;
265+
this.isExpNullAutoExpandReplicas = builder.isExpNullAutoExpandReplicas;
262266
this.merge = builder.merge;
263267
this.search = builder.search;
264268
this.refreshInterval = builder.refreshInterval;
@@ -867,6 +871,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
867871
generator.writeKey("auto_expand_replicas");
868872
generator.write(this.autoExpandReplicas);
869873

874+
}
875+
876+
else if (isExpNullAutoExpandReplicas) {
877+
generator.writeKey("auto_expand_replicas");
878+
generator.write(JsonValue.NULL);
879+
870880
}
871881
if (this.merge != null) {
872882
generator.writeKey("merge");
@@ -1169,6 +1179,8 @@ public final Builder otherSettings(String key, JsonData value) {
11691179
@Nullable
11701180
private String autoExpandReplicas;
11711181

1182+
private boolean isExpNullAutoExpandReplicas;
1183+
11721184
@Nullable
11731185
private Merge merge;
11741186

@@ -1437,6 +1449,16 @@ public final Builder hidden(@Nullable Boolean value) {
14371449
*/
14381450
public final Builder autoExpandReplicas(@Nullable String value) {
14391451
this.autoExpandReplicas = value;
1452+
this.isExpNullAutoExpandReplicas = false;
1453+
return this;
1454+
}
1455+
1456+
/**
1457+
* API name: {@code auto_expand_replicas}
1458+
*/
1459+
public final Builder autoExpandReplicasWithNull() {
1460+
this.isExpNullAutoExpandReplicas = true;
1461+
this.autoExpandReplicas = null;
14401462
return this;
14411463
}
14421464

0 commit comments

Comments
 (0)