Skip to content

Commit f07990e

Browse files
Merge pull request #881 from watson-developer-cloud/codegen/natural-language-understanding
[Natural Language Understanding] Add newest generated code and update tests
2 parents 3b2efbd + d8729fb commit f07990e

34 files changed

+19
-1238
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ public class NaturalLanguageUnderstanding extends WatsonService {
7878

7979
private String versionDate;
8080

81-
/** The Constant VERSION_DATE_2017_02_27. */
82-
public static final String VERSION_DATE_2017_02_27 = "2017-02-27";
83-
8481
/**
8582
* Instantiates a new `NaturalLanguageUnderstanding`.
8683
*
@@ -93,8 +90,7 @@ public NaturalLanguageUnderstanding(String versionDate) {
9390
setEndPoint(URL);
9491
}
9592

96-
Validator.isTrue((versionDate != null) && !versionDate.isEmpty(),
97-
"'version cannot be null. Use " + VERSION_DATE_2017_02_27);
93+
Validator.isTrue((versionDate != null) && !versionDate.isEmpty(), "version cannot be null.");
9894

9995
this.versionDate = versionDate;
10096
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/AnalysisResults.java

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -181,121 +181,4 @@ public List<SemanticRolesResult> getSemanticRoles() {
181181
public SentimentResult getSentiment() {
182182
return sentiment;
183183
}
184-
185-
/**
186-
* Sets the language.
187-
*
188-
* @param language the new language
189-
*/
190-
public void setLanguage(final String language) {
191-
this.language = language;
192-
}
193-
194-
/**
195-
* Sets the analyzedText.
196-
*
197-
* @param analyzedText the new analyzedText
198-
*/
199-
public void setAnalyzedText(final String analyzedText) {
200-
this.analyzedText = analyzedText;
201-
}
202-
203-
/**
204-
* Sets the retrievedUrl.
205-
*
206-
* @param retrievedUrl the new retrievedUrl
207-
*/
208-
public void setRetrievedUrl(final String retrievedUrl) {
209-
this.retrievedUrl = retrievedUrl;
210-
}
211-
212-
/**
213-
* Sets the usage.
214-
*
215-
* @param usage the new usage
216-
*/
217-
public void setUsage(final Usage usage) {
218-
this.usage = usage;
219-
}
220-
221-
/**
222-
* Sets the concepts.
223-
*
224-
* @param concepts the new concepts
225-
*/
226-
public void setConcepts(final List<ConceptsResult> concepts) {
227-
this.concepts = concepts;
228-
}
229-
230-
/**
231-
* Sets the entities.
232-
*
233-
* @param entities the new entities
234-
*/
235-
public void setEntities(final List<EntitiesResult> entities) {
236-
this.entities = entities;
237-
}
238-
239-
/**
240-
* Sets the keywords.
241-
*
242-
* @param keywords the new keywords
243-
*/
244-
public void setKeywords(final List<KeywordsResult> keywords) {
245-
this.keywords = keywords;
246-
}
247-
248-
/**
249-
* Sets the categories.
250-
*
251-
* @param categories the new categories
252-
*/
253-
public void setCategories(final List<CategoriesResult> categories) {
254-
this.categories = categories;
255-
}
256-
257-
/**
258-
* Sets the emotion.
259-
*
260-
* @param emotion the new emotion
261-
*/
262-
public void setEmotion(final EmotionResult emotion) {
263-
this.emotion = emotion;
264-
}
265-
266-
/**
267-
* Sets the metadata.
268-
*
269-
* @param metadata the new metadata
270-
*/
271-
public void setMetadata(final MetadataResult metadata) {
272-
this.metadata = metadata;
273-
}
274-
275-
/**
276-
* Sets the relations.
277-
*
278-
* @param relations the new relations
279-
*/
280-
public void setRelations(final List<RelationsResult> relations) {
281-
this.relations = relations;
282-
}
283-
284-
/**
285-
* Sets the semanticRoles.
286-
*
287-
* @param semanticRoles the new semanticRoles
288-
*/
289-
public void setSemanticRoles(final List<SemanticRolesResult> semanticRoles) {
290-
this.semanticRoles = semanticRoles;
291-
}
292-
293-
/**
294-
* Sets the sentiment.
295-
*
296-
* @param sentiment the new sentiment
297-
*/
298-
public void setSentiment(final SentimentResult sentiment) {
299-
this.sentiment = sentiment;
300-
}
301184
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/Author.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,4 @@ public class Author extends GenericModel {
3131
public String getName() {
3232
return name;
3333
}
34-
35-
/**
36-
* Sets the name.
37-
*
38-
* @param name the new name
39-
*/
40-
public void setName(final String name) {
41-
this.name = name;
42-
}
4334
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/CategoriesResult.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,4 @@ public String getLabel() {
4343
public Double getScore() {
4444
return score;
4545
}
46-
47-
/**
48-
* Sets the label.
49-
*
50-
* @param label the new label
51-
*/
52-
public void setLabel(final String label) {
53-
this.label = label;
54-
}
55-
56-
/**
57-
* Sets the score.
58-
*
59-
* @param score the new score
60-
*/
61-
public void setScore(final Double score) {
62-
this.score = score;
63-
}
6446
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/ConceptsResult.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,4 @@ public Double getRelevance() {
5757
public String getDbpediaResource() {
5858
return dbpediaResource;
5959
}
60-
61-
/**
62-
* Sets the text.
63-
*
64-
* @param text the new text
65-
*/
66-
public void setText(final String text) {
67-
this.text = text;
68-
}
69-
70-
/**
71-
* Sets the relevance.
72-
*
73-
* @param relevance the new relevance
74-
*/
75-
public void setRelevance(final Double relevance) {
76-
this.relevance = relevance;
77-
}
78-
79-
/**
80-
* Sets the dbpediaResource.
81-
*
82-
* @param dbpediaResource the new dbpediaResource
83-
*/
84-
public void setDbpediaResource(final String dbpediaResource) {
85-
this.dbpediaResource = dbpediaResource;
86-
}
8760
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/DisambiguationResult.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -59,31 +59,4 @@ public String getDbpediaResource() {
5959
public List<String> getSubtype() {
6060
return subtype;
6161
}
62-
63-
/**
64-
* Sets the name.
65-
*
66-
* @param name the new name
67-
*/
68-
public void setName(final String name) {
69-
this.name = name;
70-
}
71-
72-
/**
73-
* Sets the dbpediaResource.
74-
*
75-
* @param dbpediaResource the new dbpediaResource
76-
*/
77-
public void setDbpediaResource(final String dbpediaResource) {
78-
this.dbpediaResource = dbpediaResource;
79-
}
80-
81-
/**
82-
* Sets the subtype.
83-
*
84-
* @param subtype the new subtype
85-
*/
86-
public void setSubtype(final List<String> subtype) {
87-
this.subtype = subtype;
88-
}
8962
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/DocumentEmotionResults.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,4 @@ public class DocumentEmotionResults extends GenericModel {
3131
public EmotionScores getEmotion() {
3232
return emotion;
3333
}
34-
35-
/**
36-
* Sets the emotion.
37-
*
38-
* @param emotion the new emotion
39-
*/
40-
public void setEmotion(final EmotionScores emotion) {
41-
this.emotion = emotion;
42-
}
4334
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/DocumentSentimentResults.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,4 @@ public String getLabel() {
4343
public Double getScore() {
4444
return score;
4545
}
46-
47-
/**
48-
* Sets the label.
49-
*
50-
* @param label the new label
51-
*/
52-
public void setLabel(final String label) {
53-
this.label = label;
54-
}
55-
56-
/**
57-
* Sets the score.
58-
*
59-
* @param score the new score
60-
*/
61-
public void setScore(final Double score) {
62-
this.score = score;
63-
}
6446
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/EmotionResult.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,4 @@ public DocumentEmotionResults getDocument() {
4646
public List<TargetedEmotionResults> getTargets() {
4747
return targets;
4848
}
49-
50-
/**
51-
* Sets the document.
52-
*
53-
* @param document the new document
54-
*/
55-
public void setDocument(final DocumentEmotionResults document) {
56-
this.document = document;
57-
}
58-
59-
/**
60-
* Sets the targets.
61-
*
62-
* @param targets the new targets
63-
*/
64-
public void setTargets(final List<TargetedEmotionResults> targets) {
65-
this.targets = targets;
66-
}
6749
}

natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/EmotionScores.java

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -79,49 +79,4 @@ public Double getJoy() {
7979
public Double getSadness() {
8080
return sadness;
8181
}
82-
83-
/**
84-
* Sets the anger.
85-
*
86-
* @param anger the new anger
87-
*/
88-
public void setAnger(final Double anger) {
89-
this.anger = anger;
90-
}
91-
92-
/**
93-
* Sets the disgust.
94-
*
95-
* @param disgust the new disgust
96-
*/
97-
public void setDisgust(final Double disgust) {
98-
this.disgust = disgust;
99-
}
100-
101-
/**
102-
* Sets the fear.
103-
*
104-
* @param fear the new fear
105-
*/
106-
public void setFear(final Double fear) {
107-
this.fear = fear;
108-
}
109-
110-
/**
111-
* Sets the joy.
112-
*
113-
* @param joy the new joy
114-
*/
115-
public void setJoy(final Double joy) {
116-
this.joy = joy;
117-
}
118-
119-
/**
120-
* Sets the sadness.
121-
*
122-
* @param sadness the new sadness
123-
*/
124-
public void setSadness(final Double sadness) {
125-
this.sadness = sadness;
126-
}
12782
}

0 commit comments

Comments
 (0)