Skip to content

Commit

Permalink
ci(generated): add POST /_replicator IT stub
Browse files Browse the repository at this point in the history
Generated SDK source code using:
- Generator version 3.98.0
- Specification version 1.0.0-dev0.1.23
- Automation (cloudant-sdks) version eea18a5
  • Loading branch information
cloudant-sdks-automation authored and ricellis committed Dec 20, 2024
1 parent d21c7ba commit 7fc9445
Show file tree
Hide file tree
Showing 37 changed files with 1,413 additions and 674 deletions.
414 changes: 221 additions & 193 deletions modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/Cloudant.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected AllDocsResult() { }
/**
* Gets the totalRows.
*
* Number of total rows.
* Total number of document results.
*
* @return the totalRows
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ private Builder(Analyzer analyzer) {
public Builder() {
}

/**
* Instantiates a new builder with required properties.
*
* @param name the name
*/
public Builder(String name) {
this.name = name;
}

/**
* Builds a Analyzer.
*
Expand Down Expand Up @@ -192,6 +201,8 @@ public Builder stopwords(List<String> stopwords) {
protected Analyzer() { }

protected Analyzer(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name,
"name cannot be null");
name = builder.name;
stopwords = builder.stopwords;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ private Builder(AnalyzerConfiguration analyzerConfiguration) {
public Builder() {
}

/**
* Instantiates a new builder with required properties.
*
* @param name the name
*/
public Builder(String name) {
this.name = name;
}

/**
* Builds a AnalyzerConfiguration.
*
Expand Down Expand Up @@ -207,6 +216,8 @@ public Builder fields(Map<String, Analyzer> fields) {
protected AnalyzerConfiguration() { }

protected AnalyzerConfiguration(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name,
"name cannot be null");
name = builder.name;
stopwords = builder.stopwords;
fields = builder.fields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public class DatabaseInformation extends GenericModel {
protected String engine;
@SerializedName("instance_start_time")
protected String instanceStartTime;
@SerializedName("partitioned_indexes")
protected PartitionedIndexesInformation partitionedIndexes;
protected DatabaseInformationProps props;
protected ContentInformationSizes sizes;
@SerializedName("update_seq")
protected String updateSeq;
protected String uuid;
@SerializedName("partitioned_indexes")
protected PartitionedIndexesInformation partitionedIndexes;

protected DatabaseInformation() { }

Expand Down Expand Up @@ -160,6 +160,17 @@ public String getInstanceStartTime() {
return instanceStartTime;
}

/**
* Gets the partitionedIndexes.
*
* Information about database's partitioned indexes.
*
* @return the partitionedIndexes
*/
public PartitionedIndexesInformation getPartitionedIndexes() {
return partitionedIndexes;
}

