diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b37e1a1cbfe..a89f1b4fa5f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 6.13.2 +current_version = 6.14.0 commit = True message = [skip ci] docs: Update version numbers from {current_version} -> {new_version} diff --git a/README.md b/README.md index fb441cb54d7..c9aa79c2f7a 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ All the services: com.ibm.watson.developer_cloud java-sdk - 6.13.2 + 6.14.0 ``` @@ -71,7 +71,7 @@ Only Discovery: com.ibm.watson.developer_cloud discovery - 6.13.2 + 6.14.0 ``` @@ -80,13 +80,13 @@ Only Discovery: All the services: ```gradle -'com.ibm.watson.developer_cloud:java-sdk:6.13.2' +'com.ibm.watson.developer_cloud:java-sdk:6.14.0' ``` Only Assistant: ```gradle -'com.ibm.watson.developer_cloud:assistant:6.13.2' +'com.ibm.watson.developer_cloud:assistant:6.14.0' ``` ##### Development snapshots @@ -109,7 +109,7 @@ And then reference the snapshot version on your app module gradle Only Speech to Text: ```gradle -'com.ibm.watson.developer_cloud:speech-to-text:6.13.3-SNAPSHOT' +'com.ibm.watson.developer_cloud:speech-to-text:6.14.1-SNAPSHOT' ``` ##### JAR @@ -388,7 +388,7 @@ Gradle: ```sh cd java-sdk -gradle jar # build jar file (build/libs/watson-developer-cloud-6.13.2.jar) +gradle jar # build jar file (build/libs/watson-developer-cloud-6.14.0.jar) gradle test # run tests gradle check # performs quality checks on source files and generates reports gradle testReport # run tests and generate the aggregated test report (build/reports/allTests) @@ -441,4 +441,4 @@ or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson). [ibm-cloud-onboarding]: http://cloud.ibm.com/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Java -[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.13.2/java-sdk-6.13.2-jar-with-dependencies.jar +[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.14.0/java-sdk-6.14.0-jar-with-dependencies.jar diff --git a/assistant/README.md b/assistant/README.md index 2c27119fdef..11d12c7c72c 100644 --- a/assistant/README.md +++ b/assistant/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud assistant - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:assistant:6.13.2' +'com.ibm.watson.developer_cloud:assistant:6.14.0' ``` ## Usage diff --git a/assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/model/MessageResponse.java b/assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/model/MessageResponse.java index c9721dd0cd8..ca381913e25 100644 --- a/assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/model/MessageResponse.java +++ b/assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/model/MessageResponse.java @@ -12,92 +12,100 @@ */ package com.ibm.watson.developer_cloud.assistant.v1.model; -import java.lang.reflect.Type; import java.util.List; -import com.google.gson.reflect.TypeToken; -import com.ibm.watson.developer_cloud.service.model.DynamicModel; -import com.ibm.watson.developer_cloud.util.GsonSerializationHelper; +import com.google.gson.annotations.SerializedName; +import com.ibm.watson.developer_cloud.service.model.GenericModel; /** * The response sent by the workspace, including the output text, detected intents and entities, and context. */ -public class MessageResponse extends DynamicModel { - private Type inputType = new TypeToken() { - }.getType(); - private Type intentsType = new TypeToken>() { - }.getType(); - private Type entitiesType = new TypeToken>() { - }.getType(); - private Type alternateIntentsType = new TypeToken() { - }.getType(); - private Type contextType = new TypeToken() { - }.getType(); - private Type outputType = new TypeToken() { - }.getType(); - private Type actionsType = new TypeToken>() { - }.getType(); +public class MessageResponse extends GenericModel { + + private MessageInput input; + private List intents; + private List entities; + @SerializedName("alternate_intents") + private Boolean alternateIntents; + private Context context; + private OutputData output; + private List actions; /** * Gets the input. * + * The text of the user input. + * * @return the input */ public MessageInput getInput() { - return GsonSerializationHelper.serializeDynamicModelProperty(this.get("input"), inputType); + return input; } /** * Gets the intents. * + * An array of intents recognized in the user input, sorted in descending order of confidence. + * * @return the intents */ public List getIntents() { - return GsonSerializationHelper.serializeDynamicModelProperty(this.get("intents"), intentsType); + return intents; } /** * Gets the entities. * + * An array of entities identified in the user input. + * * @return the entities */ public List getEntities() { - return GsonSerializationHelper.serializeDynamicModelProperty(this.get("entities"), entitiesType); + return entities; } /** * Gets the alternateIntents. * + * Whether to return more than one intent. A value of `true` indicates that all matching intents are returned. + * * @return the alternateIntents */ public Boolean isAlternateIntents() { - return GsonSerializationHelper.serializeDynamicModelProperty(this.get("alternate_intents"), alternateIntentsType); + return alternateIntents; } /** * Gets the context. * + * State information for the conversation. To maintain state, include the context from the previous response. + * * @return the context */ public Context getContext() { - return GsonSerializationHelper.serializeDynamicModelProperty(this.get("context"), contextType); + return context; } /** * Gets the output. * + * An output object that includes the response to the user, the dialog nodes that were triggered, and messages from + * the log. + * * @return the output */ public OutputData getOutput() { - return GsonSerializationHelper.serializeDynamicModelProperty(this.get("output"), outputType); + return output; } /** * Gets the actions. * + * An array of objects describing any actions requested by the dialog node. + * * @return the actions */ public List getActions() { - return GsonSerializationHelper.serializeDynamicModelProperty(this.get("actions"), actionsType); + return actions; } } diff --git a/assistant/src/test/java/com/ibm/watson/developer_cloud/assistant/v1/AssistantTest.java b/assistant/src/test/java/com/ibm/watson/developer_cloud/assistant/v1/AssistantTest.java index d7cc0f67cab..d1e3c8530a7 100644 --- a/assistant/src/test/java/com/ibm/watson/developer_cloud/assistant/v1/AssistantTest.java +++ b/assistant/src/test/java/com/ibm/watson/developer_cloud/assistant/v1/AssistantTest.java @@ -166,7 +166,7 @@ public void testSendMessage() throws IOException, InterruptedException { String path = StringUtils.join(PATH_MESSAGE, "?", VERSION, "=2018-07-10"); assertEquals(path, request.getPath()); - assertArrayEquals(new String[] { "Great choice! Playing some jazz for you." }, + assertArrayEquals(new String[]{"Great choice! Playing some jazz for you."}, serviceResponse.getOutput().getText().toArray(new String[0])); assertEquals(request.getMethod(), "POST"); assertNotNull(request.getHeader(HttpHeaders.AUTHORIZATION)); @@ -183,7 +183,6 @@ public void testSendMessage() throws IOException, InterruptedException { assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getTitle()); assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getConditions()); assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getConditions()); - assertEquals(serviceResponse, mockResponse); } /** @@ -224,7 +223,6 @@ public void testSendMessageWithAlternateIntents() throws IOException, Interrupte serviceResponse.getOutput().getText().toArray(new String[0])); assertEquals(request.getMethod(), "POST"); assertNotNull(request.getHeader(HttpHeaders.AUTHORIZATION)); - assertEquals(serviceResponse, mockResponse); } /** diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComply.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComply.java index 9bdc2b9971d..cf3715ece2a 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComply.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComply.java @@ -95,7 +95,7 @@ public CompareComply(String versionDate, IamOptions iamOptions) { /** * Convert file to HTML. * - * Uploads an input file. The response includes an HTML version of the document. + * Convert an uploaded file to HTML. * * @param convertToHtmlOptions the {@link ConvertToHtmlOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link HTMLReturn} @@ -122,7 +122,7 @@ public ServiceCall convertToHtml(ConvertToHtmlOptions convertToHtmlO /** * Classify the elements of a document. * - * Uploads a file. The response includes an analysis of the document's structural and semantic elements. + * Analyze an uploaded file's structural and semantic elements. * * @param classifyElementsOptions the {@link ClassifyElementsOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link ClassifyReturn} @@ -149,7 +149,7 @@ public ServiceCall classifyElements(ClassifyElementsOptions clas /** * Extract a document's tables. * - * Uploads a file. The response includes an analysis of the document's tables. + * Extract and analyze an uploaded file's tables. * * @param extractTablesOptions the {@link ExtractTablesOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link TableReturn} @@ -176,8 +176,7 @@ public ServiceCall extractTables(ExtractTablesOptions extractTables /** * Compare two documents. * - * Uploads two input files. The response includes JSON comparing the two documents. Uploaded files must be in the same - * file format. + * Compare two uploaded input files. Uploaded files must be in the same file format. * * @param compareDocumentsOptions the {@link CompareDocumentsOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link CompareReturn} @@ -360,10 +359,9 @@ public ServiceCall listFeedback() { * * Run Compare and Comply methods over a collection of input documents. * **Important:** Batch processing requires the use of the [IBM Cloud Object Storage - * service] - * (https://console.bluemix.net/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage). + * service](https://cloud.ibm.com/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage). * The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using batch - * processing](https://console.bluemix.net/docs/services/compare-comply/batching.html#before-you-batch). + * processing](https://cloud.ibm.com/docs/services/compare-comply/batching.html#before-you-batch). * * @param createBatchOptions the {@link CreateBatchOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link BatchStatus} @@ -398,9 +396,9 @@ public ServiceCall createBatch(CreateBatchOptions createBatchOption } /** - * Gets information about a specific batch-processing request. + * Get information about a specific batch-processing request. * - * Gets information about a batch-processing request with a specified ID. + * Get information about a batch-processing request with a specified ID. * * @param getBatchOptions the {@link GetBatchOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link BatchStatus} @@ -417,9 +415,9 @@ public ServiceCall getBatch(GetBatchOptions getBatchOptions) { } /** - * Gets the list of submitted batch-processing jobs. + * List submitted batch-processing jobs. * - * Gets the list of batch-processing jobs submitted by users. + * List the batch-processing jobs submitted by users. * * @param listBatchesOptions the {@link ListBatchesOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link Batches} @@ -436,9 +434,9 @@ public ServiceCall listBatches(ListBatchesOptions listBatchesOptions) { } /** - * Gets the list of submitted batch-processing jobs. + * List submitted batch-processing jobs. * - * Gets the list of batch-processing jobs submitted by users. + * List the batch-processing jobs submitted by users. * * @return a {@link ServiceCall} with a response type of {@link Batches} */ @@ -447,9 +445,9 @@ public ServiceCall listBatches() { } /** - * Updates a pending or active batch-processing request. + * Update a pending or active batch-processing request. * - * Updates a pending or active batch-processing request. You can rescan the input bucket to check for new documents or + * Update a pending or active batch-processing request. You can rescan the input bucket to check for new documents or * cancel a request. * * @param updateBatchOptions the {@link UpdateBatchOptions} containing the options for the call diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Attribute.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Attribute.java index 1f1a17bb3db..ebfaff8d0cb 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Attribute.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Attribute.java @@ -20,9 +20,11 @@ public class Attribute extends GenericModel { /** - * The type of attribute. Possible values are `Currency`, `DateTime`, `Location`, `Organization`, and `Person`. + * The type of attribute. */ public interface Type { + /** Address. */ + String ADDRESS = "Address"; /** Currency. */ String CURRENCY = "Currency"; /** DateTime. */ @@ -42,7 +44,7 @@ public interface Type { /** * Gets the type. * - * The type of attribute. Possible values are `Currency`, `DateTime`, `Location`, `Organization`, and `Person`. + * The type of attribute. * * @return the type */ diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/BodyCells.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/BodyCells.java index 59623db8859..e0f1ec7eb0a 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/BodyCells.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/BodyCells.java @@ -46,6 +46,7 @@ public class BodyCells extends GenericModel { private List columnHeaderTexts; @SerializedName("column_header_texts_normalized") private List columnHeaderTextsNormalized; + private List attributes; /** * Gets the cellId. @@ -193,4 +194,13 @@ public List getColumnHeaderTexts() { public List getColumnHeaderTextsNormalized() { return columnHeaderTextsNormalized; } + + /** + * Gets the attributes. + * + * @return the attributes + */ + public List getAttributes() { + return attributes; + } } diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/ContractAmts.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/ContractAmts.java index e23f11724ac..6ccb480f2be 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/ContractAmts.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/ContractAmts.java @@ -12,6 +12,7 @@ */ package com.ibm.watson.developer_cloud.compare_comply.v1.model; +import com.google.gson.annotations.SerializedName; import com.ibm.watson.developer_cloud.service.model.GenericModel; /** @@ -19,7 +20,21 @@ */ public class ContractAmts extends GenericModel { + /** + * The confidence level in the identification of the contract amount. + */ + public interface ConfidenceLevel { + /** High. */ + String HIGH = "High"; + /** Medium. */ + String MEDIUM = "Medium"; + /** Low. */ + String LOW = "Low"; + } + private String text; + @SerializedName("confidence_level") + private String confidenceLevel; private Location location; /** @@ -33,6 +48,17 @@ public String getText() { return text; } + /** + * Gets the confidenceLevel. + * + * The confidence level in the identification of the contract amount. + * + * @return the confidenceLevel + */ + public String getConfidenceLevel() { + return confidenceLevel; + } + /** * Gets the location. * diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/DeleteFeedbackOptions.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/DeleteFeedbackOptions.java index fbe0ad76090..cedaad30586 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/DeleteFeedbackOptions.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/DeleteFeedbackOptions.java @@ -112,7 +112,7 @@ public Builder newBuilder() { /** * Gets the feedbackId. * - * An string that specifies the feedback entry to be deleted from the document. + * A string that specifies the feedback entry to be deleted from the document. * * @return the feedbackId */ diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Document.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Document.java index 9f0fcbb770a..35dbfa3467d 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Document.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Document.java @@ -60,7 +60,8 @@ public String getHash() { /** * Gets the label. * - * The label applied to the input document with the calling method's `file1_label` or `file2_label` value. + * The label applied to the input document with the calling method's `file_1_label` or `file_2_label` value. This + * field is specified only in the output of the **Comparing two documents** method. * * @return the label */ diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/EffectiveDates.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/EffectiveDates.java index a7d644c543c..c3e78c26034 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/EffectiveDates.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/EffectiveDates.java @@ -12,6 +12,7 @@ */ package com.ibm.watson.developer_cloud.compare_comply.v1.model; +import com.google.gson.annotations.SerializedName; import com.ibm.watson.developer_cloud.service.model.GenericModel; /** @@ -19,7 +20,21 @@ */ public class EffectiveDates extends GenericModel { + /** + * The confidence level in the identification of the effective date. + */ + public interface ConfidenceLevel { + /** High. */ + String HIGH = "High"; + /** Medium. */ + String MEDIUM = "Medium"; + /** Low. */ + String LOW = "Low"; + } + private String text; + @SerializedName("confidence_level") + private String confidenceLevel; private Location location; /** @@ -33,6 +48,17 @@ public String getText() { return text; } + /** + * Gets the confidenceLevel. + * + * The confidence level in the identification of the effective date. + * + * @return the confidenceLevel + */ + public String getConfidenceLevel() { + return confidenceLevel; + } + /** * Gets the location. * diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/GetFeedbackOptions.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/GetFeedbackOptions.java index e0f641030d0..622193084b3 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/GetFeedbackOptions.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/GetFeedbackOptions.java @@ -112,7 +112,7 @@ public Builder newBuilder() { /** * Gets the feedbackId. * - * An string that specifies the feedback entry to be included in the output. + * A string that specifies the feedback entry to be included in the output. * * @return the feedbackId */ diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/LeadingSentence.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/LeadingSentence.java index f58ff18b611..f5b483cd78b 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/LeadingSentence.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/LeadingSentence.java @@ -53,7 +53,7 @@ public Location getLocation() { /** * Gets the elementLocations. * - * An array of `location` objects listing the locations of detected leading sentences. + * An array of `location` objects that lists the locations of detected leading sentences. * * @return the elementLocations */ diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Parties.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Parties.java index 009e05457ac..3bda007b78a 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Parties.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Parties.java @@ -21,7 +21,18 @@ */ public class Parties extends GenericModel { + /** + * A string that identifies the importance of the party. + */ + public interface Importance { + /** Primary. */ + String PRIMARY = "Primary"; + /** Unknown. */ + String UNKNOWN = "Unknown"; + } + private String party; + private String importance; private String role; private List
addresses; private List contacts; @@ -37,6 +48,17 @@ public String getParty() { return party; } + /** + * Gets the importance. + * + * A string that identifies the importance of the party. + * + * @return the importance + */ + public String getImportance() { + return importance; + } + /** * Gets the role. * diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/SectionTitles.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/SectionTitles.java index bfd40e4a06f..35379aa666d 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/SectionTitles.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/SectionTitles.java @@ -68,7 +68,7 @@ public Long getLevel() { /** * Gets the elementLocations. * - * An array of `location` objects listing the locations of detected leading sentences. + * An array of `location` objects that lists the locations of detected section titles. * * @return the elementLocations */ diff --git a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/TerminationDates.java b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/TerminationDates.java index 84a1bbaa74b..5ad325a1f88 100644 --- a/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/TerminationDates.java +++ b/compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/TerminationDates.java @@ -12,6 +12,7 @@ */ package com.ibm.watson.developer_cloud.compare_comply.v1.model; +import com.google.gson.annotations.SerializedName; import com.ibm.watson.developer_cloud.service.model.GenericModel; /** @@ -19,7 +20,21 @@ */ public class TerminationDates extends GenericModel { + /** + * The confidence level in the identification of the termination date. + */ + public interface ConfidenceLevel { + /** High. */ + String HIGH = "High"; + /** Medium. */ + String MEDIUM = "Medium"; + /** Low. */ + String LOW = "Low"; + } + private String text; + @SerializedName("confidence_level") + private String confidenceLevel; private Location location; /** @@ -33,6 +48,17 @@ public String getText() { return text; } + /** + * Gets the confidenceLevel. + * + * The confidence level in the identification of the termination date. + * + * @return the confidenceLevel + */ + public String getConfidenceLevel() { + return confidenceLevel; + } + /** * Gets the location. * diff --git a/compare-comply/src/test/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComplyTest.java b/compare-comply/src/test/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComplyTest.java index b5e9856e29b..011ad8c9aa2 100644 --- a/compare-comply/src/test/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComplyTest.java +++ b/compare-comply/src/test/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComplyTest.java @@ -21,9 +21,11 @@ import com.ibm.watson.developer_cloud.compare_comply.v1.model.ClassifyReturn; import com.ibm.watson.developer_cloud.compare_comply.v1.model.CompareDocumentsOptions; import com.ibm.watson.developer_cloud.compare_comply.v1.model.CompareReturn; +import com.ibm.watson.developer_cloud.compare_comply.v1.model.ContractAmts; import com.ibm.watson.developer_cloud.compare_comply.v1.model.ConvertToHtmlOptions; import com.ibm.watson.developer_cloud.compare_comply.v1.model.CreateBatchOptions; import com.ibm.watson.developer_cloud.compare_comply.v1.model.DeleteFeedbackOptions; +import com.ibm.watson.developer_cloud.compare_comply.v1.model.EffectiveDates; import com.ibm.watson.developer_cloud.compare_comply.v1.model.ExtractTablesOptions; import com.ibm.watson.developer_cloud.compare_comply.v1.model.FeedbackDataInput; import com.ibm.watson.developer_cloud.compare_comply.v1.model.FeedbackList; @@ -38,8 +40,10 @@ import com.ibm.watson.developer_cloud.compare_comply.v1.model.Location; import com.ibm.watson.developer_cloud.compare_comply.v1.model.OriginalLabelsIn; import com.ibm.watson.developer_cloud.compare_comply.v1.model.OriginalLabelsOut; +import com.ibm.watson.developer_cloud.compare_comply.v1.model.Parties; import com.ibm.watson.developer_cloud.compare_comply.v1.model.ShortDoc; import com.ibm.watson.developer_cloud.compare_comply.v1.model.TableReturn; +import com.ibm.watson.developer_cloud.compare_comply.v1.model.TerminationDates; import com.ibm.watson.developer_cloud.compare_comply.v1.model.TypeLabel; import com.ibm.watson.developer_cloud.compare_comply.v1.model.UpdateBatchOptions; import com.ibm.watson.developer_cloud.compare_comply.v1.model.UpdatedLabelsIn; @@ -633,6 +637,12 @@ public void testClassifyElements() throws FileNotFoundException, InterruptedExce assertEquals(TEXT, response.getTables().get(0).getBodyCells().get(0).getColumnHeaderTexts().get(0)); assertEquals(TEXT_NORMALIZED, response.getTables().get(0).getBodyCells().get(0).getColumnHeaderTextsNormalized().get(0)); + assertEquals(TYPE, response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getType()); + assertEquals(TEXT, response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getText()); + assertEquals(BEGIN, + response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getLocation().getBegin()); + assertEquals(END, + response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getLocation().getEnd()); assertEquals(TEXT, response.getDocumentStructure().getSectionTitles().get(0).getText()); assertEquals(BEGIN, response.getDocumentStructure().getSectionTitles().get(0).getLocation().getBegin()); assertEquals(END, response.getDocumentStructure().getSectionTitles().get(0).getLocation().getEnd()); @@ -649,6 +659,7 @@ public void testClassifyElements() throws FileNotFoundException, InterruptedExce assertEquals(END, response.getDocumentStructure().getLeadingSentences().get(0).getElementLocations().get(0).getEnd()); assertEquals(PARTY, response.getParties().get(0).getParty()); + assertEquals(Parties.Importance.UNKNOWN, response.getParties().get(0).getImportance()); assertEquals(ROLE, response.getParties().get(0).getRole()); assertEquals(TEXT, response.getParties().get(0).getAddresses().get(0).getText()); assertEquals(BEGIN, response.getParties().get(0).getAddresses().get(0).getLocation().getBegin()); @@ -658,12 +669,15 @@ public void testClassifyElements() throws FileNotFoundException, InterruptedExce assertEquals(TEXT, response.getEffectiveDates().get(0).getText()); assertEquals(BEGIN, response.getEffectiveDates().get(0).getLocation().getBegin()); assertEquals(END, response.getEffectiveDates().get(0).getLocation().getEnd()); + assertEquals(EffectiveDates.ConfidenceLevel.HIGH, response.getEffectiveDates().get(0).getConfidenceLevel()); assertEquals(TEXT, response.getContractAmounts().get(0).getText()); assertEquals(BEGIN, response.getContractAmounts().get(0).getLocation().getBegin()); assertEquals(END, response.getContractAmounts().get(0).getLocation().getEnd()); + assertEquals(ContractAmts.ConfidenceLevel.HIGH, response.getContractAmounts().get(0).getConfidenceLevel()); assertEquals(TEXT, response.getTerminationDates().get(0).getText()); assertEquals(BEGIN, response.getTerminationDates().get(0).getLocation().getBegin()); assertEquals(END, response.getTerminationDates().get(0).getLocation().getEnd()); + assertEquals(TerminationDates.ConfidenceLevel.HIGH, response.getTerminationDates().get(0).getConfidenceLevel()); } @Test @@ -729,6 +743,12 @@ public void testExtractTables() throws FileNotFoundException, InterruptedExcepti assertEquals(TEXT, response.getTables().get(0).getBodyCells().get(0).getColumnHeaderTexts().get(0)); assertEquals(TEXT_NORMALIZED, response.getTables().get(0).getBodyCells().get(0).getColumnHeaderTextsNormalized().get(0)); + assertEquals(TYPE, response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getType()); + assertEquals(TEXT, response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getText()); + assertEquals(BEGIN, + response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getLocation().getBegin()); + assertEquals(END, + response.getTables().get(0).getBodyCells().get(0).getAttributes().get(0).getLocation().getEnd()); } @Test diff --git a/compare-comply/src/test/resources/compare_comply/classify-return.json b/compare-comply/src/test/resources/compare_comply/classify-return.json index 1e4986e02f2..2ace0837ba1 100644 --- a/compare-comply/src/test/resources/compare_comply/classify-return.json +++ b/compare-comply/src/test/resources/compare_comply/classify-return.json @@ -131,6 +131,16 @@ ], "column_header_texts_normalized": [ "text_normalized" + ], + "attributes": [ + { + "type": "type", + "text": "text", + "location": { + "begin": 0, + "end": 1 + } + } ] } ] @@ -172,6 +182,7 @@ "parties": [ { "party": "party", + "importance": "Unknown", "role": "role", "addresses": [ { @@ -196,7 +207,8 @@ "location": { "begin": 0, "end": 1 - } + }, + "confidence_level": "High" } ], "contract_amounts": [ @@ -205,7 +217,8 @@ "location": { "begin": 0, "end": 1 - } + }, + "confidence_level": "High" } ], "termination_dates": [ @@ -214,7 +227,8 @@ "location": { "begin": 0, "end": 1 - } + }, + "confidence_level": "High" } ] } \ No newline at end of file diff --git a/compare-comply/src/test/resources/compare_comply/table-return.json b/compare-comply/src/test/resources/compare_comply/table-return.json index cd00d7e1b03..99b998cdfae 100644 --- a/compare-comply/src/test/resources/compare_comply/table-return.json +++ b/compare-comply/src/test/resources/compare_comply/table-return.json @@ -92,6 +92,16 @@ ], "column_header_texts_normalized": [ "text_normalized" + ], + "attributes": [ + { + "type": "type", + "text": "text", + "location": { + "begin": 0, + "end": 1 + } + } ] } ] diff --git a/conversation/README.md b/conversation/README.md index 9055f4e4182..885781beb27 100644 --- a/conversation/README.md +++ b/conversation/README.md @@ -10,13 +10,13 @@ Conversation will be removed in the next major release. Please migrate to Assist com.ibm.watson.developer_cloud conversation - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:conversation:6.13.2' +'com.ibm.watson.developer_cloud:conversation:6.14.0' ``` ## Usage diff --git a/discovery/README.md b/discovery/README.md index 5b3c3658953..cae60ff2162 100644 --- a/discovery/README.md +++ b/discovery/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud discovery - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:discovery:6.13.2' +'com.ibm.watson.developer_cloud:discovery:6.14.0' ``` ## Usage diff --git a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/Discovery.java b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/Discovery.java index 7c89fe7eeba..82c719c4664 100644 --- a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/Discovery.java +++ b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/Discovery.java @@ -57,12 +57,12 @@ import com.ibm.watson.developer_cloud.discovery.v1.model.GetDocumentStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetEnvironmentOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetGatewayOptions; -import com.ibm.watson.developer_cloud.discovery.v1.model.ListGatewaysOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsEventRateOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryEventOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryNoResultsOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryTokenEventOptions; +import com.ibm.watson.developer_cloud.discovery.v1.model.GetStopwordListStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTokenizationDictionaryStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingDataOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingExampleOptions; @@ -77,6 +77,7 @@ import com.ibm.watson.developer_cloud.discovery.v1.model.ListEnvironmentsResponse; import com.ibm.watson.developer_cloud.discovery.v1.model.ListExpansionsOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.ListFieldsOptions; +import com.ibm.watson.developer_cloud.discovery.v1.model.ListGatewaysOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.ListTrainingDataOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.ListTrainingExamplesOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.LogQueryResponse; @@ -823,6 +824,28 @@ public ServiceCall deleteTokenizationDictionary( return createServiceCall(builder.build(), ResponseConverterUtils.getVoid()); } + /** + * Get stopword list status. + * + * Returns the current status of the stopword list for the specified collection. + * + * @param getStopwordListStatusOptions the {@link GetStopwordListStatusOptions} containing the options for the call + * @return a {@link ServiceCall} with a response type of {@link TokenDictStatusResponse} + */ + public ServiceCall getStopwordListStatus( + GetStopwordListStatusOptions getStopwordListStatusOptions) { + Validator.notNull(getStopwordListStatusOptions, "getStopwordListStatusOptions cannot be null"); + String[] pathSegments = { "v1/environments", "collections", "word_lists/stopwords" }; + String[] pathParameters = { getStopwordListStatusOptions.environmentId(), getStopwordListStatusOptions + .collectionId() }; + RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments, + pathParameters)); + builder.query(VERSION, versionDate); + builder.header("X-IBMCloud-SDK-Analytics", + "service_name=discovery;service_version=v1;operation_id=getStopwordListStatus"); + return createServiceCall(builder.build(), ResponseConverterUtils.getObject(TokenDictStatusResponse.class)); + } + /** * Get tokenization dictionary status. * diff --git a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentAccepted.java b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentAccepted.java index 7f5e3a83563..b4306ef8733 100644 --- a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentAccepted.java +++ b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentAccepted.java @@ -23,11 +23,14 @@ public class DocumentAccepted extends GenericModel { /** - * Status of the document in the ingestion process. + * Status of the document in the ingestion process. A status of `processing` is returned for documents that are + * ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others. */ public interface Status { /** processing. */ String PROCESSING = "processing"; + /** pending. */ + String PENDING = "pending"; } @SerializedName("document_id") @@ -49,7 +52,8 @@ public String getDocumentId() { /** * Gets the status. * - * Status of the document in the ingestion process. + * Status of the document in the ingestion process. A status of `processing` is returned for documents that are + * ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others. * * @return the status */ diff --git a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentCounts.java b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentCounts.java index cc7d91bd5a8..91efe393388 100644 --- a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentCounts.java +++ b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentCounts.java @@ -22,6 +22,7 @@ public class DocumentCounts extends GenericModel { private Long available; private Long processing; private Long failed; + private Long pending; /** * Gets the available. @@ -55,4 +56,15 @@ public Long getProcessing() { public Long getFailed() { return failed; } + + /** + * Gets the pending. + * + * The number of documents that have been uploaded to the collection, but have not yet started processing. + * + * @return the pending + */ + public Long getPending() { + return pending; + } } diff --git a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentStatus.java b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentStatus.java index c330533bb2a..1b78c1f9a35 100644 --- a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentStatus.java +++ b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/DocumentStatus.java @@ -35,6 +35,8 @@ public interface Status { String FAILED = "failed"; /** processing. */ String PROCESSING = "processing"; + /** pending. */ + String PENDING = "pending"; } /** diff --git a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/GetGatewayOptions.java b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/GetGatewayOptions.java index 6711ce3126d..11b6a0a31a6 100644 --- a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/GetGatewayOptions.java +++ b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/GetGatewayOptions.java @@ -55,7 +55,7 @@ public Builder(String environmentId, String gatewayId) { /** * Builds a GetGatewayOptions. * - * @return the getGatewayDetailsOptions + * @return the getGatewayOptions */ public GetGatewayOptions build() { return new GetGatewayOptions(this); diff --git a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/GetStopwordListStatusOptions.java b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/GetStopwordListStatusOptions.java new file mode 100644 index 00000000000..b6918ce8c3d --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/GetStopwordListStatusOptions.java @@ -0,0 +1,124 @@ +/* + * Copyright 2018 IBM Corp. All Rights Reserved. + * + * 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.watson.developer_cloud.discovery.v1.model; + +import com.ibm.watson.developer_cloud.service.model.GenericModel; +import com.ibm.watson.developer_cloud.util.Validator; + +/** + * The getStopwordListStatus options. + */ +public class GetStopwordListStatusOptions extends GenericModel { + + private String environmentId; + private String collectionId; + + /** + * Builder. + */ + public static class Builder { + private String environmentId; + private String collectionId; + + private Builder(GetStopwordListStatusOptions getStopwordListStatusOptions) { + environmentId = getStopwordListStatusOptions.environmentId; + collectionId = getStopwordListStatusOptions.collectionId; + } + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Instantiates a new builder with required properties. + * + * @param environmentId the environmentId + * @param collectionId the collectionId + */ + public Builder(String environmentId, String collectionId) { + this.environmentId = environmentId; + this.collectionId = collectionId; + } + + /** + * Builds a GetStopwordListStatusOptions. + * + * @return the getStopwordListStatusOptions + */ + public GetStopwordListStatusOptions build() { + return new GetStopwordListStatusOptions(this); + } + + /** + * Set the environmentId. + * + * @param environmentId the environmentId + * @return the GetStopwordListStatusOptions builder + */ + public Builder environmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Set the collectionId. + * + * @param collectionId the collectionId + * @return the GetStopwordListStatusOptions builder + */ + public Builder collectionId(String collectionId) { + this.collectionId = collectionId; + return this; + } + } + + private GetStopwordListStatusOptions(Builder builder) { + Validator.notEmpty(builder.environmentId, "environmentId cannot be empty"); + Validator.notEmpty(builder.collectionId, "collectionId cannot be empty"); + environmentId = builder.environmentId; + collectionId = builder.collectionId; + } + + /** + * New builder. + * + * @return a GetStopwordListStatusOptions builder + */ + public Builder newBuilder() { + return new Builder(this); + } + + /** + * Gets the environmentId. + * + * The ID of the environment. + * + * @return the environmentId + */ + public String environmentId() { + return environmentId; + } + + /** + * Gets the collectionId. + * + * The ID of the collection. + * + * @return the collectionId + */ + public String collectionId() { + return collectionId; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/ListGatewaysOptions.java b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/ListGatewaysOptions.java index e92cf8fc449..ebd8fdfc374 100644 --- a/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/ListGatewaysOptions.java +++ b/discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/ListGatewaysOptions.java @@ -50,7 +50,7 @@ public Builder(String environmentId) { /** * Builds a ListGatewaysOptions. * - * @return the getGatewayListOptions + * @return the listGatewaysOptions */ public ListGatewaysOptions build() { return new ListGatewaysOptions(this); diff --git a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java index b6cb067e6fa..ef2a0cc2298 100644 --- a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java +++ b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceIT.java @@ -66,6 +66,7 @@ import com.ibm.watson.developer_cloud.discovery.v1.model.GetDocumentStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetEnvironmentOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetGatewayOptions; +import com.ibm.watson.developer_cloud.discovery.v1.model.GetStopwordListStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTokenizationDictionaryStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingDataOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingExampleOptions; @@ -1048,20 +1049,6 @@ public void queryWithOffsetIsSuccessful() { assertEquals(5, queryResponse.getResults().size()); } - @Test - public void queryWithReturnFieldsIsSuccessful() { - String collectionId = setupTestDocuments(); - createTestDocument("{\"field_2\":\"value_2\"}", collectionId); - - QueryOptions.Builder queryBuilder = new QueryOptions.Builder(environmentId, collectionId); - List fieldNames = new ArrayList<>(); - fieldNames.add("field"); - queryBuilder.returnFields(fieldNames); - QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute(); - String[] expected = new String[] { "id", "result_metadata", "field" }; - assertTrue(queryResponse.getResults().get(0).keySet().containsAll(Arrays.asList(expected))); - } - @Ignore @Test public void queryWithQueryIsSuccessful() { @@ -1989,6 +1976,13 @@ public void stopwordListOperationsAreSuccessful() throws FileNotFoundException, TokenDictStatusResponse createResponse = discovery.createStopwordList(createStopwordListOptions).execute(); assertEquals("stopwords", createResponse.getType()); + GetStopwordListStatusOptions getStopwordListStatusOptions = new GetStopwordListStatusOptions.Builder() + .environmentId(environmentId) + .collectionId(testCollectionId) + .build(); + TokenDictStatusResponse getResponse = discovery.getStopwordListStatus(getStopwordListStatusOptions).execute(); + assertEquals("stopwords", getResponse.getType()); + DeleteStopwordListOptions deleteStopwordListOptions = new DeleteStopwordListOptions.Builder() .environmentId(environmentId) .collectionId(testCollectionId) diff --git a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java index 0e671077d61..c83c4a1b4ea 100644 --- a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java +++ b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java @@ -72,6 +72,7 @@ import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryNoResultsOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryTokenEventOptions; +import com.ibm.watson.developer_cloud.discovery.v1.model.GetStopwordListStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTokenizationDictionaryStatusOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingDataOptions; import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingExampleOptions; @@ -272,6 +273,7 @@ public class DiscoveryServiceTest extends WatsonServiceUnitTest { private MetricTokenResponse metricTokenResp; private LogQueryResponse logQueryResp; private TokenDictStatusResponse tokenDictStatusResponse; + private TokenDictStatusResponse tokenDictStatusResponseStopwords; private Gateway gatewayResponse; private GatewayList listGatewaysResponse; @@ -335,6 +337,8 @@ public void setup() throws Exception { metricTokenResp = loadFixture(RESOURCE + "metric_token_resp.json", MetricTokenResponse.class); logQueryResp = loadFixture(RESOURCE + "log_query_resp.json", LogQueryResponse.class); tokenDictStatusResponse = loadFixture(RESOURCE + "token_dict_status_resp.json", TokenDictStatusResponse.class); + tokenDictStatusResponseStopwords = loadFixture(RESOURCE + "token_dict_status_resp_stopwords.json", + TokenDictStatusResponse.class); gatewayResponse = loadFixture(RESOURCE + "gateway_resp.json", Gateway.class); listGatewaysResponse = loadFixture(RESOURCE + "list_gateways_resp.json", GatewayList.class); } @@ -1740,6 +1744,35 @@ public void testDeleteStopwordList() throws InterruptedException { assertEquals(DELETE, request.getMethod()); } + @Test + public void testGetStopwordListStatusOptions() { + GetStopwordListStatusOptions getStopwordListStatusOptions = new GetStopwordListStatusOptions.Builder() + .environmentId(environmentId) + .collectionId(collectionId) + .build(); + + assertEquals(environmentId, getStopwordListStatusOptions.environmentId()); + assertEquals(collectionId, getStopwordListStatusOptions.collectionId()); + } + + @Test + public void testGetStopwordListStatus() throws InterruptedException { + server.enqueue(jsonResponse(tokenDictStatusResponseStopwords)); + + String type = "stopwords"; + + GetStopwordListStatusOptions getStopwordListStatusOptions = new GetStopwordListStatusOptions.Builder() + .environmentId(environmentId) + .collectionId(collectionId) + .build(); + TokenDictStatusResponse response = discoveryService.getStopwordListStatus(getStopwordListStatusOptions).execute(); + RecordedRequest request = server.takeRequest(); + + assertEquals(GET, request.getMethod()); + assertEquals(TokenDictStatusResponse.Status.ACTIVE, response.getStatus()); + assertEquals(type, response.getType()); + } + @Test public void testCreateGatewayOptions() { String name = "name"; diff --git a/discovery/src/test/resources/discovery/token_dict_status_resp_stopwords.json b/discovery/src/test/resources/discovery/token_dict_status_resp_stopwords.json new file mode 100644 index 00000000000..1d08a5d7605 --- /dev/null +++ b/discovery/src/test/resources/discovery/token_dict_status_resp_stopwords.json @@ -0,0 +1,4 @@ +{ + "status" : "active", + "type" : "stopwords" +} \ No newline at end of file diff --git a/language-translator/README.md b/language-translator/README.md index d1b744b1309..64d7d3172a7 100644 --- a/language-translator/README.md +++ b/language-translator/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud language-translator - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:language-translator:6.13.2' +'com.ibm.watson.developer_cloud:language-translator:6.14.0' ``` ## Usage diff --git a/natural-language-classifier/README.md b/natural-language-classifier/README.md index 4fbb4091556..e26636f50bc 100644 --- a/natural-language-classifier/README.md +++ b/natural-language-classifier/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud natural-language-classifier - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:natural-language-classifier:6.13.2' +'com.ibm.watson.developer_cloud:natural-language-classifier:6.14.0' ``` ## Usage diff --git a/natural-language-classifier/src/main/java/com/ibm/watson/developer_cloud/natural_language_classifier/v1/model/CreateClassifierOptions.java b/natural-language-classifier/src/main/java/com/ibm/watson/developer_cloud/natural_language_classifier/v1/model/CreateClassifierOptions.java index da1909a4cc2..4d0eba3c984 100644 --- a/natural-language-classifier/src/main/java/com/ibm/watson/developer_cloud/natural_language_classifier/v1/model/CreateClassifierOptions.java +++ b/natural-language-classifier/src/main/java/com/ibm/watson/developer_cloud/natural_language_classifier/v1/model/CreateClassifierOptions.java @@ -194,7 +194,7 @@ public String metadataFilename() { * * Training data in CSV format. Each text value must have at least one class. The data can include up to 3,000 classes * and 20,000 records. For details, see [Data - * preparation](https://console.bluemix.net/docs/services/natural-language-classifier/using-your-data.html). + * preparation](https://cloud.ibm.com/docs/services/natural-language-classifier/using-your-data.html). * * @return the trainingData */ diff --git a/natural-language-understanding/README.md b/natural-language-understanding/README.md index ab872a39e1f..2bcf0aa69e9 100644 --- a/natural-language-understanding/README.md +++ b/natural-language-understanding/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud natural-language-understanding - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:natural-language-understanding:6.13.2' +'com.ibm.watson.developer_cloud:natural-language-understanding:6.14.0' ``` ## Usage diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/NaturalLanguageUnderstanding.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/NaturalLanguageUnderstanding.java index b988d299c10..99f17d7a23e 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/NaturalLanguageUnderstanding.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/NaturalLanguageUnderstanding.java @@ -31,9 +31,8 @@ * Language Understanding will give you results for the features you request. The service cleans HTML content before * analysis by default, so the results can ignore most advertisements and other unwanted content. * - * You can create [custom models](https://cloud.ibm.com/docs/services/natural-language-understanding/customizing - * .html) with Watson Knowledge - * Studio to detect custom entities and relations in Natural Language Understanding. + * You can create [custom models](https://cloud.ibm.com/docs/services/natural-language-understanding/customizing.html) + * with Watson Knowledge Studio to detect custom entities and relations in Natural Language Understanding. * * @version v1 * @see Natural Language @@ -172,9 +171,9 @@ public ServiceCall deleteModel(DeleteModelOptions deleteModelOptions) { /** * List models. * - * Lists Watson Knowledge Studio [custom models](https://cloud.ibm - * .com/docs/services/natural-language-understanding/customizing.html) that - * are deployed to your Natural Language Understanding service. + * Lists Watson Knowledge Studio [custom + * models](https://cloud.ibm.com/docs/services/natural-language-understanding/customizing.html) that are deployed to + * your Natural Language Understanding service. * * @param listModelsOptions the {@link ListModelsOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link ListModelsResults} @@ -193,9 +192,9 @@ public ServiceCall listModels(ListModelsOptions listModelsOpt /** * List models. * - * Lists Watson Knowledge Studio [custom models](https://cloud.ibm - * .com/docs/services/natural-language-understanding/customizing.html) that - * are deployed to your Natural Language Understanding service. + * Lists Watson Knowledge Studio [custom + * models](https://cloud.ibm.com/docs/services/natural-language-understanding/customizing.html) that are deployed to + * your Natural Language Understanding service. * * @return a {@link ServiceCall} with a response type of {@link ListModelsResults} */ diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/AnalyzeOptions.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/AnalyzeOptions.java index fbca4138782..f8a3d80a8f9 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/AnalyzeOptions.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/AnalyzeOptions.java @@ -277,9 +277,9 @@ public Boolean clean() { /** * Gets the xpath. * - * An [XPath query](https://cloud.ibm.com/docs/services/natural-language-understanding/analyzing-webpages - * .html#xpath) to perform on `html` or `url` input. Results of the query will be appended to the cleaned webpage - * text before it is analyzed. To analyze only the results of the XPath query, set the `clean` parameter to `false`. + * An [XPath query](https://cloud.ibm.com/docs/services/natural-language-understanding/analyzing-webpages.html#xpath) + * to perform on `html` or `url` input. Results of the query will be appended to the cleaned webpage text before it is + * analyzed. To analyze only the results of the XPath query, set the `clean` parameter to `false`. * * @return the xpath */ diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesOptions.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesOptions.java index c67b1159175..f705991e0db 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesOptions.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesOptions.java @@ -31,7 +31,6 @@ public class CategoriesOptions extends DynamicModel { * Gets the limit. * * Maximum number of categories to return. - * Maximum value: **10**. * * @return the limit */ diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesResult.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesResult.java index 3748dd261df..745c8a35454 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesResult.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesResult.java @@ -26,8 +26,8 @@ public class CategoriesResult extends GenericModel { * Gets the label. * * The path to the category through the 5-level taxonomy hierarchy. For the complete list of categories, see the - * [Categories hierarchy](https://cloud.ibm.com/docs/services/natural-language-understanding/categories - * .html#categories-hierarchy) + * [Categories + * hierarchy](https://cloud.ibm.com/docs/services/natural-language-understanding/categories.html#categories-hierarchy) * documentation. * * @return the label diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ConceptsOptions.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ConceptsOptions.java index b6781aab276..479dc84046a 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ConceptsOptions.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ConceptsOptions.java @@ -18,7 +18,7 @@ * Returns high-level concepts in the content. For example, a research paper about deep learning might return the * concept, "Artificial Intelligence" although the term is not mentioned. * - * Supported languages: English, French, German, Japanese, Korean, Portuguese, Spanish. + * Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. */ public class ConceptsOptions extends GenericModel { diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/DeleteModelOptions.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/DeleteModelOptions.java index 45d2ffa1ef8..039ae0046f1 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/DeleteModelOptions.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/DeleteModelOptions.java @@ -85,7 +85,7 @@ public Builder newBuilder() { /** * Gets the modelId. * - * model_id of the model to delete. + * Model ID of the model to delete. * * @return the modelId */ diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/EntitiesOptions.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/EntitiesOptions.java index 0de74131892..be669496f73 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/EntitiesOptions.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/EntitiesOptions.java @@ -19,7 +19,7 @@ * subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding/entity-types.html). * * Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. - * Arabic, Chinese, and Dutch custom models are also supported. + * Arabic, Chinese, and Dutch are supported only through custom models. */ public class EntitiesOptions extends GenericModel { @@ -160,7 +160,7 @@ public Boolean mentions() { /** * Gets the model. * - * Enter a [custom model](https://www.bluemix.net/docs/services/natural-language-understanding/customizing.html) ID to + * Enter a [custom model](https://cloud.ibm.com/docs/services/natural-language-understanding/customizing.html) ID to * override the standard entity detection model. * * @return the model diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/Features.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/Features.java index 37cf6644c94..8a1c961b5a7 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/Features.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/Features.java @@ -199,7 +199,7 @@ public Builder newBuilder() { * Returns high-level concepts in the content. For example, a research paper about deep learning might return the * concept, "Artificial Intelligence" although the term is not mentioned. * - * Supported languages: English, French, German, Japanese, Korean, Portuguese, Spanish. + * Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Spanish. * * @return the concepts */ @@ -229,7 +229,7 @@ public EmotionOptions emotion() { * subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding/entity-types.html). * * Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. - * Arabic, Chinese, and Dutch custom models are also supported. + * Arabic, Chinese, and Dutch are supported only through custom models. * * @return the entities */ diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ListModelsResults.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ListModelsResults.java index 26b023b9ced..7a0106682b5 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ListModelsResults.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ListModelsResults.java @@ -17,7 +17,7 @@ import com.ibm.watson.developer_cloud.service.model.GenericModel; /** - * Models available for Relations and Entities features. + * Custom models that are available for entities and relations. */ public class ListModelsResults extends GenericModel { diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/RelationsOptions.java b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/RelationsOptions.java index b2cd3bf2184..46097bec4f7 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/RelationsOptions.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/RelationsOptions.java @@ -79,9 +79,8 @@ public Builder newBuilder() { /** * Gets the model. * - * Enter a [custom model](https://cloud.ibm.com/docs/services/natural-language-understanding/customizing.html) ID - * to override the default - * model. + * Enter a [custom model](https://cloud.ibm.com/docs/services/natural-language-understanding/customizing.html) ID to + * override the default model. * * @return the model */ diff --git a/personality-insights/README.md b/personality-insights/README.md index 4aa0d85cc7f..ec60624437d 100755 --- a/personality-insights/README.md +++ b/personality-insights/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud personality-insights - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:personality-insights:6.13.2' +'com.ibm.watson.developer_cloud:personality-insights:6.14.0' ``` ## Usage diff --git a/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/PersonalityInsights.java b/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/PersonalityInsights.java index 22566922275..5de3402e038 100644 --- a/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/PersonalityInsights.java +++ b/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/PersonalityInsights.java @@ -119,8 +119,8 @@ public PersonalityInsights(String versionDate, IamOptions iamOptions) { * When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the character * encoding of the input text; for example, `Content-Type: text/plain;charset=utf-8`. * - * **See also:** [Specifying request and response formats](https://cloud.ibm - * .com/docs/services/personality-insights/input.html#formats) + * **See also:** [Specifying request and response + * formats](https://cloud.ibm.com/docs/services/personality-insights/input.html#formats) * * ### Accept types * @@ -183,8 +183,8 @@ public ServiceCall profile(ProfileOptions profileOptions) { * When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the character * encoding of the input text; for example, `Content-Type: text/plain;charset=utf-8`. * - * **See also:** [Specifying request and response formats](https://cloud.ibm - * .com/docs/services/personality-insights/input.html#formats) + * **See also:** [Specifying request and response + * formats](https://cloud.ibm.com/docs/services/personality-insights/input.html#formats) * * ### Accept types * diff --git a/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ProfileOptions.java b/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ProfileOptions.java index 407dedfde86..561c576e6e3 100644 --- a/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ProfileOptions.java +++ b/personality-insights/src/main/java/com/ibm/watson/developer_cloud/personality_insights/v3/model/ProfileOptions.java @@ -236,9 +236,8 @@ public Builder newBuilder() { * Gets the content. * * A maximum of 20 MB of content to analyze, though the service requires much less text; for more information, see - * [Providing sufficient input](https://cloud.ibm.com/docs/services/personality-insights/input.html#sufficient). - * For JSON input, provide an - * object of type `Content`. + * [Providing sufficient input](https://cloud.ibm.com/docs/services/personality-insights/input.html#sufficient). For + * JSON input, provide an object of type `Content`. * * @return the content */ @@ -250,9 +249,8 @@ public Content content() { * Gets the body. * * A maximum of 20 MB of content to analyze, though the service requires much less text; for more information, see - * [Providing sufficient input](https://cloud.ibm.com/docs/services/personality-insights/input.html#sufficient). - * For JSON input, provide an - * object of type `Content`. + * [Providing sufficient input](https://cloud.ibm.com/docs/services/personality-insights/input.html#sufficient). For + * JSON input, provide an object of type `Content`. * * @return the body */ diff --git a/speech-to-text/README.md b/speech-to-text/README.md index 2514498c134..da5608b527a 100755 --- a/speech-to-text/README.md +++ b/speech-to-text/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud speech-to-text - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:speech-to-text:6.13.2' +'com.ibm.watson.developer_cloud:speech-to-text:6.14.0' ``` ## Usage diff --git a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToText.java b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToText.java index c0d36b83061..8d6e9699217 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToText.java +++ b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToText.java @@ -1564,16 +1564,18 @@ public ServiceCall resetAcousticModel(ResetAcousticModelOptions resetAcous * existing request completes. * * You can use the optional `custom_language_model_id` parameter to specify the GUID of a separately created custom - * language model that is to be used during training. Specify a custom language model if you have verbatim + * language model that is to be used during training. Train with a custom language model if you have verbatim * transcriptions of the audio files that you have added to the custom model or you have either corpora (text files) - * or a list of words that are relevant to the contents of the audio files. For more information, see the **Create a - * custom language model** method. + * or a list of words that are relevant to the contents of the audio files. Both of the custom models must be based on + * the same version of the same base model for training to succeed. * * Training can fail to start for the following reasons: * * The service is currently handling another request for the custom model, such as another training request or a * request to add audio resources to the model. * * The custom model contains less than 10 minutes or more than 100 hours of audio data. * * One or more of the custom model's audio resources is invalid. + * * You passed an incompatible custom language model with the `custom_language_model_id` query parameter. Both custom + * models must be based on the same version of the same base model. * * **See also:** [Train the custom acoustic * model](https://cloud.ibm.com/docs/services/speech-to-text/acoustic-create.html#trainModel). @@ -1633,6 +1635,9 @@ public ServiceCall upgradeAcousticModel(UpgradeAcousticModelOptions upgrad if (upgradeAcousticModelOptions.customLanguageModelId() != null) { builder.query("custom_language_model_id", upgradeAcousticModelOptions.customLanguageModelId()); } + if (upgradeAcousticModelOptions.force() != null) { + builder.query("force", String.valueOf(upgradeAcousticModelOptions.force())); + } return createServiceCall(builder.build(), ResponseConverterUtils.getVoid()); } diff --git a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/TrainAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/TrainAcousticModelOptions.java index 60809c70d88..06c0b666b46 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/TrainAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/TrainAcousticModelOptions.java @@ -114,7 +114,9 @@ public String customizationId() { * * The customization ID (GUID) of a custom language model that is to be used during training of the custom acoustic * model. Specify a custom language model that has been trained with verbatim transcriptions of the audio resources or - * that contains words that are relevant to the contents of the audio resources. + * that contains words that are relevant to the contents of the audio resources. The custom language model must be + * based on the same version of the same base model as the custom acoustic model. The credentials specified with the + * request must own both custom models. * * @return the customLanguageModelId */ diff --git a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/UpgradeAcousticModelOptions.java b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/UpgradeAcousticModelOptions.java index 40ff4b29114..803425639b7 100644 --- a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/UpgradeAcousticModelOptions.java +++ b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/model/UpgradeAcousticModelOptions.java @@ -22,6 +22,7 @@ public class UpgradeAcousticModelOptions extends GenericModel { private String customizationId; private String customLanguageModelId; + private Boolean force; /** * Builder. @@ -29,10 +30,12 @@ public class UpgradeAcousticModelOptions extends GenericModel { public static class Builder { private String customizationId; private String customLanguageModelId; + private Boolean force; private Builder(UpgradeAcousticModelOptions upgradeAcousticModelOptions) { customizationId = upgradeAcousticModelOptions.customizationId; customLanguageModelId = upgradeAcousticModelOptions.customLanguageModelId; + force = upgradeAcousticModelOptions.force; } /** @@ -80,12 +83,24 @@ public Builder customLanguageModelId(String customLanguageModelId) { this.customLanguageModelId = customLanguageModelId; return this; } + + /** + * Set the force. + * + * @param force the force + * @return the UpgradeAcousticModelOptions builder + */ + public Builder force(Boolean force) { + this.force = force; + return this; + } } private UpgradeAcousticModelOptions(Builder builder) { Validator.notEmpty(builder.customizationId, "customizationId cannot be empty"); customizationId = builder.customizationId; customLanguageModelId = builder.customLanguageModelId; + force = builder.force; } /** @@ -113,11 +128,27 @@ public String customizationId() { * Gets the customLanguageModelId. * * If the custom acoustic model was trained with a custom language model, the customization ID (GUID) of that custom - * language model. The custom language model must be upgraded before the custom acoustic model can be upgraded. + * language model. The custom language model must be upgraded before the custom acoustic model can be upgraded. The + * credentials specified with the request must own both custom models. * * @return the customLanguageModelId */ public String customLanguageModelId() { return customLanguageModelId; } + + /** + * Gets the force. + * + * If `true`, forces the upgrade of a custom acoustic model for which no input data has been modified since it was + * last trained. Use this parameter only to force the upgrade of a custom acoustic model that is trained with a custom + * language model, and only if you receive a 400 response code and the message `No input data modified since last + * training`. See [Upgrading a custom acoustic + * model](https://cloud.ibm.com/docs/services/speech-to-text/custom-upgrade.html#upgradeAcoustic). + * + * @return the force + */ + public Boolean force() { + return force; + } } diff --git a/speech-to-text/src/test/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToTextTest.java b/speech-to-text/src/test/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToTextTest.java index 873941de2dd..a1052ea9abe 100755 --- a/speech-to-text/src/test/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToTextTest.java +++ b/speech-to-text/src/test/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToTextTest.java @@ -1202,12 +1202,17 @@ public void testUpgradeAcousticModel() throws InterruptedException { UpgradeAcousticModelOptions upgradeOptions = new UpgradeAcousticModelOptions.Builder() .customizationId(id) .customLanguageModelId(languageModelId) + .force(true) .build(); + upgradeOptions = upgradeOptions.newBuilder().build(); service.upgradeAcousticModel(upgradeOptions).execute(); final RecordedRequest request = server.takeRequest(); assertEquals("POST", request.getMethod()); - assertEquals(String.format(PATH_ACOUSTIC_UPGRADE, id) + "?custom_language_model_id=" + languageModelId, + assertEquals(String.format(PATH_ACOUSTIC_UPGRADE, id) + + "?custom_language_model_id=" + + languageModelId + + "&force=true", request.getPath()); } diff --git a/text-to-speech/README.md b/text-to-speech/README.md index 514cbdad6ee..974aab79eb8 100755 --- a/text-to-speech/README.md +++ b/text-to-speech/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud text-to-speech - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:text-to-speech:6.13.2' +'com.ibm.watson.developer_cloud:text-to-speech:6.14.0' ``` ## Usage diff --git a/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/BaseSynthesizeCallback.java b/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/BaseSynthesizeCallback.java index d675ca07b50..e17b86381f0 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/BaseSynthesizeCallback.java +++ b/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/BaseSynthesizeCallback.java @@ -13,7 +13,8 @@ public class BaseSynthesizeCallback implements SynthesizeCallback { * (non-Javadoc) * @see com.ibm.watson.developer_cloud.text_to_speech.v1.websocket.SynthesizeCallback#onConnected() */ - public void onConnected() { } + public void onConnected() { + } /* * (non-Javadoc) @@ -40,33 +41,38 @@ public void onWarning(Exception e) { * @see * com.ibm.watson.developer_cloud.text_to_speech.v1.websocket.SynthesizeCallback#onDisconnected() */ - public void onDisconnected() { } + public void onDisconnected() { + } /* * (non-Javadoc) * @see com.ibm.watson.developer_cloud.text_to_speech.v1.websocket.SynthesizeCallback#onContentType() */ @Override - public void onContentType(String contentType) { } + public void onContentType(String contentType) { + } /* * (non-Javadoc) * @see com.ibm.watson.developer_cloud.text_to_speech.v1.websocket.SynthesizeCallback#onTimings() */ @Override - public void onTimings(Timings timings) { } + public void onTimings(Timings timings) { + } /* * (non-Javadoc) * @see com.ibm.watson.developer_cloud.text_to_speech.v1.websocket.SynthesizeCallback#onMarks() */ @Override - public void onMarks(Marks marks) { } + public void onMarks(Marks marks) { + } /* * (non-Javadoc) * @see com.ibm.watson.developer_cloud.text_to_speech.v1.websocket.SynthesizeCallback#onAudioStream() */ @Override - public void onAudioStream(byte[] bytes) { } + public void onAudioStream(byte[] bytes) { + } } diff --git a/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/SynthesizeCallback.java b/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/SynthesizeCallback.java index 5d3d80e2040..db559f71ee6 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/SynthesizeCallback.java +++ b/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/SynthesizeCallback.java @@ -54,7 +54,7 @@ public interface SynthesizeCallback { * a result of synthesis. * * @param bytes array of bytes in the specified audio format or the default - * (audio/ogg;codecs=opus) + * (audio/ogg;codecs=opus) */ void onAudioStream(byte[] bytes); } diff --git a/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/TextToSpeechWebSocketListener.java b/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/TextToSpeechWebSocketListener.java index 6cc44367f2e..59ea025dd0b 100644 --- a/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/TextToSpeechWebSocketListener.java +++ b/text-to-speech/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/websocket/TextToSpeechWebSocketListener.java @@ -35,7 +35,6 @@ public class TextToSpeechWebSocketListener extends WebSocketListener { private static final String WORDS = "words"; private static final String MARKS = "marks"; - private final SynthesizeOptions options; private final SynthesizeCallback callback; private WebSocket socket; diff --git a/tone-analyzer/README.md b/tone-analyzer/README.md index 60a7e8cfcec..dc0e4100262 100755 --- a/tone-analyzer/README.md +++ b/tone-analyzer/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud tone-analyzer - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:tone-analyzer:6.13.2' +'com.ibm.watson.developer_cloud:tone-analyzer:6.14.0' ``` ## Usage diff --git a/visual-recognition/README.md b/visual-recognition/README.md index 732a88f60f9..d28010b322f 100644 --- a/visual-recognition/README.md +++ b/visual-recognition/README.md @@ -7,13 +7,13 @@ com.ibm.watson.developer_cloud visual-recognition - 6.13.2 + 6.14.0 ``` ##### Gradle ```gradle -'com.ibm.watson.developer_cloud:visual-recognition:6.13.2' +'com.ibm.watson.developer_cloud:visual-recognition:6.14.0' ``` ## Usage diff --git a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/VisualRecognition.java b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/VisualRecognition.java index 4dccfd5e489..e8a834a01a5 100644 --- a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/VisualRecognition.java +++ b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/VisualRecognition.java @@ -207,7 +207,8 @@ public ServiceCall classify() { * recognition. * * Supported image formats include .gif, .jpg, .png, and .tif. The maximum image size is 10 MB. The minimum - * recommended pixel density is 32X32 pixels per inch. + * recommended pixel density is 32X32 pixels, but the service tends to perform better with images that are at least + * 224 x 224 pixels. * * @param detectFacesOptions the {@link DetectFacesOptions} containing the options for the call * @return a {@link ServiceCall} with a response type of {@link DetectedFaces} @@ -256,7 +257,8 @@ public ServiceCall detectFaces(DetectFacesOptions detectFacesOpti * recognition. * * Supported image formats include .gif, .jpg, .png, and .tif. The maximum image size is 10 MB. The minimum - * recommended pixel density is 32X32 pixels per inch. + * recommended pixel density is 32X32 pixels, but the service tends to perform better with images that are at least + * 224 x 224 pixels. * * @return a {@link ServiceCall} with a response type of {@link DetectedFaces} */ @@ -374,9 +376,8 @@ public ServiceCall listClassifiers() { /** * Update a classifier. * - * Update a custom classifier by adding new positive or negative classes (examples) or by adding new images to - * existing classes. You must supply at least one set of positive or negative examples. For details, see [Updating - * custom + * Update a custom classifier by adding new positive or negative classes or by adding new images to existing classes. + * You must supply at least one set of positive or negative examples. For details, see [Updating custom * classifiers](https://cloud.ibm.com/docs/services/visual-recognition/customizing.html#updating-custom-classifiers). * * Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image file names, and classifier and class diff --git a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassResult.java b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassResult.java index 6e5bf4f9200..fbcd7a2dbf9 100644 --- a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassResult.java +++ b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassResult.java @@ -31,6 +31,11 @@ public class ClassResult extends GenericModel { * * Name of the class. * + * Class names are translated in the language defined by the **Accept-Language** request header for the build-in + * classifier IDs (`default`, `food`, and `explicit`). Class names of custom classifiers are not translated. The + * response might not be in the specified language when the requested language is not supported or when there is no + * translation for the class name. + * * @return the className */ public String getClassName() { diff --git a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/Classifier.java b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/Classifier.java index 4b1e234ae13..ae7fbbc3d74 100644 --- a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/Classifier.java +++ b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/Classifier.java @@ -75,8 +75,7 @@ public String getName() { /** * Gets the owner. * - * Unique ID of the account who owns the classifier. Returned when verbose=`true`. Might not be returned by some - * requests. + * Unique ID of the account who owns the classifier. Might not be returned by some requests. * * @return the owner */ @@ -142,8 +141,8 @@ public List getClasses() { /** * Gets the retrained. * - * Date and time in Coordinated Universal Time (UTC) that the classifier was updated. Returned when verbose=`true`. - * Might not be returned by some requests. Identical to `updated` and retained for backward compatibility. + * Date and time in Coordinated Universal Time (UTC) that the classifier was updated. Might not be returned by some + * requests. Identical to `updated` and retained for backward compatibility. * * @return the retrained */ @@ -155,7 +154,7 @@ public Date getRetrained() { * Gets the updated. * * Date and time in Coordinated Universal Time (UTC) that the classifier was most recently updated. The field matches - * either `retrained` or `created`. Returned when verbose=`true`. Might not be returned by some requests. + * either `retrained` or `created`. Might not be returned by some requests. * * @return the updated */ diff --git a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassifyOptions.java b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassifyOptions.java index c1ed490c7f0..f4d54d1cc0d 100644 --- a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassifyOptions.java +++ b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassifyOptions.java @@ -28,11 +28,7 @@ public class ClassifyOptions extends GenericModel { /** - * The language of the output class names. The full set of languages is supported for the built-in classifier IDs: - * `default`, `food`, and `explicit`. The class names of custom classifiers are not translated. - * - * The response might not be in the specified language when the requested language is not supported or when there is - * no translation for the class name. + * The desired language of parts of the response. See the response for details. */ public interface AcceptLanguage { /** en. */ @@ -283,9 +279,9 @@ public Builder newBuilder() { /** * Gets the imagesFile. * - * An image file (.jpg, .png) or .zip file with images. Maximum image size is 10 MB. Include no more than 20 images - * and limit the .zip file to 100 MB. Encode the image and .zip file names in UTF-8 if they contain non-ASCII - * characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters. + * An image file (.gif, .jpg, .png, .tif) or .zip file with images. Maximum image size is 10 MB. Include no more than + * 20 images and limit the .zip file to 100 MB. Encode the image and .zip file names in UTF-8 if they contain + * non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters. * * You can also include an image with the **url** parameter. * @@ -309,11 +305,7 @@ public String imagesFilename() { /** * Gets the acceptLanguage. * - * The language of the output class names. The full set of languages is supported for the built-in classifier IDs: - * `default`, `food`, and `explicit`. The class names of custom classifiers are not translated. - * - * The response might not be in the specified language when the requested language is not supported or when there is - * no translation for the class name. + * The desired language of parts of the response. See the response for details. * * @return the acceptLanguage */ @@ -324,8 +316,9 @@ public String acceptLanguage() { /** * Gets the url. * - * The URL of an image to analyze. Must be in .jpg, or .png format. The minimum recommended pixel density is 32X32 - * pixels per inch, and the maximum image size is 10 MB. + * The URL of an image (.gif, .jpg, .png, .tif) to analyze. The minimum recommended pixel density is 32X32 pixels, but + * the service tends to perform better with images that are at least 224 x 224 pixels. The maximum image size is 10 + * MB. * * You can also include images with the **images_file** parameter. * @@ -338,8 +331,8 @@ public String url() { /** * Gets the threshold. * - * The minimum score a class must have to be displayed in the response. Set the threshold to `0.0` to ignore the - * classification score and return all values. + * The minimum score a class must have to be displayed in the response. Set the threshold to `0.0` to return all + * identified classes. * * @return the threshold */ @@ -350,13 +343,13 @@ public Float threshold() { /** * Gets the owners. * - * The categories of classifiers to apply. Use `IBM` to classify against the `default` general classifier, and use - * `me` to classify against your custom classifiers. To analyze the image against both classifier categories, set the - * value to both `IBM` and `me`. - * - * The built-in `default` classifier is used if both **classifier_ids** and **owners** parameters are empty. - * - * The **classifier_ids** parameter overrides **owners**, so make sure that **classifier_ids** is empty. + * The categories of classifiers to apply. The **classifier_ids** parameter overrides **owners**, so make sure that + * **classifier_ids** is empty. + * - Use `IBM` to classify against the `default` general classifier. You get the same result if both + * **classifier_ids** and **owners** parameters are empty. + * - Use `me` to classify against all your custom classifiers. However, for better performance use **classifier_ids** + * to specify the specific custom classifiers to apply. + * - Use both `IBM` and `me` to analyze the image against both classifier categories. * * @return the owners */ diff --git a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/DetectFacesOptions.java b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/DetectFacesOptions.java index 77475ef6b50..73819b6aedb 100644 --- a/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/DetectFacesOptions.java +++ b/visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/DetectFacesOptions.java @@ -25,7 +25,7 @@ public class DetectFacesOptions extends GenericModel { /** - * The language used for the value of `gender_label` in the response. + * The desired language of parts of the response. See the response for details. */ public interface AcceptLanguage { /** en. */ @@ -228,8 +228,8 @@ public String imagesFilename() { * Gets the url. * * The URL of an image to analyze. Must be in .gif, .jpg, .png, or .tif format. The minimum recommended pixel density - * is 32X32 pixels per inch, and the maximum image size is 10 MB. Redirects are followed, so you can use a shortened - * URL. + * is 32X32 pixels, but the service tends to perform better with images that are at least 224 x 224 pixels. The + * maximum image size is 10 MB. Redirects are followed, so you can use a shortened URL. * * You can also include images with the **images_file** parameter. * @@ -242,7 +242,7 @@ public String url() { /** * Gets the acceptLanguage. * - * The language used for the value of `gender_label` in the response. + * The desired language of parts of the response. See the response for details. * * @return the acceptLanguage */