Skip to content

Commit

Permalink
feat(assistant-v2): generated using api-def: master & generator: 3.46.0
Browse files Browse the repository at this point in the history
MessageContext: integrations property added, MessageContextGlobalSystem: skipUserInput property
added, MessageContextStateless: integrations property added, MessageInput: attachments property
added, MessageInputStateless: attachments property added, MessageOutputDebug: BREAKING nodesVisited
type DialogNodesVisited changed to DialogNodeVisited, RuntimeEntity: BREAKING optional metadata
property removed, RuntimeResponseGeneric: Three new response types added

BREAKING CHANGE: MessageOutputDebug: BREAKING nodesVisited type DialogNodesVisited changed to
DialogNodeVisited, RuntimeEntity: BREAKING optional metadata property removed
  • Loading branch information
kevinkowa committed Mar 17, 2022
1 parent c42505f commit d0d6ca2
Show file tree
Hide file tree
Showing 18 changed files with 435 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IBM.Cloud.SDK.Core" Version="1.2.0" />
<PackageReference Include="IBM.Cloud.SDK.Core" Version="1.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/IBM.Watson.Assistant.v2/IBM.Watson.Assistant.v2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="IBM.Cloud.SDK.Core" Version="1.2.0" />
<PackageReference Include="IBM.Watson.Common" Version="5.3.0" />
<PackageReference Include="IBM.Cloud.SDK.Core" Version="1.3.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="JsonSubTypes" Version="1.6.0" />
</ItemGroup>
Expand Down
45 changes: 45 additions & 0 deletions src/IBM.Watson.Assistant.v2/Model/DialogNodeVisited.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

using Newtonsoft.Json;

