Skip to content

Commit 3620142

Browse files
authored
fix!: Update generated source code (#8)
Generated SDK source code using: - Generator version 3.12.0 - Specification version 0.0.26 - Automation (cloudant-sdks) version b4b51b9
1 parent b48418f commit 3620142

49 files changed

Lines changed: 976 additions & 786 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/Cloudant.java

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.10.3-18e3fe12-20200803-172650
15+
* IBM OpenAPI SDK Code Generator Version: 3.12.0-64fe8d3f-20200820-144050
1616
*/
1717

1818
package com.ibm.cloud.cloudant.v1;
@@ -118,7 +118,7 @@
118118
import com.ibm.cloud.cloudant.v1.model.PostViewOptions;
119119
import com.ibm.cloud.cloudant.v1.model.PostViewQueriesOptions;
120120
import com.ibm.cloud.cloudant.v1.model.PutAttachmentOptions;
121-
import com.ibm.cloud.cloudant.v1.model.PutCloudantSecurityOptions;
121+
import com.ibm.cloud.cloudant.v1.model.PutCloudantSecurityConfigurationOptions;
122122
import com.ibm.cloud.cloudant.v1.model.PutCorsConfigurationOptions;
123123
import com.ibm.cloud.cloudant.v1.model.PutDatabaseOptions;
124124
import com.ibm.cloud.cloudant.v1.model.PutDesignDocumentOptions;
@@ -580,6 +580,9 @@ public ServiceCall<ChangesResult> postChanges(PostChangesOptions postChangesOpti
580580
if (postChangesOptions.docIds() != null) {
581581
contentJson.add("doc_ids", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postChangesOptions.docIds()));
582582
}
583+
if (postChangesOptions.fields() != null) {
584+
contentJson.add("fields", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postChangesOptions.fields()));
585+
}
583586
if (postChangesOptions.selector() != null) {
584587
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postChangesOptions.selector()));
585588
}
@@ -658,6 +661,9 @@ public ServiceCall<InputStream> postChangesAsStream(PostChangesOptions postChang
658661
if (postChangesOptions.docIds() != null) {
659662
contentJson.add("doc_ids", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postChangesOptions.docIds()));
660663
}
664+
if (postChangesOptions.fields() != null) {
665+
contentJson.add("fields", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postChangesOptions.fields()));
666+
}
661667
if (postChangesOptions.selector() != null) {
662668
contentJson.add("selector", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(postChangesOptions.selector()));
663669
}
@@ -3940,23 +3946,32 @@ public ServiceCall<ApiKeysResult> postApiKeys() {
39403946
* Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove
39413947
* the API key from the list of users that have access to the database.
39423948
*
3943-
* @param putCloudantSecurityOptions the {@link PutCloudantSecurityOptions} containing the options for the call
3949+
* @param putCloudantSecurityConfigurationOptions the {@link PutCloudantSecurityConfigurationOptions} containing the options for the call
39443950
* @return a {@link ServiceCall} with a result of type {@link Ok}
39453951
*/
3946-
public ServiceCall<Ok> putCloudantSecurity(PutCloudantSecurityOptions putCloudantSecurityOptions) {
3947-
com.ibm.cloud.sdk.core.util.Validator.notNull(putCloudantSecurityOptions,
3948-
"putCloudantSecurityOptions cannot be null");
3952+
public ServiceCall<Ok> putCloudantSecurityConfiguration(PutCloudantSecurityConfigurationOptions putCloudantSecurityConfigurationOptions) {
3953+
com.ibm.cloud.sdk.core.util.Validator.notNull(putCloudantSecurityConfigurationOptions,
3954+
"putCloudantSecurityConfigurationOptions cannot be null");
39493955
String[] pathSegments = { "_api/v2/db", "_security" };
3950-
String[] pathParameters = { putCloudantSecurityOptions.db() };
3956+
String[] pathParameters = { putCloudantSecurityConfigurationOptions.db() };
39513957
RequestBuilder builder = RequestBuilder.put(RequestBuilder.constructHttpUrl(getServiceUrl(), pathSegments, pathParameters));
3952-
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("cloudant", "v1", "putCloudantSecurity");
3958+
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("cloudant", "v1", "putCloudantSecurityConfiguration");
39533959
for (Entry<String, String> header : sdkHeaders.entrySet()) {
39543960
builder.header(header.getKey(), header.getValue());
39553961
}
39563962
builder.header("Accept", "application/json");
39573963
final JsonObject contentJson = new JsonObject();
3958-
if (putCloudantSecurityOptions.cloudant() != null) {
3959-
contentJson.add("cloudant", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(putCloudantSecurityOptions.cloudant()));
3964+
if (putCloudantSecurityConfigurationOptions.admins() != null) {
3965+
contentJson.add("admins", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(putCloudantSecurityConfigurationOptions.admins()));
3966+
}
3967+
if (putCloudantSecurityConfigurationOptions.members() != null) {
3968+
contentJson.add("members", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(putCloudantSecurityConfigurationOptions.members()));
3969+
}
3970+
if (putCloudantSecurityConfigurationOptions.cloudant() != null) {
3971+
contentJson.add("cloudant", com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(putCloudantSecurityConfigurationOptions.cloudant()));
3972+
}
3973+
if (putCloudantSecurityConfigurationOptions.couchdbAuthOnly() != null) {
3974+
contentJson.addProperty("couchdb_auth_only", putCloudantSecurityConfigurationOptions.couchdbAuthOnly());
39603975
}
39613976
builder.bodyJson(contentJson);
39623977
ResponseConverter<Ok> responseConverter =
@@ -4446,8 +4461,8 @@ public ServiceCall<MissingRevsResult> postMissingRevs(PostMissingRevsOptions pos
44464461
builder.header(header.getKey(), header.getValue());
44474462
}
44484463
builder.header("Accept", "application/json");
4449-
if (postMissingRevsOptions.missingRevs() != null) {
4450-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(postMissingRevsOptions.missingRevs()), "application/json");
4464+
if (postMissingRevsOptions.documentRevisions() != null) {
4465+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(postMissingRevsOptions.documentRevisions()), "application/json");
44514466
}
44524467
ResponseConverter<MissingRevsResult> responseConverter =
44534468
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<MissingRevsResult>() { }.getType());
@@ -4475,8 +4490,8 @@ public ServiceCall<Map<String, RevsDiff>> postRevsDiff(PostRevsDiffOptions postR
44754490
builder.header(header.getKey(), header.getValue());
44764491
}
44774492
builder.header("Accept", "application/json");
4478-
if (postRevsDiffOptions.revsDiffRequest() != null) {
4479-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(postRevsDiffOptions.revsDiffRequest()), "application/json");
4493+
if (postRevsDiffOptions.documentRevisions() != null) {
4494+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(postRevsDiffOptions.documentRevisions()), "application/json");
44804495
}
44814496
ResponseConverter<Map<String, RevsDiff>> responseConverter =
44824497
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<Map<String, RevsDiff>>() { }.getType());

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/ApiKeysResult.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,30 @@
1919
*/
2020
public class ApiKeysResult extends GenericModel {
2121

22+
protected Boolean ok;
2223
protected String key;
23-
protected Ok ok;
2424
protected String password;
2525

2626
/**
27-
* Gets the key.
27+
* Gets the ok.
2828
*
29-
* The generated api key.
29+
* ok.
3030
*
31-
* @return the key
31+
* @return the ok
3232
*/
33-
public String getKey() {
34-
return key;
33+
public Boolean isOk() {
34+
return ok;
3535
}
3636

3737
/**
38-
* Gets the ok.
38+
* Gets the key.
3939
*
40-
* Schema for an OK result.
40+
* The generated api key.
4141
*
42-
* @return the ok
42+
* @return the key
4343
*/
44-
public Ok getOk() {
45-
return ok;
44+
public String getKey() {
45+
return key;
4646
}
4747

4848
/**

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/DesignDocumentInformation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class DesignDocumentInformation extends GenericModel {
2222

2323
protected String name;
2424
@SerializedName("view_index")
25-
protected DesignDocumentInformationViewIndex viewIndex;
25+
protected DesignDocumentViewIndex viewIndex;
2626

2727
/**
2828
* Gets the name.
@@ -42,7 +42,7 @@ public String getName() {
4242
*
4343
* @return the viewIndex
4444
*/
45-
public DesignDocumentInformationViewIndex getViewIndex() {
45+
public DesignDocumentViewIndex getViewIndex() {
4646
return viewIndex;
4747
}
4848
}

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/DesignDocumentInformationViewIndex.java renamed to modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/DesignDocumentViewIndex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* View index information.
2020
*/
21-
public class DesignDocumentInformationViewIndex extends GenericModel {
21+
public class DesignDocumentViewIndex extends GenericModel {
2222

2323
@SerializedName("compact_running")
2424
protected Boolean compactRunning;

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/MissingRevsResult.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
import com.ibm.cloud.sdk.core.service.model.GenericModel;
2020

2121
/**
22-
* Schema for mapping document IDs to lists of missed revisions.
22+
* Schema for mapping document IDs to lists of missing revisions.
2323
*/
2424
public class MissingRevsResult extends GenericModel {
2525

26-
@SerializedName("missed_revs")
27-
protected Map<String, List<String>> missedRevs;
26+
@SerializedName("missing_revs")
27+
protected Map<String, List<String>> missingRevs;
2828

2929
/**
30-
* Gets the missedRevs.
30+
* Gets the missingRevs.
3131
*
3232
* Schema for mapping document IDs to lists of revisions.
3333
*
34-
* @return the missedRevs
34+
* @return the missingRevs
3535
*/
36-
public Map<String, List<String>> getMissedRevs() {
37-
return missedRevs;
36+
public Map<String, List<String>> getMissingRevs() {
37+
return missingRevs;
3838
}
3939
}
4040

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostChangesOptions.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public interface Feed {
3939

4040
protected String db;
4141
protected List<String> docIds;
42+
protected List<String> fields;
4243
protected Map<String, Object> selector;
4344
protected String lastEventId;
4445
protected Boolean attEncodingInfo;
@@ -62,6 +63,7 @@ public interface Feed {
6263
public static class Builder {
6364
private String db;
6465
private List<String> docIds;
66+
private List<String> fields;
6567
private Map<String, Object> selector;
6668
private String lastEventId;
6769
private Boolean attEncodingInfo;
@@ -82,6 +84,7 @@ public static class Builder {
8284
private Builder(PostChangesOptions postChangesOptions) {
8385
this.db = postChangesOptions.db;
8486
this.docIds = postChangesOptions.docIds;
87+
this.fields = postChangesOptions.fields;
8588
this.selector = postChangesOptions.selector;
8689
this.lastEventId = postChangesOptions.lastEventId;
8790
this.attEncodingInfo = postChangesOptions.attEncodingInfo;
@@ -140,6 +143,22 @@ public Builder addDocIds(String docIds) {
140143
return this;
141144
}
142145

146+
/**
147+
* Adds an fields to fields.
148+
*
149+
* @param fields the new fields
150+
* @return the PostChangesOptions builder
151+
*/
152+
public Builder addFields(String fields) {
153+
com.ibm.cloud.sdk.core.util.Validator.notNull(fields,
154+
"fields cannot be null");
155+
if (this.fields == null) {
156+
this.fields = new ArrayList<String>();
157+
}
158+
this.fields.add(fields);
159+
return this;
160+
}
161+
143162
/**
144163
* Set the db.
145164
*
@@ -163,6 +182,18 @@ public Builder docIds(List<String> docIds) {
163182
return this;
164183
}
165184

185+
/**
186+
* Set the fields.
187+
* Existing fields will be replaced.
188+
*
189+
* @param fields the fields
190+
* @return the PostChangesOptions builder
191+
*/
192+
public Builder fields(List<String> fields) {
193+
this.fields = fields;
194+
return this;
195+
}
196+
166197
/**
167198
* Set the selector.
168199
*
@@ -345,6 +376,7 @@ protected PostChangesOptions(Builder builder) {
345376
"db cannot be empty");
346377
db = builder.db;
347378
docIds = builder.docIds;
379+
fields = builder.fields;
348380
selector = builder.selector;
349381
lastEventId = builder.lastEventId;
350382
attEncodingInfo = builder.attEncodingInfo;
@@ -394,6 +426,18 @@ public List<String> docIds() {
394426
return docIds;
395427
}
396428

429+
/**
430+
* Gets the fields.
431+
*
432+
* JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned.
433+
* If it is omitted, the entire document is returned.
434+
*
435+
* @return the fields
436+
*/
437+
public List<String> fields() {
438+
return fields;
439+
}
440+
397441
/**
398442
* Gets the selector.
399443
*

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostExplainOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ public Boolean executionStats() {
378378
/**
379379
* Gets the fields.
380380
*
381-
* JSON array that uses the field syntax as described in the following information. Use this parameter to specify
382-
* which fields of a document must be returned. If it is omitted, the entire document is returned.
381+
* JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned.
382+
* If it is omitted, the entire document is returned.
383383
*
384384
* @return the fields
385385
*/

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostFindOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ public Boolean executionStats() {
378378
/**
379379
* Gets the fields.
380380
*
381-
* JSON array that uses the field syntax as described in the following information. Use this parameter to specify
382-
* which fields of a document must be returned. If it is omitted, the entire document is returned.
381+
* JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned.
382+
* If it is omitted, the entire document is returned.
383383
*
384384
* @return the fields
385385
*/

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostMissingRevsOptions.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
public class PostMissingRevsOptions extends GenericModel {
2424

2525
protected String db;
26-
protected Map<String, List<String>> missingRevs;
26+
protected Map<String, List<String>> documentRevisions;
2727

2828
/**
2929
* Builder.
3030
*/
3131
public static class Builder {
3232
private String db;
33-
private Map<String, List<String>> missingRevs;
33+
private Map<String, List<String>> documentRevisions;
3434

3535
private Builder(PostMissingRevsOptions postMissingRevsOptions) {
3636
this.db = postMissingRevsOptions.db;
37-
this.missingRevs = postMissingRevsOptions.missingRevs;
37+
this.documentRevisions = postMissingRevsOptions.documentRevisions;
3838
}
3939

4040
/**
@@ -73,13 +73,13 @@ public Builder db(String db) {
7373
}
7474

7575
/**
76-
* Set the missingRevs.
76+
* Set the documentRevisions.
7777
*
78-
* @param missingRevs the missingRevs
78+
* @param documentRevisions the documentRevisions
7979
* @return the PostMissingRevsOptions builder
8080
*/
81-
public Builder missingRevs(Map<String, List<String>> missingRevs) {
82-
this.missingRevs = missingRevs;
81+
public Builder documentRevisions(Map<String, List<String>> documentRevisions) {
82+
this.documentRevisions = documentRevisions;
8383
return this;
8484
}
8585
}
@@ -88,7 +88,7 @@ protected PostMissingRevsOptions(Builder builder) {
8888
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.db,
8989
"db cannot be empty");
9090
db = builder.db;
91-
missingRevs = builder.missingRevs;
91+
documentRevisions = builder.documentRevisions;
9292
}
9393

9494
/**
@@ -112,14 +112,14 @@ public String db() {
112112
}
113113

114114
/**
115-
* Gets the missingRevs.
115+
* Gets the documentRevisions.
116116
*
117117
* HTTP request body for postMissingRevs and postRevsDiff.
118118
*
119-
* @return the missingRevs
119+
* @return the documentRevisions
120120
*/
121-
public Map<String, List<String>> missingRevs() {
122-
return missingRevs;
121+
public Map<String, List<String>> documentRevisions() {
122+
return documentRevisions;
123123
}
124124
}
125125

modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostPartitionFindOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ public Boolean executionStats() {
393393
/**
394394
* Gets the fields.
395395
*
396-
* JSON array that uses the field syntax as described in the following information. Use this parameter to specify
397-
* which fields of a document must be returned. If it is omitted, the entire document is returned.
396+
* JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned.
397+
* If it is omitted, the entire document is returned.
398398
*
399399
* @return the fields
400400
*/

0 commit comments

Comments
 (0)