Skip to content

Commit 8896d26

Browse files
opensearch-trigger-bot[bot]github-actions[bot]
andauthoredDec 23, 2024··
Re-generate client code using latest OpenSearch API specification (2024-12-23) (opensearch-project#1364)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 9f9ea7c commit 8896d26

File tree

2 files changed

+88
-8
lines changed

2 files changed

+88
-8
lines changed
 

‎java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfoBase.java

+33
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public abstract class TaskInfoBase implements PlainJsonSerializable {
6363

6464
private final boolean cancellable;
6565

66+
@Nullable
67+
private final Long cancellationTimeMillis;
68+
6669
@Nullable
6770
private final Boolean cancelled;
6871

@@ -101,6 +104,7 @@ public abstract class TaskInfoBase implements PlainJsonSerializable {
101104
protected TaskInfoBase(AbstractBuilder<?> builder) {
102105
this.action = ApiTypeHelper.requireNonNull(builder.action, this, "action");
103106
this.cancellable = ApiTypeHelper.requireNonNull(builder.cancellable, this, "cancellable");
107+
this.cancellationTimeMillis = builder.cancellationTimeMillis;
104108
this.cancelled = builder.cancelled;
105109
this.description = builder.description;
106110
this.headers = ApiTypeHelper.unmodifiableRequired(builder.headers, this, "headers");
@@ -130,6 +134,14 @@ public final boolean cancellable() {
130134
return this.cancellable;
131135
}
132136

137+
/**
138+
* API name: {@code cancellation_time_millis}
139+
*/
140+
@Nullable
141+
public final Long cancellationTimeMillis() {
142+
return this.cancellationTimeMillis;
143+
}
144+
133145
/**
134146
* API name: {@code cancelled}
135147
*/
@@ -240,6 +252,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
240252
generator.writeKey("cancellable");
241253
generator.write(this.cancellable);
242254

255+
if (this.cancellationTimeMillis != null) {
256+
generator.writeKey("cancellation_time_millis");
257+
generator.write(this.cancellationTimeMillis);
258+
}
259+
243260
if (this.cancelled != null) {
244261
generator.writeKey("cancelled");
245262
generator.write(this.cancelled);
@@ -300,6 +317,8 @@ protected abstract static class AbstractBuilder<BuilderT extends AbstractBuilder
300317
private String action;
301318
private Boolean cancellable;
302319
@Nullable
320+
private Long cancellationTimeMillis;
321+
@Nullable
303322
private Boolean cancelled;
304323
@Nullable
305324
private String description;
@@ -323,6 +342,7 @@ protected AbstractBuilder() {}
323342
protected AbstractBuilder(TaskInfoBase o) {
324343
this.action = o.action;
325344
this.cancellable = o.cancellable;
345+
this.cancellationTimeMillis = o.cancellationTimeMillis;
326346
this.cancelled = o.cancelled;
327347
this.description = o.description;
328348
this.headers = _mapCopy(o.headers);
@@ -340,6 +360,7 @@ protected AbstractBuilder(TaskInfoBase o) {
340360
protected AbstractBuilder(AbstractBuilder<BuilderT> o) {
341361
this.action = o.action;
342362
this.cancellable = o.cancellable;
363+
this.cancellationTimeMillis = o.cancellationTimeMillis;
343364
this.cancelled = o.cancelled;
344365
this.description = o.description;
345366
this.headers = _mapCopy(o.headers);
@@ -375,6 +396,15 @@ public final BuilderT cancellable(boolean value) {
375396
return self();
376397
}
377398

399+
/**
400+
* API name: {@code cancellation_time_millis}
401+
*/
402+
@Nonnull
403+
public final BuilderT cancellationTimeMillis(@Nullable Long value) {
404+
this.cancellationTimeMillis = value;
405+
return self();
406+
}
407+
378408
/**
379409
* API name: {@code cancelled}
380410
*/
@@ -530,6 +560,7 @@ public final BuilderT type(String value) {
530560
protected static <BuilderT extends AbstractBuilder<BuilderT>> void setupTaskInfoBaseDeserializer(ObjectDeserializer<BuilderT> op) {
531561
op.add(AbstractBuilder::action, JsonpDeserializer.stringDeserializer(), "action");
532562
op.add(AbstractBuilder::cancellable, JsonpDeserializer.booleanDeserializer(), "cancellable");
563+
op.add(AbstractBuilder::cancellationTimeMillis, JsonpDeserializer.longDeserializer(), "cancellation_time_millis");
533564
op.add(AbstractBuilder::cancelled, JsonpDeserializer.booleanDeserializer(), "cancelled");
534565
op.add(AbstractBuilder::description, JsonpDeserializer.stringDeserializer(), "description");
535566
op.add(AbstractBuilder::headers, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "headers");
@@ -549,6 +580,7 @@ public int hashCode() {
549580
int result = 17;
550581
result = 31 * result + this.action.hashCode();
551582
result = 31 * result + Boolean.hashCode(this.cancellable);
583+
result = 31 * result + Objects.hashCode(this.cancellationTimeMillis);
552584
result = 31 * result + Objects.hashCode(this.cancelled);
553585
result = 31 * result + Objects.hashCode(this.description);
554586
result = 31 * result + this.headers.hashCode();
@@ -571,6 +603,7 @@ public boolean equals(Object o) {
571603
TaskInfoBase other = (TaskInfoBase) o;
572604
return this.action.equals(other.action)
573605
&& this.cancellable == other.cancellable
606+
&& Objects.equals(this.cancellationTimeMillis, other.cancellationTimeMillis)
574607
&& Objects.equals(this.cancelled, other.cancelled)
575608
&& Objects.equals(this.description, other.description)
576609
&& this.headers.equals(other.headers)

‎java-codegen/opensearch-openapi.yaml

+55-8
Original file line numberDiff line numberDiff line change
@@ -6521,6 +6521,8 @@ paths:
65216521
responses:
65226522
'200':
65236523
$ref: '#/components/responses/security.update_distinguished_name___200'
6524+
'201':
6525+
$ref: '#/components/responses/security.update_distinguished_name___201'
65246526
'400':
65256527
$ref: '#/components/responses/security.update_distinguished_name___400'
65266528
'403':
@@ -8009,7 +8011,7 @@ paths:
80098011
operationId: reindex_rethrottle.0
80108012
x-operation-group: reindex_rethrottle
80118013
x-version-added: '1.0'
8012-
description: Changes the number of requests per second for a particular Reindex operation.
8014+
description: Changes the number of requests per second for a particular reindex operation.
80138015
externalDocs:
80148016
url: https://opensearch.org/docs/latest
80158017
parameters:
@@ -8690,6 +8692,8 @@ paths:
86908692
responses:
86918693
'200':
86928694
$ref: '#/components/responses/clear_scroll___200'
8695+
'404':
8696+
$ref: '#/components/responses/clear_scroll___404'
86938697
get:
86948698
operationId: scroll.0
86958699
x-operation-group: scroll
@@ -8755,6 +8759,8 @@ paths:
87558759
responses:
87568760
'200':
87578761
$ref: '#/components/responses/clear_scroll___200'
8762+
'404':
8763+
$ref: '#/components/responses/clear_scroll___404'
87588764
get:
87598765
operationId: scroll.2
87608766
x-operation-group: scroll
@@ -14040,6 +14046,8 @@ paths:
1404014046
responses:
1404114047
'200':
1404214048
$ref: '#/components/responses/security.update_distinguished_name___200'
14049+
'201':
14050+
$ref: '#/components/responses/security.update_distinguished_name___201'
1404314051
'400':
1404414052
$ref: '#/components/responses/security.update_distinguished_name___400'
1404514053
'403':
@@ -27451,9 +27459,6 @@ components:
2745127459
$ref: '#/components/schemas/_common___Duration'
2745227460
scroll_id:
2745327461
$ref: '#/components/schemas/_common___ScrollId'
27454-
required:
27455-
- scroll_id
27456-
description: The scroll ID if not passed by URL or query parameter.
2745727462
search:
2745827463
content:
2745927464
application/json:
@@ -27780,7 +27785,7 @@ components:
2778027785
content:
2778127786
application/json:
2778227787
schema:
27783-
$ref: '#/components/schemas/security._common___PatchOperation'
27788+
$ref: '#/components/schemas/security._common___PatchOperations'
2778427789
security.patch_distinguished_names:
2778527790
content:
2778627791
application/json:
@@ -28504,6 +28509,21 @@ components:
2850428509
- num_freed
2850528510
- succeeded
2850628511
description: ''
28512+
clear_scroll___404:
28513+
content:
28514+
application/json:
28515+
schema:
28516+
type: object
28517+
properties:
28518+
succeeded:
28519+
type: boolean
28520+
num_freed:
28521+
type: integer
28522+
format: int32
28523+
required:
28524+
- num_freed
28525+
- succeeded
28526+
description: ''
2850728527
cluster.allocation_explain___200:
2850828528
content:
2850928529
application/json:
@@ -31202,7 +31222,7 @@ components:
3120231222
content:
3120331223
application/json:
3120431224
schema:
31205-
$ref: '#/components/schemas/security._common___DistinguishedNames'
31225+
$ref: '#/components/schemas/security._common___DistinguishedNamesMap'
3120631226
security.get_distinguished_name___400:
3120731227
content:
3120831228
application/json:
@@ -31626,6 +31646,12 @@ components:
3162631646
schema:
3162731647
$ref: '#/components/schemas/security._common___Ok'
3162831648
description: ''
31649+
security.update_distinguished_name___201:
31650+
content:
31651+
application/json:
31652+
schema:
31653+
$ref: '#/components/schemas/security._common___Ok'
31654+
description: ''
3162931655
security.update_distinguished_name___400:
3163031656
content:
3163131657
application/json:
@@ -31945,8 +31971,9 @@ components:
3194531971
format: int64
3194631972
_version:
3194731973
$ref: '#/components/schemas/_common___VersionNumber'
31974+
_type:
31975+
$ref: '#/components/schemas/_common___Type'
3194831976
required:
31949-
- _id
3195031977
- _index
3195131978
- _version
3195231979
- found
@@ -32016,6 +32043,10 @@ components:
3201632043
type: object
3201732044
additionalProperties:
3201832045
$ref: '#/components/schemas/_core.update_by_query_rethrottle___UpdateByQueryRethrottleNode'
32046+
node_failures:
32047+
type: array
32048+
items:
32049+
$ref: '#/components/schemas/_common___ErrorCause'
3201932050
required:
3202032051
- nodes
3202132052
description: ''
@@ -33906,6 +33937,7 @@ components:
3390633937
- dfs_query_then_fetch
3390733938
- query_then_fetch
3390833939
_common___SegmentReplicationStats:
33940+
x-version-added: 2.10.0
3390933941
oneOf:
3391033942
- x-version-added: 2.10.0
3391133943
x-version-removed: 2.12.0
@@ -34013,6 +34045,7 @@ components:
3401334045
remote_store:
3401434046
$ref: '#/components/schemas/_common___RemoteStoreStats'
3401534047
segment_replication:
34048+
x-version-added: 2.10.0
3401634049
$ref: '#/components/schemas/_common___SegmentReplicationStats'
3401734050
required:
3401834051
- count
@@ -43683,7 +43716,9 @@ components:
4368343716
The value is the variable value.
4368443717
type: object
4368543718
additionalProperties:
43686-
type: object
43719+
oneOf:
43720+
- type: string
43721+
- type: object
4368743722
profile:
4368843723
description: When `true`, provides a profile for the query execution.
4368943724
type: boolean
@@ -43927,6 +43962,8 @@ components:
4392743962
$ref: '#/components/schemas/_core.termvectors___TermVector'
4392843963
error:
4392943964
$ref: '#/components/schemas/_common___ErrorCause'
43965+
_type:
43966+
$ref: '#/components/schemas/_common___Type'
4393043967
required:
4393143968
- _id
4393243969
- _index
@@ -44168,12 +44205,16 @@ components:
4416844205
type: string
4416944206
cancellable:
4417044207
type: boolean
44208+
cancelled:
44209+
type: boolean
4417144210
description:
4417244211
type: string
4417344212
id:
4417444213
type: number
4417544214
node:
4417644215
$ref: '#/components/schemas/_common___Name'
44216+
resource_stats:
44217+
$ref: '#/components/schemas/_common___ResourceStats'
4417744218
running_time_in_nanos:
4417844219
$ref: '#/components/schemas/_common___DurationValueUnitNanos'
4417944220
start_time_in_millis:
@@ -58066,6 +58107,10 @@ components:
5806658107
required:
5806758108
- op
5806858109
- path
58110+
security._common___PatchOperations:
58111+
type: array
58112+
items:
58113+
$ref: '#/components/schemas/security._common___PatchOperation'
5806958114
security._common___PermissionsInfo:
5807058115
type: object
5807158116
properties:
@@ -59197,6 +59242,8 @@ components:
5919759242
type: boolean
5919859243
cancellable:
5919959244
type: boolean
59245+
cancellation_time_millis:
59246+
$ref: '#/components/schemas/_common___EpochTimeUnitMillis'
5920059247
description:
5920159248
type: string
5920259249
headers:

0 commit comments

Comments
 (0)
Please sign in to comment.