Skip to content

Commit f192628

Browse files
authored
Merge pull request #948 from watson-developer-cloud/develop
Release v6.0.0
2 parents 9f8d2cf + 11f5917 commit f192628

File tree

74 files changed

+879
-1033
lines changed

Some content is hidden

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

74 files changed

+879
-1033
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ docs
1919
.swagger-codegen-ignore
2020
.vscode/
2121
conversation/src/test/java/com/ibm/watson/developer_cloud/conversation/v1/ConversationTest.java
22+
.swagger-codegen/VERSION

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ service.setUsernameAndPassword("<username>", "<password>");
155155

156156
### API Key
157157

158-
_Note: This version of instantiation only works with Visual Recognition, as it's the only service that uses an API key rather than a username and password._
158+
_Important: Instantiation with API key works only with Visual Recognition service instances created before May 23, 2018. Visual Recognition instances created after May 22 use IAM._
159159

160160
```java
161161
// in the constructor
@@ -180,7 +180,7 @@ When authenticating with IAM, you have the option of passing in:
180180
// in the constructor, letting the SDK manage the IAM token
181181
IamOptions options = new IamOptions.Builder()
182182
.apiKey("<iam_api_key>")
183-
.url("<iam_url>") // optional - the default value is https://iam.ng.bluemix.net/identity/token
183+
.url("<iam_url>") // optional - the default value is https://iam.bluemix.net/identity/token
184184
.build();
185185
Discovery service = new Discovery("2017-11-07", options);
186186
```

assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/Assistant.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,11 @@ public Assistant(String versionDate, String username, String password) {
132132
}
133133

134134
/**
135-
* Instantiates a new `Assistant` with IAM. Note that if the access token is specified in the iamOptions,
136-
* you accept responsibility for managing the access token yourself. You must set a new access token before this one
137-
* expires. Failing to do so will result in authentication errors after this token expires.
135+
* Instantiates a new `Assistant` with IAM. Note that if the access token is specified in the
136+
* iamOptions, you accept responsibility for managing the access token yourself. You must set a new access token
137+
* before this
138+
* one expires or after receiving a 401 error from the service. Failing to do so will result in authentication errors
139+
* after this token expires.
138140
*
139141
* @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
140142
* calls from failing when the service introduces breaking changes.
Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017 IBM Corp. All Rights Reserved.
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -12,49 +12,24 @@
1212
*/
1313
package com.ibm.watson.developer_cloud.assistant.v1.model;
1414

15-
import com.google.gson.annotations.JsonAdapter;
1615
import com.google.gson.annotations.SerializedName;
17-
import com.ibm.watson.developer_cloud.assistant.v1.model.util.LogPaginationTypeAdapter;
1816
import com.ibm.watson.developer_cloud.service.model.GenericModel;
1917

