forked from aws/aws-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LexActiveContext.cs
64 lines (59 loc) · 2.28 KB
/
LexActiveContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Amazon.Lambda.LexEvents
{
/// <summary>
/// One or more contexts that are active during this turn of a conversation with the user.
/// </summary>
[DataContract]
public class LexActiveContext
{
/// <summary>
/// The length of time or number of turns in the conversation with the user that the context remains active.
/// </summary>
[DataMember(Name = "timeToLive", EmitDefaultValue = false)]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("timeToLive")]
#endif
public TimeToLive TimeToLive { get; set; }
/// <summary>
/// The name of the context.
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("name")]
#endif
public string Name { get; set; }
/// <summary>
/// A list of key/value pairs the contains the name and value of the slots from the intent that activated the context.
/// </summary>
[DataMember(Name = "parameters", EmitDefaultValue = false)]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("parameters")]
#endif
public IDictionary<string, string> Parameters { get; set; }
}
/// <summary>
/// The length of time or number of turns in the conversation with the user that the context remains active.
/// </summary>
[DataContract]
public class TimeToLive
{
/// <summary>
/// The length of time that the context remains active.
/// </summary>
[DataMember(Name = "timeToLiveInSeconds", EmitDefaultValue = false)]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("timeToLiveInSeconds")]
#endif
public int TimeToLiveInSeconds { get; set; }
/// <summary>
/// The number of turns in the conversation with the user that the context remains active.
/// </summary>
[DataMember(Name = "turnsToLive", EmitDefaultValue = false)]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("turnsToLive")]
#endif
public int TurnsToLive { get; set; }
}
}