Skip to content

Commit 4333c7c

Browse files
authored
Merge pull request #828 from watson-developer-cloud/dynamic-property-fix
Add generated code using API spec as of 12/5/17
2 parents cd35984 + 026b716 commit 4333c7c

File tree

129 files changed

+4057
-729
lines changed

Some content is hidden

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

129 files changed

+4057
-729
lines changed

discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/Discovery.java

Lines changed: 205 additions & 223 deletions
Large diffs are not rendered by default.

discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/AddDocumentOptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public Builder file(File file) throws FileNotFoundException {
162162
private AddDocumentOptions(Builder builder) {
163163
Validator.notEmpty(builder.environmentId, "environmentId cannot be empty");
164164
Validator.notEmpty(builder.collectionId, "collectionId cannot be empty");
165-
Validator.isTrue((builder.file == null) || (builder.filename != null),
165+
Validator.isTrue((builder.file == null) || (builder.filename != null),
166166
"filename cannot be null if file is not null.");
167167
environmentId = builder.environmentId;
168168
collectionId = builder.collectionId;
@@ -230,8 +230,8 @@ public String filename() {
230230
* Gets the metadata.
231231
*
232232
* If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata
233-
* that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1
234-
* MB are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```.
233+
* that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB
234+
* are rejected. Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```
235235
*
236236
* @return the metadata
237237
*/

discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/Collection.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public String getDescription() {
8787
/**
8888
* Gets the created.
8989
*
90-
* The creation date of the collection in the format yyyy-MM-dd'T'HH:mmcon:ss.SSS'Z'.
90+
* The creation date of the collection in the format yyyy-MM-dd'T'HH:mmcon:ss.SSS'Z'
9191
*
9292
* @return the created
9393
*/
@@ -98,7 +98,7 @@ public Date getCreated() {
9898
/**
9999
* Gets the updated.
100100
*
101-
* The timestamp of when the collection was last updated in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
101+
* The timestamp of when the collection was last updated in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
102102
*
103103
* @return the updated
104104
*/
@@ -131,8 +131,8 @@ public String getConfigurationId() {
131131
/**
132132
* Gets the language.
133133
*
134-
* The language of the documents stored in the collection. Permitted values include `en_us` (U.S. English),
135-
* `de` (German), and `es` (Spanish).
134+
* The language of the documents stored in the collection. Permitted values include `en_us` (U.S. English), `de`
135+
* (German), and `es` (Spanish).
136136
*
137137
* @return the language
138138
*/
@@ -143,8 +143,8 @@ public String getLanguage() {
143143
/**
144144
* Gets the documentCounts.
145145
*
146-
* The object providing information about the documents in the collection. Present only when retrieving details of
147-
* a collection.
146+
* The object providing information about the documents in the collection. Present only when retrieving details of a
147+
* collection.
148148
*
149149
* @return the documentCounts
150150
*/
@@ -155,8 +155,8 @@ public DocumentCounts getDocumentCounts() {
155155
/**
156156
* Gets the diskUsage.
157157
*
158-
* The object providing information about the disk usage of the collection. Present only when retrieving details of
159-
* a collection.
158+
* The object providing information about the disk usage of the collection. Present only when retrieving details of a
159+
* collection.
160160
*
161161
* @return the diskUsage
162162
*/

discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/CollectionUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class CollectionUsage extends GenericModel {
2727
/**
2828
* Gets the available.
2929
*
30-
* Number of active collections in the environment.
30+
* Number of active collections in the environment
3131
*
3232
* @return the available
3333
*/
@@ -38,7 +38,7 @@ public Long getAvailable() {
3838
/**
3939
* Gets the maximumAllowed.
4040
*
41-
* Total number of collections allowed in the environment.
41+
* Total number of collections allowed in the environment
4242
*
4343
* @return the maximumAllowed
4444
*/

discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/Configuration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class Configuration extends GenericModel {
3636
/**
3737
* Gets the configurationId.
3838
*
39-
* The unique identifier of the configuration.
39+
* The unique identifier of the configuration
4040
*
4141
* @return the configurationId
4242
*/
@@ -58,7 +58,7 @@ public String getName() {
5858
/**
5959
* Gets the created.
6060
*
61-
* The creation date of the configuration in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
61+
* The creation date of the configuration in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
6262
*
6363
* @return the created
6464
*/
@@ -69,7 +69,7 @@ public Date getCreated() {
6969
/**
7070
* Gets the updated.
7171
*
72-
* The timestamp of when the configuration was last updated in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
72+
* The timestamp of when the configuration was last updated in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
7373
*
7474
* @return the updated
7575
*/
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/*
2+
* Copyright 2017 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.developer_cloud.discovery.v1.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.watson.developer_cloud.service.model.GenericModel;
17+
18+
/**
19+
* CreateCollectionRequest.
20+
*/
21+
public class CreateCollectionRequest extends GenericModel {
22+
23+
/**
24+
* The language of the documents stored in the collection, in the form of an ISO 639-1 language code.
25+
*/
26+
public interface Language {
27+
/** en. */
28+
String EN = "en";
29+
/** es. */
30+
String ES = "es";
31+
/** de. */
32+
String DE = "de";
33+
/** ar. */
34+
String AR = "ar";
35+
/** fr. */
36+
String FR = "fr";
37+
/** it. */
38+
String IT = "it";
39+
/** ja. */
40+
String JA = "ja";
41+
/** ko. */
42+
String KO = "ko";
43+
/** pt-br. */
44+
String PT_BR = "pt-br";
45+
}
46+
47+
private String name;
48+
private String description;
49+
@SerializedName("configuration_id")
50+
private String configurationId;
51+
private String language;
52+
53+
/**
54+
* Gets the name.
55+
*
56+
* The name of the collection to be created.
57+
*
58+
* @return the name
59+
*/
60+
public String getName() {
61+
return name;
62+
}
63+
64+
/**
65+
* Gets the description.
66+
*
67+
* A description of the collection.
68+
*
69+
* @return the description
70+
*/
71+
public String getDescription() {
72+
return description;
73+
}
74+
75+
/**
76+
* Gets the configurationId.
77+
*
78+
* The ID of the configuration in which the collection is to be created.
79+
*
80+
* @return the configurationId
81+
*/
82+
public String getConfigurationId() {
83+
return configurationId;
84+
}
85+
86+
/**
87+
* Gets the language.
88+
*
89+
* The language of the documents stored in the collection, in the form of an ISO 639-1 language code.
90+
*
91+
* @return the language
92+
*/
93+
public String getLanguage() {
94+
return language;
95+
}
96+
97+
/**
98+
* Sets the name.
99+
*
100+
* @param name the new name
101+
*/
102+
public void setName(final String name) {
103+
this.name = name;
104+
}
105+
106+
/**
107+
* Sets the description.
108+
*
109+
* @param description the new description
110+
*/
111+
public void setDescription(final String description) {
112+
this.description = description;
113+
}
114+
115+
/**
116+
* Sets the configurationId.
117+
*
118+
* @param configurationId the new configurationId
119+
*/
120+
public void setConfigurationId(final String configurationId) {
121+
this.configurationId = configurationId;
122+
}
123+
124+
/**
125+
* Sets the language.
126+
*
127+
* @param language the new language
128+
*/
129+
public void setLanguage(final String language) {
130+
this.language = language;
131+
}
132+
}

discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/model/CreateConfigurationOptions.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,32 +75,32 @@ public CreateConfigurationOptions build() {
7575
}
7676

7777
/**
78-
* Adds an enrichment to enrichments.
78+
* Adds an enrichments to enrichments.
7979
*
80-
* @param enrichment the new enrichment
80+
* @param enrichments the new enrichments
8181
* @return the CreateConfigurationOptions builder
8282
*/
83-
public Builder addEnrichment(Enrichment enrichment) {
84-
Validator.notNull(enrichment, "enrichment cannot be null");
83+
public Builder addEnrichments(Enrichment enrichments) {
84+
Validator.notNull(enrichments, "enrichments cannot be null");
8585
if (this.enrichments == null) {
8686
this.enrichments = new ArrayList<Enrichment>();
8787
}
88-
this.enrichments.add(enrichment);
88+
this.enrichments.add(enrichments);
8989
return this;
9090
}
9191

9292
/**
93-
* Adds an normalization to normalizations.
93+
* Adds an normalizations to normalizations.
9494
*
95-
* @param normalization the new normalization
95+
* @param normalizations the new normalizations
9696
* @return the CreateConfigurationOptions builder
9797
*/
98-
public Builder addNormalization(NormalizationOperation normalization) {
99-
Validator.notNull(normalization, "normalization cannot be null");
98+
public Builder addNormalizations(NormalizationOperation normalizations) {
99+
Validator.notNull(normalizations, "normalizations cannot be null");
100100
if (this.normalizations == null) {
101101
this.normalizations = new ArrayList<NormalizationOperation>();
102102
}
103-
this.normalizations.add(normalization);
103+
this.normalizations.add(normalizations);
104104
return this;
105105
}
106106

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* Copyright 2017 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.developer_cloud.discovery.v1.model;
14+
15+
import com.ibm.watson.developer_cloud.service.model.GenericModel;
16+
17+
/**
18+
* CreateEnvironmentRequest.
19+
*/
20+
public class CreateEnvironmentRequest extends GenericModel {
21+
22+
private String name;
23+
private String description;
24+
private Long size;
25+
26+
/**
27+
* Gets the name.
28+
*
29+
* Name that identifies the environment.
30+
*
31+
* @return the name
32+
*/
33+
public String getName() {
34+
return name;
35+
}
36+
37+
/**
38+
* Gets the description.
39+
*
40+
* Description of the environment.
41+
*
42+
* @return the description
43+
*/
44+
public String getDescription() {
45+
return description;
46+
}
47+
48+
/**
49+
* Gets the size.
50+
*
51+
* **Deprecated**: Size of the environment.
52+
*
53+
* @return the size
54+
*/
55+
public Long getSize() {
56+
return size;
57+
}
58+
59+
/**
60+
* Sets the name.
61+
*
62+
* @param name the new name
63+
*/
64+
public void setName(final String name) {
65+
this.name = name;
66+
}
67+
68+
/**
69+
* Sets the description.
70+
*
71+
* @param description the new description
72+
*/
73+
public void setDescription(final String description) {
74+
this.description = description;
75+
}
76+
77+
/**
78+
* Sets the size.
79+
*
80+
* @param size the new size
81+
*/
82+
public void setSize(final long size) {
83+
this.size = size;
84+
}
85+
}

0 commit comments

Comments
 (0)