From 52a20e1edb9144bd42a1671b1a321fad4c740b92 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Mon, 21 Aug 2023 13:50:06 -0700 Subject: [PATCH] Removing unsupported field runtime for PutMappingRequest (#597) Signed-off-by: Vacha Shah --- CHANGELOG.md | 3 +- .../opensearch/indices/PutMappingRequest.java | 64 ------------------- 2 files changed, 2 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d34a35cbd7..009ca7ae7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [Unreleased] +## [Unreleased 2.x](https://github.com/opensearch-project/opensearch-java/compare/v2.6.0...2.x) ### Added ### Dependencies @@ -16,6 +16,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Remove generated code comments from all files ([#598](https://github.com/opensearch-project/opensearch-java/pull/598)) ### Fixed +- Fix PutMappingRequest by removing unsupported fields ([#597](https://github.com/opensearch-project/opensearch-java/pull/597)) ### Security diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java index 53d45e8193..99b2951846 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/indices/PutMappingRequest.java @@ -115,8 +115,6 @@ public class PutMappingRequest extends RequestBase implements JsonpSerializable private final Map properties; - private final Map runtime; - @Nullable private final Time timeout; @@ -143,7 +141,6 @@ private PutMappingRequest(Builder builder) { this.clusterManagerTimeout = builder.clusterManagerTimeout; this.numericDetection = builder.numericDetection; this.properties = ApiTypeHelper.unmodifiable(builder.properties); - this.runtime = ApiTypeHelper.unmodifiable(builder.runtime); this.timeout = builder.timeout; this.writeIndexOnly = builder.writeIndexOnly; @@ -323,15 +320,6 @@ public final Map properties() { return this.properties; } - /** - * Mapping of runtime fields for the index. - *

- * API name: {@code runtime} - */ - public final Map runtime() { - return this.runtime; - } - /** * Explicit operation timeout *

@@ -443,18 +431,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } - if (ApiTypeHelper.isDefined(this.runtime)) { - generator.writeKey("runtime"); - generator.writeStartObject(); - for (Map.Entry item0 : this.runtime.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } - } // --------------------------------------------------------------------------------------------- @@ -512,9 +488,6 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder

properties; - @Nullable - private Map runtime; - @Nullable private Time timeout; @@ -856,41 +829,6 @@ public final Builder properties(String key, Function - * API name: {@code runtime} - *

- * Adds all entries of map to runtime. - */ - public final Builder runtime(Map map) { - this.runtime = _mapPutAll(this.runtime, map); - return this; - } - - /** - * Mapping of runtime fields for the index. - *

- * API name: {@code runtime} - *

- * Adds an entry to runtime. - */ - public final Builder runtime(String key, RuntimeField value) { - this.runtime = _mapPut(this.runtime, key, value); - return this; - } - - /** - * Mapping of runtime fields for the index. - *

- * API name: {@code runtime} - *

- * Adds an entry to runtime using a builder lambda. - */ - public final Builder runtime(String key, Function> fn) { - return runtime(key, fn.apply(new RuntimeField.Builder()).build()); - } - /** * Explicit operation timeout *

@@ -956,8 +894,6 @@ protected static void setupPutMappingRequestDeserializer(ObjectDeserializer