forked from BotBuilderCommunity/botbuilder-community-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGoogleResponseSchema.cs
More file actions
205 lines (174 loc) · 5.04 KB
/
Copy pathGoogleResponseSchema.cs
File metadata and controls
205 lines (174 loc) · 5.04 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
namespace Bot.Builder.Community.Adapters.Google
{
public class ConversationResponseBody
{
public string ConversationToken { get; set; }
public string UserStorage { get; set; }
public bool? ResetUserStorage { get; set; }
public bool ExpectUserResponse { get; set; }
public ExpectedInput[] ExpectedInputs { get; set; }
public FinalResponse FinalResponse { get; set; }
public CustomPushMessage CustomPushMessage { get; set; }
public bool IsInSandbox { get; set; }
public ISystemIntent SystemIntent { get; set; }
}
public class CustomPushMessage
{
}
public class FinalResponse
{
[JsonProperty(PropertyName = "richResponse")]
public RichResponse RichResponse { get; set; }
}
public class ExpectedInput
{
public PossibleIntent[] PossibleIntents { get; set; }
public InputPrompt InputPrompt { get; set; }
}
public class PossibleIntent
{
public string Intent { get; set; }
public InputValueData InputValueData { get; set; }
}
public class InputValueData
{
[JsonProperty(PropertyName = "@type")]
public string type { get; set; }
}
public class InputPrompt
{
public RichResponse RichInitialPrompt { get; set; }
}
public class DialogFlowResponseBody
{
public ResponsePayload Payload { get; set; }
}
public class ResponsePayload
{
public PayloadContent Google { get; set; }
}
public class PayloadContent
{
public bool ExpectUserResponse { get; set; }
public RichResponse RichResponse { get; set; }
public ISystemIntent SystemIntent { get; set; }
}
public class ISystemIntent
{
public string Intent { get; set; }
}
public class RichResponse
{
public Item[] Items { get; set; }
public Suggestion[] Suggestions { get; set; }
public LinkOutSuggestion LinkOutSuggestion { get; set; }
}
public class LinkOutSuggestion
{
public string DestinationName { get; set; }
public string Url { get; set; }
public OpenUrlAction OpenUrlAction { get; set; }
}
public class Suggestion
{
public string Title { get; set; }
}
public class Item
{
}
public class SimpleResponse : Item
{
[JsonProperty(PropertyName = "simpleResponse")]
public SimpleResponseContent Content { get; set; }
}
public class SimpleResponseContent
{
public string TextToSpeech { get; set; }
public string Ssml { get; set; }
public string DisplayText { get; set; }
}
public class GoogleBasicCard : Item
{
[JsonProperty(PropertyName = "basicCard")]
public GoogleBasicCardContent Content { get; set; }
}
public class GoogleBasicCardContent
{
public string Title { get; set; }
public string Subtitle { get; set; }
public string FormattedText { get; set; }
public Image Image { get; set; }
public Button[] Buttons { get; set; }
public ImageDisplayOptions? Display { get; set; }
}
public class MediaResponseContent
{
public MediaType MediaType { get; set; }
public MediaObject[] MediaObjects { get; set; }
}
public class MediaResponse : Item
{
[JsonProperty(PropertyName = "mediaResponse")]
public MediaResponseContent Content { get; set; }
}
public class Image
{
public string Url { get; set; }
public string AccessibilityText { get; set; }
public string Height { get; set; }
public string Width { get; set; }
}
[JsonConverter(typeof(StringEnumConverter))]
public enum ImageDisplayOptions
{
DEFAULT,
WHITE,
CROPPED
}
public class Button
{
public string Title { get; set; }
public OpenUrlAction OpenUrlAction { get; set; }
}
public class OpenUrlAction
{
public string Url { get; set; }
public AndroidApp AndroidApp { get; set; }
public UrlTypeHint UrlTypeHint { get; set; }
}
public class AndroidApp
{
public string PackageName { get; set; }
public VersionFilter[] Versions { get; set; }
}
public class VersionFilter
{
public double MinVersion { get; set; }
public double MaxVersion { get; set; }
}
public enum UrlTypeHint
{
URL_TYPE_HINT_UNSPECIFIED,
AMP_CONTENT
}
public class MediaObject
{
public string Name { get; set; }
public string Description { get; set; }
public string ContentUrl { get; set; }
public Image LargeImage { get; set; }
public Image Icon { get; set; }
}
[JsonConverter(typeof(StringEnumConverter))]
public enum MediaType
{
MEDIA_TYPE_UNSPECIFIED,
AUDIO
}
}