namespace IBM.Watson.Assistant.v2.Model
{
/// <summary>
/// An objects containing detailed diagnostic information about a dialog node that was triggered during processing
/// of the input message.
/// </summary>
public class DialogNodeVisited
{
/// <summary>
/// A dialog node that was triggered during processing of the input message.
/// </summary>
[JsonProperty("dialog_node", NullValueHandling = NullValueHandling.Ignore)]
public string DialogNode { get; set; }
/// <summary>
/// The title of the dialog node.
/// </summary>
[JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)]
public string Title { get; set; }
/// <summary>
/// The conditions that trigger the dialog node.
/// </summary>
[JsonProperty("conditions", NullValueHandling = NullValueHandling.Ignore)]
public string Conditions { get; set; }
}

}
10 changes: 8 additions & 2 deletions src/IBM.Watson.Assistant.v2/Model/MessageContext.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@ namespace IBM.Watson.Assistant.v2.Model
public class MessageContext
{
/// <summary>
/// Session context data that is shared by all skills used by the Assistant.
/// Session context data that is shared by all skills used by the assistant.
/// </summary>
[JsonProperty("global", NullValueHandling = NullValueHandling.Ignore)]
public MessageContextGlobal Global { get; set; }
Expand All @@ -38,6 +38,12 @@ public class MessageContext
/// </summary>
[JsonProperty("skills", NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, MessageContextSkill> Skills { get; set; }
/// <summary>
/// An object containing context data that is specific to particular integrations. For more information, see the
/// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
/// </summary>
[JsonProperty("integrations", NullValueHandling = NullValueHandling.Ignore)]
public object Integrations { get; set; }
}

}
4 changes: 2 additions & 2 deletions src/IBM.Watson.Assistant.v2/Model/MessageContextGlobal.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@
namespace IBM.Watson.Assistant.v2.Model
{
/// <summary>
/// Session context data that is shared by all skills used by the Assistant.
/// Session context data that is shared by all skills used by the assistant.
/// </summary>
public class MessageContextGlobal
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@
namespace IBM.Watson.Assistant.v2.Model
{
/// <summary>
/// Session context data that is shared by all skills used by the Assistant.
/// Session context data that is shared by all skills used by the assistant.
/// </summary>
public class MessageContextGlobalStateless
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -162,6 +162,11 @@ public class LocaleEnumValue
/// </summary>
[JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)]
public string State { get; set; }
/// <summary>
/// For internal use only.
/// </summary>
[JsonProperty("skip_user_input", NullValueHandling = NullValueHandling.Ignore)]
public bool? SkipUserInput { get; set; }
}

}
4 changes: 2 additions & 2 deletions src/IBM.Watson.Assistant.v2/Model/MessageContextSkill.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,7 @@
namespace IBM.Watson.Assistant.v2.Model
{
/// <summary>
/// Contains information specific to a particular skill used by the Assistant. The property name must be the same as
/// Contains information specific to a particular skill used by the assistant. The property name must be the same as
/// the name of the skill (for example, `main skill`).
/// </summary>
public class MessageContextSkill
Expand Down
10 changes: 8 additions & 2 deletions src/IBM.Watson.Assistant.v2/Model/MessageContextStateless.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@ namespace IBM.Watson.Assistant.v2.Model
public class MessageContextStateless
{
/// <summary>
/// Session context data that is shared by all skills used by the Assistant.
/// Session context data that is shared by all skills used by the assistant.
/// </summary>
[JsonProperty("global", NullValueHandling = NullValueHandling.Ignore)]
public MessageContextGlobalStateless Global { get; set; }
Expand All @@ -38,6 +38,12 @@ public class MessageContextStateless
/// </summary>
[JsonProperty("skills", NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, MessageContextSkill> Skills { get; set; }
/// <summary>
/// An object containing context data that is specific to particular integrations. For more information, see the
/// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
/// </summary>
[JsonProperty("integrations", NullValueHandling = NullValueHandling.Ignore)]
public object Integrations { get; set; }
}

}
10 changes: 9 additions & 1 deletion src/IBM.Watson.Assistant.v2/Model/MessageInput.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,6 +80,14 @@ public class MessageTypeEnumValue
[JsonProperty("suggestion_id", NullValueHandling = NullValueHandling.Ignore)]
public string SuggestionId { get; set; }
/// <summary>
/// An array of multimedia attachments to be sent with the message.
///
/// **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by
/// webhooks.
/// </summary>
[JsonProperty("attachments", NullValueHandling = NullValueHandling.Ignore)]
public List<MessageInputAttachment> Attachments { get; set; }
/// <summary>
/// Optional properties that control how the assistant responds.
/// </summary>
[JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)]
Expand Down
39 changes: 39 additions & 0 deletions src/IBM.Watson.Assistant.v2/Model/MessageInputAttachment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

using Newtonsoft.Json;

namespace IBM.Watson.Assistant.v2.Model
{
/// <summary>
/// A reference to a media file to be sent as an attachment with the message.
/// </summary>
public class MessageInputAttachment
{
/// <summary>
/// The URL of the media file.
/// </summary>
[JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)]
public string Url { get; set; }
/// <summary>
/// The media content type (such as a MIME type) of the attachment.
/// </summary>
[JsonProperty("media_type", NullValueHandling = NullValueHandling.Ignore)]
public string MediaType { get; set; }
}

}
10 changes: 9 additions & 1 deletion src/IBM.Watson.Assistant.v2/Model/MessageInputStateless.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2020, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,6 +80,14 @@ public class MessageTypeEnumValue
[JsonProperty("suggestion_id", NullValueHandling = NullValueHandling.Ignore)]
public string SuggestionId { get; set; }
/// <summary>
/// An array of multimedia attachments to be sent with the message.
///
/// **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by
/// webhooks.
/// </summary>
[JsonProperty("attachments", NullValueHandling = NullValueHandling.Ignore)]
public List<MessageInputAttachment> Attachments { get; set; }
/// <summary>
/// Optional properties that control how the assistant responds.
/// </summary>
[JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)]
Expand Down
10 changes: 5 additions & 5 deletions src/IBM.Watson.Assistant.v2/Model/MessageOutputDebug.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2019.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@ namespace IBM.Watson.Assistant.v2.Model
public class MessageOutputDebug
{
/// <summary>
/// When `branch_exited` is set to `true` by the Assistant, the `branch_exited_reason` specifies whether the
/// When `branch_exited` is set to `true` by the assistant, the `branch_exited_reason` specifies whether the
/// dialog completed by itself or got interrupted.
/// </summary>
public class BranchExitedReasonEnumValue
Expand All @@ -43,18 +43,18 @@ public class BranchExitedReasonEnumValue
}

