Skip to content

Commit 06381dd

Browse files
authored
Merge pull request #273 from watson-developer-cloud/5094-regenerate-sdk
Regenerate SDK with new Discovery and Assistant features
2 parents f07a624 + 88b6fb6 commit 06381dd

File tree

82 files changed

+2944
-176
lines changed

Some content is hidden

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

82 files changed

+2944
-176
lines changed

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

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ public Example GetExample(string workspaceId, string intent, string text, bool?
908908
/// <summary>
909909
/// List user input examples.
910910
///
911-
/// List the user input examples for an intent.
911+
/// List the user input examples for an intent, optionally including contextual entity mentions.
912912
///
913913
/// This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate limiting**.
914914
/// </summary>
@@ -1628,6 +1628,67 @@ public Entity UpdateEntity(string workspaceId, string entity, UpdateEntity prope
16281628
return result;
16291629
}
16301630
/// <summary>
1631+
/// List entity mentions.
1632+
///
1633+
/// List mentions for a contextual entity. An entity mention is an occurrence of a contextual entity in the
1634+
/// context of an intent user input example.
1635+
///
1636+
/// This operation is limited to 200 requests per 30 minutes. For more information, see **Rate limiting**.
1637+
/// </summary>
1638+
/// <param name="workspaceId">Unique identifier of the workspace.</param>
1639+
/// <param name="entity">The name of the entity.</param>
1640+
/// <param name="export">Whether to include all element content in the returned data. If **export**=`false`, the
1641+
/// returned data includes only information about the element itself. If **export**=`true`, all content,
1642+
/// including subelements, is included. (optional, default to false)</param>
1643+
/// <param name="includeAudit">Whether to include the audit properties (`created` and `updated` timestamps) in
1644+
/// the response. (optional, default to false)</param>
1645+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
1646+
/// <returns><see cref="EntityMentionCollection" />EntityMentionCollection</returns>
1647+
public EntityMentionCollection ListMentions(string workspaceId, string entity, bool? export = null, bool? includeAudit = null, Dictionary<string, object> customData = null)
1648+
{
1649+
if (string.IsNullOrEmpty(workspaceId))
1650+
throw new ArgumentNullException(nameof(workspaceId));
1651+
if (string.IsNullOrEmpty(entity))
1652+
throw new ArgumentNullException(nameof(entity));
1653+
1654+
if(string.IsNullOrEmpty(VersionDate))
1655+
throw new ArgumentNullException("versionDate cannot be null.");
1656+
1657+
EntityMentionCollection result = null;
1658+
1659+
try
1660+
{
1661+
IClient client;
1662+
if(_tokenManager == null)
1663+
{
1664+
client = this.Client.WithAuthentication(this.UserName, this.Password);
1665+
}
1666+
else
1667+
{
1668+
client = this.Client.WithAuthentication(_tokenManager.GetToken());
1669+
}
1670+
var restRequest = client.GetAsync($"{this.Endpoint}/v1/workspaces/{workspaceId}/entities/{entity}/mentions");
1671+
1672+
restRequest.WithArgument("version", VersionDate);
1673+
if (export != null)
1674+
restRequest.WithArgument("export", export);
1675+
if (includeAudit != null)
1676+
restRequest.WithArgument("include_audit", includeAudit);
1677+
if (customData != null)
1678+
restRequest.WithCustomData(customData);
1679+
result = restRequest.As<EntityMentionCollection>().Result;
1680+
if(result == null)
1681+
result = new EntityMentionCollection();
1682+
result.CustomData = restRequest.CustomData;
1683+
}
1684+
catch(AggregateException ae)
1685+
{
1686+
throw ae.Flatten();
1687+
}
1688+
1689+
return result;
1690+
}
1691+
/// <summary>
16311692
/// Add entity value.
16321693
///
16331694
/// Create a new value for an entity.

src/IBM.WatsonDeveloperCloud.Assistant.v1/IAssistantService.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public partial interface IAssistantService
254254
/// <summary>
255255
/// List user input examples.
256256
///
257-
/// List the user input examples for an intent.
257+
/// List the user input examples for an intent, optionally including contextual entity mentions.
258258
///
259259
/// This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate limiting**.
260260
/// </summary>
@@ -450,6 +450,24 @@ public partial interface IAssistantService
450450
/// <returns><see cref="Entity" />Entity</returns>
451451
Entity UpdateEntity(string workspaceId, string entity, UpdateEntity properties, Dictionary<string, object> customData = null);
452452
/// <summary>
453+
/// List entity mentions.
454+
///
455+
/// List mentions for a contextual entity. An entity mention is an occurrence of a contextual entity in the
456+
/// context of an intent user input example.
457+
///
458+
/// This operation is limited to 200 requests per 30 minutes. For more information, see **Rate limiting**.
459+
/// </summary>
460+
/// <param name="workspaceId">Unique identifier of the workspace.</param>
461+
/// <param name="entity">The name of the entity.</param>
462+
/// <param name="export">Whether to include all element content in the returned data. If **export**=`false`, the
463+
/// returned data includes only information about the element itself. If **export**=`true`, all content,
464+
/// including subelements, is included. (optional, default to false)</param>
465+
/// <param name="includeAudit">Whether to include the audit properties (`created` and `updated` timestamps) in
466+
/// the response. (optional, default to false)</param>
467+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
468+
/// <returns><see cref="EntityMentionCollection" />EntityMentionCollection</returns>
469+
EntityMentionCollection ListMentions(string workspaceId, string entity, bool? export = null, bool? includeAudit = null, Dictionary<string, object> customData = null);
470+
/// <summary>
453471
/// Add entity value.
454472
///
455473
/// Create a new value for an entity.

src/IBM.WatsonDeveloperCloud.Assistant.v1/Model/CreateDialogNode.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public enum DigressOutSlotsEnum
323323
/// [documentation](https://console.bluemix.net/docs/services/conversation/dialog-overview.html#complex).
324324
/// </value>
325325
[JsonProperty("output", NullValueHandling = NullValueHandling.Ignore)]
326-
public object Output { get; set; }
326+
public dynamic Output { get; set; }
327327
/// <summary>
328328
/// The context for the dialog node.
329329
/// </summary>
@@ -376,6 +376,14 @@ public enum DigressOutSlotsEnum
376376
/// </value>
377377
[JsonProperty("variable", NullValueHandling = NullValueHandling.Ignore)]
378378
public string Variable { get; set; }
379+
/// <summary>
380+
/// A label that can be displayed externally to describe the purpose of the node to users.
381+
/// </summary>
382+
/// <value>
383+
/// A label that can be displayed externally to describe the purpose of the node to users.
384+
/// </value>
385+
[JsonProperty("user_label", NullValueHandling = NullValueHandling.Ignore)]
386+
public string UserLabel { get; set; }
379387
}
380388

