Skip to content

Commit

Permalink
feat(generated): update API definition to 1.0.0-dev0.1.15
Browse files Browse the repository at this point in the history
Generated SDK source code using:
- Generator version 3.94.1
- Specification version 1.0.0-dev0.1.15
- Automation (cloudant-sdks) version bd3193b
  • Loading branch information
cloudant-sdks-automation authored and ricellis committed Sep 5, 2024
1 parent e559b43 commit c0d48f1
Show file tree
Hide file tree
Showing 28 changed files with 452 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,41 +245,6 @@ public ServiceCall<ServerInformation> getServerInformation() {
return getServerInformation(null);
}

/**
* Retrieve cluster membership information.
*
* Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
* node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
* cluster.
*
* @param getMembershipInformationOptions the {@link GetMembershipInformationOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link MembershipInformation}
*/
public ServiceCall<MembershipInformation> getMembershipInformation(GetMembershipInformationOptions getMembershipInformationOptions) {
RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/_membership"));
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("cloudant", "v1", "getMembershipInformation");
for (Entry<String, String> header : sdkHeaders.entrySet()) {
builder.header(header.getKey(), header.getValue());
}
builder.header("Accept", "application/json");
ResponseConverter<MembershipInformation> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<MembershipInformation>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
}

/**
* Retrieve cluster membership information.
*
* Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
* node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
* cluster.
*
* @return a {@link ServiceCall} with a result of type {@link MembershipInformation}
*/
public ServiceCall<MembershipInformation> getMembershipInformation() {
return getMembershipInformation(null);
}