2018
/**
2119
* The pagination data for the returned objects.
2220
*/
23-
@JsonAdapter(LogPaginationTypeAdapter.class)
2421
public class LogPagination extends GenericModel {
2522

2623
@SerializedName("next_url")
2724
private String nextUrl;
2825
private Long matched;
29-
30-
/**
31-
* A token identifying the last value from the previous page of results.
32-
*/
33-
private String cursor;
34-
35-
/**
36-
* Gets the cursor.
37-
* A token identifying the last value from the previous page of results.
38-
*
39-
* @return the cursor
40-
*/
41-
public String getCursor() {
42-
return cursor;
43-
}
44-
45-
/**
46-
* Sets the cursor.
47-
*
48-
* @param cursor the new cursor
49-
*/
50-
public void setCursor(String cursor) {
51-
this.cursor = cursor;
52-
}
26+
@SerializedName("next_cursor")
27+
private String nextCursor;
5328

5429
/**
5530
* Gets the nextUrl.
5631
*
57-
* The URL that will return the next page of results.
32+
* The URL that will return the next page of results, if any.
5833
*
5934
* @return the nextUrl
6035
*/
@@ -74,20 +49,13 @@ public Long getMatched() {
7449
}
7550

7651
/**
77-
* Sets the nextUrl.
52+
* Gets the nextCursor.
7853
*
79-
* @param nextUrl the new nextUrl
80-
*/
81-
public void setNextUrl(final String nextUrl) {
82-
this.nextUrl = nextUrl;
83-
}
84-
85-
/**
86-
* Sets the matched.
54+
* A token identifying the next page of results.
8755
*
88-
* @param matched the new matched
56+
* @return the nextCursor
8957
*/
90-
public void setMatched(final long matched) {
91-
this.matched = matched;
58+
public String getNextCursor() {
59+
return nextCursor;
9260
}
9361
}
Lines changed: 15 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017 IBM Corp. All Rights Reserved.
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -12,15 +12,12 @@
1212
*/
1313
package com.ibm.watson.developer_cloud.assistant.v1.model;
1414

15-
import com.google.gson.annotations.JsonAdapter;
1615
import com.google.gson.annotations.SerializedName;
17-
import com.ibm.watson.developer_cloud.assistant.v1.model.util.PaginationTypeAdapter;
1816
import com.ibm.watson.developer_cloud.service.model.GenericModel;
1917

2018
/**
2119
* The pagination data for the returned objects.
2220
*/
23-
@JsonAdapter(PaginationTypeAdapter.class)
2421
public class Pagination extends GenericModel {
2522

2623
@SerializedName("refresh_url")
@@ -29,30 +26,10 @@ public class Pagination extends GenericModel {
2926
private String nextUrl;
3027
private Long total;
3128
private Long matched;
32-
33-
/**
34-
* A token identifying the last value from the previous page of results.
35-
*/
36-
private String cursor;
37-
38-
/**
39-
* Gets the cursor.
40-
* A token identifying the last value from the previous page of results.
41-
*
42-
* @return the cursor
43-
*/
44-
public String getCursor() {
45-
return cursor;
46-
}
47-
48-
/**
49-
* Sets the cursor.
50-
*
51-
* @param cursor the new cursor
52-
*/
53-
public void setCursor(String cursor) {
54-
this.cursor = cursor;
55-
}
29+
@SerializedName("refresh_cursor")
30+
private String refreshCursor;
31+
@SerializedName("next_cursor")
32+
private String nextCursor;
5633

5734
/**
5835
* Gets the refreshUrl.
@@ -99,38 +76,24 @@ public Long getMatched() {
9976
}
10077

10178
/**
102-
* Sets the refreshUrl.
79+
* Gets the refreshCursor.
10380
*
104-
* @param refreshUrl the new refreshUrl
105-
*/
106-
public void setRefreshUrl(final String refreshUrl) {
107-
this.refreshUrl = refreshUrl;
108-
}
109-
110-
/**
111-
* Sets the nextUrl.
81+
* A token identifying the current page of results.
11282
*
113-
* @param nextUrl the new nextUrl
83+
* @return the refreshCursor
11484
*/
115-
public void setNextUrl(final String nextUrl) {
116-
this.nextUrl = nextUrl;
85+
public String getRefreshCursor() {
86+
return refreshCursor;
11787
}
11888

11989
/**
120-
* Sets the total.
90+
* Gets the nextCursor.
12191
*
122-
* @param total the new total
123-
*/
124-
public void setTotal(final long total) {
125-
this.total = total;
126-
}
127-
128-
/**
129-
* Sets the matched.
92+
* A token identifying the next page of results.
13093
*
131-
* @param matched the new matched
94+
* @return the nextCursor
13295
*/
133-
public void setMatched(final long matched) {
134-
this.matched = matched;
96+
public String getNextCursor() {
97+
return nextCursor;
13598
}
13699
}

assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/model/util/LogPaginationTypeAdapter.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/model/util/PaginationTypeAdapter.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)