381389
}

src/IBM.WatsonDeveloperCloud.Assistant.v1/Model/CreateExample.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717

18+
using System.Collections.Generic;
1819
using Newtonsoft.Json;
1920

2021
namespace IBM.WatsonDeveloperCloud.Assistant.v1.Model
@@ -38,6 +39,14 @@ public class CreateExample : BaseModel
3839
/// </value>
3940
[JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)]
4041
public string Text { get; set; }
42+
/// <summary>
43+
/// An array of contextual entity mentions.
44+
/// </summary>
45+
/// <value>
46+
/// An array of contextual entity mentions.
47+
/// </value>
48+
[JsonProperty("mentions", NullValueHandling = NullValueHandling.Ignore)]
49+
public List<Mentions> Mentions { get; set; }
4150
}
4251

4352
}

src/IBM.WatsonDeveloperCloud.Assistant.v1/Model/CreateWorkspace.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ public class CreateWorkspace : BaseModel
103103
/// </value>
104104
[JsonProperty("learning_opt_out", NullValueHandling = NullValueHandling.Ignore)]
105105
public bool? LearningOptOut { get; set; }
106+
/// <summary>
107+
/// Global settings for the workspace.
108+
/// </summary>
109+
/// <value>
110+
/// Global settings for the workspace.
111+
/// </value>
112+
[JsonProperty("system_settings", NullValueHandling = NullValueHandling.Ignore)]
113+
public WorkspaceSystemSettings SystemSettings { get; set; }
106114
}
107115

108116
}

src/IBM.WatsonDeveloperCloud.Assistant.v1/Model/DialogNode.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,15 @@ public enum DigressOutSlotsEnum
310310
[JsonProperty("previous_sibling", NullValueHandling = NullValueHandling.Ignore)]
311311
public string PreviousSibling { get; set; }
312312
/// <summary>
313-
/// The output of the dialog node.
313+
/// The output of the dialog node. For more information about how to specify dialog node output, see the
314+
/// [documentation](https://console.bluemix.net/docs/services/conversation/dialog-overview.html#complex).
314315
/// </summary>
315316
/// <value>
316-
/// The output of the dialog node.
317+
/// The output of the dialog node. For more information about how to specify dialog node output, see the
318+
/// [documentation](https://console.bluemix.net/docs/services/conversation/dialog-overview.html#complex).
317319
/// </value>
318320
[JsonProperty("output", NullValueHandling = NullValueHandling.Ignore)]
319-
public object Output { get; set; }
321+
public DialogNodeOutput Output { get; set; }
320322
/// <summary>
321323
/// The context (if defined) for the dialog node.
322324
/// </summary>
@@ -381,6 +383,14 @@ public enum DigressOutSlotsEnum
381383
/// </value>
382384
[JsonProperty("variable", NullValueHandling = NullValueHandling.Ignore)]
383385
public string Variable { get; set; }
386+
/// <summary>
387+
/// A label that can be displayed externally to describe the purpose of the node to users.
388+
/// </summary>
389+
/// <value>
390+
/// A label that can be displayed externally to describe the purpose of the node to users.
391+
/// </value>
392+
[JsonProperty("user_label", NullValueHandling = NullValueHandling.Ignore)]
393+
public string UserLabel { get; set; }
384394
}
385395

386396
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
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 Newtonsoft.Json;
20+
21+
namespace IBM.WatsonDeveloperCloud.Assistant.v1.Model
22+
{
23+
/// <summary>
24+
/// The output of the dialog node. For more information about how to specify dialog node output, see the
25+
/// [documentation](https://console.bluemix.net/docs/services/conversation/dialog-overview.html#complex).
26+
/// </summary>
27+
public class DialogNodeOutput : BaseModel
28+
{
29+
/// <summary>
30+
/// An array of objects describing the output defined for the dialog node.
31+
/// </summary>
32+
/// <value>
33+
/// An array of objects describing the output defined for the dialog node.
34+
/// </value>
35+
[JsonProperty("generic", NullValueHandling = NullValueHandling.Ignore)]
36+
public dynamic Generic { get; set; }
37+
/// <summary>
38+
/// Options that modify how specified output is handled.
39+
/// </summary>
40+
/// <value>
41+
/// Options that modify how specified output is handled.
42+
/// </value>
43+
[JsonProperty("modifiers", NullValueHandling = NullValueHandling.Ignore)]
44+
public dynamic Modifiers { get; set; }
45+
}
46+
47+
}

0 commit comments

Comments
 (0)