From 1dcf708f2e54203e760b3cd23259a95e7aac919e Mon Sep 17 00:00:00 2001 From: cloudant-sdks-automation <71659186+cloudant-sdks-automation@users.noreply.github.com> Date: Tue, 6 Jan 2026 08:42:41 +0000 Subject: [PATCH] feat(generated): update API definition to 1.0.0-dev0.1.32 Generated SDK source code using: - Generator version 3.108.0 - Specification version 1.0.0-dev0.1.32 - Automation (cloudant-sdks) version e4adb30 --- .../ibm/cloud/cloudant/v1/model/Analyzer.java | 10 +++-- .../v1/model/AnalyzerConfiguration.java | 41 ++++++++++++++++--- .../cloudant/v1/model/IndexDefinition.java | 11 ++--- .../cloudant/v1/model/IndexInformation.java | 4 +- .../cloudant/v1/model/PostIndexOptions.java | 4 +- .../v1/model/SearchIndexDefinition.java | 3 +- .../com/ibm/cloud/cloudant/v1/CloudantIT.java | 1 + .../ibm/cloud/cloudant/v1/CloudantTest.java | 3 +- .../v1/model/AnalyzerConfigurationTest.java | 3 ++ .../cloudant/v1/model/DesignDocumentTest.java | 2 + .../model/PutDesignDocumentOptionsTest.java | 2 + .../v1/model/SearchIndexDefinitionTest.java | 2 + 12 files changed, 66 insertions(+), 20 deletions(-) diff --git a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/Analyzer.java b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/Analyzer.java index 0bab6a374..70d9139e0 100644 --- a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/Analyzer.java +++ b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/Analyzer.java @@ -26,8 +26,9 @@ public class Analyzer extends GenericModel { /** * Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies depending on * the analyzer usage: - * * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query text - * index default_field the default is `standard`. + * * For search indexes the default is `standard` + * * For query text indexes the default is `keyword` + * * For a query text index default_field the default is `standard`. */ public interface Name { /** classic. */ @@ -223,8 +224,9 @@ public Builder newBuilder() { * * Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies depending on * the analyzer usage: - * * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query text - * index default_field the default is `standard`. + * * For search indexes the default is `standard` + * * For query text indexes the default is `keyword` + * * For a query text index default_field the default is `standard`. * * @return the name */ diff --git a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfiguration.java b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfiguration.java index 3cc8bfb65..c5f2eb275 100644 --- a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfiguration.java +++ b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfiguration.java @@ -17,18 +17,21 @@ import java.util.List; import java.util.Map; +import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; /** - * Schema for a search analyzer configuration. + * Analyzer configuration for search indexes. The default and fields properties are only applicable for the `perfield` + * analyzer name. */ public class AnalyzerConfiguration extends GenericModel { /** * Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies depending on * the analyzer usage: - * * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query text - * index default_field the default is `standard`. + * * For search indexes the default is `standard` + * * For query text indexes the default is `keyword` + * * For a query text index default_field the default is `standard`. */ public interface Name { /** classic. */ @@ -119,6 +122,8 @@ public interface Name { protected String name; protected List stopwords; + @SerializedName("default") + protected Analyzer xDefault; protected Map fields; /** @@ -127,6 +132,7 @@ public interface Name { public static class Builder { private String name; private List stopwords; + private Analyzer xDefault; private Map fields; /** @@ -137,6 +143,7 @@ public static class Builder { private Builder(AnalyzerConfiguration analyzerConfiguration) { this.name = analyzerConfiguration.name; this.stopwords = analyzerConfiguration.stopwords; + this.xDefault = analyzerConfiguration.xDefault; this.fields = analyzerConfiguration.fields; } @@ -203,6 +210,17 @@ public Builder stopwords(List stopwords) { return this; } + /** + * Set the xDefault. + * + * @param xDefault the xDefault + * @return the AnalyzerConfiguration builder + */ + public Builder xDefault(Analyzer xDefault) { + this.xDefault = xDefault; + return this; + } + /** * Set the fields. * @@ -222,6 +240,7 @@ protected AnalyzerConfiguration(Builder builder) { "name cannot be null"); name = builder.name; stopwords = builder.stopwords; + xDefault = builder.xDefault; fields = builder.fields; } @@ -239,8 +258,9 @@ public Builder newBuilder() { * * Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies depending on * the analyzer usage: - * * For search indexes the default is `standard` * For query text indexes the default is `keyword` * For a query text - * index default_field the default is `standard`. + * * For search indexes the default is `standard` + * * For query text indexes the default is `keyword` + * * For a query text index default_field the default is `standard`. * * @return the name */ @@ -259,6 +279,17 @@ public List stopwords() { return stopwords; } + /** + * Gets the xDefault. + * + * Schema for a full text search analyzer. + * + * @return the xDefault + */ + public Analyzer xDefault() { + return xDefault; + } + /** * Gets the fields. * diff --git a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexDefinition.java b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexDefinition.java index 86b4d2772..8ce0d01f2 100644 --- a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexDefinition.java +++ b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexDefinition.java @@ -23,8 +23,8 @@ /** * Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration properties * that do not apply to `json` indexes, these are: - * * `default_analyzer` - the default text analyzer to use * `default_field` - whether to index the text in all document - * fields and what analyzer to use for that purpose. + * * `default_analyzer` - the default text analyzer to use + * * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose. */ public class IndexDefinition extends GenericModel { @@ -223,9 +223,10 @@ public List fields() { * * Whether to scan every document for arrays and store the length for each array found. Set the index_array_lengths * field to false if: - * * You do not need to know the length of an array. * You do not use the `$size` operator. * The documents in your - * database are complex, or not completely under your control. As a result, it is difficult to estimate the impact of - * the extra processing that is needed to determine and store the arrays lengths. + * * You do not need to know the length of an array. + * * You do not use the `$size` operator. + * * The documents in your database are complex, or not completely under your control. As a result, it is difficult to + * estimate the impact of the extra processing that is needed to determine and store the arrays lengths. * * @return the indexArrayLengths */ diff --git a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexInformation.java b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexInformation.java index 77f1cb16e..6f9d0b361 100644 --- a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexInformation.java +++ b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/IndexInformation.java @@ -56,8 +56,8 @@ public String getDdoc() { * * Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration * properties that do not apply to `json` indexes, these are: - * * `default_analyzer` - the default text analyzer to use * `default_field` - whether to index the text in all - * document fields and what analyzer to use for that purpose. + * * `default_analyzer` - the default text analyzer to use + * * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose. * * @return the def */ diff --git a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostIndexOptions.java b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostIndexOptions.java index 56a531c62..19e076faf 100644 --- a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostIndexOptions.java +++ b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/PostIndexOptions.java @@ -197,8 +197,8 @@ public String db() { * * Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration * properties that do not apply to `json` indexes, these are: - * * `default_analyzer` - the default text analyzer to use * `default_field` - whether to index the text in all - * document fields and what analyzer to use for that purpose. + * * `default_analyzer` - the default text analyzer to use + * * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose. * * @return the index */ diff --git a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinition.java b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinition.java index 3e7dd872a..09e5ed792 100644 --- a/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinition.java +++ b/modules/cloudant/src/main/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinition.java @@ -108,7 +108,8 @@ public Builder newBuilder() { /** * Gets the analyzer. * - * Schema for a search analyzer configuration. + * Analyzer configuration for search indexes. The default and fields properties are only applicable for the `perfield` + * analyzer name. * * @return the analyzer */ diff --git a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantIT.java b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantIT.java index 6a44a6489..e58e8b27f 100644 --- a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantIT.java +++ b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantIT.java @@ -1303,6 +1303,7 @@ public void testPutDesignDocument() throws Exception { AnalyzerConfiguration analyzerConfigurationModel = new AnalyzerConfiguration.Builder() .name("standard") .stopwords(java.util.Arrays.asList("testString")) + .xDefault(analyzerModel) .fields(java.util.Collections.singletonMap("key1", analyzerModel)) .build(); diff --git a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantTest.java b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantTest.java index 9ab7b91dd..63e82d547 100644 --- a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantTest.java +++ b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/CloudantTest.java @@ -2328,7 +2328,7 @@ public void testDeleteDesignDocumentNoOptions() throws Throwable { @Test public void testGetDesignDocumentWOptions() throws Throwable { // Register a mock response - String mockResponseBody = "{\"_attachments\": {\"mapKey\": {\"content_type\": \"contentType\", \"data\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"digest\": \"digest\", \"encoded_length\": 0, \"encoding\": \"encoding\", \"follows\": false, \"length\": 0, \"revpos\": 1, \"stub\": true}}, \"_conflicts\": [\"conflicts\"], \"_deleted\": false, \"_deleted_conflicts\": [\"deletedConflicts\"], \"_id\": \"id\", \"_local_seq\": \"localSeq\", \"_rev\": \"rev\", \"_revisions\": {\"ids\": [\"ids\"], \"start\": 1}, \"_revs_info\": [{\"rev\": \"rev\", \"status\": \"available\"}], \"autoupdate\": true, \"filters\": {\"mapKey\": \"inner\"}, \"indexes\": {\"mapKey\": {\"analyzer\": {\"name\": \"classic\", \"stopwords\": [\"stopwords\"], \"fields\": {\"mapKey\": {\"name\": \"classic\", \"stopwords\": [\"stopwords\"]}}}, \"index\": \"index\"}}, \"language\": \"javascript\", \"options\": {\"partitioned\": false}, \"validate_doc_update\": \"validateDocUpdate\", \"views\": {\"mapKey\": {\"map\": \"map\", \"reduce\": \"reduce\"}}}"; + String mockResponseBody = "{\"_attachments\": {\"mapKey\": {\"content_type\": \"contentType\", \"data\": \"VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4=\", \"digest\": \"digest\", \"encoded_length\": 0, \"encoding\": \"encoding\", \"follows\": false, \"length\": 0, \"revpos\": 1, \"stub\": true}}, \"_conflicts\": [\"conflicts\"], \"_deleted\": false, \"_deleted_conflicts\": [\"deletedConflicts\"], \"_id\": \"id\", \"_local_seq\": \"localSeq\", \"_rev\": \"rev\", \"_revisions\": {\"ids\": [\"ids\"], \"start\": 1}, \"_revs_info\": [{\"rev\": \"rev\", \"status\": \"available\"}], \"autoupdate\": true, \"filters\": {\"mapKey\": \"inner\"}, \"indexes\": {\"mapKey\": {\"analyzer\": {\"name\": \"classic\", \"stopwords\": [\"stopwords\"], \"default\": {\"name\": \"classic\", \"stopwords\": [\"stopwords\"]}, \"fields\": {\"mapKey\": {\"name\": \"classic\", \"stopwords\": [\"stopwords\"]}}}, \"index\": \"index\"}}, \"language\": \"javascript\", \"options\": {\"partitioned\": false}, \"validate_doc_update\": \"validateDocUpdate\", \"views\": {\"mapKey\": {\"map\": \"map\", \"reduce\": \"reduce\"}}}"; String getDesignDocumentPath = "/testString/_design/testString"; server.enqueue(new MockResponse() .setHeader("Content-type", "application/json") @@ -2443,6 +2443,7 @@ public void testPutDesignDocumentWOptions() throws Throwable { AnalyzerConfiguration analyzerConfigurationModel = new AnalyzerConfiguration.Builder() .name("standard") .stopwords(java.util.Arrays.asList("testString")) + .xDefault(analyzerModel) .fields(java.util.Collections.singletonMap("key1", analyzerModel)) .build(); diff --git a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfigurationTest.java b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfigurationTest.java index b83140e13..853c76bde 100644 --- a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfigurationTest.java +++ b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/AnalyzerConfigurationTest.java @@ -42,10 +42,12 @@ public void testAnalyzerConfiguration() throws Throwable { AnalyzerConfiguration analyzerConfigurationModel = new AnalyzerConfiguration.Builder() .name("classic") .stopwords(java.util.Arrays.asList("testString")) + .xDefault(analyzerModel) .fields(java.util.Collections.singletonMap("key1", analyzerModel)) .build(); assertEquals(analyzerConfigurationModel.name(), "classic"); assertEquals(analyzerConfigurationModel.stopwords(), java.util.Arrays.asList("testString")); + assertEquals(analyzerConfigurationModel.xDefault(), analyzerModel); assertEquals(analyzerConfigurationModel.fields(), java.util.Collections.singletonMap("key1", analyzerModel)); String json = TestUtilities.serialize(analyzerConfigurationModel); @@ -53,6 +55,7 @@ public void testAnalyzerConfiguration() throws Throwable { AnalyzerConfiguration analyzerConfigurationModelNew = TestUtilities.deserialize(json, AnalyzerConfiguration.class); assertTrue(analyzerConfigurationModelNew instanceof AnalyzerConfiguration); assertEquals(analyzerConfigurationModelNew.name(), "classic"); + assertEquals(analyzerConfigurationModelNew.xDefault().toString(), analyzerModel.toString()); } @Test(expectedExceptions = IllegalArgumentException.class) diff --git a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/DesignDocumentTest.java b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/DesignDocumentTest.java index c025331db..39d5ef27f 100644 --- a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/DesignDocumentTest.java +++ b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/DesignDocumentTest.java @@ -84,10 +84,12 @@ public void testDesignDocument() throws Throwable { AnalyzerConfiguration analyzerConfigurationModel = new AnalyzerConfiguration.Builder() .name("classic") .stopwords(java.util.Arrays.asList("testString")) + .xDefault(analyzerModel) .fields(java.util.Collections.singletonMap("key1", analyzerModel)) .build(); assertEquals(analyzerConfigurationModel.name(), "classic"); assertEquals(analyzerConfigurationModel.stopwords(), java.util.Arrays.asList("testString")); + assertEquals(analyzerConfigurationModel.xDefault(), analyzerModel); assertEquals(analyzerConfigurationModel.fields(), java.util.Collections.singletonMap("key1", analyzerModel)); SearchIndexDefinition searchIndexDefinitionModel = new SearchIndexDefinition.Builder() diff --git a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/PutDesignDocumentOptionsTest.java b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/PutDesignDocumentOptionsTest.java index 6f1622059..2696b77a5 100644 --- a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/PutDesignDocumentOptionsTest.java +++ b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/PutDesignDocumentOptionsTest.java @@ -85,10 +85,12 @@ public void testPutDesignDocumentOptions() throws Throwable { AnalyzerConfiguration analyzerConfigurationModel = new AnalyzerConfiguration.Builder() .name("classic") .stopwords(java.util.Arrays.asList("testString")) + .xDefault(analyzerModel) .fields(java.util.Collections.singletonMap("key1", analyzerModel)) .build(); assertEquals(analyzerConfigurationModel.name(), "classic"); assertEquals(analyzerConfigurationModel.stopwords(), java.util.Arrays.asList("testString")); + assertEquals(analyzerConfigurationModel.xDefault(), analyzerModel); assertEquals(analyzerConfigurationModel.fields(), java.util.Collections.singletonMap("key1", analyzerModel)); SearchIndexDefinition searchIndexDefinitionModel = new SearchIndexDefinition.Builder() diff --git a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinitionTest.java b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinitionTest.java index 09a5af96d..d2a8d3be7 100644 --- a/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinitionTest.java +++ b/modules/cloudant/src/test/java/com/ibm/cloud/cloudant/v1/model/SearchIndexDefinitionTest.java @@ -43,10 +43,12 @@ public void testSearchIndexDefinition() throws Throwable { AnalyzerConfiguration analyzerConfigurationModel = new AnalyzerConfiguration.Builder() .name("classic") .stopwords(java.util.Arrays.asList("testString")) + .xDefault(analyzerModel) .fields(java.util.Collections.singletonMap("key1", analyzerModel)) .build(); assertEquals(analyzerConfigurationModel.name(), "classic"); assertEquals(analyzerConfigurationModel.stopwords(), java.util.Arrays.asList("testString")); + assertEquals(analyzerConfigurationModel.xDefault(), analyzerModel); assertEquals(analyzerConfigurationModel.fields(), java.util.Collections.singletonMap("key1", analyzerModel)); SearchIndexDefinition searchIndexDefinitionModel = new SearchIndexDefinition.Builder()