Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
import co.elastic.clients.util.ObjectBuilder;
import co.elastic.clients.util.WithJsonObjectBuilderBase;
import jakarta.json.stream.JsonGenerator;
import java.lang.Integer;
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Nullable;

//----------------------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
Expand All @@ -59,16 +59,18 @@
*/
@JsonpDeserializable
public class TextIndexPrefixes implements JsonpSerializable {
private final int maxChars;
@Nullable
private final Integer maxChars;

private final int minChars;
@Nullable
private final Integer minChars;

// ---------------------------------------------------------------------------------------------

private TextIndexPrefixes(Builder builder) {

this.maxChars = ApiTypeHelper.requireNonNull(builder.maxChars, this, "maxChars", 0);
this.minChars = ApiTypeHelper.requireNonNull(builder.minChars, this, "minChars", 0);
this.maxChars = builder.maxChars;
this.minChars = builder.minChars;

}

Expand All @@ -77,16 +79,18 @@ public static TextIndexPrefixes of(Function<Builder, ObjectBuilder<TextIndexPref
}

/**
* Required - API name: {@code max_chars}
* API name: {@code max_chars}
*/
public final int maxChars() {
@Nullable
public final Integer maxChars() {
return this.maxChars;
}

/**
* Required - API name: {@code min_chars}
* API name: {@code min_chars}
*/
public final int minChars() {
@Nullable
public final Integer minChars() {
return this.minChars;
}

Expand All @@ -101,11 +105,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {

generator.writeKey("max_chars");
generator.write(this.maxChars);
if (this.maxChars != null) {
generator.writeKey("max_chars");
generator.write(this.maxChars);

generator.writeKey("min_chars");
generator.write(this.minChars);
}
if (this.minChars != null) {
generator.writeKey("min_chars");
generator.write(this.minChars);

}

}

Expand All @@ -121,8 +130,10 @@ public String toString() {
*/

public static class Builder extends WithJsonObjectBuilderBase<Builder> implements ObjectBuilder<TextIndexPrefixes> {
@Nullable
private Integer maxChars;

@Nullable
private Integer minChars;

public Builder() {
Expand All @@ -133,17 +144,17 @@ private Builder(TextIndexPrefixes instance) {

}
/**
* Required - API name: {@code max_chars}
* API name: {@code max_chars}
*/
public final Builder maxChars(int value) {
public final Builder maxChars(@Nullable Integer value) {
this.maxChars = value;
return this;
}

/**
* Required - API name: {@code min_chars}
* API name: {@code min_chars}
*/
public final Builder minChars(int value) {
public final Builder minChars(@Nullable Integer value) {
this.minChars = value;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
'_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L150-L153',
'_global.reindex.Destination': '_global/reindex/types.ts#L39-L67',
'_global.reindex.RemoteSource': '_global/reindex/types.ts#L127-L163',
'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L32-L192',
'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L32-L195',
'_global.reindex.Response': '_global/reindex/ReindexResponse.ts#L27-L97',
'_global.reindex.Source': '_global/reindex/types.ts#L69-L125',
'_global.reindex_rethrottle.ParentReindexStatus': '_global/reindex_rethrottle/types.ts#L46-L48',
Expand Down Expand Up @@ -3562,10 +3562,10 @@
if (hash.length > 1) {
hash = hash.substring(1);
}
window.location = "https://github.com/elastic/elasticsearch-specification/tree/ea5cd764eeab3a374bc18999c0ea39e554e62d2d/specification/" + (paths[hash] || "");
window.location = "https://github.com/elastic/elasticsearch-specification/tree/22c7eb88e9919e130aa40d86bf0dccd5de355673/specification/" + (paths[hash] || "");
</script>
</head>
<body>
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/ea5cd764eeab3a374bc18999c0ea39e554e62d2d/specification/">Elasticsearch API specification</a>.
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/22c7eb88e9919e130aa40d86bf0dccd5de355673/specification/">Elasticsearch API specification</a>.
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public final String apiVersion() {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* application ID that's assigned to your app.
* <p>
* IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes,
Expand All @@ -149,7 +149,7 @@ public final String clientId() {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* application secret that you created in the Microsoft app registration portal
* for your app.
* <p>
Expand Down Expand Up @@ -221,7 +221,7 @@ public final String resourceName() {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* resource identifier (application ID URI) of the resource you want, suffixed
* with .default For example:
*
Expand All @@ -243,7 +243,7 @@ public final List<String> scopes() {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* directory tenant the application plans to operate against.
* <p>
* IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes,
Expand Down Expand Up @@ -403,7 +403,7 @@ public final Builder apiVersion(String value) {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* application ID that's assigned to your app.
* <p>
* IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes,
Expand All @@ -418,7 +418,7 @@ public final Builder clientId(@Nullable String value) {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* application secret that you created in the Microsoft app registration portal
* for your app.
* <p>
Expand Down Expand Up @@ -506,7 +506,7 @@ public final Builder resourceName(String value) {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* resource identifier (application ID URI) of the resource you want, suffixed
* with .default For example:
*
Expand All @@ -531,7 +531,7 @@ public final Builder scopes(List<String> list) {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* resource identifier (application ID URI) of the resource you want, suffixed
* with .default For example:
*
Expand All @@ -556,7 +556,7 @@ public final Builder scopes(String value, String... values) {
}

/**
* For OAuth 2.0 authentication using the client credentials grant flow. The
* For OAuth 2.0 authorization using the client credentials grant flow. The
* directory tenant the application plans to operate against.
* <p>
* IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public final Integer batchSize() {
}

/**
* Specifies the HTTP header parameters – such as <code>Authentication</code> or
* Specifies the HTTP header parameters – such as <code>Authorization</code> or
* <code>Content-Type</code> – that are required to access the custom service.
* For example:
*
Expand Down Expand Up @@ -379,7 +379,7 @@ public final Builder batchSize(@Nullable Integer value) {
}

/**
* Specifies the HTTP header parameters – such as <code>Authentication</code> or
* Specifies the HTTP header parameters – such as <code>Authorization</code> or
* <code>Content-Type</code> – that are required to access the custom service.
* For example:
*
Expand All @@ -401,7 +401,7 @@ public final Builder headers(Map<String, String> map) {
}

/**
* Specifies the HTTP header parameters – such as <code>Authentication</code> or
* Specifies the HTTP header parameters – such as <code>Authorization</code> or
* <code>Content-Type</code> – that are required to access the custom service.
* For example:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class JinaAIServiceSettings implements JsonpSerializable {
private final Integer dimensions;

@Nullable
private final JinaAIElementType elementType;
private final JinaAIElementType embeddingType;

@Nullable
private final Boolean multimodalModel;
Expand All @@ -90,7 +90,7 @@ private JinaAIServiceSettings(Builder builder) {
this.rateLimit = builder.rateLimit;
this.similarity = builder.similarity;
this.dimensions = builder.dimensions;
this.elementType = builder.elementType;
this.embeddingType = builder.embeddingType;
this.multimodalModel = builder.multimodalModel;

}
Expand Down Expand Up @@ -167,11 +167,11 @@ public final Integer dimensions() {
* (this is a synonym of <code>bit</code>). Use <code>float</code> for the
* default float embeddings.
* <p>
* API name: {@code element_type}
* API name: {@code embedding_type}
*/
@Nullable
public final JinaAIElementType elementType() {
return this.elementType;
public final JinaAIElementType embeddingType() {
return this.embeddingType;
}

/**
Expand Down Expand Up @@ -221,9 +221,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.dimensions);

}
if (this.elementType != null) {
generator.writeKey("element_type");
this.elementType.serialize(generator, mapper);
if (this.embeddingType != null) {
generator.writeKey("embedding_type");
this.embeddingType.serialize(generator, mapper);
}
if (this.multimodalModel != null) {
generator.writeKey("multimodal_model");
Expand Down Expand Up @@ -261,7 +261,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
private Integer dimensions;

@Nullable
private JinaAIElementType elementType;
private JinaAIElementType embeddingType;

@Nullable
private Boolean multimodalModel;
Expand All @@ -274,7 +274,7 @@ private Builder(JinaAIServiceSettings instance) {
this.rateLimit = instance.rateLimit;
this.similarity = instance.similarity;
this.dimensions = instance.dimensions;
this.elementType = instance.elementType;
this.embeddingType = instance.embeddingType;
this.multimodalModel = instance.multimodalModel;

}
Expand Down Expand Up @@ -359,10 +359,10 @@ public final Builder dimensions(@Nullable Integer value) {
* (this is a synonym of <code>bit</code>). Use <code>float</code> for the
* default float embeddings.
* <p>
* API name: {@code element_type}
* API name: {@code embedding_type}
*/
public final Builder elementType(@Nullable JinaAIElementType value) {
this.elementType = value;
public final Builder embeddingType(@Nullable JinaAIElementType value) {
this.embeddingType = value;
return this;
}

Expand Down Expand Up @@ -421,7 +421,7 @@ protected static void setupJinaAIServiceSettingsDeserializer(ObjectDeserializer<
op.add(Builder::rateLimit, RateLimitSetting._DESERIALIZER, "rate_limit");
op.add(Builder::similarity, JinaAISimilarityType._DESERIALIZER, "similarity");
op.add(Builder::dimensions, JsonpDeserializer.integerDeserializer(), "dimensions");
op.add(Builder::elementType, JinaAIElementType._DESERIALIZER, "element_type");
op.add(Builder::embeddingType, JinaAIElementType._DESERIALIZER, "embedding_type");
op.add(Builder::multimodalModel, JsonpDeserializer.booleanDeserializer(), "multimodal_model");

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ public final TrainedModelType modelType() {
* processor architecture and OS combination, then this field specifies which.
* The format of the string must match the platform identifiers used by
* Elasticsearch, so one of, <code>linux-x86_64</code>,
* <code>linux-aarch64</code>, <code>darwin-x86_64</code>,
* <code>darwin-aarch64</code>, or <code>windows-x86_64</code>. For portable
* models (those that work independent of processor architecture or OS
* features), leave this field unset.
* <code>linux-aarch64</code>, <code>darwin-aarch64</code>, or
* <code>windows-x86_64</code>. For portable models (those that work independent
* of processor architecture or OS features), leave this field unset.
* <p>
* API name: {@code platform_architecture}
*/
Expand Down Expand Up @@ -597,10 +596,9 @@ public final Builder modelType(@Nullable TrainedModelType value) {
* processor architecture and OS combination, then this field specifies which.
* The format of the string must match the platform identifiers used by
* Elasticsearch, so one of, <code>linux-x86_64</code>,
* <code>linux-aarch64</code>, <code>darwin-x86_64</code>,
* <code>darwin-aarch64</code>, or <code>windows-x86_64</code>. For portable
* models (those that work independent of processor architecture or OS
* features), leave this field unset.
* <code>linux-aarch64</code>, <code>darwin-aarch64</code>, or
* <code>windows-x86_64</code>. For portable models (those that work independent
* of processor architecture or OS features), leave this field unset.
* <p>
* API name: {@code platform_architecture}
*/
Expand Down
Loading