Skip to content

Commit ac51578

Browse files
committed
feat(natural-language-understanding-v1): generated using api def 5b4cdff & gen 3.31.0
1 parent a6c708f commit ac51578

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.ibm.watson.natural_language_understanding.v1.model.AnalysisResults;
3131
import com.ibm.watson.natural_language_understanding.v1.model.AnalyzeOptions;
3232
import com.ibm.watson.natural_language_understanding.v1.model.CategoriesModel;
33+
import com.ibm.watson.natural_language_understanding.v1.model.CategoriesModelList;
3334
import com.ibm.watson.natural_language_understanding.v1.model.ClassificationsModel;
3435
import com.ibm.watson.natural_language_understanding.v1.model.CreateCategoriesModelOptions;
3536
import com.ibm.watson.natural_language_understanding.v1.model.CreateClassificationsModelOptions;
@@ -43,7 +44,6 @@
4344
import com.ibm.watson.natural_language_understanding.v1.model.GetClassificationsModelOptions;
4445
import com.ibm.watson.natural_language_understanding.v1.model.GetSentimentModelOptions;
4546
import com.ibm.watson.natural_language_understanding.v1.model.ListCategoriesModelsOptions;
46-
import com.ibm.watson.natural_language_understanding.v1.model.ListCategoriesModelsResponse;
4747
import com.ibm.watson.natural_language_understanding.v1.model.ListClassificationsModelsOptions;
4848
import com.ibm.watson.natural_language_understanding.v1.model.ListClassificationsModelsResponse;
4949
import com.ibm.watson.natural_language_understanding.v1.model.ListModelsOptions;
@@ -569,9 +569,9 @@ public ServiceCall<CategoriesModel> createCategoriesModel(
569569
*
570570
* @param listCategoriesModelsOptions the {@link ListCategoriesModelsOptions} containing the
571571
* options for the call
572-
* @return a {@link ServiceCall} with a result of type {@link ListCategoriesModelsResponse}
572+
* @return a {@link ServiceCall} with a result of type {@link CategoriesModelList}
573573
*/
574-
public ServiceCall<ListCategoriesModelsResponse> listCategoriesModels(
574+
public ServiceCall<CategoriesModelList> listCategoriesModels(
575575
ListCategoriesModelsOptions listCategoriesModelsOptions) {
576576
RequestBuilder builder =
577577
RequestBuilder.get(
@@ -583,9 +583,9 @@ public ServiceCall<ListCategoriesModelsResponse> listCategoriesModels(
583583
}
584584
builder.header("Accept", "application/json");
585585
builder.query("version", String.valueOf(this.version));
586-
ResponseConverter<ListCategoriesModelsResponse> responseConverter =
586+
ResponseConverter<CategoriesModelList> responseConverter =
587587
ResponseConverterUtils.getValue(
588-
new com.google.gson.reflect.TypeToken<ListCategoriesModelsResponse>() {}.getType());
588+
new com.google.gson.reflect.TypeToken<CategoriesModelList>() {}.getType());
589589
return createServiceCall(builder.build(), responseConverter);
590590
}
591591

@@ -594,9 +594,9 @@ public ServiceCall<ListCategoriesModelsResponse> listCategoriesModels(
594594
*
595595
* <p>(Beta) Returns all custom categories models associated with this service instance.
596596
*
597-
* @return a {@link ServiceCall} with a result of type {@link ListCategoriesModelsResponse}
597+
* @return a {@link ServiceCall} with a result of type {@link CategoriesModelList}
598598
*/
599-
public ServiceCall<ListCategoriesModelsResponse> listCategoriesModels() {
599+
public ServiceCall<CategoriesModelList> listCategoriesModels() {
600600
return listCategoriesModels(null);
601601
}
602602

natural-language-understanding/src/test/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstandingTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.ibm.watson.natural_language_understanding.v1.model.AnalysisResults;
2222
import com.ibm.watson.natural_language_understanding.v1.model.AnalyzeOptions;
2323
import com.ibm.watson.natural_language_understanding.v1.model.CategoriesModel;
24+
import com.ibm.watson.natural_language_understanding.v1.model.CategoriesModelList;
2425
import com.ibm.watson.natural_language_understanding.v1.model.CategoriesOptions;
2526
import com.ibm.watson.natural_language_understanding.v1.model.ClassificationsModel;
2627
import com.ibm.watson.natural_language_understanding.v1.model.ClassificationsOptions;
@@ -41,7 +42,6 @@
4142
import com.ibm.watson.natural_language_understanding.v1.model.GetSentimentModelOptions;
4243
import com.ibm.watson.natural_language_understanding.v1.model.KeywordsOptions;
4344
import com.ibm.watson.natural_language_understanding.v1.model.ListCategoriesModelsOptions;
44-
import com.ibm.watson.natural_language_understanding.v1.model.ListCategoriesModelsResponse;
4545
import com.ibm.watson.natural_language_understanding.v1.model.ListClassificationsModelsOptions;
4646
import com.ibm.watson.natural_language_understanding.v1.model.ListClassificationsModelsResponse;
4747
import com.ibm.watson.natural_language_understanding.v1.model.ListModelsOptions;
@@ -705,7 +705,7 @@ public void testCreateCategoriesModelNoOptions() throws Throwable {
705705
public void testListCategoriesModelsWOptions() throws Throwable {
706706
// Schedule some responses.
707707
String mockResponseBody =
708-
"{\"models\": [{\"models\": [{\"name\": \"name\", \"user_metadata\": {\"mapKey\": {\"anyKey\": \"anyValue\"}}, \"language\": \"language\", \"description\": \"description\", \"model_version\": \"modelVersion\", \"workspace_id\": \"workspaceId\", \"version_description\": \"versionDescription\", \"features\": [\"features\"], \"status\": \"starting\", \"model_id\": \"modelId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"notices\": [{\"message\": \"message\"}], \"last_trained\": \"2019-01-01T12:00:00.000Z\", \"last_deployed\": \"2019-01-01T12:00:00.000Z\"}]}]}";
708+
"{\"models\": [{\"name\": \"name\", \"user_metadata\": {\"mapKey\": {\"anyKey\": \"anyValue\"}}, \"language\": \"language\", \"description\": \"description\", \"model_version\": \"modelVersion\", \"workspace_id\": \"workspaceId\", \"version_description\": \"versionDescription\", \"features\": [\"features\"], \"status\": \"starting\", \"model_id\": \"modelId\", \"created\": \"2019-01-01T12:00:00.000Z\", \"notices\": [{\"message\": \"message\"}], \"last_trained\": \"2019-01-01T12:00:00.000Z\", \"last_deployed\": \"2019-01-01T12:00:00.000Z\"}]}";
709709
String listCategoriesModelsPath = "/v1/models/categories";
710710

711711
server.enqueue(
@@ -721,12 +721,12 @@ public void testListCategoriesModelsWOptions() throws Throwable {
721721
new ListCategoriesModelsOptions();
722722

723723
// Invoke operation with valid options model (positive test)
724-
Response<ListCategoriesModelsResponse> response =
724+
Response<CategoriesModelList> response =
725725
naturalLanguageUnderstandingService
726726
.listCategoriesModels(listCategoriesModelsOptionsModel)
727727
.execute();
728728
assertNotNull(response);
729-
ListCategoriesModelsResponse responseObj = response.getResult();
729+
CategoriesModelList responseObj = response.getResult();
730730
assertNotNull(responseObj);
731731

732732
// Verify the contents of the request

0 commit comments

Comments
 (0)