Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(generated): update API definition to 1.0.0-dev0.1.22 #632

Merged
merged 1 commit into from
Nov 7, 2024
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 @@ -2581,6 +2581,9 @@ public ServiceCall<ExplainResult> postPartitionExplain(PostPartitionExplainOptio
builder.header("Accept", "application/json");
final JsonObject contentJson = new JsonObject();
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postPartitionExplainOptions.selector()));
if (postPartitionExplainOptions.allowFallback() != null) {
contentJson.addProperty("allow_fallback", postPartitionExplainOptions.allowFallback());
}
if (postPartitionExplainOptions.bookmark() != null) {
contentJson.addProperty("bookmark", postPartitionExplainOptions.bookmark());
}
Expand Down Expand Up @@ -2623,9 +2626,13 @@ public ServiceCall<ExplainResult> postPartitionExplain(PostPartitionExplainOptio
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
* all fields in selector by using the `_index` endpoint.
*
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
* recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
* In this case the response body will include a warning field recommending that an index is created.
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
* isn't recommended because it has a significant performance impact causing a full scan of the partition with each
* request. In this case the response body includes a warning field recommending the creation of an index.
*
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
* status code if no suitable index exists. If you want to use only a specific index for your query set
* `allow_fallback` to `false` and set the `use_index` option.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
Expand All @@ -2648,6 +2655,9 @@ public ServiceCall<FindResult> postPartitionFind(PostPartitionFindOptions postPa
builder.header("Accept", "application/json");
final JsonObject contentJson = new JsonObject();
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postPartitionFindOptions.selector()));
if (postPartitionFindOptions.allowFallback() != null) {
contentJson.addProperty("allow_fallback", postPartitionFindOptions.allowFallback());
}
if (postPartitionFindOptions.bookmark() != null) {
contentJson.addProperty("bookmark", postPartitionFindOptions.bookmark());
}
Expand Down Expand Up @@ -2690,9 +2700,13 @@ public ServiceCall<FindResult> postPartitionFind(PostPartitionFindOptions postPa
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
* all fields in selector by using the `_index` endpoint.
*
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
* recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
* In this case the response body will include a warning field recommending that an index is created.
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
* isn't recommended because it has a significant performance impact causing a full scan of the partition with each
* request. In this case the response body includes a warning field recommending the creation of an index.
*
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
* status code if no suitable index exists. If you want to use only a specific index for your query set
* `allow_fallback` to `false` and set the `use_index` option.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
Expand All @@ -2715,6 +2729,9 @@ public ServiceCall<InputStream> postPartitionFindAsStream(PostPartitionFindOptio
builder.header("Accept", "application/json");
final JsonObject contentJson = new JsonObject();
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postPartitionFindOptions.selector()));
if (postPartitionFindOptions.allowFallback() != null) {
contentJson.addProperty("allow_fallback", postPartitionFindOptions.allowFallback());
}
if (postPartitionFindOptions.bookmark() != null) {
contentJson.addProperty("bookmark", postPartitionFindOptions.bookmark());
}
Expand Down Expand Up @@ -2771,6 +2788,9 @@ public ServiceCall<ExplainResult> postExplain(PostExplainOptions postExplainOpti
builder.header("Accept", "application/json");
final JsonObject contentJson = new JsonObject();
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postExplainOptions.selector()));
if (postExplainOptions.allowFallback() != null) {
contentJson.addProperty("allow_fallback", postExplainOptions.allowFallback());
}
if (postExplainOptions.bookmark() != null) {
contentJson.addProperty("bookmark", postExplainOptions.bookmark());
}
Expand Down Expand Up @@ -2816,9 +2836,13 @@ public ServiceCall<ExplainResult> postExplain(PostExplainOptions postExplainOpti
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
* all fields in selector by using the `_index` endpoint.
*
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
* recommended because it has a significant performance impact causing a full scan of the database with each request.
* In this case the response body will include a warning field recommending that an index is created.
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
* isn't recommended because it has a significant performance impact causing a full scan of the database with each
* request. In this case the response body includes a warning field recommending the creation of an index.
*
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
* status code if no suitable index exists. If you want to use only a specific index for your query set
* `allow_fallback` to `false` and set the `use_index` option.
*
* @param postFindOptions the {@link PostFindOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link FindResult}
Expand All @@ -2836,6 +2860,9 @@ public ServiceCall<FindResult> postFind(PostFindOptions postFindOptions) {
builder.header("Accept", "application/json");
final JsonObject contentJson = new JsonObject();
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postFindOptions.selector()));
if (postFindOptions.allowFallback() != null) {
contentJson.addProperty("allow_fallback", postFindOptions.allowFallback());
}
if (postFindOptions.bookmark() != null) {
contentJson.addProperty("bookmark", postFindOptions.bookmark());
}
Expand Down Expand Up @@ -2881,9 +2908,13 @@ public ServiceCall<FindResult> postFind(PostFindOptions postFindOptions) {
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
* all fields in selector by using the `_index` endpoint.
*
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
* recommended because it has a significant performance impact causing a full scan of the database with each request.
* In this case the response body will include a warning field recommending that an index is created.
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
* isn't recommended because it has a significant performance impact causing a full scan of the database with each
* request. In this case the response body includes a warning field recommending the creation of an index.
*
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
* status code if no suitable index exists. If you want to use only a specific index for your query set
* `allow_fallback` to `false` and set the `use_index` option.
*
* @param postFindOptions the {@link PostFindOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link InputStream}
Expand All @@ -2901,6 +2932,9 @@ public ServiceCall<InputStream> postFindAsStream(PostFindOptions postFindOptions
builder.header("Accept", "application/json");
final JsonObject contentJson = new JsonObject();
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postFindOptions.selector()));
if (postFindOptions.allowFallback() != null) {
contentJson.addProperty("allow_fallback", postFindOptions.allowFallback());
}
if (postFindOptions.bookmark() != null) {
contentJson.addProperty("bookmark", postFindOptions.bookmark());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ public Long getUpdatedOn() {
/**
* Gets the user.
*
* Name of user running replication or owning the indexer. Available for `indexer`, `replication` type tasks.
* Name of user running the process.
*
* @return the user
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public String getCompactedSeq() {
/**
* Gets the dbName.
*
* The name of the database.
* Schema for a database name.
*
* @return the dbName
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected DbEvent() { }
/**
* Gets the dbName.
*
* Database name.
* Schema for a database name.
*
* @return the dbName
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public DatabaseInformation getInfo() {
/**
* Gets the key.
*
* Database name.
* Schema for a database name.
*
* @return the key
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public void setDeletedConflicts(final List<String> deletedConflicts) {
/**
* Gets the id.
*
* Schema for a design document ID.
* Schema for a design document ID including a `_design/` prefix.
*
* @return the id
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public Document getDoc() {
/**
* Gets the id.
*
* id.
* Schema for a document ID.
*
* @return the id
*/
Expand All @@ -102,7 +102,7 @@ public String getId() {
/**
* Gets the key.
*
* Document ID.
* Schema for a document ID.
*
* @return the key
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public Boolean isCovering() {
/**
* Gets the dbname.
*
* Name of database.
* Schema for a database name.
*
* @return the dbname
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
*/
public class ExplainResultMrArgs extends GenericModel {

/**
* Direction parameter passed to the underlying view.
*/
public interface Direction {
/** asc. */
String ASC = "asc";
/** desc. */
String DESC = "desc";
}

/**
* The type of the underlying view.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ private Builder(IndexDefinition indexDefinition) {
public Builder() {
}

/**
* Instantiates a new builder with required properties.
*
* @param fields the fields
*/
public Builder(List<IndexField> fields) {
this.fields = fields;
}

/**
* Builds a IndexDefinition.
*
Expand Down Expand Up @@ -152,6 +161,8 @@ public Builder partialFilterSelector(Map<String, Object> partialFilterSelector)
protected IndexDefinition() { }

protected IndexDefinition(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.fields,
"fields cannot be null");
defaultAnalyzer = builder.defaultAnalyzer;
defaultField = builder.defaultField;
fields = builder.fields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected IndexInformation() { }
/**
* Gets the ddoc.
*
* Design document ID including a `_design/` prefix.
* Schema for a nullable design document ID including a `_design/` prefix.
*
* @return the ddoc
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected PartitionInformation() { }
/**
* Gets the dbName.
*
* The name of the database.
* Schema for a database name.
*
* @return the dbName
*/
Expand Down Expand Up @@ -70,7 +70,7 @@ public Long getDocDelCount() {
/**
* Gets the partition.
*
* The name of the partition in the database.
* Schema for a partition key.
*
* @return the partition
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public interface Update {

protected String db;
protected Map<String, Object> selector;
protected Boolean allowFallback;
protected String bookmark;
protected Boolean conflicts;
protected Boolean executionStats;
Expand All @@ -56,6 +57,7 @@ public interface Update {
public static class Builder {
private String db;
private Map<String, Object> selector;
private Boolean allowFallback;
private String bookmark;
private Boolean conflicts;
private Boolean executionStats;
Expand All @@ -76,6 +78,7 @@ public static class Builder {
private Builder(PostExplainOptions postExplainOptions) {
this.db = postExplainOptions.db;
this.selector = postExplainOptions.selector;
this.allowFallback = postExplainOptions.allowFallback;
this.bookmark = postExplainOptions.bookmark;
this.conflicts = postExplainOptions.conflicts;
this.executionStats = postExplainOptions.executionStats;
Expand Down Expand Up @@ -185,6 +188,17 @@ public Builder selector(Map<String, Object> selector) {
return this;
}

/**
* Set the allowFallback.
*
* @param allowFallback the allowFallback
* @return the PostExplainOptions builder
*/
public Builder allowFallback(Boolean allowFallback) {
this.allowFallback = allowFallback;
return this;
}

/**
* Set the bookmark.
*
Expand Down Expand Up @@ -319,6 +333,7 @@ protected PostExplainOptions(Builder builder) {
"selector cannot be null");
db = builder.db;
selector = builder.selector;
allowFallback = builder.allowFallback;
bookmark = builder.bookmark;
conflicts = builder.conflicts;
executionStats = builder.executionStats;
Expand Down Expand Up @@ -395,6 +410,17 @@ public Map<String, Object> selector() {
return selector;
}

/**
* Gets the allowFallback.
*
* Whether to allow fallback to other indexes. Default is true.
*
* @return the allowFallback
*/
public Boolean allowFallback() {
return allowFallback;
}

/**
* Gets the bookmark.
*
Expand Down Expand Up @@ -515,8 +541,9 @@ public String update() {
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
* indexes that might get added later.
*
* If the specified index does not exist or cannot answer the query then the value is ignored and another index or a
* full scan of all documents will answer the query.
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
* another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
* server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
*
* @return the useIndex
*/
Expand Down
Loading