Skip to content

Commit 7efb5b8

Browse files
committed
refactor: Use better naming for reserved word vars
1 parent 8d9c314 commit 7efb5b8

File tree

17 files changed

+116
-116
lines changed

17 files changed

+116
-116
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,8 +1261,8 @@ public ServiceCall<QueryResponse> query(QueryOptions queryOptions) {
12611261
if (queryOptions.count() != null) {
12621262
contentJson.addProperty("count", queryOptions.count());
12631263
}
1264-
if (queryOptions.xreturn() != null) {
1265-
contentJson.addProperty("return", queryOptions.xreturn());
1264+
if (queryOptions.xReturn() != null) {
1265+
contentJson.addProperty("return", queryOptions.xReturn());
12661266
}
12671267
if (queryOptions.offset() != null) {
12681268
contentJson.addProperty("offset", queryOptions.offset());
@@ -1352,8 +1352,8 @@ public ServiceCall<QueryNoticesResponse> queryNotices(QueryNoticesOptions queryN
13521352
if (queryNoticesOptions.count() != null) {
13531353
builder.query("count", String.valueOf(queryNoticesOptions.count()));
13541354
}
1355-
if (queryNoticesOptions.xreturn() != null) {
1356-
builder.query("return", RequestUtils.join(queryNoticesOptions.xreturn(), ","));
1355+
if (queryNoticesOptions.xReturn() != null) {
1356+
builder.query("return", RequestUtils.join(queryNoticesOptions.xReturn(), ","));
13571357
}
13581358
if (queryNoticesOptions.offset() != null) {
13591359
builder.query("offset", String.valueOf(queryNoticesOptions.offset()));
@@ -1436,8 +1436,8 @@ public ServiceCall<QueryResponse> federatedQuery(FederatedQueryOptions federated
14361436
if (federatedQueryOptions.count() != null) {
14371437
contentJson.addProperty("count", federatedQueryOptions.count());
14381438
}
1439-
if (federatedQueryOptions.xreturn() != null) {
1440-
contentJson.addProperty("return", federatedQueryOptions.xreturn());
1439+
if (federatedQueryOptions.xReturn() != null) {
1440+
contentJson.addProperty("return", federatedQueryOptions.xReturn());
14411441
}
14421442
if (federatedQueryOptions.offset() != null) {
14431443
contentJson.addProperty("offset", federatedQueryOptions.offset());
@@ -1526,8 +1526,8 @@ public ServiceCall<QueryNoticesResponse> federatedQueryNotices(
15261526
if (federatedQueryNoticesOptions.count() != null) {
15271527
builder.query("count", String.valueOf(federatedQueryNoticesOptions.count()));
15281528
}
1529-
if (federatedQueryNoticesOptions.xreturn() != null) {
1530-
builder.query("return", RequestUtils.join(federatedQueryNoticesOptions.xreturn(), ","));
1529+
if (federatedQueryNoticesOptions.xReturn() != null) {
1530+
builder.query("return", RequestUtils.join(federatedQueryNoticesOptions.xReturn(), ","));
15311531
}
15321532
if (federatedQueryNoticesOptions.offset() != null) {
15331533
builder.query("offset", String.valueOf(federatedQueryNoticesOptions.offset()));

discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryNoticesOptions.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class FederatedQueryNoticesOptions extends GenericModel {
2929
private String naturalLanguageQuery;
3030
private String aggregation;
3131
private Long count;
32-
private List<String> xreturn;
32+
private List<String> xReturn;
3333
private Long offset;
3434
private List<String> sort;
3535
private Boolean highlight;
@@ -49,7 +49,7 @@ public static class Builder {
4949
private String naturalLanguageQuery;
5050
private String aggregation;
5151
private Long count;
52-
private List<String> xreturn;
52+
private List<String> xReturn;
5353
private Long offset;
5454
private List<String> sort;
5555
private Boolean highlight;
@@ -66,7 +66,7 @@ private Builder(FederatedQueryNoticesOptions federatedQueryNoticesOptions) {
6666
this.naturalLanguageQuery = federatedQueryNoticesOptions.naturalLanguageQuery;
6767
this.aggregation = federatedQueryNoticesOptions.aggregation;
6868
this.count = federatedQueryNoticesOptions.count;
69-
this.xreturn = federatedQueryNoticesOptions.xreturn;
69+
this.xReturn = federatedQueryNoticesOptions.xReturn;
7070
this.offset = federatedQueryNoticesOptions.offset;
7171
this.sort = federatedQueryNoticesOptions.sort;
7272
this.highlight = federatedQueryNoticesOptions.highlight;
@@ -119,18 +119,18 @@ public Builder addCollectionIds(String collectionIds) {
119119
}
120120

121121
/**
122-
* Adds an returnField to xreturn.
122+
* Adds an returnField to xReturn.
123123
*
124124
* @param returnField the new returnField
125125
* @return the FederatedQueryNoticesOptions builder
126126
*/
127127
public Builder addReturnField(String returnField) {
128128
com.ibm.cloud.sdk.core.util.Validator.notNull(returnField,
129129
"returnField cannot be null");
130-
if (this.xreturn == null) {
131-
this.xreturn = new ArrayList<String>();
130+
if (this.xReturn == null) {
131+
this.xReturn = new ArrayList<String>();
132132
}
133-
this.xreturn.add(returnField);
133+
this.xReturn.add(returnField);
134134
return this;
135135
}
136136

@@ -261,14 +261,14 @@ public Builder count(long count) {
261261
}
262262

263263
/**
264-
* Set the xreturn.
265-
* Existing xreturn will be replaced.
264+
* Set the xReturn.
265+
* Existing xReturn will be replaced.
266266
*
267-
* @param xreturn the xreturn
267+
* @param xReturn the xReturn
268268
* @return the FederatedQueryNoticesOptions builder
269269
*/
270-
public Builder xreturn(List<String> xreturn) {
271-
this.xreturn = xreturn;
270+
public Builder xReturn(List<String> xReturn) {
271+
this.xReturn = xReturn;
272272
return this;
273273
}
274274

@@ -365,7 +365,7 @@ private FederatedQueryNoticesOptions(Builder builder) {
365365
naturalLanguageQuery = builder.naturalLanguageQuery;
366366
aggregation = builder.aggregation;
367367
count = builder.count;
368-
xreturn = builder.xreturn;
368+
xReturn = builder.xReturn;
369369
offset = builder.offset;
370370
sort = builder.sort;
371371
highlight = builder.highlight;
@@ -467,14 +467,14 @@ public Long count() {
467467
}
468468

469469
/**
470-
* Gets the xreturn.
470+
* Gets the xReturn.
471471
*
472472
* A comma-separated list of the portion of the document hierarchy to return.
473473
*
474-
* @return the xreturn
474+
* @return the xReturn
475475
*/
476-
public List<String> xreturn() {
477-
return xreturn;
476+
public List<String> xReturn() {
477+
return xReturn;
478478
}
479479

480480
/**

discovery/src/main/java/com/ibm/watson/discovery/v1/model/FederatedQueryOptions.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class FederatedQueryOptions extends GenericModel {
2626
private Boolean passages;
2727
private String aggregation;
2828
private Long count;
29-
private String xreturn;
29+
private String xReturn;
3030
private Long offset;
3131
private String sort;
3232
private Boolean highlight;
@@ -53,7 +53,7 @@ public static class Builder {
5353
private Boolean passages;
5454
private String aggregation;
5555
private Long count;
56-
private String xreturn;
56+
private String xReturn;
5757
private Long offset;
5858
private String sort;
5959
private Boolean highlight;
@@ -77,7 +77,7 @@ private Builder(FederatedQueryOptions federatedQueryOptions) {
7777
this.passages = federatedQueryOptions.passages;
7878
this.aggregation = federatedQueryOptions.aggregation;
7979
this.count = federatedQueryOptions.count;
80-
this.xreturn = federatedQueryOptions.xreturn;
80+
this.xReturn = federatedQueryOptions.xReturn;
8181
this.offset = federatedQueryOptions.offset;
8282
this.sort = federatedQueryOptions.sort;
8383
this.highlight = federatedQueryOptions.highlight;
@@ -196,13 +196,13 @@ public Builder count(long count) {
196196
}
197197

198198
/**
199-
* Set the xreturn.
199+
* Set the xReturn.
200200
*
201-
* @param xreturn the xreturn
201+
* @param xReturn the xReturn
202202
* @return the FederatedQueryOptions builder
203203
*/
204-
public Builder xreturn(String xreturn) {
205-
this.xreturn = xreturn;
204+
public Builder xReturn(String xReturn) {
205+
this.xReturn = xReturn;
206206
return this;
207207
}
208208

@@ -371,7 +371,7 @@ private FederatedQueryOptions(Builder builder) {
371371
passages = builder.passages;
372372
aggregation = builder.aggregation;
373373
count = builder.count;
374-
xreturn = builder.xreturn;
374+
xReturn = builder.xReturn;
375375
offset = builder.offset;
376376
sort = builder.sort;
377377
highlight = builder.highlight;
@@ -479,14 +479,14 @@ public Long count() {
479479
}
480480

481481
/**
482-
* Gets the xreturn.
482+
* Gets the xReturn.
483483
*
484484
* A comma-separated list of the portion of the document hierarchy to return.
485485
*
486-
* @return the xreturn
486+
* @return the xReturn
487487
*/
488-
public String xreturn() {
489-
return xreturn;
488+
public String xReturn() {
489+
return xReturn;
490490
}
491491

492492
/**

discovery/src/main/java/com/ibm/watson/discovery/v1/model/Field.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ public interface Type {
3030
/** date. */
3131
String DATE = "date";
3232
/** long. */
33-
String XLONG = "long";
33+
String X_LONG = "long";
3434
/** integer. */
3535
String INTEGER = "integer";
3636
/** short. */
37-
String XSHORT = "short";
37+
String X_SHORT = "short";
3838
/** byte. */
39-
String XBYTE = "byte";
39+
String X_BYTE = "byte";
4040
/** double. */
41-
String XDOUBLE = "double";
41+
String X_DOUBLE = "double";
4242
/** float. */
43-
String XFLOAT = "float";
43+
String X_FLOAT = "float";
4444
/** boolean. */
45-
String XBOOLEAN = "boolean";
45+
String X_BOOLEAN = "boolean";
4646
/** binary. */
4747
String BINARY = "binary";
4848
}

discovery/src/main/java/com/ibm/watson/discovery/v1/model/QueryNoticesOptions.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class QueryNoticesOptions extends GenericModel {
3030
private Boolean passages;
3131
private String aggregation;
3232
private Long count;
33-
private List<String> xreturn;
33+
private List<String> xReturn;
3434
private Long offset;
3535
private List<String> sort;
3636
private Boolean highlight;
@@ -54,7 +54,7 @@ public static class Builder {
5454
private Boolean passages;
5555
private String aggregation;
5656
private Long count;
57-
private List<String> xreturn;
57+
private List<String> xReturn;
5858
private Long offset;
5959
private List<String> sort;
6060
private Boolean highlight;
@@ -75,7 +75,7 @@ private Builder(QueryNoticesOptions queryNoticesOptions) {
7575
this.passages = queryNoticesOptions.passages;
7676
this.aggregation = queryNoticesOptions.aggregation;
7777
this.count = queryNoticesOptions.count;
78-
this.xreturn = queryNoticesOptions.xreturn;
78+
this.xReturn = queryNoticesOptions.xReturn;
7979
this.offset = queryNoticesOptions.offset;
8080
this.sort = queryNoticesOptions.sort;
8181
this.highlight = queryNoticesOptions.highlight;
@@ -115,18 +115,18 @@ public QueryNoticesOptions build() {
115115
}
116116

117117
/**
118-
* Adds an returnField to xreturn.
118+
* Adds an returnField to xReturn.
119119
*
120120
* @param returnField the new returnField
121121
* @return the QueryNoticesOptions builder
122122
*/
123123
public Builder addReturnField(String returnField) {
124124
com.ibm.cloud.sdk.core.util.Validator.notNull(returnField,
125125
"returnField cannot be null");
126-
if (this.xreturn == null) {
127-
this.xreturn = new ArrayList<String>();
126+
if (this.xReturn == null) {
127+
this.xReturn = new ArrayList<String>();
128128
}
129-
this.xreturn.add(returnField);
129+
this.xReturn.add(returnField);
130130
return this;
131131
}
132132

@@ -283,14 +283,14 @@ public Builder count(long count) {
283283
}
284284

285285
/**
286-
* Set the xreturn.
287-
* Existing xreturn will be replaced.
286+
* Set the xReturn.
287+
* Existing xReturn will be replaced.
288288
*
289-
* @param xreturn the xreturn
289+
* @param xReturn the xReturn
290290
* @return the QueryNoticesOptions builder
291291
*/
292-
public Builder xreturn(List<String> xreturn) {
293-
this.xreturn = xreturn;
292+
public Builder xReturn(List<String> xReturn) {
293+
this.xReturn = xReturn;
294294
return this;
295295
}
296296

@@ -422,7 +422,7 @@ private QueryNoticesOptions(Builder builder) {
422422
passages = builder.passages;
423423
aggregation = builder.aggregation;
424424
count = builder.count;
425-
xreturn = builder.xreturn;
425+
xReturn = builder.xReturn;
426426
offset = builder.offset;
427427
sort = builder.sort;
428428
highlight = builder.highlight;
@@ -538,14 +538,14 @@ public Long count() {
538538
}
539539

540540
/**
541-
* Gets the xreturn.
541+
* Gets the xReturn.
542542
*
543543
* A comma-separated list of the portion of the document hierarchy to return.
544544
*
545-
* @return the xreturn
545+
* @return the xReturn
546546
*/
547-
public List<String> xreturn() {
548-
return xreturn;
547+
public List<String> xReturn() {
548+
return xReturn;
549549
}
550550

551551
/**

0 commit comments

Comments
 (0)