From 897cc9bb34d05dd852b1a0b2fcd5621d9bd81628 Mon Sep 17 00:00:00 2001
From: Thomas Farr
Date: Wed, 2 Oct 2024 03:22:24 +1300
Subject: [PATCH] Re-run codegen (#1216)
* Re-run codegen
Signed-off-by: Thomas Farr
* Improve null handling
Signed-off-by: Thomas Farr
---------
Signed-off-by: Thomas Farr
---
.../_types/AcknowledgedResponseBase.java | 4 +-
.../client/opensearch/_types/BaseNode.java | 11 +++-
.../_types/BulkByScrollFailure.java | 8 +--
.../_types/BulkByScrollTaskStatus.java | 37 ++++++++------
.../BulkByScrollTaskStatusOrException.java | 10 ++--
.../client/opensearch/_types/ErrorCause.java | 13 ++++-
.../opensearch/_types/NodeStatistics.java | 11 ++--
.../_types/OpenSearchVersionInfo.java | 37 ++++++++++----
.../client/opensearch/_types/Retries.java | 4 +-
.../opensearch/_types/ShardFailure.java | 9 ++--
.../opensearch/_types/ShardStatistics.java | 15 +++---
.../client/opensearch/_types/TaskFailure.java | 18 ++++---
.../opensearch/_types/WriteResponseBase.java | 29 +++++++----
.../client/opensearch/core/InfoRequest.java | 2 +-
.../client/opensearch/core/InfoResponse.java | 24 ++++++---
.../DeleteDanglingIndexRequest.java | 9 ++--
.../DeleteDanglingIndexResponse.java | 2 +-
.../ImportDanglingIndexRequest.java | 9 ++--
.../ImportDanglingIndexResponse.java | 2 +-
.../ListDanglingIndicesRequest.java | 2 +-
.../ListDanglingIndicesResponse.java | 7 ++-
.../list_dangling_indices/DanglingIndex.java | 17 +++++--
.../client/opensearch/ml/Action.java | 2 +-
.../client/opensearch/ml/ClientConfig.java | 26 +++++-----
.../opensearch/ml/CreateConnectorRequest.java | 29 ++++++++---
.../ml/CreateConnectorResponse.java | 2 +-
.../client/opensearch/ml/Credential.java | 5 +-
.../opensearch/ml/DeleteAgentRequest.java | 8 +--
.../opensearch/ml/DeleteAgentResponse.java | 2 +-
.../opensearch/ml/DeleteConnectorRequest.java | 8 +--
.../ml/DeleteConnectorResponse.java | 2 +-
.../ml/DeleteModelGroupRequest.java | 8 +--
.../ml/DeleteModelGroupResponse.java | 2 +-
.../opensearch/ml/DeleteModelRequest.java | 8 +--
.../opensearch/ml/DeleteModelResponse.java | 2 +-
.../opensearch/ml/DeleteTaskRequest.java | 8 +--
.../opensearch/ml/DeleteTaskResponse.java | 2 +-
.../opensearch/ml/DeployModelRequest.java | 8 +--
.../opensearch/ml/DeployModelResponse.java | 11 ++--
.../opensearch/ml/GetModelGroupRequest.java | 8 +--
.../opensearch/ml/GetModelGroupResponse.java | 25 +++++----
.../client/opensearch/ml/GetTaskRequest.java | 8 +--
.../client/opensearch/ml/GetTaskResponse.java | 21 +++++---
.../client/opensearch/ml/Headers.java | 5 +-
.../opensearch/client/opensearch/ml/LLM.java | 5 +-
.../client/opensearch/ml/Memory.java | 2 +-
.../opensearch/ml/RegisterAgentsRequest.java | 15 ++++--
.../opensearch/ml/RegisterAgentsResponse.java | 2 +-
.../ml/RegisterModelGroupRequest.java | 13 +++--
.../ml/RegisterModelGroupResponse.java | 10 ++--
.../opensearch/ml/RegisterModelRequest.java | 15 ++++--
.../opensearch/ml/RegisterModelResponse.java | 10 ++--
.../client/opensearch/ml/ToolItems.java | 7 ++-
.../opensearch/ml/UndeployModelNode.java | 5 +-
.../opensearch/ml/UndeployModelRequest.java | 8 +--
.../opensearch/ml/UndeployModelResponse.java | 5 +-
.../snapshot/CleanupRepositoryRequest.java | 23 +++++++++
.../snapshot/CleanupRepositoryResponse.java | 16 ++++++
.../snapshot/CloneSnapshotRequest.java | 33 ++++++++++++
.../snapshot/CloneSnapshotResponse.java | 14 +++++
.../snapshot/VerifyRepositoryRequest.java | 23 +++++++++
.../snapshot/VerifyRepositoryResponse.java | 16 ++++++
.../CleanupRepositoryResults.java | 14 +++++
.../verify_repository/CompactNodeInfo.java | 16 ++++++
.../opensearch/tasks/CancelRequest.java | 11 ++--
.../opensearch/tasks/CancelResponse.java | 2 +-
.../opensearch/tasks/GetTasksRequest.java | 11 ++--
.../opensearch/tasks/GetTasksResponse.java | 9 ++--
.../client/opensearch/tasks/ListRequest.java | 15 ++++--
.../client/opensearch/tasks/ListResponse.java | 2 +-
.../client/opensearch/tasks/Status.java | 51 ++++++++++---------
.../opensearch/tasks/TaskExecutingNode.java | 8 +--
.../client/opensearch/tasks/TaskGroup.java | 5 +-
.../client/opensearch/tasks/TaskInfo.java | 31 +++++++----
.../client/opensearch/tasks/TaskInfos.java | 10 ++--
.../tasks/TaskListResponseBase.java | 9 +++-
.../client/opensearch/tasks/TaskResponse.java | 45 +++++++++-------
.../client/codegen/model/Field.java | 8 ---
.../opensearch/client/codegen/model/Type.java | 33 ++++--------
.../client/codegen/model/Types.java | 1 +
.../templates/ObjectShape/Equals.mustache | 17 ++++---
.../ObjectShape/FieldNullability.mustache | 13 +++++
.../templates/ObjectShape/Fields.mustache | 6 +--
.../templates/ObjectShape/Getters.mustache | 6 +--
.../templates/ObjectShape/HashCode.mustache | 23 +++++----
.../ObjectShape/TaggedUnionEquals.mustache | 6 ---
.../ObjectShape/TaggedUnionHashCode.mustache | 6 ---
.../templates/TaggedUnionShape.mustache | 5 +-
.../TaggedUnionShape/Equals.mustache | 6 +++
.../TaggedUnionShape/HashCode.mustache | 6 +++
.../templates/Type/deserializer.mustache | 20 ++++++--
.../templates/Type/directSerializer.mustache | 17 ++++---
.../templates/Type/queryParamify.mustache | 8 +--
93 files changed, 757 insertions(+), 365 deletions(-)
create mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldNullability.mustache
delete mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionEquals.mustache
delete mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionHashCode.mustache
create mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/Equals.mustache
create mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/HashCode.mustache
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java
index 631c4bdef1..13e2183302 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java
@@ -118,8 +118,8 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
AcknowledgedResponseBase other = (AcknowledgedResponseBase) o;
- return this.acknowledged() == other.acknowledged();
+ return this.acknowledged == other.acknowledged;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java
index bcd4083925..bcc2b4cf99 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java
@@ -41,6 +41,7 @@
import java.util.Map;
import java.util.Objects;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -54,6 +55,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public abstract class BaseNode implements PlainJsonSerializable {
+ @Nonnull
private final Map attributes;
@Nullable
@@ -62,8 +64,10 @@ public abstract class BaseNode implements PlainJsonSerializable {
@Nullable
private final String ip;
+ @Nonnull
private final String name;
+ @Nonnull
private final List roles;
@Nullable
@@ -83,6 +87,7 @@ protected BaseNode(AbstractBuilder> builder) {
/**
* API name: {@code attributes}
*/
+ @Nonnull
public final Map attributes() {
return this.attributes;
}
@@ -106,6 +111,7 @@ public final String ip() {
/**
* Required - API name: {@code name}
*/
+ @Nonnull
public final String name() {
return this.name;
}
@@ -113,6 +119,7 @@ public final String name() {
/**
* API name: {@code roles}
*/
+ @Nonnull
public final List roles() {
return this.roles;
}
@@ -296,12 +303,12 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
BaseNode other = (BaseNode) o;
return Objects.equals(this.attributes, other.attributes)
&& Objects.equals(this.host, other.host)
&& Objects.equals(this.ip, other.ip)
- && Objects.equals(this.name, other.name)
+ && this.name.equals(other.name)
&& Objects.equals(this.roles, other.roles)
&& Objects.equals(this.transportAddress, other.transportAddress);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java
index d3993eacfb..861e1f9a1e 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java
@@ -322,21 +322,21 @@ public int hashCode() {
result = 31 * result + Objects.hashCode(this.index);
result = 31 * result + Objects.hashCode(this.node);
result = 31 * result + Objects.hashCode(this.reason);
- result = 31 * result + Integer.hashCode(this.shard);
+ result = 31 * result + Objects.hashCode(this.shard);
result = 31 * result + Integer.hashCode(this.status);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
BulkByScrollFailure other = (BulkByScrollFailure) o;
return Objects.equals(this.cause, other.cause)
&& Objects.equals(this.id, other.id)
&& Objects.equals(this.index, other.index)
&& Objects.equals(this.node, other.node)
&& Objects.equals(this.reason, other.reason)
- && this.shard() == other.shard()
- && this.status() == other.status();
+ && Objects.equals(this.shard, other.shard)
+ && this.status == other.status;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatus.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatus.java
index e46bce36dd..57ec03b281 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatus.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatus.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -72,11 +73,13 @@ public class BulkByScrollTaskStatus implements PlainJsonSerializable {
private final float requestsPerSecond;
+ @Nonnull
private final Retries retries;
@Nullable
private final Integer sliceId;
+ @Nonnull
private final List slices;
@Nullable
@@ -183,6 +186,7 @@ public final float requestsPerSecond() {
/**
* Required - API name: {@code retries}
*/
+ @Nonnull
public final Retries retries() {
return this.retries;
}
@@ -198,6 +202,7 @@ public final Integer sliceId() {
/**
* API name: {@code slices}
*/
+ @Nonnull
public final List slices() {
return this.slices;
}
@@ -620,42 +625,42 @@ public int hashCode() {
int result = 17;
result = 31 * result + Integer.hashCode(this.batches);
result = 31 * result + Objects.hashCode(this.canceled);
- result = 31 * result + Long.hashCode(this.created);
+ result = 31 * result + Objects.hashCode(this.created);
result = 31 * result + Long.hashCode(this.deleted);
result = 31 * result + Long.hashCode(this.noops);
result = 31 * result + Float.hashCode(this.requestsPerSecond);
result = 31 * result + this.retries.hashCode();
- result = 31 * result + Integer.hashCode(this.sliceId);
+ result = 31 * result + Objects.hashCode(this.sliceId);
result = 31 * result + Objects.hashCode(this.slices);
result = 31 * result + Objects.hashCode(this.throttled);
result = 31 * result + Long.hashCode(this.throttledMillis);
result = 31 * result + Objects.hashCode(this.throttledUntil);
result = 31 * result + Long.hashCode(this.throttledUntilMillis);
result = 31 * result + Long.hashCode(this.total);
- result = 31 * result + Long.hashCode(this.updated);
+ result = 31 * result + Objects.hashCode(this.updated);
result = 31 * result + Long.hashCode(this.versionConflicts);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
BulkByScrollTaskStatus other = (BulkByScrollTaskStatus) o;
- return this.batches() == other.batches()
+ return this.batches == other.batches
&& Objects.equals(this.canceled, other.canceled)
- && this.created() == other.created()
- && this.deleted() == other.deleted()
- && this.noops() == other.noops()
- && this.requestsPerSecond() == other.requestsPerSecond()
- && Objects.equals(this.retries, other.retries)
- && this.sliceId() == other.sliceId()
+ && Objects.equals(this.created, other.created)
+ && this.deleted == other.deleted
+ && this.noops == other.noops
+ && this.requestsPerSecond == other.requestsPerSecond
+ && this.retries.equals(other.retries)
+ && Objects.equals(this.sliceId, other.sliceId)
&& Objects.equals(this.slices, other.slices)
&& Objects.equals(this.throttled, other.throttled)
- && this.throttledMillis() == other.throttledMillis()
+ && this.throttledMillis == other.throttledMillis
&& Objects.equals(this.throttledUntil, other.throttledUntil)
- && this.throttledUntilMillis() == other.throttledUntilMillis()
- && this.total() == other.total()
- && this.updated() == other.updated()
- && this.versionConflicts() == other.versionConflicts();
+ && this.throttledUntilMillis == other.throttledUntilMillis
+ && this.total == other.total
+ && Objects.equals(this.updated, other.updated)
+ && this.versionConflicts == other.versionConflicts;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatusOrException.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatusOrException.java
index e2425568f6..6b5f183514 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatusOrException.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollTaskStatusOrException.java
@@ -37,6 +37,7 @@
package org.opensearch.client.opensearch._types;
import jakarta.json.stream.JsonGenerator;
+import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
import org.opensearch.client.json.JsonpDeserializable;
@@ -178,16 +179,15 @@ private static JsonpDeserializer buildBulkByS
public int hashCode() {
int result = 17;
- result = 31 * result + _kind.hashCode();
- result = 31 * result + _value.hashCode();
+ result = 31 * result + Objects.hashCode(this._kind);
+ result = 31 * result + Objects.hashCode(this._value);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
BulkByScrollTaskStatusOrException other = (BulkByScrollTaskStatusOrException) o;
- return this._kind().equals(other._kind()) && this._get().equals(other._get());
+ return Objects.equals(this._kind, other._kind) && Objects.equals(this._value, other._value);
}
-
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java
index de1cad3599..36a0c74b71 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java
@@ -43,6 +43,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
@@ -67,15 +68,19 @@ public class ErrorCause implements PlainJsonSerializable {
@Nullable
private final String reason;
+ @Nonnull
private final List rootCause;
@Nullable
private final String stackTrace;
+ @Nonnull
private final List suppressed;
+ @Nonnull
private final String type;
+ @Nonnull
private final Map metadata;
// ---------------------------------------------------------------------------------------------
@@ -116,6 +121,7 @@ public final String reason() {
/**
* API name: {@code root_cause}
*/
+ @Nonnull
public final List rootCause() {
return this.rootCause;
}
@@ -134,6 +140,7 @@ public final String stackTrace() {
/**
* API name: {@code suppressed}
*/
+ @Nonnull
public final List suppressed() {
return this.suppressed;
}
@@ -144,6 +151,7 @@ public final List suppressed() {
* API name: {@code type}
*
*/
+ @Nonnull
public final String type() {
return this.type;
}
@@ -151,6 +159,7 @@ public final String type() {
/**
* Additional details about the error.
*/
+ @Nonnull
public final Map metadata() {
return this.metadata;
}
@@ -420,14 +429,14 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
ErrorCause other = (ErrorCause) o;
return Objects.equals(this.causedBy, other.causedBy)
&& Objects.equals(this.reason, other.reason)
&& Objects.equals(this.rootCause, other.rootCause)
&& Objects.equals(this.stackTrace, other.stackTrace)
&& Objects.equals(this.suppressed, other.suppressed)
- && Objects.equals(this.type, other.type)
+ && this.type.equals(other.type)
&& Objects.equals(this.metadata, other.metadata);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java
index 5a71fd4c40..953138ded1 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -60,6 +61,7 @@ public class NodeStatistics implements PlainJsonSerializable {
private final int failed;
+ @Nonnull
private final List failures;
private final int successful;
@@ -93,6 +95,7 @@ public final int failed() {
/**
* API name: {@code failures}
*/
+ @Nonnull
public final List failures() {
return this.failures;
}
@@ -268,11 +271,11 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
NodeStatistics other = (NodeStatistics) o;
- return this.failed() == other.failed()
+ return this.failed == other.failed
&& Objects.equals(this.failures, other.failures)
- && this.successful() == other.successful()
- && this.total() == other.total();
+ && this.successful == other.successful
+ && this.total == other.total;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java
index 2434eb05b7..a1654453c6 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java
@@ -40,6 +40,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -57,25 +58,33 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class OpenSearchVersionInfo implements PlainJsonSerializable {
+ @Nonnull
private final String buildDate;
@Nullable
private final String buildFlavor;
+ @Nonnull
private final String buildHash;
private final boolean buildSnapshot;
+ @Nonnull
private final String buildType;
+ @Nonnull
private final String distribution;
+ @Nonnull
private final String luceneVersion;
+ @Nonnull
private final String minimumIndexCompatibilityVersion;
+ @Nonnull
private final String minimumWireCompatibilityVersion;
+ @Nonnull
private final String number;
// ---------------------------------------------------------------------------------------------
@@ -108,6 +117,7 @@ public static OpenSearchVersionInfo of(Function failures;
@Nullable
@@ -93,6 +95,7 @@ public final int failed() {
/**
* API name: {@code failures}
*/
+ @Nonnull
public final List failures() {
return this.failures;
}
@@ -269,7 +272,7 @@ public int hashCode() {
int result = 17;
result = 31 * result + Integer.hashCode(this.failed);
result = 31 * result + Objects.hashCode(this.failures);
- result = 31 * result + Integer.hashCode(this.skipped);
+ result = 31 * result + Objects.hashCode(this.skipped);
result = 31 * result + Integer.hashCode(this.successful);
result = 31 * result + Integer.hashCode(this.total);
return result;
@@ -277,12 +280,12 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
ShardStatistics other = (ShardStatistics) o;
- return this.failed() == other.failed()
+ return this.failed == other.failed
&& Objects.equals(this.failures, other.failures)
- && this.skipped() == other.skipped()
- && this.successful() == other.successful()
- && this.total() == other.total();
+ && Objects.equals(this.skipped, other.skipped)
+ && this.successful == other.successful
+ && this.total == other.total;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TaskFailure.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TaskFailure.java
index fe173421a1..b2f8a7fcd5 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TaskFailure.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TaskFailure.java
@@ -37,9 +37,9 @@
package org.opensearch.client.opensearch._types;
import jakarta.json.stream.JsonGenerator;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -56,10 +56,13 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class TaskFailure implements PlainJsonSerializable {
+ @Nonnull
private final String nodeId;
+ @Nonnull
private final ErrorCause reason;
+ @Nonnull
private final String status;
private final int taskId;
@@ -80,6 +83,7 @@ public static TaskFailure of(Function> void setupWriteRes
public int hashCode() {
int result = 17;
- result = 31 * result + Boolean.hashCode(this.forcedRefresh);
+ result = 31 * result + Objects.hashCode(this.forcedRefresh);
result = 31 * result + this.id.hashCode();
result = 31 * result + this.index.hashCode();
result = 31 * result + Long.hashCode(this.primaryTerm);
@@ -294,15 +303,15 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
WriteResponseBase other = (WriteResponseBase) o;
- return this.forcedRefresh() == other.forcedRefresh()
- && Objects.equals(this.id, other.id)
- && Objects.equals(this.index, other.index)
- && this.primaryTerm() == other.primaryTerm()
- && Objects.equals(this.result, other.result)
- && this.seqNo() == other.seqNo()
- && Objects.equals(this.shards, other.shards)
- && this.version() == other.version();
+ return Objects.equals(this.forcedRefresh, other.forcedRefresh)
+ && this.id.equals(other.id)
+ && this.index.equals(other.index)
+ && this.primaryTerm == other.primaryTerm
+ && this.result.equals(other.result)
+ && this.seqNo == other.seqNo
+ && this.shards.equals(other.shards)
+ && this.version == other.version;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java
index b40292bc51..63f0b50600 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java
@@ -80,7 +80,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
return true;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java
index 8698576035..36fec1ee30 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java
@@ -37,9 +37,9 @@
package org.opensearch.client.opensearch.core;
import jakarta.json.stream.JsonGenerator;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -57,14 +57,19 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class InfoResponse implements PlainJsonSerializable {
+ @Nonnull
private final String clusterName;
+ @Nonnull
private final String clusterUuid;
+ @Nonnull
private final String name;
+ @Nonnull
private final String tagline;
+ @Nonnull
private final OpenSearchVersionInfo version;
// ---------------------------------------------------------------------------------------------
@@ -84,6 +89,7 @@ public static InfoResponse of(Function
*/
+ @Nonnull
public final String indexUuid() {
return this.indexUuid;
}
@@ -304,11 +307,11 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
DeleteDanglingIndexRequest other = (DeleteDanglingIndexRequest) o;
- return this.acceptDataLoss() == other.acceptDataLoss()
+ return this.acceptDataLoss == other.acceptDataLoss
&& Objects.equals(this.clusterManagerTimeout, other.clusterManagerTimeout)
- && Objects.equals(this.indexUuid, other.indexUuid)
+ && this.indexUuid.equals(other.indexUuid)
&& Objects.equals(this.masterTimeout, other.masterTimeout)
&& Objects.equals(this.timeout, other.timeout);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java
index 0f3d499cbf..abc22417e3 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/DeleteDanglingIndexResponse.java
@@ -112,7 +112,7 @@ public boolean equals(Object o) {
return false;
}
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
return true;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java
index 127d1763b8..466ae7c14d 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexRequest.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
@@ -64,6 +65,7 @@ public class ImportDanglingIndexRequest extends RequestBase {
@Nullable
private final Time clusterManagerTimeout;
+ @Nonnull
private final String indexUuid;
@Deprecated
@@ -116,6 +118,7 @@ public final Time clusterManagerTimeout() {
* API name: {@code index_uuid}
*
*/
+ @Nonnull
public final String indexUuid() {
return this.indexUuid;
}
@@ -304,11 +307,11 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
ImportDanglingIndexRequest other = (ImportDanglingIndexRequest) o;
- return this.acceptDataLoss() == other.acceptDataLoss()
+ return this.acceptDataLoss == other.acceptDataLoss
&& Objects.equals(this.clusterManagerTimeout, other.clusterManagerTimeout)
- && Objects.equals(this.indexUuid, other.indexUuid)
+ && this.indexUuid.equals(other.indexUuid)
&& Objects.equals(this.masterTimeout, other.masterTimeout)
&& Objects.equals(this.timeout, other.timeout);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java
index 586d116d62..f3da2fec28 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ImportDanglingIndexResponse.java
@@ -112,7 +112,7 @@ public boolean equals(Object o) {
return false;
}
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
return true;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java
index 5452b35c3b..15ca0305fe 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesRequest.java
@@ -80,7 +80,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
return true;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java
index 6b15626049..ca742edffb 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -63,6 +64,7 @@ public class ListDanglingIndicesResponse implements PlainJsonSerializable {
@Nullable
private final String clusterName;
+ @Nonnull
private final List danglingIndices;
@Nullable
@@ -93,6 +95,7 @@ public final String clusterName() {
/**
* Required - API name: {@code dangling_indices}
*/
+ @Nonnull
public final List danglingIndices() {
return this.danglingIndices;
}
@@ -242,10 +245,10 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
ListDanglingIndicesResponse other = (ListDanglingIndicesResponse) o;
return Objects.equals(this.clusterName, other.clusterName)
- && Objects.equals(this.danglingIndices, other.danglingIndices)
+ && this.danglingIndices.equals(other.danglingIndices)
&& Objects.equals(this.nodes, other.nodes);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java
index a3b848732b..8217d16f83 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -63,10 +64,13 @@ public class DanglingIndex implements PlainJsonSerializable {
private final long creationDateMillis;
+ @Nonnull
private final String indexName;
+ @Nonnull
private final String indexUuid;
+ @Nonnull
private final List nodeIds;
// ---------------------------------------------------------------------------------------------
@@ -101,6 +105,7 @@ public final long creationDateMillis() {
/**
* Required - API name: {@code index_name}
*/
+ @Nonnull
public final String indexName() {
return this.indexName;
}
@@ -108,6 +113,7 @@ public final String indexName() {
/**
* Required - API name: {@code index_uuid}
*/
+ @Nonnull
public final String indexUuid() {
return this.indexUuid;
}
@@ -115,6 +121,7 @@ public final String indexUuid() {
/**
* Required - API name: {@code node_ids}
*/
+ @Nonnull
public final List nodeIds() {
return this.nodeIds;
}
@@ -263,12 +270,12 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
DanglingIndex other = (DanglingIndex) o;
return Objects.equals(this.creationDate, other.creationDate)
- && this.creationDateMillis() == other.creationDateMillis()
- && Objects.equals(this.indexName, other.indexName)
- && Objects.equals(this.indexUuid, other.indexUuid)
- && Objects.equals(this.nodeIds, other.nodeIds);
+ && this.creationDateMillis == other.creationDateMillis
+ && this.indexName.equals(other.indexName)
+ && this.indexUuid.equals(other.indexUuid)
+ && this.nodeIds.equals(other.nodeIds);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Action.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Action.java
index 68e20bc646..38e6fa54af 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Action.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Action.java
@@ -302,7 +302,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
Action other = (Action) o;
return Objects.equals(this.actionType, other.actionType)
&& Objects.equals(this.headers, other.headers)
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ClientConfig.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ClientConfig.java
index 0a3fa1a853..bd03b5ec22 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ClientConfig.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ClientConfig.java
@@ -283,26 +283,26 @@ protected static void setupClientConfigDeserializer(ObjectDeserializer actions;
@Nullable
private final ClientConfig clientConfig;
+ @Nonnull
private final Credential credential;
+ @Nonnull
private final String description;
+ @Nonnull
private final String name;
+ @Nonnull
private final Map parameters;
+ @Nonnull
private final String protocol;
private final int version;
@@ -80,6 +87,7 @@ public static CreateConnectorRequest of(Function actions() {
return this.actions;
}
@@ -95,6 +103,7 @@ public final ClientConfig clientConfig() {
/**
* Required - API name: {@code credential}
*/
+ @Nonnull
public final Credential credential() {
return this.credential;
}
@@ -102,6 +111,7 @@ public final Credential credential() {
/**
* Required - API name: {@code description}
*/
+ @Nonnull
public final String description() {
return this.description;
}
@@ -109,6 +119,7 @@ public final String description() {
/**
* Required - API name: {@code name}
*/
+ @Nonnull
public final String name() {
return this.name;
}
@@ -116,6 +127,7 @@ public final String name() {
/**
* Required - API name: {@code parameters}
*/
+ @Nonnull
public final Map parameters() {
return this.parameters;
}
@@ -123,6 +135,7 @@ public final Map parameters() {
/**
* Required - API name: {@code protocol}
*/
+ @Nonnull
public final String protocol() {
return this.protocol;
}
@@ -382,15 +395,15 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
CreateConnectorRequest other = (CreateConnectorRequest) o;
- return Objects.equals(this.actions, other.actions)
+ return this.actions.equals(other.actions)
&& Objects.equals(this.clientConfig, other.clientConfig)
- && Objects.equals(this.credential, other.credential)
- && Objects.equals(this.description, other.description)
- && Objects.equals(this.name, other.name)
- && Objects.equals(this.parameters, other.parameters)
- && Objects.equals(this.protocol, other.protocol)
- && this.version() == other.version();
+ && this.credential.equals(other.credential)
+ && this.description.equals(other.description)
+ && this.name.equals(other.name)
+ && this.parameters.equals(other.parameters)
+ && this.protocol.equals(other.protocol)
+ && this.version == other.version;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorResponse.java
index 309c8e4c95..bed71edbbc 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorResponse.java
@@ -121,7 +121,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
CreateConnectorResponse other = (CreateConnectorResponse) o;
return Objects.equals(this.connectorId, other.connectorId);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Credential.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Credential.java
index 1e465e9f59..ef7dfb84ad 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Credential.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Credential.java
@@ -18,6 +18,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
@@ -45,6 +46,7 @@ public class Credential implements PlainJsonSerializable {
@Nullable
private final String sessionToken;
+ @Nonnull
private final Map metadata;
// ---------------------------------------------------------------------------------------------
@@ -86,6 +88,7 @@ public final String sessionToken() {
/**
*/
+ @Nonnull
public final Map metadata() {
return this.metadata;
}
@@ -227,7 +230,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
Credential other = (Credential) o;
return Objects.equals(this.accessKey, other.accessKey)
&& Objects.equals(this.secretKey, other.secretKey)
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentRequest.java
index 95483fb1fa..da99ed04fa 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentRequest.java
@@ -12,9 +12,9 @@
package org.opensearch.client.opensearch.ml;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
import org.opensearch.client.transport.Endpoint;
@@ -31,6 +31,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class DeleteAgentRequest extends RequestBase {
+ @Nonnull
private final String agentId;
// ---------------------------------------------------------------------------------------------
@@ -46,6 +47,7 @@ public static DeleteAgentRequest of(Function
*/
+ @Nonnull
public final String access() {
return this.access;
}
@@ -86,6 +91,7 @@ public final Long createdTime() {
* API name: {@code description}
*
*/
+ @Nonnull
public final String description() {
return this.description;
}
@@ -114,6 +120,7 @@ public final int latestVersion() {
* API name: {@code name}
*
*/
+ @Nonnull
public final String name() {
return this.name;
}
@@ -261,9 +268,9 @@ protected static void setupGetModelGroupResponseDeserializer(ObjectDeserializer<
public int hashCode() {
int result = 17;
result = 31 * result + this.access.hashCode();
- result = 31 * result + Long.hashCode(this.createdTime);
+ result = 31 * result + Objects.hashCode(this.createdTime);
result = 31 * result + this.description.hashCode();
- result = 31 * result + Long.hashCode(this.lastUpdatedTime);
+ result = 31 * result + Objects.hashCode(this.lastUpdatedTime);
result = 31 * result + Integer.hashCode(this.latestVersion);
result = 31 * result + this.name.hashCode();
return result;
@@ -271,13 +278,13 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
GetModelGroupResponse other = (GetModelGroupResponse) o;
- return Objects.equals(this.access, other.access)
- && this.createdTime() == other.createdTime()
- && Objects.equals(this.description, other.description)
- && this.lastUpdatedTime() == other.lastUpdatedTime()
- && this.latestVersion() == other.latestVersion()
- && Objects.equals(this.name, other.name);
+ return this.access.equals(other.access)
+ && Objects.equals(this.createdTime, other.createdTime)
+ && this.description.equals(other.description)
+ && Objects.equals(this.lastUpdatedTime, other.lastUpdatedTime)
+ && this.latestVersion == other.latestVersion
+ && this.name.equals(other.name);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskRequest.java
index 76dbbc8352..664c9b3d31 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskRequest.java
@@ -12,9 +12,9 @@
package org.opensearch.client.opensearch.ml;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
import org.opensearch.client.transport.Endpoint;
@@ -31,6 +31,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class GetTaskRequest extends RequestBase {
+ @Nonnull
private final String taskId;
// ---------------------------------------------------------------------------------------------
@@ -46,6 +47,7 @@ public static GetTaskRequest of(Function> workerNode;
// ---------------------------------------------------------------------------------------------
@@ -132,6 +135,7 @@ public final String modelId() {
/**
* Required - API name: {@code state}
*/
+ @Nonnull
public final String state() {
return this.state;
}
@@ -158,6 +162,7 @@ public final String taskType() {
/**
* API name: {@code worker_node}
*/
+ @Nonnull
public final List> workerNode() {
return this.workerNode;
}
@@ -396,11 +401,11 @@ protected static void setupGetTaskResponseDeserializer(ObjectDeserializer metadata;
// ---------------------------------------------------------------------------------------------
@@ -62,6 +64,7 @@ public final String contentType() {
/**
*/
+ @Nonnull
public final Map metadata() {
return this.metadata;
}
@@ -169,7 +172,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
Headers other = (Headers) o;
return Objects.equals(this.contentType, other.contentType) && Objects.equals(this.metadata, other.metadata);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/LLM.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/LLM.java
index 2455229411..2f0613294a 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/LLM.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/LLM.java
@@ -17,6 +17,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
@@ -38,6 +39,7 @@ public class LLM implements PlainJsonSerializable {
@Nullable
private final String modelId;
+ @Nonnull
private final Map parameters;
// ---------------------------------------------------------------------------------------------
@@ -62,6 +64,7 @@ public final String modelId() {
/**
* API name: {@code parameters}
*/
+ @Nonnull
public final Map parameters() {
return this.parameters;
}
@@ -169,7 +172,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
LLM other = (LLM) o;
return Objects.equals(this.modelId, other.modelId) && Objects.equals(this.parameters, other.parameters);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Memory.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Memory.java
index 3ae6dcaf1e..0660178e13 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Memory.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Memory.java
@@ -121,7 +121,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
Memory other = (Memory) o;
return Objects.equals(this.type, other.type);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java
index 1924edac77..2c2e560a6d 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java
@@ -18,6 +18,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
@@ -55,12 +56,16 @@ public class RegisterAgentsRequest extends RequestBase implements PlainJsonSeria
@Nullable
private final Memory memory;
+ @Nonnull
private final String name;
+ @Nonnull
private final Map parameters;
+ @Nonnull
private final List tools;
+ @Nonnull
private final String type;
// ---------------------------------------------------------------------------------------------
@@ -115,6 +120,7 @@ public final Memory memory() {
/**
* Required - API name: {@code name}
*/
+ @Nonnull
public final String name() {
return this.name;
}
@@ -122,6 +128,7 @@ public final String name() {
/**
* API name: {@code parameters}
*/
+ @Nonnull
public final Map parameters() {
return this.parameters;
}
@@ -129,6 +136,7 @@ public final Map parameters() {
/**
* API name: {@code tools}
*/
+ @Nonnull
public final List tools() {
return this.tools;
}
@@ -136,6 +144,7 @@ public final List tools() {
/**
* Required - API name: {@code type}
*/
+ @Nonnull
public final String type() {
return this.type;
}
@@ -403,15 +412,15 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
RegisterAgentsRequest other = (RegisterAgentsRequest) o;
return Objects.equals(this.appType, other.appType)
&& Objects.equals(this.description, other.description)
&& Objects.equals(this.llm, other.llm)
&& Objects.equals(this.memory, other.memory)
- && Objects.equals(this.name, other.name)
+ && this.name.equals(other.name)
&& Objects.equals(this.parameters, other.parameters)
&& Objects.equals(this.tools, other.tools)
- && Objects.equals(this.type, other.type);
+ && this.type.equals(other.type);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsResponse.java
index 199ae5fde6..b15475a2aa 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsResponse.java
@@ -121,7 +121,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
RegisterAgentsResponse other = (RegisterAgentsResponse) o;
return Objects.equals(this.agentId, other.agentId);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java
index b9f1b069fd..e7bc41bb13 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java
@@ -17,6 +17,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -47,11 +48,13 @@ public class RegisterModelGroupRequest extends RequestBase implements PlainJsonS
@Nullable
private final Boolean addAllBackendRoles;
+ @Nonnull
private final List backendRoles;
@Nullable
private final String description;
+ @Nonnull
private final String name;
// ---------------------------------------------------------------------------------------------
@@ -96,6 +99,7 @@ public final Boolean addAllBackendRoles() {
* API name: {@code backend_roles}
*
*/
+ @Nonnull
public final List backendRoles() {
return this.backendRoles;
}
@@ -117,6 +121,7 @@ public final String description() {
* API name: {@code name}
*
*/
+ @Nonnull
public final String name() {
return this.name;
}
@@ -299,7 +304,7 @@ protected static void setupRegisterModelGroupRequestDeserializer(ObjectDeseriali
public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.accessMode);
- result = 31 * result + Boolean.hashCode(this.addAllBackendRoles);
+ result = 31 * result + Objects.hashCode(this.addAllBackendRoles);
result = 31 * result + Objects.hashCode(this.backendRoles);
result = 31 * result + Objects.hashCode(this.description);
result = 31 * result + this.name.hashCode();
@@ -308,12 +313,12 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
RegisterModelGroupRequest other = (RegisterModelGroupRequest) o;
return Objects.equals(this.accessMode, other.accessMode)
- && this.addAllBackendRoles() == other.addAllBackendRoles()
+ && Objects.equals(this.addAllBackendRoles, other.addAllBackendRoles)
&& Objects.equals(this.backendRoles, other.backendRoles)
&& Objects.equals(this.description, other.description)
- && Objects.equals(this.name, other.name);
+ && this.name.equals(other.name);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java
index 6ee1aab4cf..ac99154507 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java
@@ -13,9 +13,9 @@
package org.opensearch.client.opensearch.ml;
import jakarta.json.stream.JsonGenerator;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -32,8 +32,10 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class RegisterModelGroupResponse implements PlainJsonSerializable {
+ @Nonnull
private final String modelGroupId;
+ @Nonnull
private final String status;
// ---------------------------------------------------------------------------------------------
@@ -55,6 +57,7 @@ public static RegisterModelGroupResponse of(
* API name: {@code model_group_id}
*
*/
+ @Nonnull
public final String modelGroupId() {
return this.modelGroupId;
}
@@ -65,6 +68,7 @@ public final String modelGroupId() {
* API name: {@code status}
*
*/
+ @Nonnull
public final String status() {
return this.status;
}
@@ -154,8 +158,8 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
RegisterModelGroupResponse other = (RegisterModelGroupResponse) o;
- return Objects.equals(this.modelGroupId, other.modelGroupId) && Objects.equals(this.status, other.status);
+ return this.modelGroupId.equals(other.modelGroupId) && this.status.equals(other.status);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java
index 9536644078..5261601622 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java
@@ -16,6 +16,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -43,13 +44,16 @@ public class RegisterModelRequest extends RequestBase implements PlainJsonSerial
@Nullable
private final String description;
+ @Nonnull
private final String modelFormat;
@Nullable
private final String modelGroupId;
+ @Nonnull
private final String name;
+ @Nonnull
private final String version;
// ---------------------------------------------------------------------------------------------
@@ -83,6 +87,7 @@ public final String description() {
* API name: {@code model_format}
*
*/
+ @Nonnull
public final String modelFormat() {
return this.modelFormat;
}
@@ -104,6 +109,7 @@ public final String modelGroupId() {
* API name: {@code name}
*
*/
+ @Nonnull
public final String name() {
return this.name;
}
@@ -114,6 +120,7 @@ public final String name() {
* API name: {@code version}
*
*/
+ @Nonnull
public final String version() {
return this.version;
}
@@ -276,12 +283,12 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
RegisterModelRequest other = (RegisterModelRequest) o;
return Objects.equals(this.description, other.description)
- && Objects.equals(this.modelFormat, other.modelFormat)
+ && this.modelFormat.equals(other.modelFormat)
&& Objects.equals(this.modelGroupId, other.modelGroupId)
- && Objects.equals(this.name, other.name)
- && Objects.equals(this.version, other.version);
+ && this.name.equals(other.name)
+ && this.version.equals(other.version);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java
index 4bcac19b3b..d565876256 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java
@@ -13,9 +13,9 @@
package org.opensearch.client.opensearch.ml;
import jakarta.json.stream.JsonGenerator;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -32,8 +32,10 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class RegisterModelResponse implements PlainJsonSerializable {
+ @Nonnull
private final String status;
+ @Nonnull
private final String taskId;
// ---------------------------------------------------------------------------------------------
@@ -50,6 +52,7 @@ public static RegisterModelResponse of(Function parameters;
@Nullable
private final String type;
+ @Nonnull
private final Map metadata;
// ---------------------------------------------------------------------------------------------
@@ -70,6 +73,7 @@ public final String name() {
/**
* API name: {@code parameters}
*/
+ @Nonnull
public final Map parameters() {
return this.parameters;
}
@@ -84,6 +88,7 @@ public final String type() {
/**
*/
+ @Nonnull
public final Map metadata() {
return this.metadata;
}
@@ -246,7 +251,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
ToolItems other = (ToolItems) o;
return Objects.equals(this.name, other.name)
&& Objects.equals(this.parameters, other.parameters)
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java
index 0a7a3d58c7..9b9afcbc98 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java
@@ -17,6 +17,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
@@ -35,6 +36,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class UndeployModelNode implements PlainJsonSerializable {
+ @Nonnull
private final Map stats;
// ---------------------------------------------------------------------------------------------
@@ -50,6 +52,7 @@ public static UndeployModelNode of(Function stats() {
return this.stats;
}
@@ -143,7 +146,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
UndeployModelNode other = (UndeployModelNode) o;
return Objects.equals(this.stats, other.stats);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelRequest.java
index 0b9f760371..5c5a4a4eed 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelRequest.java
@@ -12,9 +12,9 @@
package org.opensearch.client.opensearch.ml;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
import org.opensearch.client.transport.Endpoint;
@@ -31,6 +31,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class UndeployModelRequest extends RequestBase {
+ @Nonnull
private final String modelId;
// ---------------------------------------------------------------------------------------------
@@ -46,6 +47,7 @@ public static UndeployModelRequest of(Function nodes;
// ---------------------------------------------------------------------------------------------
@@ -49,6 +51,7 @@ public static UndeployModelResponse of(Function nodes() {
return this.nodes;
}
@@ -150,7 +153,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
UndeployModelResponse other = (UndeployModelResponse) o;
return Objects.equals(this.nodes, other.nodes);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java
index 3c30cc3dd5..6f8185a3f0 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryRequest.java
@@ -38,8 +38,10 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
@@ -65,6 +67,7 @@ public class CleanupRepositoryRequest extends RequestBase {
@Nullable
private final Time masterTimeout;
+ @Nonnull
private final String repository;
@Nullable
@@ -112,6 +115,7 @@ public final Time masterTimeout() {
* API name: {@code repository}
*
*/
+ @Nonnull
public final String repository() {
return this.repository;
}
@@ -263,4 +267,23 @@ public CleanupRepositoryRequest build() {
false,
CleanupRepositoryResponse._DESERIALIZER
);
+
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + Objects.hashCode(this.clusterManagerTimeout);
+ result = 31 * result + Objects.hashCode(this.masterTimeout);
+ result = 31 * result + this.repository.hashCode();
+ result = 31 * result + Objects.hashCode(this.timeout);
+ return result;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ CleanupRepositoryRequest other = (CleanupRepositoryRequest) o;
+ return Objects.equals(this.clusterManagerTimeout, other.clusterManagerTimeout)
+ && Objects.equals(this.masterTimeout, other.masterTimeout)
+ && this.repository.equals(other.repository)
+ && Objects.equals(this.timeout, other.timeout);
+ }
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java
index 30dacbf36d..a04547aa7f 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CleanupRepositoryResponse.java
@@ -39,6 +39,7 @@
import jakarta.json.stream.JsonGenerator;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -56,6 +57,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class CleanupRepositoryResponse implements PlainJsonSerializable {
+ @Nonnull
private final CleanupRepositoryResults results;
// ---------------------------------------------------------------------------------------------
@@ -71,6 +73,7 @@ public static CleanupRepositoryResponse of(Function op) {
op.add(Builder::results, CleanupRepositoryResults._DESERIALIZER, "results");
}
+
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + this.results.hashCode();
+ return result;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ CleanupRepositoryResponse other = (CleanupRepositoryResponse) o;
+ return this.results.equals(other.results);
+ }
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java
index 464881269c..39be1d2b3e 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/CloneSnapshotRequest.java
@@ -39,8 +39,10 @@
import jakarta.json.stream.JsonGenerator;
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -69,16 +71,20 @@ public class CloneSnapshotRequest extends RequestBase implements PlainJsonSerial
@Nullable
private final Time clusterManagerTimeout;
+ @Nonnull
private final String indices;
@Deprecated
@Nullable
private final Time masterTimeout;
+ @Nonnull
private final String repository;
+ @Nonnull
private final String snapshot;
+ @Nonnull
private final String targetSnapshot;
// ---------------------------------------------------------------------------------------------
@@ -110,6 +116,7 @@ public final Time clusterManagerTimeout() {
/**
* Required - API name: {@code indices}
*/
+ @Nonnull
public final String indices() {
return this.indices;
}
@@ -132,6 +139,7 @@ public final Time masterTimeout() {
* API name: {@code repository}
*
*/
+ @Nonnull
public final String repository() {
return this.repository;
}
@@ -142,6 +150,7 @@ public final String repository() {
* API name: {@code snapshot}
*
*/
+ @Nonnull
public final String snapshot() {
return this.snapshot;
}
@@ -152,6 +161,7 @@ public final String snapshot() {
* API name: {@code target_snapshot}
*
*/
+ @Nonnull
public final String targetSnapshot() {
return this.targetSnapshot;
}
@@ -330,4 +340,27 @@ protected static void setupCloneSnapshotRequestDeserializer(ObjectDeserializer op) {
AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op);
}
+
+ public int hashCode() {
+ int result = super.hashCode();
+ return result;
+ }
+
+ public boolean equals(Object o) {
+ if (!super.equals(o)) {
+ return false;
+ }
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ return true;
+ }
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java
index 6d7efc4332..c774629456 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryRequest.java
@@ -38,8 +38,10 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
@@ -65,6 +67,7 @@ public class VerifyRepositoryRequest extends RequestBase {
@Nullable
private final Time masterTimeout;
+ @Nonnull
private final String repository;
@Nullable
@@ -112,6 +115,7 @@ public final Time masterTimeout() {
* API name: {@code repository}
*
*/
+ @Nonnull
public final String repository() {
return this.repository;
}
@@ -263,4 +267,23 @@ public VerifyRepositoryRequest build() {
false,
VerifyRepositoryResponse._DESERIALIZER
);
+
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + Objects.hashCode(this.clusterManagerTimeout);
+ result = 31 * result + Objects.hashCode(this.masterTimeout);
+ result = 31 * result + this.repository.hashCode();
+ result = 31 * result + Objects.hashCode(this.timeout);
+ return result;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ VerifyRepositoryRequest other = (VerifyRepositoryRequest) o;
+ return Objects.equals(this.clusterManagerTimeout, other.clusterManagerTimeout)
+ && Objects.equals(this.masterTimeout, other.masterTimeout)
+ && this.repository.equals(other.repository)
+ && Objects.equals(this.timeout, other.timeout);
+ }
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java
index 5a40b49c69..6d743ef812 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/VerifyRepositoryResponse.java
@@ -40,6 +40,7 @@
import java.util.Map;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -57,6 +58,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class VerifyRepositoryResponse implements PlainJsonSerializable {
+ @Nonnull
private final Map nodes;
// ---------------------------------------------------------------------------------------------
@@ -72,6 +74,7 @@ public static VerifyRepositoryResponse of(Function nodes() {
return this.nodes;
}
@@ -164,4 +167,17 @@ public VerifyRepositoryResponse build() {
protected static void setupVerifyRepositoryResponseDeserializer(ObjectDeserializer op) {
op.add(Builder::nodes, JsonpDeserializer.stringMapDeserializer(CompactNodeInfo._DESERIALIZER), "nodes");
}
+
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + this.nodes.hashCode();
+ return result;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ VerifyRepositoryResponse other = (VerifyRepositoryResponse) o;
+ return this.nodes.equals(other.nodes);
+ }
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java
index 4fb8fb8b92..e765baf51b 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/cleanup_repository/CleanupRepositoryResults.java
@@ -165,4 +165,18 @@ protected static void setupCleanupRepositoryResultsDeserializer(ObjectDeserializ
op.add(Builder::deletedBlobs, JsonpDeserializer.longDeserializer(), "deleted_blobs");
op.add(Builder::deletedBytes, JsonpDeserializer.longDeserializer(), "deleted_bytes");
}
+
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + Long.hashCode(this.deletedBlobs);
+ result = 31 * result + Long.hashCode(this.deletedBytes);
+ return result;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ CleanupRepositoryResults other = (CleanupRepositoryResults) o;
+ return this.deletedBlobs == other.deletedBlobs && this.deletedBytes == other.deletedBytes;
+ }
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java
index 8d9bad177a..3032f27855 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/snapshot/verify_repository/CompactNodeInfo.java
@@ -39,6 +39,7 @@
import jakarta.json.stream.JsonGenerator;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -55,6 +56,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class CompactNodeInfo implements PlainJsonSerializable {
+ @Nonnull
private final String name;
// ---------------------------------------------------------------------------------------------
@@ -70,6 +72,7 @@ public static CompactNodeInfo of(Function op) {
op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name");
}
+
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + this.name.hashCode();
+ return result;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ CompactNodeInfo other = (CompactNodeInfo) o;
+ return this.name.equals(other.name);
+ }
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelRequest.java
index 383f28b8eb..d2b51396cf 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelRequest.java
@@ -42,6 +42,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
@@ -59,8 +60,10 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class CancelRequest extends RequestBase {
+ @Nonnull
private final List actions;
+ @Nonnull
private final List nodes;
@Nullable
@@ -92,6 +95,7 @@ public static CancelRequest of(Function
*/
+ @Nonnull
public final List actions() {
return this.actions;
}
@@ -102,6 +106,7 @@ public final List actions() {
* API name: {@code nodes}
*
*/
+ @Nonnull
public final List nodes() {
return this.nodes;
}
@@ -318,18 +323,18 @@ public int hashCode() {
result = 31 * result + Objects.hashCode(this.nodes);
result = 31 * result + Objects.hashCode(this.parentTaskId);
result = 31 * result + Objects.hashCode(this.taskId);
- result = 31 * result + Boolean.hashCode(this.waitForCompletion);
+ result = 31 * result + Objects.hashCode(this.waitForCompletion);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
CancelRequest other = (CancelRequest) o;
return Objects.equals(this.actions, other.actions)
&& Objects.equals(this.nodes, other.nodes)
&& Objects.equals(this.parentTaskId, other.parentTaskId)
&& Objects.equals(this.taskId, other.taskId)
- && this.waitForCompletion() == other.waitForCompletion();
+ && Objects.equals(this.waitForCompletion, other.waitForCompletion);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelResponse.java
index 0f96ce30d4..2db28d13b1 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/CancelResponse.java
@@ -107,7 +107,7 @@ public boolean equals(Object o) {
return false;
}
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
return true;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java
index 2c27e75efc..0111f19a39 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksRequest.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
@@ -59,6 +60,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class GetTasksRequest extends RequestBase {
+ @Nonnull
private final String taskId;
@Nullable
@@ -85,6 +87,7 @@ public static GetTasksRequest of(Function
*/
+ @Nonnull
public final String taskId() {
return this.taskId;
}
@@ -213,16 +216,16 @@ public int hashCode() {
int result = 17;
result = 31 * result + this.taskId.hashCode();
result = 31 * result + Objects.hashCode(this.timeout);
- result = 31 * result + Boolean.hashCode(this.waitForCompletion);
+ result = 31 * result + Objects.hashCode(this.waitForCompletion);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
GetTasksRequest other = (GetTasksRequest) o;
- return Objects.equals(this.taskId, other.taskId)
+ return this.taskId.equals(other.taskId)
&& Objects.equals(this.timeout, other.timeout)
- && this.waitForCompletion() == other.waitForCompletion();
+ && Objects.equals(this.waitForCompletion, other.waitForCompletion);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java
index 13c285185f..36f073d57a 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/GetTasksResponse.java
@@ -40,6 +40,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -66,6 +67,7 @@ public class GetTasksResponse implements PlainJsonSerializable {
@Nullable
private final TaskResponse response;
+ @Nonnull
private final TaskInfo task;
// ---------------------------------------------------------------------------------------------
@@ -107,6 +109,7 @@ public final TaskResponse response() {
/**
* Required - API name: {@code task}
*/
+ @Nonnull
public final TaskInfo task() {
return this.task;
}
@@ -245,11 +248,11 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
GetTasksResponse other = (GetTasksResponse) o;
- return this.completed() == other.completed()
+ return this.completed == other.completed
&& Objects.equals(this.error, other.error)
&& Objects.equals(this.response, other.response)
- && Objects.equals(this.task, other.task);
+ && this.task.equals(other.task);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListRequest.java
index fef278d750..e53367c802 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListRequest.java
@@ -42,6 +42,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.opensearch._types.ErrorResponse;
import org.opensearch.client.opensearch._types.RequestBase;
@@ -60,6 +61,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class ListRequest extends RequestBase {
+ @Nonnull
private final List actions;
@Nullable
@@ -68,6 +70,7 @@ public class ListRequest extends RequestBase {
@Nullable
private final GroupBy groupBy;
+ @Nonnull
private final List nodes;
@Nullable
@@ -101,6 +104,7 @@ public static ListRequest of(Function
*/
+ @Nonnull
public final List actions() {
return this.actions;
}
@@ -134,6 +138,7 @@ public final GroupBy groupBy() {
* API name: {@code nodes}
*
*/
+ @Nonnull
public final List nodes() {
return this.nodes;
}
@@ -375,25 +380,25 @@ public ListRequest build() {
public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.actions);
- result = 31 * result + Boolean.hashCode(this.detailed);
+ result = 31 * result + Objects.hashCode(this.detailed);
result = 31 * result + Objects.hashCode(this.groupBy);
result = 31 * result + Objects.hashCode(this.nodes);
result = 31 * result + Objects.hashCode(this.parentTaskId);
result = 31 * result + Objects.hashCode(this.timeout);
- result = 31 * result + Boolean.hashCode(this.waitForCompletion);
+ result = 31 * result + Objects.hashCode(this.waitForCompletion);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
ListRequest other = (ListRequest) o;
return Objects.equals(this.actions, other.actions)
- && this.detailed() == other.detailed()
+ && Objects.equals(this.detailed, other.detailed)
&& Objects.equals(this.groupBy, other.groupBy)
&& Objects.equals(this.nodes, other.nodes)
&& Objects.equals(this.parentTaskId, other.parentTaskId)
&& Objects.equals(this.timeout, other.timeout)
- && this.waitForCompletion() == other.waitForCompletion();
+ && Objects.equals(this.waitForCompletion, other.waitForCompletion);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListResponse.java
index 2752f63d1c..6e557c534d 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/ListResponse.java
@@ -107,7 +107,7 @@ public boolean equals(Object o) {
return false;
}
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
return true;
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/Status.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/Status.java
index eb052d1f47..85d9d93009 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/Status.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/Status.java
@@ -43,6 +43,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
@@ -94,6 +95,7 @@ public class Status implements PlainJsonSerializable {
@Nullable
private final Integer sliceId;
+ @Nonnull
private final List slices;
@Nullable
@@ -120,6 +122,7 @@ public class Status implements PlainJsonSerializable {
@Nullable
private final Long versionConflicts;
+ @Nonnull
private final Map metadata;
// ---------------------------------------------------------------------------------------------
@@ -240,6 +243,7 @@ public final Integer sliceId() {
/**
* API name: {@code slices}
*/
+ @Nonnull
public final List slices() {
return this.slices;
}
@@ -320,6 +324,7 @@ public final Long versionConflicts() {
/**
*/
+ @Nonnull
public final Map metadata() {
return this.metadata;
}
@@ -771,50 +776,50 @@ protected static void setupStatusDeserializer(ObjectDeserializer
public int hashCode() {
int result = 17;
- result = 31 * result + Integer.hashCode(this.batches);
+ result = 31 * result + Objects.hashCode(this.batches);
result = 31 * result + Objects.hashCode(this.canceled);
- result = 31 * result + Long.hashCode(this.created);
- result = 31 * result + Long.hashCode(this.deleted);
- result = 31 * result + Long.hashCode(this.noops);
+ result = 31 * result + Objects.hashCode(this.created);
+ result = 31 * result + Objects.hashCode(this.deleted);
+ result = 31 * result + Objects.hashCode(this.noops);
result = 31 * result + Objects.hashCode(this.phase);
- result = 31 * result + Float.hashCode(this.requestsPerSecond);
+ result = 31 * result + Objects.hashCode(this.requestsPerSecond);
result = 31 * result + Objects.hashCode(this.retries);
- result = 31 * result + Integer.hashCode(this.sliceId);
+ result = 31 * result + Objects.hashCode(this.sliceId);
result = 31 * result + Objects.hashCode(this.slices);
result = 31 * result + Objects.hashCode(this.state);
result = 31 * result + Objects.hashCode(this.throttled);
- result = 31 * result + Long.hashCode(this.throttledMillis);
+ result = 31 * result + Objects.hashCode(this.throttledMillis);
result = 31 * result + Objects.hashCode(this.throttledUntil);
- result = 31 * result + Long.hashCode(this.throttledUntilMillis);
- result = 31 * result + Long.hashCode(this.total);
- result = 31 * result + Long.hashCode(this.updated);
- result = 31 * result + Long.hashCode(this.versionConflicts);
+ result = 31 * result + Objects.hashCode(this.throttledUntilMillis);
+ result = 31 * result + Objects.hashCode(this.total);
+ result = 31 * result + Objects.hashCode(this.updated);
+ result = 31 * result + Objects.hashCode(this.versionConflicts);
result = 31 * result + Objects.hashCode(this.metadata);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
Status other = (Status) o;
- return this.batches() == other.batches()
+ return Objects.equals(this.batches, other.batches)
&& Objects.equals(this.canceled, other.canceled)
- && this.created() == other.created()
- && this.deleted() == other.deleted()
- && this.noops() == other.noops()
+ && Objects.equals(this.created, other.created)
+ && Objects.equals(this.deleted, other.deleted)
+ && Objects.equals(this.noops, other.noops)
&& Objects.equals(this.phase, other.phase)
- && this.requestsPerSecond() == other.requestsPerSecond()
+ && Objects.equals(this.requestsPerSecond, other.requestsPerSecond)
&& Objects.equals(this.retries, other.retries)
- && this.sliceId() == other.sliceId()
+ && Objects.equals(this.sliceId, other.sliceId)
&& Objects.equals(this.slices, other.slices)
&& Objects.equals(this.state, other.state)
&& Objects.equals(this.throttled, other.throttled)
- && this.throttledMillis() == other.throttledMillis()
+ && Objects.equals(this.throttledMillis, other.throttledMillis)
&& Objects.equals(this.throttledUntil, other.throttledUntil)
- && this.throttledUntilMillis() == other.throttledUntilMillis()
- && this.total() == other.total()
- && this.updated() == other.updated()
- && this.versionConflicts() == other.versionConflicts()
+ && Objects.equals(this.throttledUntilMillis, other.throttledUntilMillis)
+ && Objects.equals(this.total, other.total)
+ && Objects.equals(this.updated, other.updated)
+ && Objects.equals(this.versionConflicts, other.versionConflicts)
&& Objects.equals(this.metadata, other.metadata);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java
index 7a9d77716f..6bcaf68dae 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java
@@ -38,9 +38,9 @@
import jakarta.json.stream.JsonGenerator;
import java.util.Map;
-import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -56,6 +56,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class TaskExecutingNode extends BaseNode {
+ @Nonnull
private final Map tasks;
// ---------------------------------------------------------------------------------------------
@@ -72,6 +73,7 @@ public static TaskExecutingNode of(Function tasks() {
return this.tasks;
}
@@ -173,8 +175,8 @@ public boolean equals(Object o) {
return false;
}
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
TaskExecutingNode other = (TaskExecutingNode) o;
- return Objects.equals(this.tasks, other.tasks);
+ return this.tasks.equals(other.tasks);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskGroup.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskGroup.java
index dff52c8dcc..a38fab6c66 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskGroup.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskGroup.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -56,6 +57,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class TaskGroup extends TaskInfo {
+ @Nonnull
private final List children;
// ---------------------------------------------------------------------------------------------
@@ -72,6 +74,7 @@ public static TaskGroup of(Function>
/**
* API name: {@code children}
*/
+ @Nonnull
public final List children() {
return this.children;
}
@@ -175,7 +178,7 @@ public boolean equals(Object o) {
return false;
}
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
TaskGroup other = (TaskGroup) o;
return Objects.equals(this.children, other.children);
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfo.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfo.java
index 05e2b5057b..48c88c1f53 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfo.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfo.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -59,6 +60,7 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class TaskInfo implements PlainJsonSerializable {
+ @Nonnull
private final String action;
private final boolean cancellable;
@@ -69,10 +71,12 @@ public class TaskInfo implements PlainJsonSerializable {
@Nullable
private final String description;
+ @Nonnull
private final Map headers;
private final long id;
+ @Nonnull
private final String node;
@Nullable
@@ -88,6 +92,7 @@ public class TaskInfo implements PlainJsonSerializable {
@Nullable
private final Status status;
+ @Nonnull
private final String type;
// ---------------------------------------------------------------------------------------------
@@ -115,6 +120,7 @@ public static TaskInfo taskInfoOf(Function headers() {
return this.headers;
}
@@ -159,6 +166,7 @@ public final long id() {
/**
* Required - API name: {@code node}
*/
+ @Nonnull
public final String node() {
return this.node;
}
@@ -204,6 +212,7 @@ public final Status status() {
/**
* Required - API name: {@code type}
*/
+ @Nonnull
public final String type() {
return this.type;
}
@@ -484,7 +493,7 @@ public int hashCode() {
int result = 17;
result = 31 * result + this.action.hashCode();
result = 31 * result + Boolean.hashCode(this.cancellable);
- result = 31 * result + Boolean.hashCode(this.cancelled);
+ result = 31 * result + Objects.hashCode(this.cancelled);
result = 31 * result + Objects.hashCode(this.description);
result = 31 * result + this.headers.hashCode();
result = 31 * result + Long.hashCode(this.id);
@@ -500,20 +509,20 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
TaskInfo other = (TaskInfo) o;
- return Objects.equals(this.action, other.action)
- && this.cancellable() == other.cancellable()
- && this.cancelled() == other.cancelled()
+ return this.action.equals(other.action)
+ && this.cancellable == other.cancellable
+ && Objects.equals(this.cancelled, other.cancelled)
&& Objects.equals(this.description, other.description)
- && Objects.equals(this.headers, other.headers)
- && this.id() == other.id()
- && Objects.equals(this.node, other.node)
+ && this.headers.equals(other.headers)
+ && this.id == other.id
+ && this.node.equals(other.node)
&& Objects.equals(this.parentTaskId, other.parentTaskId)
&& Objects.equals(this.runningTime, other.runningTime)
- && this.runningTimeInNanos() == other.runningTimeInNanos()
- && this.startTimeInMillis() == other.startTimeInMillis()
+ && this.runningTimeInNanos == other.runningTimeInNanos
+ && this.startTimeInMillis == other.startTimeInMillis
&& Objects.equals(this.status, other.status)
- && Objects.equals(this.type, other.type);
+ && this.type.equals(other.type);
}
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfos.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfos.java
index aeb0c0e298..e786f17581 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfos.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskInfos.java
@@ -39,6 +39,7 @@
import jakarta.json.stream.JsonGenerator;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
import org.opensearch.client.json.JsonpDeserializable;
@@ -163,16 +164,15 @@ private static JsonpDeserializer buildTaskInfosDeserializer() {
public int hashCode() {
int result = 17;
- result = 31 * result + _kind.hashCode();
- result = 31 * result + _value.hashCode();
+ result = 31 * result + Objects.hashCode(this._kind);
+ result = 31 * result + Objects.hashCode(this._value);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
TaskInfos other = (TaskInfos) o;
- return this._kind().equals(other._kind()) && this._get().equals(other._get());
+ return Objects.equals(this._kind, other._kind) && Objects.equals(this._value, other._value);
}
-
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskListResponseBase.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskListResponseBase.java
index 36ad3d85d3..713bd8f4d3 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskListResponseBase.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskListResponseBase.java
@@ -42,6 +42,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -58,10 +59,13 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public abstract class TaskListResponseBase implements PlainJsonSerializable {
+ @Nonnull
private final List nodeFailures;
+ @Nonnull
private final Map nodes;
+ @Nonnull
private final List taskFailures;
@Nullable
@@ -79,6 +83,7 @@ protected TaskListResponseBase(AbstractBuilder> builder) {
/**
* API name: {@code node_failures}
*/
+ @Nonnull
public final List nodeFailures() {
return this.nodeFailures;
}
@@ -89,6 +94,7 @@ public final List nodeFailures() {
* API name: {@code nodes}
*
*/
+ @Nonnull
public final Map nodes() {
return this.nodes;
}
@@ -96,6 +102,7 @@ public final Map nodes() {
/**
* API name: {@code task_failures}
*/
+ @Nonnull
public final List taskFailures() {
return this.taskFailures;
}
@@ -319,7 +326,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
TaskListResponseBase other = (TaskListResponseBase) o;
return Objects.equals(this.nodeFailures, other.nodeFailures)
&& Objects.equals(this.nodes, other.nodes)
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java
index c737e57217..0f43e2491f 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java
@@ -41,6 +41,7 @@
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
@@ -72,17 +73,20 @@ public class TaskResponse implements PlainJsonSerializable {
private final long deleted;
+ @Nonnull
private final List failures;
private final long noops;
private final float requestsPerSecond;
+ @Nonnull
private final Retries retries;
@Nullable
private final Integer sliceId;
+ @Nonnull
private final List slices;
@Nullable
@@ -176,6 +180,7 @@ public final long deleted() {
/**
* Required - API name: {@code failures}
*/
+ @Nonnull
public final List failures() {
return this.failures;
}
@@ -203,6 +208,7 @@ public final float requestsPerSecond() {
/**
* Required - API name: {@code retries}
*/
+ @Nonnull
public final Retries retries() {
return this.retries;
}
@@ -218,6 +224,7 @@ public final Integer sliceId() {
/**
* API name: {@code slices}
*/
+ @Nonnull
public final List slices() {
return this.slices;
}
@@ -724,13 +731,13 @@ public int hashCode() {
int result = 17;
result = 31 * result + Integer.hashCode(this.batches);
result = 31 * result + Objects.hashCode(this.canceled);
- result = 31 * result + Long.hashCode(this.created);
+ result = 31 * result + Objects.hashCode(this.created);
result = 31 * result + Long.hashCode(this.deleted);
result = 31 * result + this.failures.hashCode();
result = 31 * result + Long.hashCode(this.noops);
result = 31 * result + Float.hashCode(this.requestsPerSecond);
result = 31 * result + this.retries.hashCode();
- result = 31 * result + Integer.hashCode(this.sliceId);
+ result = 31 * result + Objects.hashCode(this.sliceId);
result = 31 * result + Objects.hashCode(this.slices);
result = 31 * result + Objects.hashCode(this.throttled);
result = 31 * result + Long.hashCode(this.throttledMillis);
@@ -739,33 +746,33 @@ public int hashCode() {
result = 31 * result + Boolean.hashCode(this.timedOut);
result = 31 * result + Long.hashCode(this.took);
result = 31 * result + Long.hashCode(this.total);
- result = 31 * result + Long.hashCode(this.updated);
+ result = 31 * result + Objects.hashCode(this.updated);
result = 31 * result + Long.hashCode(this.versionConflicts);
return result;
}
public boolean equals(Object o) {
if (this == o) return true;
- if (this.getClass() != o.getClass()) return false;
+ if (o == null || this.getClass() != o.getClass()) return false;
TaskResponse other = (TaskResponse) o;
- return this.batches() == other.batches()
+ return this.batches == other.batches
&& Objects.equals(this.canceled, other.canceled)
- && this.created() == other.created()
- && this.deleted() == other.deleted()
- && Objects.equals(this.failures, other.failures)
- && this.noops() == other.noops()
- && this.requestsPerSecond() == other.requestsPerSecond()
- && Objects.equals(this.retries, other.retries)
- && this.sliceId() == other.sliceId()
+ && Objects.equals(this.created, other.created)
+ && this.deleted == other.deleted
+ && this.failures.equals(other.failures)
+ && this.noops == other.noops
+ && this.requestsPerSecond == other.requestsPerSecond
+ && this.retries.equals(other.retries)
+ && Objects.equals(this.sliceId, other.sliceId)
&& Objects.equals(this.slices, other.slices)
&& Objects.equals(this.throttled, other.throttled)
- && this.throttledMillis() == other.throttledMillis()
+ && this.throttledMillis == other.throttledMillis
&& Objects.equals(this.throttledUntil, other.throttledUntil)
- && this.throttledUntilMillis() == other.throttledUntilMillis()
- && this.timedOut() == other.timedOut()
- && this.took() == other.took()
- && this.total() == other.total()
- && this.updated() == other.updated()
- && this.versionConflicts() == other.versionConflicts();
+ && this.throttledUntilMillis == other.throttledUntilMillis
+ && this.timedOut == other.timedOut
+ && this.took == other.took
+ && this.total == other.total
+ && Objects.equals(this.updated, other.updated)
+ && this.versionConflicts == other.versionConflicts;
}
}
diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Field.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Field.java
index 03025401cb..e4d1734572 100644
--- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Field.java
+++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Field.java
@@ -84,12 +84,4 @@ public String getDescription() {
public Deprecation getDeprecation() {
return deprecation;
}
-
- public boolean isUnboxedPrimitive() {
- return type.isUnboxedPrimitive();
- }
-
- public Type getBoxedType() {
- return type.getBoxed();
- }
}
diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java
index d9123a7eaa..f46c3f0306 100644
--- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java
+++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java
@@ -23,25 +23,16 @@
import org.opensearch.client.codegen.utils.Strings;
public class Type {
- private static final Set PRIMITIVES = Set.of(
- "String",
- "boolean",
+ private static final Set PRIMITIVES = Set.of("boolean", "char", "byte", "short", "int", "long", "float", "double");
+ private static final Set BOXED_PRIMITIVES = Set.of(
"Boolean",
- "char",
"Character",
- "byte",
"Byte",
- "short",
"Short",
- "int",
"Integer",
- "long",
"Long",
- "float",
"Float",
- "double",
- "Double",
- "Number"
+ "Double"
);
@Nonnull
@@ -157,16 +148,12 @@ public boolean isPrimitive() {
return PRIMITIVES.contains(name);
}
- public boolean isUnboxedPrimitive() {
- return isPrimitive()
- && !name.equals("String")
- && !name.equals("Boolean")
- && !name.equals("Character")
- && !name.equals("Integer")
- && !name.equals("Long")
- && !name.equals("Float")
- && !name.equals("Double")
- && !name.equals("Number");
+ public boolean isBoxedPrimitive() {
+ return BOXED_PRIMITIVES.contains(name);
+ }
+
+ public boolean isPotentiallyBoxedPrimitive() {
+ return isPrimitive() || isBoxedPrimitive();
}
public boolean isNumber() {
@@ -182,7 +169,7 @@ public boolean isTime() {
}
public boolean isBuiltIn() {
- return isListOrMap() || isPrimitive() || "JsonData".equals(name);
+ return isPrimitive() || (packageName != null && packageName.startsWith("java.")) || "JsonData".equals(name);
}
public boolean hasBuilder() {
diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java
index d5f4e9a750..aff4712672 100644
--- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java
+++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java
@@ -123,6 +123,7 @@ public static final class Javax {
public static final class Annotation {
public static final String PACKAGE = Javax.PACKAGE + ".annotation";
public static final Type Generated = Type.builder().withPackage(PACKAGE).withName("Generated").build();
+ public static final Type Nonnull = Type.builder().withPackage(PACKAGE).withName("Nonnull").build();
public static final Type Nullable = Type.builder().withPackage(PACKAGE).withName("Nullable").build();
}
}
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Equals.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Equals.mustache
index 6e45e22d72..1670834380 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Equals.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Equals.mustache
@@ -5,7 +5,7 @@
}
{{/extendsOtherShape}}
if(this == o) return true;
- if(this.getClass() != o.getClass()) return false;
+ if(o == null || this.getClass() != o.getClass()) return false;
{{^hasFields}}
return true;
{{/hasFields}}
@@ -13,12 +13,17 @@
{{className}} other = ({{className}})o;
return
{{#fields}}
- {{#isUnboxedPrimitive}}
- this.{{name}}() == other.{{name}}()
- {{/isUnboxedPrimitive}}
- {{^isUnboxedPrimitive}}
+ {{#required}}
+ {{#type.isPrimitive}}
+ this.{{name}} == other.{{name}}
+ {{/type.isPrimitive}}
+ {{^type.isPrimitive}}
+ this.{{name}}.equals(other.{{name}})
+ {{/type.isPrimitive}}
+ {{/required}}
+ {{^required}}
{{TYPES.Java.Util.Objects}}.equals(this.{{name}}, other.{{name}})
- {{/isUnboxedPrimitive}}
+ {{/required}}
{{^-last}}
&&
{{/-last}}
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldNullability.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldNullability.mustache
new file mode 100644
index 0000000000..f9739563bb
--- /dev/null
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldNullability.mustache
@@ -0,0 +1,13 @@
+{{#type.isListOrMap}}
+ @{{TYPES.Javax.Annotation.Nonnull}}
+{{/type.isListOrMap}}
+{{^type.isListOrMap}}
+ {{#required}}
+ {{^type.isPrimitive}}
+ @{{TYPES.Javax.Annotation.Nonnull}}
+ {{/type.isPrimitive}}
+ {{/required}}
+ {{^required}}
+ @{{TYPES.Javax.Annotation.Nullable}}
+ {{/required}}
+{{/type.isListOrMap}}
\ No newline at end of file
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache
index bd320a391b..7e3bea7471 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache
@@ -3,10 +3,6 @@
{{/-first}}
{{#deprecation}}@Deprecated{{/deprecation}}
-{{^required}}
-{{^type.isListOrMap}}
- @{{TYPES.Javax.Annotation.Nullable}}
-{{/type.isListOrMap}}
-{{/required}}
+ {{>ObjectShape/FieldNullability}}
private final {{type}} {{name}};
{{/fields}}
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Getters.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Getters.mustache
index 61fea36e57..b9742a7b13 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Getters.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Getters.mustache
@@ -2,11 +2,7 @@
{{>ObjectShape/FieldDoc/Basic}}
{{#deprecation}}@Deprecated{{/deprecation}}
- {{^required}}
- {{^type.isListOrMap}}
- @{{TYPES.Javax.Annotation.Nullable}}
- {{/type.isListOrMap}}
- {{/required}}
+ {{>ObjectShape/FieldNullability}}
public final {{type}} {{name}}() {
return this.{{name}};
}
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/HashCode.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/HashCode.mustache
index 5418321cc6..d14479eb81 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/HashCode.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/HashCode.mustache
@@ -6,17 +6,18 @@
int result = 17;
{{/extendsOtherShape}}
{{#fields}}
- {{#isUnboxedPrimitive}}
- result = 31 * result + {{getBoxedType}}.hashCode(this.{{name}});
- {{/isUnboxedPrimitive}}
- {{^isUnboxedPrimitive}}
- {{#isRequired}}
- result = 31 * result + this.{{name}}.hashCode();
- {{/isRequired}}
- {{^isRequired}}
- result = 31 * result + {{TYPES.Java.Util.Objects}}.hashCode(this.{{name}});
- {{/isRequired}}
- {{/isUnboxedPrimitive}}
+ result = 31 * result +
+ {{#required}}
+ {{#type.isPrimitive}}
+ {{type.boxed}}.hashCode(this.{{name}});
+ {{/type.isPrimitive}}
+ {{^type.isPrimitive}}
+ this.{{name}}.hashCode();
+ {{/type.isPrimitive}}
+ {{/required}}
+ {{^required}}
+ {{TYPES.Java.Util.Objects}}.hashCode(this.{{name}});
+ {{/required}}
{{/fields}}
return result;
}
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionEquals.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionEquals.mustache
deleted file mode 100644
index 7a368dc538..0000000000
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionEquals.mustache
+++ /dev/null
@@ -1,6 +0,0 @@
- public boolean equals(Object o) {
- if(this == o) return true;
- if(this.getClass() != o.getClass()) return false;
- {{className}} other = ({{className}})o;
- return this._kind().equals(other._kind()) && this._get().equals(other._get());
- }
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionHashCode.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionHashCode.mustache
deleted file mode 100644
index 8cd7137529..0000000000
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/TaggedUnionHashCode.mustache
+++ /dev/null
@@ -1,6 +0,0 @@
- public int hashCode() {
- int result = 17;
- result = 31 * result + _kind.hashCode();
- result = 31 * result + _value.hashCode();
- return result;
- }
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache
index c59a635d39..8a584d6812 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache
@@ -112,8 +112,7 @@
public static final {{TYPES.Client.Json.JsonpDeserializer}}<{{className}}> _DESERIALIZER = {{TYPES.Client.Json.JsonpDeserializer}}.lazy({{className}}::build{{className}}Deserializer);
- {{>ObjectShape/TaggedUnionHashCode}}
-
- {{>ObjectShape/TaggedUnionEquals}}
+ {{>TaggedUnionShape/HashCode}}
+ {{>TaggedUnionShape/Equals}}
}
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/Equals.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/Equals.mustache
new file mode 100644
index 0000000000..ece94de59b
--- /dev/null
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/Equals.mustache
@@ -0,0 +1,6 @@
+ public boolean equals(Object o) {
+ if(this == o) return true;
+ if(o == null || this.getClass() != o.getClass()) return false;
+ {{className}} other = ({{className}})o;
+ return {{TYPES.Java.Util.Objects}}.equals(this._kind, other._kind) && {{TYPES.Java.Util.Objects}}.equals(this._value, other._value);
+ }
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/HashCode.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/HashCode.mustache
new file mode 100644
index 0000000000..eb7a1d39a1
--- /dev/null
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape/HashCode.mustache
@@ -0,0 +1,6 @@
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + {{TYPES.Java.Util.Objects}}.hashCode(this._kind);
+ result = 31 * result + {{TYPES.Java.Util.Objects}}.hashCode(this._value);
+ return result;
+ }
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/deserializer.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/deserializer.mustache
index 61fb38b72b..25d0754571 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/deserializer.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/deserializer.mustache
@@ -1,7 +1,7 @@
-{{#isPrimitive}}
+{{#isPotentiallyBoxedPrimitive}}
{{TYPES.Client.Json.JsonpDeserializer}}.{{#toLower}}{{boxed.name}}{{/toLower}}Deserializer()
-{{/isPrimitive}}
-{{^isPrimitive}}
+{{/isPotentiallyBoxedPrimitive}}
+{{^isPotentiallyBoxedPrimitive}}
{{#isList}}
{{TYPES.Client.Json.JsonpDeserializer}}.arrayDeserializer({{#listValueType}}{{>Type/deserializer}}{{/listValueType}})
{{/isList}}
@@ -9,6 +9,16 @@
{{TYPES.Client.Json.JsonpDeserializer}}.stringMapDeserializer({{#mapValueType}}{{>Type/deserializer}}{{/mapValueType}})
{{/isMap}}
{{^isListOrMap}}
- {{name}}._DESERIALIZER
+ {{#isNumber}}
+ {{TYPES.Client.Json.JsonpDeserializer}}.numberDeserializer()
+ {{/isNumber}}
+ {{^isNumber}}
+ {{#isString}}
+ {{TYPES.Client.Json.JsonpDeserializer}}.stringDeserializer()
+ {{/isString}}
+ {{^isString}}
+ {{name}}._DESERIALIZER
+ {{/isString}}
+ {{/isNumber}}
{{/isListOrMap}}
-{{/isPrimitive}}
\ No newline at end of file
+{{/isPotentiallyBoxedPrimitive}}
\ No newline at end of file
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/directSerializer.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/directSerializer.mustache
index f8c2fb10cd..34f4345fca 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/directSerializer.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/directSerializer.mustache
@@ -10,15 +10,20 @@
}
{{/type.isList}}
{{^type.isListOrMap}}
- {{#type.isPrimitive}}
+ {{#type.isPotentiallyBoxedPrimitive}}
+ generator.write({{value}});
+ {{/type.isPotentiallyBoxedPrimitive}}
+ {{^type.isPotentiallyBoxedPrimitive}}
{{#type.isNumber}}
generator.write({{value}}.doubleValue());
{{/type.isNumber}}
{{^type.isNumber}}
- generator.write({{value}});
+ {{#type.isString}}
+ generator.write({{value}});
+ {{/type.isString}}
+ {{^type.isString}}
+ {{value}}.serialize(generator, mapper);
+ {{/type.isString}}
{{/type.isNumber}}
- {{/type.isPrimitive}}
- {{^type.isPrimitive}}
- {{value}}.serialize(generator, mapper);
- {{/type.isPrimitive}}
+ {{/type.isPotentiallyBoxedPrimitive}}
{{/type.isListOrMap}}
\ No newline at end of file
diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/queryParamify.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/queryParamify.mustache
index 1abc099c55..ebdacdc7ae 100644
--- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/queryParamify.mustache
+++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/queryParamify.mustache
@@ -6,10 +6,10 @@
{{value}}.jsonValue()
{{/type.isEnum}}
{{^type.isEnum}}
- {{#type.isPrimitive}}
+ {{#type.isPotentiallyBoxedPrimitive}}
String.valueOf({{value}})
- {{/type.isPrimitive}}
- {{^type.isPrimitive}}
+ {{/type.isPotentiallyBoxedPrimitive}}
+ {{^type.isPotentiallyBoxedPrimitive}}
{{#type.isList}}
{{#type.listValueType.isString}}
String.join(",", {{value}})
@@ -24,6 +24,6 @@
{{^type.isList}}
{{value}}._toJsonString()
{{/type.isList}}
- {{/type.isPrimitive}}
+ {{/type.isPotentiallyBoxedPrimitive}}
{{/type.isEnum}}
{{/type.isString}}