Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-generated client code using latest OpenSearch API specification #1364

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public abstract class TaskInfoBase implements PlainJsonSerializable {

private final boolean cancellable;

@Nullable
private final Long cancellationTimeMillis;

@Nullable
private final Boolean cancelled;

Expand Down Expand Up @@ -101,6 +104,7 @@ public abstract class TaskInfoBase implements PlainJsonSerializable {
protected TaskInfoBase(AbstractBuilder<?> builder) {
this.action = ApiTypeHelper.requireNonNull(builder.action, this, "action");
this.cancellable = ApiTypeHelper.requireNonNull(builder.cancellable, this, "cancellable");
this.cancellationTimeMillis = builder.cancellationTimeMillis;
this.cancelled = builder.cancelled;
this.description = builder.description;
this.headers = ApiTypeHelper.unmodifiableRequired(builder.headers, this, "headers");
Expand Down Expand Up @@ -130,6 +134,14 @@ public final boolean cancellable() {
return this.cancellable;
}

/**
* API name: {@code cancellation_time_millis}
*/
@Nullable
public final Long cancellationTimeMillis() {
return this.cancellationTimeMillis;
}

/**
* API name: {@code cancelled}
*/
Expand Down Expand Up @@ -240,6 +252,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("cancellable");
generator.write(this.cancellable);

if (this.cancellationTimeMillis != null) {
generator.writeKey("cancellation_time_millis");
generator.write(this.cancellationTimeMillis);
}

if (this.cancelled != null) {
generator.writeKey("cancelled");
generator.write(this.cancelled);
Expand Down Expand Up @@ -300,6 +317,8 @@ protected abstract static class AbstractBuilder<BuilderT extends AbstractBuilder
private String action;
private Boolean cancellable;
@Nullable
private Long cancellationTimeMillis;
@Nullable
private Boolean cancelled;
@Nullable
private String description;
Expand All @@ -323,6 +342,7 @@ protected AbstractBuilder() {}
protected AbstractBuilder(TaskInfoBase o) {
this.action = o.action;
this.cancellable = o.cancellable;
this.cancellationTimeMillis = o.cancellationTimeMillis;
this.cancelled = o.cancelled;
this.description = o.description;
this.headers = _mapCopy(o.headers);
Expand All @@ -340,6 +360,7 @@ protected AbstractBuilder(TaskInfoBase o) {
protected AbstractBuilder(AbstractBuilder<BuilderT> o) {
this.action = o.action;
this.cancellable = o.cancellable;
this.cancellationTimeMillis = o.cancellationTimeMillis;
this.cancelled = o.cancelled;
this.description = o.description;
this.headers = _mapCopy(o.headers);
Expand Down Expand Up @@ -375,6 +396,15 @@ public final BuilderT cancellable(boolean value) {
return self();
}

/**
* API name: {@code cancellation_time_millis}
*/
@Nonnull
public final BuilderT cancellationTimeMillis(@Nullable Long value) {
this.cancellationTimeMillis = value;
return self();
}

/**
* API name: {@code cancelled}
*/
Expand Down Expand Up @@ -530,6 +560,7 @@ public final BuilderT type(String value) {
protected static <BuilderT extends AbstractBuilder<BuilderT>> void setupTaskInfoBaseDeserializer(ObjectDeserializer<BuilderT> op) {
op.add(AbstractBuilder::action, JsonpDeserializer.stringDeserializer(), "action");
op.add(AbstractBuilder::cancellable, JsonpDeserializer.booleanDeserializer(), "cancellable");
op.add(AbstractBuilder::cancellationTimeMillis, JsonpDeserializer.longDeserializer(), "cancellation_time_millis");
op.add(AbstractBuilder::cancelled, JsonpDeserializer.booleanDeserializer(), "cancelled");
op.add(AbstractBuilder::description, JsonpDeserializer.stringDeserializer(), "description");
op.add(AbstractBuilder::headers, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "headers");
Expand All @@ -549,6 +580,7 @@ public int hashCode() {
int result = 17;
result = 31 * result + this.action.hashCode();
result = 31 * result + Boolean.hashCode(this.cancellable);
result = 31 * result + Objects.hashCode(this.cancellationTimeMillis);
result = 31 * result + Objects.hashCode(this.cancelled);
result = 31 * result + Objects.hashCode(this.description);
result = 31 * result + this.headers.hashCode();
Expand All @@ -571,6 +603,7 @@ public boolean equals(Object o) {
TaskInfoBase other = (TaskInfoBase) o;
return this.action.equals(other.action)
&& this.cancellable == other.cancellable
&& Objects.equals(this.cancellationTimeMillis, other.cancellationTimeMillis)
&& Objects.equals(this.cancelled, other.cancelled)
&& Objects.equals(this.description, other.description)
&& this.headers.equals(other.headers)
Expand Down
63 changes: 55 additions & 8 deletions java-codegen/opensearch-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6521,6 +6521,8 @@ paths:
responses:
'200':
$ref: '#/components/responses/security.update_distinguished_name___200'
'201':
$ref: '#/components/responses/security.update_distinguished_name___201'
'400':
$ref: '#/components/responses/security.update_distinguished_name___400'
'403':
Expand Down Expand Up @@ -8009,7 +8011,7 @@ paths:
operationId: reindex_rethrottle.0
x-operation-group: reindex_rethrottle
x-version-added: '1.0'
description: Changes the number of requests per second for a particular Reindex operation.
description: Changes the number of requests per second for a particular reindex operation.
externalDocs:
url: https://opensearch.org/docs/latest
parameters:
Expand Down Expand Up @@ -8690,6 +8692,8 @@ paths:
responses:
'200':
$ref: '#/components/responses/clear_scroll___200'
'404':
$ref: '#/components/responses/clear_scroll___404'
get:
operationId: scroll.0
x-operation-group: scroll
Expand Down Expand Up @@ -8755,6 +8759,8 @@ paths:
responses:
'200':
$ref: '#/components/responses/clear_scroll___200'
'404':
$ref: '#/components/responses/clear_scroll___404'
get:
operationId: scroll.2
x-operation-group: scroll
Expand Down Expand Up @@ -14040,6 +14046,8 @@ paths:
responses:
'200':
$ref: '#/components/responses/security.update_distinguished_name___200'
'201':
$ref: '#/components/responses/security.update_distinguished_name___201'
'400':
$ref: '#/components/responses/security.update_distinguished_name___400'
'403':
Expand Down Expand Up @@ -27451,9 +27459,6 @@ components:
$ref: '#/components/schemas/_common___Duration'
scroll_id:
$ref: '#/components/schemas/_common___ScrollId'
required:
- scroll_id
description: The scroll ID if not passed by URL or query parameter.
search:
content:
application/json:
Expand Down Expand Up @@ -27780,7 +27785,7 @@ components:
content:
application/json:
schema:
$ref: '#/components/schemas/security._common___PatchOperation'
$ref: '#/components/schemas/security._common___PatchOperations'
security.patch_distinguished_names:
content:
application/json:
Expand Down Expand Up @@ -28504,6 +28509,21 @@ components:
- num_freed
- succeeded
description: ''
clear_scroll___404:
content:
application/json:
schema:
type: object
properties:
succeeded:
type: boolean
num_freed:
type: integer
format: int32
required:
- num_freed
- succeeded
description: ''
cluster.allocation_explain___200:
content:
application/json:
Expand Down Expand Up @@ -31202,7 +31222,7 @@ components:
content:
application/json:
schema:
$ref: '#/components/schemas/security._common___DistinguishedNames'
$ref: '#/components/schemas/security._common___DistinguishedNamesMap'
security.get_distinguished_name___400:
content:
application/json:
Expand Down Expand Up @@ -31626,6 +31646,12 @@ components:
schema:
$ref: '#/components/schemas/security._common___Ok'
description: ''
security.update_distinguished_name___201:
content:
application/json:
schema:
$ref: '#/components/schemas/security._common___Ok'
description: ''
security.update_distinguished_name___400:
content:
application/json:
Expand Down Expand Up @@ -31945,8 +31971,9 @@ components:
format: int64
_version:
$ref: '#/components/schemas/_common___VersionNumber'
_type:
$ref: '#/components/schemas/_common___Type'
required:
- _id
- _index
- _version
- found
Expand Down Expand Up @@ -32016,6 +32043,10 @@ components:
type: object
additionalProperties:
$ref: '#/components/schemas/_core.update_by_query_rethrottle___UpdateByQueryRethrottleNode'
node_failures:
type: array
items:
$ref: '#/components/schemas/_common___ErrorCause'
required:
- nodes
description: ''
Expand Down Expand Up @@ -33906,6 +33937,7 @@ components:
- dfs_query_then_fetch
- query_then_fetch
_common___SegmentReplicationStats:
x-version-added: 2.10.0
oneOf:
- x-version-added: 2.10.0
x-version-removed: 2.12.0
Expand Down Expand Up @@ -34013,6 +34045,7 @@ components:
remote_store:
$ref: '#/components/schemas/_common___RemoteStoreStats'
segment_replication:
x-version-added: 2.10.0
$ref: '#/components/schemas/_common___SegmentReplicationStats'
required:
- count
Expand Down Expand Up @@ -43683,7 +43716,9 @@ components:
The value is the variable value.
type: object
additionalProperties:
type: object
oneOf:
- type: string
- type: object
profile:
description: When `true`, provides a profile for the query execution.
type: boolean
Expand Down Expand Up @@ -43927,6 +43962,8 @@ components:
$ref: '#/components/schemas/_core.termvectors___TermVector'
error:
$ref: '#/components/schemas/_common___ErrorCause'
_type:
$ref: '#/components/schemas/_common___Type'
required:
- _id
- _index
Expand Down Expand Up @@ -44168,12 +44205,16 @@ components:
type: string
cancellable:
type: boolean
cancelled:
type: boolean
description:
type: string
id:
type: number
node:
$ref: '#/components/schemas/_common___Name'
resource_stats:
$ref: '#/components/schemas/_common___ResourceStats'
running_time_in_nanos:
$ref: '#/components/schemas/_common___DurationValueUnitNanos'
start_time_in_millis:
Expand Down Expand Up @@ -58066,6 +58107,10 @@ components:
required:
- op
- path
security._common___PatchOperations:
type: array
items:
$ref: '#/components/schemas/security._common___PatchOperation'
security._common___PermissionsInfo:
type: object
properties:
Expand Down Expand Up @@ -59197,6 +59242,8 @@ components:
type: boolean
cancellable:
type: boolean
cancellation_time_millis:
$ref: '#/components/schemas/_common___EpochTimeUnitMillis'
description:
type: string
headers:
Expand Down
Loading