Skip to content

Commit aa2b2e3

Browse files
authored
Merge pull request #385 from watson-developer-cloud/7099-regenerate-sdk
Regenerate sdk
2 parents d1d6f88 + 9d1d344 commit aa2b2e3

File tree

48 files changed

+2142
-206
lines changed

Some content is hidden

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

48 files changed

+2142
-206
lines changed

src/IBM.Watson.Assistant.v1/AssistantService.cs

Lines changed: 337 additions & 0 deletions
Large diffs are not rendered by default.

src/IBM.Watson.Assistant.v1/Model/RuntimeEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ public class RuntimeEntity : DynamicModel<object>
3838
[JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)]
3939
public List<long?> Location { get; set; }
4040
/// <summary>
41-
/// The term in the input text that was recognized as an entity value.
41+
/// The entity value that was recognized in the user input.
4242
/// </summary>
4343
[JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
4444
public string Value { get; set; }
4545
/// <summary>
46-
/// A decimal percentage that represents Watson's confidence in the entity.
46+
/// A decimal percentage that represents Watson's confidence in the recognized entity.
4747
/// </summary>
4848
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
4949
public float? Confidence { get; set; }

src/IBM.Watson.Assistant.v2/AssistantService.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public AssistantService(IClient httpClient) : base(SERVICE_NAME, URL)
101101
{
102102
if (httpClient == null)
103103
throw new ArgumentNullException(nameof(httpClient));
104-
104+
105105
this.Client = httpClient;
106106
SkipAuthentication = true;
107107
}
@@ -130,6 +130,10 @@ public DetailedResponse<SessionResponse> CreateSession(string assistantId)
130130
{
131131
throw new ArgumentNullException("`assistantId` is required for `CreateSession`");
132132
}
133+
else
134+
{
135+
assistantId = Uri.EscapeDataString(assistantId);
136+
}
133137

134138
if (string.IsNullOrEmpty(VersionDate))
135139
{
@@ -185,10 +189,18 @@ public DetailedResponse<object> DeleteSession(string assistantId, string session
185189
{
186190
throw new ArgumentNullException("`assistantId` is required for `DeleteSession`");
187191
}
192+
else
193+
{
194+
assistantId = Uri.EscapeDataString(assistantId);
195+
}
188196
if (string.IsNullOrEmpty(sessionId))
189197
{
190198
throw new ArgumentNullException("`sessionId` is required for `DeleteSession`");
191199
}
200+
else
201+
{
202+
sessionId = Uri.EscapeDataString(sessionId);
203+
}
192204

193205
if (string.IsNullOrEmpty(VersionDate))
194206
{
@@ -247,10 +259,18 @@ public DetailedResponse<MessageResponse> Message(string assistantId, string sess
247259
{
248260
throw new ArgumentNullException("`assistantId` is required for `Message`");
249261
}
262+
else
263+
{
264+
assistantId = Uri.EscapeDataString(assistantId);
265+
}
250266
if (string.IsNullOrEmpty(sessionId))
251267
{
252268
throw new ArgumentNullException("`sessionId` is required for `Message`");
253269
}
270+
else
271+
{
272+
sessionId = Uri.EscapeDataString(sessionId);
273+
}
254274

255275
if (string.IsNullOrEmpty(VersionDate))
256276
{

src/IBM.Watson.Assistant.v2/Model/DialogRuntimeResponseGeneric.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ public class PreferenceEnumValue
151151
/// </summary>
152152
[JsonProperty("suggestions", NullValueHandling = NullValueHandling.Ignore)]
153153
public List<DialogSuggestion> Suggestions { get; set; }
154+
/// <summary>
155+
/// The title or introductory text to show before the response. This text is defined in the search skill
156+
/// configuration.
157+
/// </summary>
158+
[JsonProperty("header", NullValueHandling = NullValueHandling.Ignore)]
159+
public string Header { get; set; }
160+
/// <summary>
161+
/// An array of objects containing search results.
162+
/// </summary>
163+
[JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)]
164+
public List<SearchResult> Results { get; set; }
154165
}
155166

156167
}

src/IBM.Watson.Assistant.v2/Model/RuntimeEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
namespace IBM.Watson.Assistant.v2.Model
2222
{
2323
/// <summary>
24-
/// A term from the request that was identified as an entity.
24+
/// The entity value that was recognized in the user input.
2525
/// </summary>
2626
public class RuntimeEntity
2727
{
@@ -42,7 +42,7 @@ public class RuntimeEntity
4242
[JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
4343
public string Value { get; set; }
4444
/// <summary>
45-
/// A decimal percentage that represents Watson's confidence in the entity.
45+
/// A decimal percentage that represents Watson's confidence in the recognized entity.
4646
/// </summary>
4747
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
4848
public float? Confidence { get; set; }
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* (C) Copyright IBM Corp. 2018, 2019.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using Newtonsoft.Json;
19+
20+
namespace IBM.Watson.Assistant.v2.Model
21+
{
22+
/// <summary>
23+
/// SearchResult.
24+
/// </summary>
25+
public class SearchResult
26+
{
27+
/// <summary>
28+
/// The unique identifier of the document in the Discovery service collection.
29+
///
30+
/// This property is included in responses from search skills, which are a beta feature available only to Plus
31+
/// or Premium plan users.
32+
/// </summary>
33+
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
34+
public string Id { get; set; }
35+
/// <summary>
36+
/// An object containing search result metadata from the Discovery service.
37+
/// </summary>
38+
[JsonProperty("result_metadata", NullValueHandling = NullValueHandling.Ignore)]
39+
public SearchResultMetadata ResultMetadata { get; set; }
40+
/// <summary>
41+
/// A description of the search result. This is taken from an abstract, summary, or highlight field in the
42+
/// Discovery service response, as specified in the search skill configuration.
43+
/// </summary>
44+
[JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)]
45+
public string Body { get; set; }
46+
/// <summary>
47+
/// The title of the search result. This is taken from a title or name field in the Discovery service response,
48+
/// as specified in the search skill configuration.
49+
/// </summary>
50+
[JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)]
51+
public string Title { get; set; }
52+
/// <summary>
53+
/// The URL of the original data object in its native data source.
54+
/// </summary>
55+
[JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)]
56+
public string Url { get; set; }
57+
/// <summary>
58+
/// An object containing segments of text from search results with query-matching text highlighted using HTML
59+
/// <em> tags.
60+
/// </summary>
61+
[JsonProperty("highlight", NullValueHandling = NullValueHandling.Ignore)]
62+
public SearchResultHighlight Highlight { get; set; }
63+
}
64+
65+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* (C) Copyright IBM Corp. 2018, 2019.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using System.Collections.Generic;
19+
using IBM.Cloud.SDK.Core.Model;
20+
using Newtonsoft.Json;
21+
22+
namespace IBM.Watson.Assistant.v2.Model
23+
{
24+
/// <summary>
25+
/// An object containing segments of text from search results with query-matching text highlighted using HTML <em>
26+
/// tags.
27+
/// </summary>
28+
public class SearchResultHighlight : DynamicModel<List<string>>
29+
{
30+
/// <summary>
31+
/// An array of strings containing segments taken from body text in the search results, with query-matching
32+
/// substrings highlighted.
33+
/// </summary>
34+
[JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)]
35+
public List<string> Body { get; set; }
36+
/// <summary>
37+
/// An array of strings containing segments taken from title text in the search results, with query-matching
38+
/// substrings highlighted.
39+
/// </summary>
40+
[JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)]
41+
public List<string> Title { get; set; }
42+
/// <summary>
43+
/// An array of strings containing segments taken from URLs in the search results, with query-matching
44+
/// substrings highlighted.
45+
/// </summary>
46+
[JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)]
47+
public List<string> Url { get; set; }
48+
}
49+
50+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* (C) Copyright IBM Corp. 2018, 2019.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using Newtonsoft.Json;
19+
20+
namespace IBM.Watson.Assistant.v2.Model
21+
{
22+
/// <summary>
23+
/// An object containing search result metadata from the Discovery service.
24+
/// </summary>
25+
public class SearchResultMetadata
26+
{
27+
/// <summary>
28+
/// The confidence score for the given result. For more information about how the confidence is calculated, see
29+
/// the Discovery service [documentation](../discovery#query-your-collection).
30+
/// </summary>
31+
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
32+
public double? Confidence { get; set; }
33+
/// <summary>
34+
/// An unbounded measure of the relevance of a particular result, dependent on the query and matching document.
35+
/// A higher score indicates a greater match to the query parameters.
36+
/// </summary>
37+
[JsonProperty("score", NullValueHandling = NullValueHandling.Ignore)]
38+
public double? Score { get; set; }
39+
}
40+
41+
}

src/IBM.Watson.CompareComply.v1/CompareComplyService.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,22 @@ public string VersionDate
4646

4747
public CompareComplyService() : base(SERVICE_NAME) { }
4848

49+
[Obsolete("Please use CompareComplyService(string versionDate, IAuthenticatorConfig config) instead")]
50+
public CompareComplyService(string userName, string password, string versionDate) : base(SERVICE_NAME, URL)
51+
{
52+
if (string.IsNullOrEmpty(userName))
53+
throw new ArgumentNullException(nameof(userName));
54+
55+
if (string.IsNullOrEmpty(password))
56+
throw new ArgumentNullException(nameof(password));
57+
58+
this.SetCredential(userName, password);
59+
if (string.IsNullOrEmpty(versionDate))
60+
throw new ArgumentNullException("versionDate cannot be null.");
61+
62+
VersionDate = versionDate;
63+
}
64+
4965
[Obsolete("Please use CompareComplyService(string versionDate, IAuthenticatorConfig config) instead")]
5066
public CompareComplyService(TokenOptions options, string versionDate) : base(SERVICE_NAME, URL)
5167
{
@@ -637,6 +653,10 @@ public DetailedResponse<GetFeedback> GetFeedback(string feedbackId, string model
637653
{
638654
throw new ArgumentNullException("`feedbackId` is required for `GetFeedback`");
639655
}
656+
else
657+
{
658+
feedbackId = Uri.EscapeDataString(feedbackId);
659+
}
640660

641661
if (string.IsNullOrEmpty(VersionDate))
642662
{
@@ -694,6 +714,10 @@ public DetailedResponse<FeedbackDeleted> DeleteFeedback(string feedbackId, strin
694714
{
695715
throw new ArgumentNullException("`feedbackId` is required for `DeleteFeedback`");
696716
}
717+
else
718+
{
719+
feedbackId = Uri.EscapeDataString(feedbackId);
720+
}
697721

698722
if (string.IsNullOrEmpty(VersionDate))
699723
{
@@ -943,6 +967,10 @@ public DetailedResponse<BatchStatus> GetBatch(string batchId)
943967
{
944968
throw new ArgumentNullException("`batchId` is required for `GetBatch`");
945969
}
970+
else
971+
{
972+
batchId = Uri.EscapeDataString(batchId);
973+
}
946974

947975
if (string.IsNullOrEmpty(VersionDate))
948976
{
@@ -998,6 +1026,10 @@ public DetailedResponse<BatchStatus> UpdateBatch(string batchId, string action,
9981026
{
9991027
throw new ArgumentNullException("`batchId` is required for `UpdateBatch`");
10001028
}
1029+
else
1030+
{
1031+
batchId = Uri.EscapeDataString(batchId);
1032+
}
10011033
if (string.IsNullOrEmpty(action))
10021034
{
10031035
throw new ArgumentNullException("`action` is required for `UpdateBatch`");

src/IBM.Watson.CompareComply.v1/Model/Attribute.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ public class TypeEnumValue
3838
/// </summary>
3939
public const string DATETIME = "DateTime";
4040
/// <summary>
41+
/// Constant DEFINEDTERM for DefinedTerm
42+
/// </summary>
43+
public const string DEFINEDTERM = "DefinedTerm";
44+
/// <summary>
4145
/// Constant DURATION for Duration
4246
/// </summary>
4347
public const string DURATION = "Duration";
@@ -46,6 +50,10 @@ public class TypeEnumValue
4650
/// </summary>
4751
public const string LOCATION = "Location";
4852
/// <summary>
53+
/// Constant NUMBER for Number
54+
/// </summary>
55+
public const string NUMBER = "Number";
56+
/// <summary>
4957
/// Constant ORGANIZATION for Organization
5058
/// </summary>
5159
public const string ORGANIZATION = "Organization";

0 commit comments

Comments
 (0)