@@ -83,12 +83,14 @@ public class DeleteByQueryResponse implements JsonpSerializable {
83
83
@ Nullable
84
84
private final Time throttled ;
85
85
86
- private final long throttledMillis ;
86
+ @ Nullable
87
+ private final Long throttledMillis ;
87
88
88
89
@ Nullable
89
90
private final Time throttledUntil ;
90
91
91
- private final long throttledUntilMillis ;
92
+ @ Nullable
93
+ private final Long throttledUntilMillis ;
92
94
93
95
@ Nullable
94
96
private final Boolean timedOut ;
@@ -115,10 +117,9 @@ private DeleteByQueryResponse(Builder builder) {
115
117
this .sliceId = builder .sliceId ;
116
118
this .task = builder .task ;
117
119
this .throttled = builder .throttled ;
118
- this .throttledMillis = ApiTypeHelper . requireNonNull ( builder .throttledMillis , this , "throttledMillis" ) ;
120
+ this .throttledMillis = builder .throttledMillis ;
119
121
this .throttledUntil = builder .throttledUntil ;
120
- this .throttledUntilMillis = ApiTypeHelper .requireNonNull (builder .throttledUntilMillis , this ,
121
- "throttledUntilMillis" );
122
+ this .throttledUntilMillis = builder .throttledUntilMillis ;
122
123
this .timedOut = builder .timedOut ;
123
124
this .took = builder .took ;
124
125
this .total = builder .total ;
@@ -202,9 +203,10 @@ public final Time throttled() {
202
203
}
203
204
204
205
/**
205
- * Required - API name: {@code throttled_millis}
206
+ * API name: {@code throttled_millis}
206
207
*/
207
- public final long throttledMillis () {
208
+ @ Nullable
209
+ public final Long throttledMillis () {
208
210
return this .throttledMillis ;
209
211
}
210
212
@@ -217,9 +219,10 @@ public final Time throttledUntil() {
217
219
}
218
220
219
221
/**
220
- * Required - API name: {@code throttled_until_millis}
222
+ * API name: {@code throttled_until_millis}
221
223
*/
222
- public final long throttledUntilMillis () {
224
+ @ Nullable
225
+ public final Long throttledUntilMillis () {
223
226
return this .throttledUntilMillis ;
224
227
}
225
228
@@ -316,17 +319,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
316
319
this .throttled .serialize (generator , mapper );
317
320
318
321
}
319
- generator .writeKey ("throttled_millis" );
320
- generator .write (this .throttledMillis );
322
+ if (this .throttledMillis != null ) {
323
+ generator .writeKey ("throttled_millis" );
324
+ generator .write (this .throttledMillis );
321
325
326
+ }
322
327
if (this .throttledUntil != null ) {
323
328
generator .writeKey ("throttled_until" );
324
329
this .throttledUntil .serialize (generator , mapper );
325
330
326
331
}
327
- generator .writeKey ("throttled_until_millis" );
328
- generator .write (this .throttledUntilMillis );
332
+ if (this .throttledUntilMillis != null ) {
333
+ generator .writeKey ("throttled_until_millis" );
334
+ generator .write (this .throttledUntilMillis );
329
335
336
+ }
330
337
if (this .timedOut != null ) {
331
338
generator .writeKey ("timed_out" );
332
339
generator .write (this .timedOut );
@@ -391,11 +398,13 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
391
398
@ Nullable
392
399
private Time throttled ;
393
400
401
+ @ Nullable
394
402
private Long throttledMillis ;
395
403
396
404
@ Nullable
397
405
private Time throttledUntil ;
398
406
407
+ @ Nullable
399
408
private Long throttledUntilMillis ;
400
409
401
410
@ Nullable
@@ -519,9 +528,9 @@ public final Builder throttled(Function<Time.Builder, ObjectBuilder<Time>> fn) {
519
528
}
520
529
521
530
/**
522
- * Required - API name: {@code throttled_millis}
531
+ * API name: {@code throttled_millis}
523
532
*/
524
- public final Builder throttledMillis (long value ) {
533
+ public final Builder throttledMillis (@ Nullable Long value ) {
525
534
this .throttledMillis = value ;
526
535
return this ;
527
536
}
@@ -542,9 +551,9 @@ public final Builder throttledUntil(Function<Time.Builder, ObjectBuilder<Time>>
542
551
}
543
552
544
553
/**
545
- * Required - API name: {@code throttled_until_millis}
554
+ * API name: {@code throttled_until_millis}
546
555
*/
547
- public final Builder throttledUntilMillis (long value ) {
556
+ public final Builder throttledUntilMillis (@ Nullable Long value ) {
548
557
this .throttledUntilMillis = value ;
549
558
return this ;
550
559
}
0 commit comments