32
32
33
33
package org .opensearch .client .opensearch ._types .mapping ;
34
34
35
+ // typedef: _types.mapping.XyShapeProperty
36
+
35
37
import jakarta .json .stream .JsonGenerator ;
36
38
import java .util .function .Function ;
37
39
import javax .annotation .Nullable ;
42
44
import org .opensearch .client .json .ObjectDeserializer ;
43
45
import org .opensearch .client .util .ObjectBuilder ;
44
46
45
- // typedef: _types.mapping.ShapeProperty
46
-
47
47
/**
48
- * The <code>shape </code> data type facilitates the indexing of and searching
48
+ * The <code>xy_shape </code> data type facilitates the indexing of and searching
49
49
* with arbitrary <code>x, y</code> cartesian shapes such as rectangles and
50
50
* polygons.
51
51
*
52
52
*/
53
53
@ JsonpDeserializable
54
- public class ShapeProperty extends DocValuesPropertyBase implements PropertyVariant {
54
+ public class XyShapeProperty extends DocValuesPropertyBase implements PropertyVariant {
55
55
@ Nullable
56
56
private final Boolean coerce ;
57
57
@@ -66,7 +66,7 @@ public class ShapeProperty extends DocValuesPropertyBase implements PropertyVari
66
66
67
67
// ---------------------------------------------------------------------------------------------
68
68
69
- private ShapeProperty ( Builder builder ) {
69
+ private XyShapeProperty ( XyShapeProperty . Builder builder ) {
70
70
super (builder );
71
71
72
72
this .coerce = builder .coerce ;
@@ -76,16 +76,16 @@ private ShapeProperty(Builder builder) {
76
76
77
77
}
78
78
79
- public static ShapeProperty of (Function <Builder , ObjectBuilder <ShapeProperty >> fn ) {
80
- return fn .apply (new Builder ()).build ();
79
+ public static XyShapeProperty of (Function <XyShapeProperty . Builder , ObjectBuilder <XyShapeProperty >> fn ) {
80
+ return fn .apply (new XyShapeProperty . Builder ()).build ();
81
81
}
82
82
83
83
/**
84
84
* Property variant kind.
85
85
*/
86
86
@ Override
87
87
public Property .Kind _propertyKind () {
88
- return Property .Kind .Shape ;
88
+ return Property .Kind .XyShape ;
89
89
}
90
90
91
91
/**
@@ -122,7 +122,7 @@ public final GeoOrientation orientation() {
122
122
123
123
protected void serializeInternal (JsonGenerator generator , JsonpMapper mapper ) {
124
124
125
- generator .write ("type" , "shape " );
125
+ generator .write ("type" , "xy_shape " );
126
126
super .serializeInternal (generator , mapper );
127
127
if (this .coerce != null ) {
128
128
generator .writeKey ("coerce" );
@@ -149,10 +149,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
149
149
// ---------------------------------------------------------------------------------------------
150
150
151
151
/**
152
- * Builder for {@link ShapeProperty }.
152
+ * Builder for {@link XyShapeProperty }.
153
153
*/
154
154
155
- public static class Builder extends DocValuesPropertyBase .AbstractBuilder <Builder > implements ObjectBuilder <ShapeProperty > {
155
+ public static class Builder extends DocValuesPropertyBase .AbstractBuilder <XyShapeProperty .Builder >
156
+ implements
157
+ ObjectBuilder <XyShapeProperty > {
156
158
@ Nullable
157
159
private Boolean coerce ;
158
160
@@ -168,69 +170,69 @@ public static class Builder extends DocValuesPropertyBase.AbstractBuilder<Builde
168
170
/**
169
171
* API name: {@code coerce}
170
172
*/
171
- public final Builder coerce (@ Nullable Boolean value ) {
173
+ public final XyShapeProperty . Builder coerce (@ Nullable Boolean value ) {
172
174
this .coerce = value ;
173
175
return this ;
174
176
}
175
177
176
178
/**
177
179
* API name: {@code ignore_malformed}
178
180
*/
179
- public final Builder ignoreMalformed (@ Nullable Boolean value ) {
181
+ public final XyShapeProperty . Builder ignoreMalformed (@ Nullable Boolean value ) {
180
182
this .ignoreMalformed = value ;
181
183
return this ;
182
184
}
183
185
184
186
/**
185
187
* API name: {@code ignore_z_value}
186
188
*/
187
- public final Builder ignoreZValue (@ Nullable Boolean value ) {
189
+ public final XyShapeProperty . Builder ignoreZValue (@ Nullable Boolean value ) {
188
190
this .ignoreZValue = value ;
189
191
return this ;
190
192
}
191
193
192
194
/**
193
195
* API name: {@code orientation}
194
196
*/
195
- public final Builder orientation (@ Nullable GeoOrientation value ) {
197
+ public final XyShapeProperty . Builder orientation (@ Nullable GeoOrientation value ) {
196
198
this .orientation = value ;
197
199
return this ;
198
200
}
199
201
200
202
@ Override
201
- protected Builder self () {
203
+ protected XyShapeProperty . Builder self () {
202
204
return this ;
203
205
}
204
206
205
207
/**
206
- * Builds a {@link ShapeProperty }.
208
+ * Builds a {@link XyShapeProperty }.
207
209
*
208
210
* @throws NullPointerException
209
211
* if some of the required fields are null.
210
212
*/
211
- public ShapeProperty build () {
213
+ public XyShapeProperty build () {
212
214
_checkSingleUse ();
213
215
214
- return new ShapeProperty (this );
216
+ return new XyShapeProperty (this );
215
217
}
216
218
}
217
219
218
220
// ---------------------------------------------------------------------------------------------
219
221
220
222
/**
221
- * Json deserializer for {@link ShapeProperty }
223
+ * Json deserializer for {@link XyShapeProperty }
222
224
*/
223
- public static final JsonpDeserializer <ShapeProperty > _DESERIALIZER = ObjectBuilderDeserializer .lazy (
224
- Builder ::new ,
225
- ShapeProperty :: setupShapePropertyDeserializer
225
+ public static final JsonpDeserializer <XyShapeProperty > _DESERIALIZER = ObjectBuilderDeserializer .lazy (
226
+ XyShapeProperty . Builder ::new ,
227
+ XyShapeProperty :: setupXyShapePropertyDeserializer
226
228
);
227
229
228
- protected static void setupShapePropertyDeserializer (ObjectDeserializer <ShapeProperty .Builder > op ) {
230
+ protected static void setupXyShapePropertyDeserializer (ObjectDeserializer <XyShapeProperty .Builder > op ) {
229
231
DocValuesPropertyBase .setupDocValuesPropertyBaseDeserializer (op );
230
- op .add (Builder ::coerce , JsonpDeserializer .booleanDeserializer (), "coerce" );
231
- op .add (Builder ::ignoreMalformed , JsonpDeserializer .booleanDeserializer (), "ignore_malformed" );
232
- op .add (Builder ::ignoreZValue , JsonpDeserializer .booleanDeserializer (), "ignore_z_value" );
233
- op .add (Builder ::orientation , GeoOrientation ._DESERIALIZER , "orientation" );
232
+ op .add (XyShapeProperty . Builder ::coerce , JsonpDeserializer .booleanDeserializer (), "coerce" );
233
+ op .add (XyShapeProperty . Builder ::ignoreMalformed , JsonpDeserializer .booleanDeserializer (), "ignore_malformed" );
234
+ op .add (XyShapeProperty . Builder ::ignoreZValue , JsonpDeserializer .booleanDeserializer (), "ignore_z_value" );
235
+ op .add (XyShapeProperty . Builder ::orientation , GeoOrientation ._DESERIALIZER , "orientation" );
234
236
235
237
op .ignore ("type" );
236
238
}
0 commit comments