/// <summary>
/// When `branch_exited` is set to `true` by the Assistant, the `branch_exited_reason` specifies whether the
/// When `branch_exited` is set to `true` by the assistant, the `branch_exited_reason` specifies whether the
/// dialog completed by itself or got interrupted.
/// Constants for possible values can be found using MessageOutputDebug.BranchExitedReasonEnumValue
/// </summary>
[JsonProperty("branch_exited_reason", NullValueHandling = NullValueHandling.Ignore)]
public string BranchExitedReason { get; set; }
/// <summary>
/// An array of objects containing detailed diagnostic information about the nodes that were triggered during
/// An array of objects containing detailed diagnostic information about dialog nodes that were triggered during
/// processing of the input message.
/// </summary>
[JsonProperty("nodes_visited", NullValueHandling = NullValueHandling.Ignore)]
public List<DialogNodesVisited> NodesVisited { get; set; }
public List<DialogNodeVisited> NodesVisited { get; set; }
/// <summary>
/// An array of up to 50 messages logged with the request.
/// </summary>
Expand Down
10 changes: 1 addition & 9 deletions src/IBM.Watson.Assistant.v2/Model/RuntimeEntity.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,14 +47,6 @@ public class RuntimeEntity
[JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)]
public float? Confidence { get; set; }
/// <summary>
/// **Deprecated.** Any metadata for the entity.
///
/// Beginning with the `2021-06-14` API version, the `metadata` property is no longer returned. For information
/// about system entities recognized in the user input, see the `interpretation` property.
/// </summary>
[JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, object> Metadata { get; set; }
/// <summary>
/// The recognized capture groups for the entity, as defined by the entity pattern.
/// </summary>
[JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)]
Expand Down
21 changes: 20 additions & 1 deletion src/IBM.Watson.Assistant.v2/Model/RuntimeResponseGeneric.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,17 +33,23 @@ namespace IBM.Watson.Assistant.v2.Model
/// - RuntimeResponseGenericRuntimeResponseTypeChannelTransfer
/// - RuntimeResponseGenericRuntimeResponseTypeSearch
/// - RuntimeResponseGenericRuntimeResponseTypeUserDefined
/// - RuntimeResponseGenericRuntimeResponseTypeVideo
/// - RuntimeResponseGenericRuntimeResponseTypeAudio
/// - RuntimeResponseGenericRuntimeResponseTypeIframe
/// </summary>
[JsonConverter(typeof(JsonSubtypes), "response_type")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeAudio), "audio")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeChannelTransfer), "channel_transfer")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeConnectToAgent), "connect_to_agent")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeIframe), "iframe")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeImage), "image")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeOption), "option")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeSuggestion), "suggestion")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypePause), "pause")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeSearch), "search")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeText), "text")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeUserDefined), "user_defined")]
[JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeVideo), "video")]
public class RuntimeResponseGeneric
{
/// This ctor is protected to prevent instantiation of this base class.
Expand All @@ -57,6 +63,9 @@ public class RuntimeResponseGeneric
/// - RuntimeResponseGenericRuntimeResponseTypeChannelTransfer
/// - RuntimeResponseGenericRuntimeResponseTypeSearch
/// - RuntimeResponseGenericRuntimeResponseTypeUserDefined
/// - RuntimeResponseGenericRuntimeResponseTypeVideo
/// - RuntimeResponseGenericRuntimeResponseTypeAudio
/// - RuntimeResponseGenericRuntimeResponseTypeIframe
protected RuntimeResponseGeneric()
{
}
Expand Down Expand Up @@ -189,6 +198,16 @@ public class PreferenceEnumValue
/// </summary>
[JsonProperty("user_defined", NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, object> UserDefined { get; protected set; }
/// <summary>
/// For internal use only.
/// </summary>
[JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)]
public object ChannelOptions { get; protected set; }
/// <summary>
/// The URL of an image that shows a preview of the embedded content.
/// </summary>
[JsonProperty("image_url", NullValueHandling = NullValueHandling.Ignore)]
public string ImageUrl { get; protected set; }
}

}
Loading

0 comments on commit d0d6ca2

Please sign in to comment.