Skip to content

Commit

Permalink
codegen latest from main
Browse files Browse the repository at this point in the history
Signed-off-by: miguel-vila <[email protected]>
  • Loading branch information
miguel-vila committed Sep 23, 2024
1 parent 55216fb commit cd233be
Show file tree
Hide file tree
Showing 15 changed files with 276 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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.Nullable;
Expand Down Expand Up @@ -286,4 +287,29 @@ protected static void setupActionDeserializer(ObjectDeserializer<Action.Builder>
op.add(Builder::requestBody, JsonpDeserializer.stringDeserializer(), "request_body");
op.add(Builder::url, JsonpDeserializer.stringDeserializer(), "url");
}

public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.actionType);
result = 31 * result + Objects.hashCode(this.headers);
result = 31 * result + Objects.hashCode(this.method);
result = 31 * result + Objects.hashCode(this.postProcessFunction);
result = 31 * result + Objects.hashCode(this.preProcessFunction);
result = 31 * result + Objects.hashCode(this.requestBody);
result = 31 * result + Objects.hashCode(this.url);
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
Action other = (Action) o;
return Objects.equals(this.actionType, other.actionType)
&& Objects.equals(this.headers, other.headers)
&& Objects.equals(this.method, other.method)
&& Objects.equals(this.postProcessFunction, other.postProcessFunction)
&& Objects.equals(this.preProcessFunction, other.preProcessFunction)
&& Objects.equals(this.requestBody, other.requestBody)
&& Objects.equals(this.url, other.url);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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.Nullable;
Expand Down Expand Up @@ -279,4 +280,29 @@ protected static void setupClientConfigDeserializer(ObjectDeserializer<ClientCon
op.add(Builder::retryBackoffPolicy, JsonpDeserializer.stringDeserializer(), "retry_backoff_policy");
op.add(Builder::retryTimeoutSeconds, JsonpDeserializer.integerDeserializer(), "retry_timeout_seconds");
}

public int hashCode() {
int result = 17;
result = 31 * result + Integer.hashCode(this.connectionTimeout);
result = 31 * result + Integer.hashCode(this.maxConnection);
result = 31 * result + Integer.hashCode(this.maxRetryTimes);
result = 31 * result + Integer.hashCode(this.readTimeout);
result = 31 * result + Integer.hashCode(this.retryBackoffMillis);
result = 31 * result + Objects.hashCode(this.retryBackoffPolicy);
result = 31 * result + Integer.hashCode(this.retryTimeoutSeconds);
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
ClientConfig other = (ClientConfig) o;
return this.connectionTimeout() == other.connectionTimeout()
&& this.maxConnection() == other.maxConnection()
&& this.maxRetryTimes() == other.maxRetryTimes()
&& this.readTimeout() == other.readTimeout()
&& this.retryBackoffMillis() == other.retryBackoffMillis()
&& Objects.equals(this.retryBackoffPolicy, other.retryBackoffPolicy)
&& this.retryTimeoutSeconds() == other.retryTimeoutSeconds();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,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 javax.annotation.Nullable;
Expand Down Expand Up @@ -365,4 +366,31 @@ protected static void setupCreateConnectorRequestDeserializer(ObjectDeserializer
true,
CreateConnectorResponse._DESERIALIZER
);

public int hashCode() {
int result = 17;
result = 31 * result + this.actions.hashCode();
result = 31 * result + Objects.hashCode(this.clientConfig);
result = 31 * result + this.credential.hashCode();
result = 31 * result + this.description.hashCode();
result = 31 * result + this.name.hashCode();
result = 31 * result + this.parameters.hashCode();
result = 31 * result + this.protocol.hashCode();
result = 31 * result + Integer.hashCode(this.version);
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
CreateConnectorRequest other = (CreateConnectorRequest) o;
return Objects.equals(this.actions, 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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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.Nullable;
Expand Down Expand Up @@ -111,4 +112,17 @@ public CreateConnectorResponse build() {
protected static void setupCreateConnectorResponseDeserializer(ObjectDeserializer<CreateConnectorResponse.Builder> op) {
op.add(Builder::connectorId, JsonpDeserializer.stringDeserializer(), "connector_id");
}

public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.connectorId);
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
CreateConnectorResponse other = (CreateConnectorResponse) o;
return Objects.equals(this.connectorId, other.connectorId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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.Nullable;
Expand Down Expand Up @@ -214,4 +215,23 @@ protected static void setupCredentialDeserializer(ObjectDeserializer<Credential.
builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper));
});
}

