Skip to content

Commit e4ae610

Browse files
Xtansiaopensearch-trigger-bot[bot]github-actions[bot]dependabot[bot]psingh3
authored
Backport fixes to 2.x and prepare v2.26.0 release (#1670)
* Bump org.owasp.dependencycheck from 12.1.1 to 12.1.2 in /java-client (#1608) (#1609) * Bump org.owasp.dependencycheck from 12.1.1 to 12.1.2 in /java-client Bumps org.owasp.dependencycheck from 12.1.1 to 12.1.2. Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: org.owasp.dependencycheck dependency-version: 12.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit aa6c784) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit b86119f) * Bump org.junit:junit-bom from 5.13.0 to 5.13.1 (#1606) (#1610) * Bump org.junit:junit-bom from 5.13.0 to 5.13.1 Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.13.0 to 5.13.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.13.0...r5.13.1) Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-version: 5.13.1 dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit 2166660) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 8753f33) * Bump org.owasp.dependencycheck from 12.1.1 to 12.1.2 (#1607) (#1611) * Bump org.owasp.dependencycheck from 12.1.1 to 12.1.2 Bumps org.owasp.dependencycheck from 12.1.1 to 12.1.2. Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: org.owasp.dependencycheck dependency-version: 12.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit df76033) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 8e41281) * Bump org.owasp.dependencycheck from 12.1.2 to 12.1.3 in /java-client (#1623) (#1627) * Bump org.owasp.dependencycheck from 12.1.2 to 12.1.3 in /java-client Bumps org.owasp.dependencycheck from 12.1.2 to 12.1.3. Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: org.owasp.dependencycheck dependency-version: 12.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit 9fd0eeb) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit a08e03d) * Bump org.ajoberstar.grgit:grgit-gradle from 5.3.0 to 5.3.2 (#1621) (#1628) * Bump org.ajoberstar.grgit:grgit-gradle from 5.3.0 to 5.3.2 Bumps [org.ajoberstar.grgit:grgit-gradle](https://github.com/ajoberstar/grgit) from 5.3.0 to 5.3.2. - [Release notes](https://github.com/ajoberstar/grgit/releases) - [Commits](ajoberstar/grgit@5.3.0...5.3.2) Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: org.ajoberstar.grgit:grgit-gradle dependency-version: 5.3.2 dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit e44d379) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit ee92b8a) * [Backport 3.x] Bump org.junit:junit-bom from 5.13.1 to 5.13.2 (#1656) * Bump org.junit:junit-bom from 5.13.1 to 5.13.2 (#1650) * Bump org.junit:junit-bom from 5.13.1 to 5.13.2 Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 5.13.1 to 5.13.2. - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](junit-team/junit-framework@r5.13.1...r5.13.2) Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-version: 5.13.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update changelog Signed-off-by: dependabot[bot] <support@github.com> * Fix changelog Signed-off-by: Thomas Farr <tsfarr@amazon.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Thomas Farr <tsfarr@amazon.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas Farr <tsfarr@amazon.com> (cherry picked from commit d7eddd4) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fix changelog Signed-off-by: Thomas Farr <tsfarr@amazon.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Thomas Farr <tsfarr@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas Farr <tsfarr@amazon.com> (cherry picked from commit 6e15143) * Bump io.github.classgraph:classgraph from 4.8.179 to 4.8.180 in /java-client (#1651) (#1657) * Bump io.github.classgraph:classgraph in /java-client Bumps [io.github.classgraph:classgraph](https://github.com/classgraph/classgraph) from 4.8.179 to 4.8.180. - [Release notes](https://github.com/classgraph/classgraph/releases) - [Commits](classgraph/classgraph@classgraph-4.8.179...classgraph-4.8.180) Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: io.github.classgraph:classgraph dependency-version: 4.8.180 dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit a56cbe0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 7f32f11) * Bump org.junit:junit-bom from 5.13.2 to 5.13.3 (#1665) (#1666) * Bump org.junit:junit-bom from 5.13.2 to 5.13.3 Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 5.13.2 to 5.13.3. - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](junit-team/junit-framework@r5.13.2...r5.13.3) Signed-off-by: Thomas Farr <tsfarr@amazon.com> --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-version: 5.13.3 dependency-type: direct:production update-type: version-update:semver-patch ... * Update changelog --------- (cherry picked from commit d354cc6) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 0c08afa) * Connection config's socket timeout issue (#1662) (#1667) * removed connect and socket timeout from RequestConfig builder * added connectionConfigCallback * test cases to test connectConfig's socket timeout is respected or not * removed the default values for connection and socket timeout as well * address the review comments and make the build green * updated CHANGELOG.md * updating README.md to see available snapshot versions * added defaults back for connection config and * added defaults back for connection config and * added implementation of assertInstanceOf for junit 4. * address review comments --------- (cherry picked from commit 338656e) Signed-off-by: psingh3 <pushpendra.singh@walmart.com> Signed-off-by: a0a0mf4 <akanksha.agrawal@walmart.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: psingh3 <pushpendra.singh@walmart.com> Co-authored-by: a0a0mf4 <akanksha.agrawal@walmart.com> (cherry picked from commit 8fd762f) * [Backport 3.x] Re-generate from latest specification (#1663) (#1664) * Re-generate from latest specification (#1663) * Re-generate from latest specification Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Fix sample Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Generate `ingestion` namespace Signed-off-by: Thomas Farr <tsfarr@amazon.com> --------- Signed-off-by: Thomas Farr <tsfarr@amazon.com> (cherry picked from commit a044051) * spotless Signed-off-by: Thomas Farr <tsfarr@amazon.com> --------- Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Prepare v2.26.0 release Signed-off-by: Thomas Farr <tsfarr@amazon.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Thomas Farr <tsfarr@amazon.com> Signed-off-by: psingh3 <pushpendra.singh@walmart.com> Signed-off-by: a0a0mf4 <akanksha.agrawal@walmart.com> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: psingh3 <pushpendra.singh@walmart.com> Co-authored-by: a0a0mf4 <akanksha.agrawal@walmart.com>
1 parent 64429a9 commit e4ae610

31 files changed

Lines changed: 5426 additions & 1801 deletions

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
33

44
## [Unreleased 2.x]
55
### Added
6-
- Added Jackson `ObjectMapper` module auto-detection ([#1643](https://github.com/opensearch-project/opensearch-java/pull/1643))
76

87
### Dependencies
98

@@ -17,6 +16,19 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1716

1817
### Security
1918

19+
## [2.26.0] - 07/10/2025
20+
### Added
21+
- Added Jackson `ObjectMapper` module auto-detection ([#1643](https://github.com/opensearch-project/opensearch-java/pull/1643))
22+
23+
### Dependencies
24+
- Bump `org.owasp.dependencycheck` from 12.1.1 to 12.1.3 ([#1608](https://github.com/opensearch-project/opensearch-java/pull/1608), [#1607](https://github.com/opensearch-project/opensearch-java/pull/1607), [#1623](https://github.com/opensearch-project/opensearch-java/pull/1623))
25+
- Bump `org.junit:junit-bom` from 5.13.0 to 5.13.2 ([#1606](https://github.com/opensearch-project/opensearch-java/pull/1606), [#1650](https://github.com/opensearch-project/opensearch-java/pull/1650), [#1665](https://github.com/opensearch-project/opensearch-java/pull/1665))
26+
- Bump `org.ajoberstar.grgit:grgit-gradle` from 5.3.0 to 5.3.2 ([#1621](https://github.com/opensearch-project/opensearch-java/pull/1621))
27+
- Bump `io.github.classgraph:classgraph` from 4.8.179 to 4.8.180 ([#1651](https://github.com/opensearch-project/opensearch-java/pull/1651))
28+
29+
### Fixed
30+
- Fixed `ApacheHttpClient5Transport` not honoring connect & socket timeouts configured on `ConnectionConfig` ([#1662](https://github.com/opensearch-project/opensearch-java/pull/1662))
31+
2032
## [2.25.0] - 06/03/2025
2133
### Added
2234
- Added support for the `template` query type ([#1586](https://github.com/opensearch-project/opensearch-java/pull/1586))
@@ -476,7 +488,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
476488
- Fix catching JsonParsingException ([#494](https://github.com/opensearch-project/opensearch-java/issues/494))
477489
- Fix StoryStats numeric value out of range of int ([#489](https://github.com/opensearch-project/opensearch-java/pull/489))
478490

479-
[Unreleased 2.x]: https://github.com/opensearch-project/opensearch-java/compare/v2.25.0...2.x
491+
[Unreleased 2.x]: https://github.com/opensearch-project/opensearch-java/compare/v2.26.0...2.x
492+
[2.26.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.25.0...v2.26.0
480493
[2.25.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.24.0...v2.25.0
481494
[2.24.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.23.0...v2.24.0
482495
[2.23.0]: https://github.com/opensearch-project/opensearch-java/compare/v2.22.0...v2.23.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUC
5353
See [User Guide](USER_GUIDE.md).
5454

5555
## Snapshot Builds
56-
The [snapshots builds](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/org/opensearch/client/opensearch-java/) are published to sonatype using [publish-snapshots.yml](./.github/workflows/publish-snapshots.yml) workflow. Each `push` event to the main branch triggers this workflow.
56+
The [snapshots builds](https://central.sonatype.com/repository/maven-snapshots/org/opensearch/client/opensearch-java/maven-metadata.xml) are published to sonatype using [publish-snapshots.yml](./.github/workflows/publish-snapshots.yml) workflow. Each `push` event to the main branch triggers this workflow.
5757

5858
## Compatibility with OpenSearch
5959

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ repositories {
4343
}
4444

4545
dependencies {
46-
implementation("org.ajoberstar.grgit:grgit-gradle:5.3.0")
46+
implementation("org.ajoberstar.grgit:grgit-gradle:5.3.2")
4747
implementation("com.diffplug.spotless", "spotless-plugin-gradle", "6.25.0")
4848
}
4949

java-client/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ plugins {
5050
`java-library`
5151
`maven-publish`
5252
id("com.github.jk1.dependency-license-report") version "2.9"
53-
id("org.owasp.dependencycheck") version "12.1.1"
53+
id("org.owasp.dependencycheck") version "12.1.3"
5454

5555
id("opensearch-java.spotless-conventions")
5656
}
@@ -244,7 +244,7 @@ dependencies {
244244
implementation("org.eclipse", "yasson", "2.0.2")
245245

246246
// https://github.com/classgraph/classgraph
247-
testImplementation("io.github.classgraph:classgraph:4.8.179")
247+
testImplementation("io.github.classgraph:classgraph:4.8.180")
248248

249249
// Eclipse 1.0
250250
testImplementation("junit", "junit" , "4.13.2") {

java-client/src/generated/java/org/opensearch/client/opensearch/core/SearchShardsRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public final String preference() {
188188
}
189189

190190
/**
191-
* Custom value used to route operations to a specific shard.
191+
* A custom value used to route operations to a specific shard.
192192
* <p>
193193
* API name: {@code routing}
194194
* </p>
@@ -415,7 +415,7 @@ public final Builder preference(@Nullable String value) {
415415
}
416416

417417
/**
418-
* Custom value used to route operations to a specific shard.
418+
* A custom value used to route operations to a specific shard.
419419
* <p>
420420
* API name: {@code routing}
421421
* </p>
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
//----------------------------------------------------
10+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
11+
//----------------------------------------------------
12+
13+
package org.opensearch.client.opensearch.ml;
14+
15+
import jakarta.json.stream.JsonGenerator;
16+
import java.util.Objects;
17+
import java.util.function.Function;
18+
import javax.annotation.Generated;
19+
import javax.annotation.Nonnull;
20+
import javax.annotation.Nullable;
21+
import org.opensearch.client.json.JsonpDeserializable;
22+
import org.opensearch.client.json.JsonpDeserializer;
23+
import org.opensearch.client.json.JsonpMapper;
24+
import org.opensearch.client.json.ObjectBuilderDeserializer;
25+
import org.opensearch.client.json.ObjectDeserializer;
26+
import org.opensearch.client.json.PlainJsonSerializable;
27+
import org.opensearch.client.util.CopyableBuilder;
28+
import org.opensearch.client.util.ObjectBuilder;
29+
import org.opensearch.client.util.ObjectBuilderBase;
30+
import org.opensearch.client.util.ToCopyableBuilder;
31+
32+
// typedef: ml.AdditionalConfig
33+
34+
@JsonpDeserializable
35+
@Generated("org.opensearch.client.codegen.CodeGenerator")
36+
public class AdditionalConfig implements PlainJsonSerializable, ToCopyableBuilder<AdditionalConfig.Builder, AdditionalConfig> {
37+
38+
@Nullable
39+
private final String spaceType;
40+
41+
// ---------------------------------------------------------------------------------------------
42+
43+
private AdditionalConfig(Builder builder) {
44+
this.spaceType = builder.spaceType;
45+
}
46+
47+
public static AdditionalConfig of(Function<AdditionalConfig.Builder, ObjectBuilder<AdditionalConfig>> fn) {
48+
return fn.apply(new Builder()).build();
49+
}
50+
51+
/**
52+
* The distance metric for k-NN search.
53+
* <p>
54+
* API name: {@code space_type}
55+
* </p>
56+
*/
57+
@Nullable
58+
public final String spaceType() {
59+
return this.spaceType;
60+
}
61+
62+
/**
63+
* Serialize this object to JSON.
64+
*/
65+
@Override
66+
public void serialize(JsonGenerator generator, JsonpMapper mapper) {
67+
generator.writeStartObject();
68+
serializeInternal(generator, mapper);
69+
generator.writeEnd();
70+
}
71+
72+
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
73+
if (this.spaceType != null) {
74+
generator.writeKey("space_type");
75+
generator.write(this.spaceType);
76+
}
77+
}
78+
79+
// ---------------------------------------------------------------------------------------------
80+
81+
@Override
82+
@Nonnull
83+
public Builder toBuilder() {
84+
return new Builder(this);
85+
}
86+
87+
@Nonnull
88+
public static Builder builder() {
89+
return new Builder();
90+
}
91+
92+
/**
93+
* Builder for {@link AdditionalConfig}.
94+
*/
95+
public static class Builder extends ObjectBuilderBase implements CopyableBuilder<Builder, AdditionalConfig> {
96+
@Nullable
97+
private String spaceType;
98+
99+
public Builder() {}
100+
101+
private Builder(AdditionalConfig o) {
102+
this.spaceType = o.spaceType;
103+
}
104+
105+
private Builder(Builder o) {
106+
this.spaceType = o.spaceType;
107+
}
108+
109+
@Override
110+
@Nonnull
111+
public Builder copy() {
112+
return new Builder(this);
113+
}
114+
115+
/**
116+
* The distance metric for k-NN search.
117+
* <p>
118+
* API name: {@code space_type}
119+
* </p>
120+
*/
121+
@Nonnull
122+
public final Builder spaceType(@Nullable String value) {
123+
this.spaceType = value;
124+
return this;
125+
}
126+
127+
/**
128+
* Builds a {@link AdditionalConfig}.
129+
*
130+
* @throws NullPointerException if some of the required fields are null.
131+
*/
132+
@Override
133+
@Nonnull
134+
public AdditionalConfig build() {
135+
_checkSingleUse();
136+
137+
return new AdditionalConfig(this);
138+
}
139+
}
140+
141+
// ---------------------------------------------------------------------------------------------
142+
143+
/**
144+
* Json deserializer for {@link AdditionalConfig}
145+
*/
146+
public static final JsonpDeserializer<AdditionalConfig> _DESERIALIZER = ObjectBuilderDeserializer.lazy(
147+
Builder::new,
148+
AdditionalConfig::setupAdditionalConfigDeserializer
149+
);
150+
151+
protected static void setupAdditionalConfigDeserializer(ObjectDeserializer<AdditionalConfig.Builder> op) {
152+
op.add(Builder::spaceType, JsonpDeserializer.stringDeserializer(), "space_type");
153+
}
154+
155+
@Override
156+
public int hashCode() {
157+
int result = 17;
158+
result = 31 * result + Objects.hashCode(this.spaceType);
159+
return result;
160+
}
161+
162+
@Override
163+
public boolean equals(Object o) {
164+
if (this == o) return true;
165+
if (o == null || this.getClass() != o.getClass()) return false;
166+
AdditionalConfig other = (AdditionalConfig) o;
167+
return Objects.equals(this.spaceType, other.spaceType);
168+
}
169+
}

java-client/src/generated/java/org/opensearch/client/opensearch/ml/ColumnMeta.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ public static ColumnMeta of(Function<ColumnMeta.Builder, ObjectBuilder<ColumnMet
5353
}
5454

5555
/**
56-
* The column type.
57-
* <p>
5856
* API name: {@code column_type}
59-
* </p>
6057
*/
6158
@Nullable
6259
public final String columnType() {
@@ -134,10 +131,7 @@ public Builder copy() {
134131
}
135132

136133
/**
137-
* The column type.
138-
* <p>
139134
* API name: {@code column_type}
140-
* </p>
141135
*/
142136
@Nonnull
143137
public final Builder columnType(@Nullable String value) {

java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateModelMetaRequest.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public final class CreateModelMetaRequest extends RequestBase
5050
@Nullable
5151
private final String description;
5252

53+
@Nullable
54+
private final FunctionName functionName;
55+
5356
@Nonnull
5457
private final ModelConfig modelConfig;
5558

@@ -78,6 +81,7 @@ public final class CreateModelMetaRequest extends RequestBase
7881
private CreateModelMetaRequest(Builder builder) {
7982
super(builder);
8083
this.description = builder.description;
84+
this.functionName = builder.functionName;
8185
this.modelConfig = ApiTypeHelper.requireNonNull(builder.modelConfig, this, "modelConfig");
8286
this.modelContentHashValue = ApiTypeHelper.requireNonNull(builder.modelContentHashValue, this, "modelContentHashValue");
8387
this.modelFormat = ApiTypeHelper.requireNonNull(builder.modelFormat, this, "modelFormat");
@@ -103,6 +107,14 @@ public final String description() {
103107
return this.description;
104108
}
105109

110+
/**
111+
* API name: {@code function_name}
112+
*/
113+
@Nullable
114+
public final FunctionName functionName() {
115+
return this.functionName;
116+
}
117+
106118
/**
107119
* Required - API name: {@code model_config}
108120
*/
@@ -194,6 +206,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
194206
generator.write(this.description);
195207
}
196208

209+
if (this.functionName != null) {
210+
generator.writeKey("function_name");
211+
this.functionName.serialize(generator, mapper);
212+
}
213+
197214
generator.writeKey("model_config");
198215
this.modelConfig.serialize(generator, mapper);
199216

@@ -242,6 +259,8 @@ public static Builder builder() {
242259
public static class Builder extends RequestBase.AbstractBuilder<Builder> implements CopyableBuilder<Builder, CreateModelMetaRequest> {
243260
@Nullable
244261
private String description;
262+
@Nullable
263+
private FunctionName functionName;
245264
private ModelConfig modelConfig;
246265
private String modelContentHashValue;
247266
private ModelFormat modelFormat;
@@ -258,6 +277,7 @@ public Builder() {}
258277
private Builder(CreateModelMetaRequest o) {
259278
super(o);
260279
this.description = o.description;
280+
this.functionName = o.functionName;
261281
this.modelConfig = o.modelConfig;
262282
this.modelContentHashValue = o.modelContentHashValue;
263283
this.modelFormat = o.modelFormat;
@@ -271,6 +291,7 @@ private Builder(CreateModelMetaRequest o) {
271291
private Builder(Builder o) {
272292
super(o);
273293
this.description = o.description;
294+
this.functionName = o.functionName;
274295
this.modelConfig = o.modelConfig;
275296
this.modelContentHashValue = o.modelContentHashValue;
276297
this.modelFormat = o.modelFormat;
@@ -305,6 +326,15 @@ public final Builder description(@Nullable String value) {
305326
return this;
306327
}
307328

329+
/**
330+
* API name: {@code function_name}
331+
*/
332+
@Nonnull
333+
public final Builder functionName(@Nullable FunctionName value) {
334+
this.functionName = value;
335+
return this;
336+
}
337+
308338
/**
309339
* Required - API name: {@code model_config}
310340
*/
@@ -423,6 +453,7 @@ public CreateModelMetaRequest build() {
423453

424454
protected static void setupCreateModelMetaRequestDeserializer(ObjectDeserializer<CreateModelMetaRequest.Builder> op) {
425455
op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description");
456+
op.add(Builder::functionName, FunctionName._DESERIALIZER, "function_name");
426457
op.add(Builder::modelConfig, ModelConfig._DESERIALIZER, "model_config");
427458
op.add(Builder::modelContentHashValue, JsonpDeserializer.stringDeserializer(), "model_content_hash_value");
428459
op.add(Builder::modelFormat, ModelFormat._DESERIALIZER, "model_format");
@@ -458,6 +489,7 @@ protected static void setupCreateModelMetaRequestDeserializer(ObjectDeserializer
458489
public int hashCode() {
459490
int result = 17;
460491
result = 31 * result + Objects.hashCode(this.description);
492+
result = 31 * result + Objects.hashCode(this.functionName);
461493
result = 31 * result + this.modelConfig.hashCode();
462494
result = 31 * result + this.modelContentHashValue.hashCode();
463495
result = 31 * result + this.modelFormat.hashCode();
@@ -475,6 +507,7 @@ public boolean equals(Object o) {
475507
if (o == null || this.getClass() != o.getClass()) return false;
476508
CreateModelMetaRequest other = (CreateModelMetaRequest) o;
477509
return Objects.equals(this.description, other.description)
510+
&& Objects.equals(this.functionName, other.functionName)
478511
&& this.modelConfig.equals(other.modelConfig)
479512
&& this.modelContentHashValue.equals(other.modelContentHashValue)
480513
&& this.modelFormat.equals(other.modelFormat)

0 commit comments

Comments
 (0)