/**
* Retrieve one or more UUIDs.
*
Expand Down Expand Up @@ -2278,6 +2243,10 @@ public ServiceCall<InputStream> postPartitionAllDocsAsStream(PostPartitionAllDoc
* Lucene Query Parser Syntax. Search indexes are defined by an index function, similar to a map function in MapReduce
* views. The index function decides what data to index and store in the index.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
* the limitations and appropriate use cases.
*
* @param postPartitionSearchOptions the {@link PostPartitionSearchOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link SearchResult}
*/
Expand Down Expand Up @@ -2343,6 +2312,10 @@ public ServiceCall<SearchResult> postPartitionSearch(PostPartitionSearchOptions
* Lucene Query Parser Syntax. Search indexes are defined by an index function, similar to a map function in MapReduce
* views. The index function decides what data to index and store in the index.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
* the limitations and appropriate use cases.
*
* @param postPartitionSearchOptions the {@link PostPartitionSearchOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link InputStream}
*/
Expand Down Expand Up @@ -2408,6 +2381,10 @@ public ServiceCall<InputStream> postPartitionSearchAsStream(PostPartitionSearchO
* results. The remainder of the POST view functionality is identical to the `GET /{db}/_design/{ddoc}/_view/{view}`
* API.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
* the limitations and appropriate use cases.
*
* @param postPartitionViewOptions the {@link PostPartitionViewOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link ViewResult}
*/
Expand Down Expand Up @@ -2497,6 +2474,10 @@ public ServiceCall<ViewResult> postPartitionView(PostPartitionViewOptions postPa
* results. The remainder of the POST view functionality is identical to the `GET /{db}/_design/{ddoc}/_view/{view}`
* API.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
* the limitations and appropriate use cases.
*
* @param postPartitionViewOptions the {@link PostPartitionViewOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link InputStream}
*/
Expand Down Expand Up @@ -2646,6 +2627,10 @@ public ServiceCall<ExplainResult> postPartitionExplain(PostPartitionExplainOptio
* 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.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
* the limitations and appropriate use cases.
*
* @param postPartitionFindOptions the {@link PostPartitionFindOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link FindResult}
*/
Expand Down Expand Up @@ -2709,6 +2694,10 @@ public ServiceCall<FindResult> postPartitionFind(PostPartitionFindOptions postPa
* 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.
*
* Before using read the
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
* the limitations and appropriate use cases.
*
* @param postPartitionFindOptions the {@link PostPartitionFindOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link InputStream}
*/
Expand Down Expand Up @@ -4283,6 +4272,41 @@ public ServiceCall<List<ActiveTask>> getActiveTasks() {
return getActiveTasks(null);
}

/**
* Retrieve cluster membership information.
*
* Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
* node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
* cluster.
*
* @param getMembershipInformationOptions the {@link GetMembershipInformationOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link MembershipInformation}
*/
public ServiceCall<MembershipInformation> getMembershipInformation(GetMembershipInformationOptions getMembershipInformationOptions) {
RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/_membership"));
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("cloudant", "v1", "getMembershipInformation");
for (Entry<String, String> header : sdkHeaders.entrySet()) {
builder.header(header.getKey(), header.getValue());
}
builder.header("Accept", "application/json");
ResponseConverter<MembershipInformation> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<MembershipInformation>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
}

/**
* Retrieve cluster membership information.
*
* Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
* node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
* cluster.
*
* @return a {@link ServiceCall} with a result of type {@link MembershipInformation}
*/
public ServiceCall<MembershipInformation> getMembershipInformation() {
return getMembershipInformation(null);
}

/**
* Retrieve information about whether the server is up.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ public List<Document> docs() {
*
* If `false`, prevents the database from assigning them new revision IDs. Default is `true`.
*
* Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it is
* very easy to accidentally end up with a large number of conflicts.
*
* @return the newEdits
*/
public Boolean newEdits() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
public class DesignDocumentViewsMapReduce extends GenericModel {

protected String map;
protected DesignDocumentViewsMapReduceOptions options;
protected String reduce;

/**
* Builder.
*/
public static class Builder {
private String map;
private DesignDocumentViewsMapReduceOptions options;
private String reduce;

/**
Expand All @@ -37,6 +39,7 @@ public static class Builder {
*/
private Builder(DesignDocumentViewsMapReduce designDocumentViewsMapReduce) {
this.map = designDocumentViewsMapReduce.map;
this.options = designDocumentViewsMapReduce.options;
this.reduce = designDocumentViewsMapReduce.reduce;
}

Expand Down Expand Up @@ -75,6 +78,17 @@ public Builder map(String map) {
return this;
}

/**
* Set the options.
*
* @param options the options
* @return the DesignDocumentViewsMapReduce builder
*/
public Builder options(DesignDocumentViewsMapReduceOptions options) {
this.options = options;
return this;
}

/**
* Set the reduce.
*
Expand All @@ -93,6 +107,7 @@ protected DesignDocumentViewsMapReduce(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.map,
"map cannot be null");
map = builder.map;
options = builder.options;
reduce = builder.reduce;
}

Expand All @@ -116,6 +131,17 @@ public String map() {
return map;
}

/**
* Gets the options.
*
* Options of view build resuls.
*
* @return the options
*/
public DesignDocumentViewsMapReduceOptions options() {
return options;
}

/**
* Gets the reduce.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.cloudant.v1.model;

import java.util.HashMap;
import java.util.Map;

import com.google.gson.reflect.TypeToken;
import com.ibm.cloud.sdk.core.service.model.DynamicModel;

/**
* Options of view build resuls.
*
* This type supports additional properties of type Object.
*/
public class DesignDocumentViewsMapReduceOptions extends DynamicModel<Object> {


public DesignDocumentViewsMapReduceOptions() {
super(new TypeToken<Object>() { });
}

/**
* Builder.
*/
public static class Builder {
private Map<String, Object> dynamicProperties;

/**
* Instantiates a new Builder from an existing DesignDocumentViewsMapReduceOptions instance.
*
* @param designDocumentViewsMapReduceOptions the instance to initialize the Builder with
*/
private Builder(DesignDocumentViewsMapReduceOptions designDocumentViewsMapReduceOptions) {
this.dynamicProperties = designDocumentViewsMapReduceOptions.getProperties();
}

/**
* Instantiates a new builder.
*/
public Builder() {
}

/**
* Builds a DesignDocumentViewsMapReduceOptions.
*
* @return the new DesignDocumentViewsMapReduceOptions instance
*/
public DesignDocumentViewsMapReduceOptions build() {
return new DesignDocumentViewsMapReduceOptions(this);
}

/**
* Add an arbitrary property.
*
* @param name the name of the property to add
* @param value the value of the property to add
* @return the DesignDocumentViewsMapReduceOptions builder
*/
public Builder add(String name, Object value) {
com.ibm.cloud.sdk.core.util.Validator.notNull(name, "name cannot be null");
if (this.dynamicProperties == null) {
this.dynamicProperties = new HashMap<String, Object>();
}
this.dynamicProperties.put(name, value);
return this;
}
}

protected DesignDocumentViewsMapReduceOptions(Builder builder) {
super(new TypeToken<Object>() { });
this.setProperties(builder.dynamicProperties);
}

/**
* New builder.
*
* @return a DesignDocumentViewsMapReduceOptions builder
*/
public Builder newBuilder() {
return new Builder(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,19 @@ public Object getPartitioned() {
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
* argument. See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators) for a list of all
* available combination and conditional operators.
* argument.
*
* It is important for query performance to use appropriate selectors:
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
* of a query. You should include at least one of these in a selector.
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
* of documents that will need to be scanned.
*
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
* combination and conditional operators.
*
* For further reference see
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
*
* @return the selector
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,19 @@ public Boolean indexArrayLengths() {
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
* argument. See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators) for a list of all
* available combination and conditional operators.
* argument.
*
* It is important for query performance to use appropriate selectors:
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
* of a query. You should include at least one of these in a selector.
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
* of documents that will need to be scanned.
*
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
* combination and conditional operators.
*
* For further reference see
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
*
* @return the partialFilterSelector
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,19 @@ public List<String> fields() {
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
* argument. See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators) for a list of all
* available combination and conditional operators.
* argument.
*
* It is important for query performance to use appropriate selectors:
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
* of a query. You should include at least one of these in a selector.
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
* of documents that will need to be scanned.
*
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
* combination and conditional operators.
*
* For further reference see
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
*
* @return the selector
*/
Expand Down
Loading

0 comments on commit c0d48f1

Please sign in to comment.