public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.accessKey);
result = 31 * result + Objects.hashCode(this.secretKey);
result = 31 * result + Objects.hashCode(this.sessionToken);
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;
Credential other = (Credential) o;
return Objects.equals(this.accessKey, other.accessKey)
&& Objects.equals(this.secretKey, other.secretKey)
&& Objects.equals(this.sessionToken, other.sessionToken)
&& Objects.equals(this.metadata, other.metadata);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

package org.opensearch.client.opensearch.ml;

import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
import org.opensearch.client.opensearch._types.ErrorResponse;
Expand Down Expand Up @@ -98,4 +99,17 @@ public DeleteAgentRequest build() {
false,
DeleteAgentResponse._DESERIALIZER
);

public int hashCode() {
int result = 17;
result = 31 * result + this.agentId.hashCode();
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
DeleteAgentRequest other = (DeleteAgentRequest) o;
return Objects.equals(this.agentId, other.agentId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,18 @@ public DeleteAgentResponse build() {
protected static void setupDeleteAgentResponseDeserializer(ObjectDeserializer<DeleteAgentResponse.Builder> op) {
WriteResponseBase.setupWriteResponseBaseDeserializer(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 (this.getClass() != o.getClass()) return false;
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

package org.opensearch.client.opensearch.ml;

import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Generated;
import org.opensearch.client.opensearch._types.ErrorResponse;
Expand Down Expand Up @@ -98,4 +99,17 @@ public DeleteConnectorRequest build() {
false,
DeleteConnectorResponse._DESERIALIZER
);

public int hashCode() {
int result = 17;
result = 31 * result + this.connectorId.hashCode();
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
DeleteConnectorRequest other = (DeleteConnectorRequest) o;
return Objects.equals(this.connectorId, other.connectorId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,18 @@ public DeleteConnectorResponse build() {
protected static void setupDeleteConnectorResponseDeserializer(ObjectDeserializer<DeleteConnectorResponse.Builder> op) {
WriteResponseBase.setupWriteResponseBaseDeserializer(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 (this.getClass() != o.getClass()) return false;
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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.Nullable;
Expand Down Expand Up @@ -158,4 +159,18 @@ protected static void setupHeadersDeserializer(ObjectDeserializer<Headers.Builde
builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper));
});
}

public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.contentType);
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;
Headers other = (Headers) o;
return Objects.equals(this.contentType, other.contentType) && Objects.equals(this.metadata, other.metadata);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

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.Nullable;
Expand Down Expand Up @@ -158,4 +159,18 @@ protected static void setupLLMDeserializer(ObjectDeserializer<LLM.Builder> op) {
op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id");
op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters");
}

public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.modelId);
result = 31 * result + Objects.hashCode(this.parameters);
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
LLM other = (LLM) o;
return Objects.equals(this.modelId, other.modelId) && Objects.equals(this.parameters, other.parameters);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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.Nullable;
Expand Down Expand Up @@ -111,4 +112,17 @@ public Memory build() {
protected static void setupMemoryDeserializer(ObjectDeserializer<Memory.Builder> op) {
op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type");
}

public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.type);
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
Memory other = (Memory) o;
return Objects.equals(this.type, other.type);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,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 javax.annotation.Nullable;
Expand Down Expand Up @@ -386,4 +387,31 @@ protected static void setupRegisterAgentsRequestDeserializer(ObjectDeserializer<
true,
RegisterAgentsResponse._DESERIALIZER
);

public int hashCode() {
int result = 17;
result = 31 * result + Objects.hashCode(this.appType);
result = 31 * result + Objects.hashCode(this.description);
result = 31 * result + Objects.hashCode(this.llm);
result = 31 * result + Objects.hashCode(this.memory);
result = 31 * result + this.name.hashCode();
result = 31 * result + Objects.hashCode(this.parameters);
result = 31 * result + Objects.hashCode(this.tools);
result = 31 * result + this.type.hashCode();
return result;
}

public boolean equals(Object o) {
if (this == o) return true;
if (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)
&& Objects.equals(this.parameters, other.parameters)
&& Objects.equals(this.tools, other.tools)
&& Objects.equals(this.type, other.type);
}
}
Loading

0 comments on commit cd233be

Please sign in to comment.