Skip to content

Commit

Permalink
[codegen] update to latest spec
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta committed Jan 31, 2025
1 parent 8d1f785 commit a3ee856
Show file tree
Hide file tree
Showing 313 changed files with 31,405 additions and 5,372 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public final String type() {
}

/**
* A human-readable explanation of the error, in english
* A human-readable explanation of the error, in English.
* <p>
* API name: {@code reason}
*/
Expand Down Expand Up @@ -287,7 +287,7 @@ public final Builder type(@Nullable String value) {
}

/**
* A human-readable explanation of the error, in english
* A human-readable explanation of the error, in English.
* <p>
* API name: {@code reason}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public enum ExpandWildcard implements JsonEnum {
Closed("closed"),

/**
* Match hidden data streams and hidden indices. Must be combined with open,
* closed, or both.
* Match hidden data streams and hidden indices. Must be combined with
* <code>open</code>, <code>closed</code>, or <code>both</code>.
*/
Hidden("hidden"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,18 @@ public static Retries of(Function<Builder, ObjectBuilder<Retries>> fn) {
}

/**
* Required - API name: {@code bulk}
* Required - The number of bulk actions retried.
* <p>
* API name: {@code bulk}
*/
public final long bulk() {
return this.bulk;
}

/**
* Required - API name: {@code search}
* Required - The number of search actions retried.
* <p>
* API name: {@code search}
*/
public final long search() {
return this.search;
Expand Down Expand Up @@ -125,15 +129,19 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private Long search;

/**
* Required - API name: {@code bulk}
* Required - The number of bulk actions retried.
* <p>
* API name: {@code bulk}
*/
public final Builder bulk(long value) {
this.bulk = value;
return this;
}

/**
* Required - API name: {@code search}
* Required - The number of search actions retried.
* <p>
* API name: {@code search}
*/
public final Builder search(long value) {
this.search = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@ public static ShardStatistics of(Function<Builder, ObjectBuilder<ShardStatistics
}

/**
* Required - API name: {@code failed}
* Required - The number of shards the operation or search attempted to run on
* but failed.
* <p>
* API name: {@code failed}
*/
public final Number failed() {
return this.failed;
}

/**
* Required - Indicates how many shards have successfully run the search.
* Required - The number of shards the operation or search succeeded on.
* <p>
* API name: {@code successful}
*/
Expand All @@ -104,7 +107,7 @@ public final Number successful() {
}

/**
* Required - Indicates how many shards the search will run on overall.
* Required - The number of shards the operation or search will run on overall.
* <p>
* API name: {@code total}
*/
Expand Down Expand Up @@ -190,15 +193,18 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private Number skipped;

/**
* Required - API name: {@code failed}
* Required - The number of shards the operation or search attempted to run on
* but failed.
* <p>
* API name: {@code failed}
*/
public final Builder failed(Number value) {
this.failed = value;
return this;
}

/**
* Required - Indicates how many shards have successfully run the search.
* Required - The number of shards the operation or search succeeded on.
* <p>
* API name: {@code successful}
*/
Expand All @@ -208,7 +214,7 @@ public final Builder successful(Number value) {
}

/**
* Required - Indicates how many shards the search will run on overall.
* Required - The number of shards the operation or search will run on overall.
* <p>
* API name: {@code total}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public static StoredScript of(Function<Builder, ObjectBuilder<StoredScript>> fn)
}

/**
* Required - Specifies the language the script is written in.
* Required - The language the script is written in. For serach templates, use
* <code>mustache</code>.
* <p>
* API name: {@code lang}
*/
Expand All @@ -97,7 +98,8 @@ public final Map<String, String> options() {
}

/**
* Required - The script source.
* Required - The script source. For search templates, an object containing the
* search template.
* <p>
* API name: {@code source}
*/
Expand Down Expand Up @@ -155,7 +157,8 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private String source;

/**
* Required - Specifies the language the script is written in.
* Required - The language the script is written in. For serach templates, use
* <code>mustache</code>.
* <p>
* API name: {@code lang}
*/
Expand All @@ -165,7 +168,8 @@ public final Builder lang(String value) {
}

/**
* Required - Specifies the language the script is written in.
* Required - The language the script is written in. For serach templates, use
* <code>mustache</code>.
* <p>
* API name: {@code lang}
*/
Expand Down Expand Up @@ -195,7 +199,8 @@ public final Builder options(String key, String value) {
}

/**
* Required - The script source.
* Required - The script source. For search templates, an object containing the
* search template.
* <p>
* API name: {@code source}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,23 @@ public enum VersionType implements JsonEnum {
Internal("internal"),

/**
* Only index the document if the given version is strictly higher than the
* Only index the document if the specified version is strictly higher than the
* version of the stored document or if there is no existing document.
*/
External("external"),

/**
* Only index the document if the given version is equal or higher than the
* version of the stored document or if there is no existing document. Note: the
* external_gte version type is meant for special use cases and should be used
* with care. If used incorrectly, it can result in loss of data.
* Only index the document if the specified version is equal or higher than the
* version of the stored document or if there is no existing document. NOTE: The
* <code>external_gte</code> version type is meant for special use cases and
* should be used with care. If used incorrectly, it can result in loss of data.
*/
ExternalGte("external_gte"),

/**
* This option is deprecated because it can cause primary and replica shards to
* diverge.
*/
Force("force"),

;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,26 @@ protected WriteResponseBase(AbstractBuilder<?> builder) {
}

/**
* Required - API name: {@code _id}
* Required - The unique identifier for the added document.
* <p>
* API name: {@code _id}
*/
public final String id() {
return this.id;
}

/**
* Required - API name: {@code _index}
* Required - The name of the index the document was added to.
* <p>
* API name: {@code _index}
*/
public final String index() {
return this.index;
}

/**
* The primary term assigned to the document for the indexing operation.
* <p>
* API name: {@code _primary_term}
*/
@Nullable
Expand All @@ -118,13 +124,20 @@ public final Long primaryTerm() {
}

/**
* Required - API name: {@code result}
* Required - The result of the indexing operation: <code>created</code> or
* <code>updated</code>.
* <p>
* API name: {@code result}
*/
public final Result result() {
return this.result;
}

/**
* The sequence number assigned to the document for the indexing operation.
* Sequence numbers are used to ensure an older version of a document doesn't
* overwrite a newer version.
* <p>
* API name: {@code _seq_no}
*/
@Nullable
Expand All @@ -133,14 +146,19 @@ public final Long seqNo() {
}

/**
* Required - API name: {@code _shards}
* Required - Information about the replication process of the operation.
* <p>
* API name: {@code _shards}
*/
public final ShardStatistics shards() {
return this.shards;
}

/**
* Required - API name: {@code _version}
* Required - The document version, which is incremented each time the document
* is updated.
* <p>
* API name: {@code _version}
*/
public final long version() {
return this.version;
Expand Down Expand Up @@ -225,22 +243,28 @@ public abstract static class AbstractBuilder<BuilderT extends AbstractBuilder<Bu
private Boolean forcedRefresh;

/**
* Required - API name: {@code _id}
* Required - The unique identifier for the added document.
* <p>
* API name: {@code _id}
*/
public final BuilderT id(String value) {
this.id = value;
return self();
}

/**
* Required - API name: {@code _index}
* Required - The name of the index the document was added to.
* <p>
* API name: {@code _index}
*/
public final BuilderT index(String value) {
this.index = value;
return self();
}

/**
* The primary term assigned to the document for the indexing operation.
* <p>
* API name: {@code _primary_term}
*/
public final BuilderT primaryTerm(@Nullable Long value) {
Expand All @@ -249,14 +273,21 @@ public final BuilderT primaryTerm(@Nullable Long value) {
}

/**
* Required - API name: {@code result}
* Required - The result of the indexing operation: <code>created</code> or
* <code>updated</code>.
* <p>
* API name: {@code result}
*/
public final BuilderT result(Result value) {
this.result = value;
return self();
}

/**
* The sequence number assigned to the document for the indexing operation.
* Sequence numbers are used to ensure an older version of a document doesn't
* overwrite a newer version.
* <p>
* API name: {@code _seq_no}
*/
public final BuilderT seqNo(@Nullable Long value) {
Expand All @@ -265,22 +296,29 @@ public final BuilderT seqNo(@Nullable Long value) {
}

/**
* Required - API name: {@code _shards}
* Required - Information about the replication process of the operation.
* <p>
* API name: {@code _shards}
*/
public final BuilderT shards(ShardStatistics value) {
this.shards = value;
return self();
}

/**
* Required - API name: {@code _shards}
* Required - Information about the replication process of the operation.
* <p>
* API name: {@code _shards}
*/
public final BuilderT shards(Function<ShardStatistics.Builder, ObjectBuilder<ShardStatistics>> fn) {
return this.shards(fn.apply(new ShardStatistics.Builder()).build());
}

/**
* Required - API name: {@code _version}
* Required - The document version, which is incremented each time the document
* is updated.
* <p>
* API name: {@code _version}
*/
public final BuilderT version(long value) {
this.version = value;
Expand Down
Loading

0 comments on commit a3ee856

Please sign in to comment.