/**
* Gets the props.
*
Expand Down Expand Up @@ -204,16 +215,5 @@ public String getUpdateSeq() {
public String getUuid() {
return uuid;
}

/**
* Gets the partitionedIndexes.
*
* Information about database's partitioned indexes.
*
* @return the partitionedIndexes
*/
public PartitionedIndexesInformation getPartitionedIndexes() {
return partitionedIndexes;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public class ExplainResultMrArgs extends GenericModel {
* Direction parameter passed to the underlying view.
*/
public interface Direction {
/** asc. */
String ASC = "asc";
/** desc. */
String DESC = "desc";
/** fwd. */
String FWD = "fwd";
/** rev. */
String REV = "rev";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected IndexesInformation() { }
/**
* Gets the totalRows.
*
* Number of total rows.
* Total number of query indexes in the database.
*
* @return the totalRows
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ public interface Feed {
String NORMAL = "normal";
}

/**
* Query parameter to specify how many revisions are returned in the changes array. The default, `main_only`, will
* only return the current "winning" revision; all_docs will return all leaf revisions (including conflicts and
* deleted former conflicts).
*/
public interface Style {
/** main_only. */
String MAIN_ONLY = "main_only";
/** all_docs. */
String ALL_DOCS = "all_docs";
}

protected String db;
protected List<String> docIds;
protected List<String> fields;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/*
* (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 com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* The postReplicator options.
*/
public class PostReplicatorOptions extends GenericModel {

/**
* Query parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted
* response code immediately.
*/
public interface Batch {
/** ok. */
String OK = "ok";
}

protected ReplicationDocument replicationDocument;
protected String batch;

/**
* Builder.
*/
public static class Builder {
private ReplicationDocument replicationDocument;
private String batch;

/**
* Instantiates a new Builder from an existing PostReplicatorOptions instance.
*
* @param postReplicatorOptions the instance to initialize the Builder with
*/
private Builder(PostReplicatorOptions postReplicatorOptions) {
this.replicationDocument = postReplicatorOptions.replicationDocument;
this.batch = postReplicatorOptions.batch;
}

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

/**
* Instantiates a new builder with required properties.
*
* @param replicationDocument the replicationDocument
*/
public Builder(ReplicationDocument replicationDocument) {
this.replicationDocument = replicationDocument;
}

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

/**
* Set the replicationDocument.
*
* @param replicationDocument the replicationDocument
* @return the PostReplicatorOptions builder
*/
public Builder replicationDocument(ReplicationDocument replicationDocument) {
this.replicationDocument = replicationDocument;
return this;
}

/**
* Set the batch.
*
* @param batch the batch
* @return the PostReplicatorOptions builder
*/
public Builder batch(String batch) {
this.batch = batch;
return this;
}
}

protected PostReplicatorOptions() { }

protected PostReplicatorOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.replicationDocument,
"replicationDocument cannot be null");
replicationDocument = builder.replicationDocument;
batch = builder.batch;
}

/**
* New builder.
*
* @return a PostReplicatorOptions builder
*/
public Builder newBuilder() {
return new Builder(this);
}

/**
* Gets the replicationDocument.
*
* HTTP request body for replication operations.
*
* @return the replicationDocument
*/
public ReplicationDocument replicationDocument() {
return replicationDocument;
}

/**
* Gets the batch.
*
* Query parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted
* response code immediately.
*
* @return the batch
*/
public String batch() {
return batch;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public interface Stale {
protected String groupField;
protected Long groupLimit;
protected List<String> groupSort;
protected Map<String, Map<String, Map<String, String>>> ranges;
protected Map<String, Map<String, String>> ranges;

/**
* Builder.
Expand All @@ -78,7 +78,7 @@ public static class Builder {
private String groupField;
private Long groupLimit;
private List<String> groupSort;
private Map<String, Map<String, Map<String, String>>> ranges;
private Map<String, Map<String, String>> ranges;

/**
* Instantiates a new Builder from an existing PostSearchOptions instance.
Expand Down Expand Up @@ -467,7 +467,7 @@ public Builder groupSort(List<String> groupSort) {
* @param ranges the ranges
* @return the PostSearchOptions builder
*/
public Builder ranges(Map<String, Map<String, Map<String, String>>> ranges) {
public Builder ranges(Map<String, Map<String, String>> ranges) {
this.ranges = ranges;
return this;
}
Expand Down Expand Up @@ -758,14 +758,13 @@ public List<String> groupSort() {
/**
* Gets the ranges.
*
* This field defines ranges for faceted, numeric search fields. The value is a JSON object where the fields names are
* faceted numeric search fields, and the values of the fields are JSON objects. The field names of the JSON objects
* are names for ranges. The values are strings that describe the range, for example "[0 TO 10]". This option is only
* available when making global queries.
* Object mapping faceted, numeric search field names to the required ranges. Each key is a field name and each value
* is another object defining the ranges by mapping range name keys to string values describing the numeric ranges,
* for example "[0 TO 10]". This option is only available when making global queries.
*
* @return the ranges
*/
public Map<String, Map<String, Map<String, String>>> ranges() {
public Map<String, Map<String, String>> ranges() {
return ranges;
}
}
Expand Down
Loading

0 comments on commit 7fc9445

Please sign in to comment.