forked from BotBuilderCommunity/botbuilder-community-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGoogleConversationalSchema.cs.old
More file actions
399 lines (335 loc) · 9.69 KB
/
Copy pathGoogleConversationalSchema.cs.old
File metadata and controls
399 lines (335 loc) · 9.69 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
namespace Bot.Builder.Community.Adapters.Google
{
public class GoogleResponseBody
{
public string ConversationToken { get; set; }
public string UserStorage { get; set; }
public string 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 class CustomPushMessage
{
public CustomPushMessageTarget Target { get; set; }
public ICustomPushMessageContent Content { get; set; }
}
public interface ICustomPushMessageContent
{
}
public class UserNotification : ICustomPushMessageContent
{
public string Title { get; set; }
public string Text { get; set; }
}
public class CustomPushMessageTarget
{
public string UserId { get; set; }
public string Intent { get; set; }
public Argument Argument { get; set; }
public string Locale { get; set; }
}
public class Argument
{
public string Name { get; set; }
public string RawText { get; set; }
public string TextValue { get; set; }
public Status Status { get; set; }
public IArgumentValue Value { get; set; }
}
public interface IArgumentValue
{
}
public class IntArgumentValue : IArgumentValue
{
public int IntValue { get; set; }
}
public class FloatArgumentValue : IArgumentValue
{
public float FloatValue { get; set; }
}
public class BoolArgumentValue : IArgumentValue
{
public bool BoolValue { get; set; }
}
public class DatetimeArgumentValue : IArgumentValue
{
public object DatetimeValue { get; set; }
}
public class PlaceArgumentValue : IArgumentValue
{
public object PlaceValue { get; set; }
}
public class ExtensionArgumentValue : IArgumentValue
{
public object Extension { get; set; }
}
public class StructuredArgumentValue : IArgumentValue
{
public object StructuredValue { get; set; }
}
public class Status
{
public int Code { get; set; }
public string Message { get; set; }
public object[] Details { get; set; }
}
public class FinalResponse
{
public RichResponse Response { get; set; }
}
public class ExpectedInput
{
public InputPrompt InputPrompt { get; set; }
public ExpectedIntent[] PossibleIntents { get; set; }
public string[] SpeechBiasingHints { get; set; }
}
public class ExpectedIntent
{
public string Intent { get; set; }
public object InputValueData { get; set; }
}
public class InputPrompt
{
public RichResponse RichInitialPrompt { get; set; }
public SimpleResponse[] NoInputPrompts { get; set; }
}
public class RichResponse
{
public IItem[] 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 interface IItem
{
}
public class SimpleResponse : IItem
{
public string TextTopSpeech { get; set; }
public string Ssml { get; set; }
public string DisplayText { get; set; }
}
public class BasicCard : IItem
{
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 ImageDisplayOptions { 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; }
}
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 MediaResponse : IItem
{
public MediaType MediaType { get; set; }
public MediaObject[] MediaObjects { get; set; }
}
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; }
}
public enum MediaType
{
MEDIA_TYPE_UNSPECIFIED,
AUDIO
}
public class CarouselBrowse : IItem
{
public IItem[] Items { get; set; }
public ImageDisplayOptions ImageDisplayOptions { get; set; }
}
//public class StructuredResponse : IItem
//{
// public OrderUpdate OrderUpdate { get; set; }
//}
//public class OrderUpdate
//{
//}
public enum ImageDisplayOptions
{
DEFAULT,
WHITE,
CROPPED
}
public class GoogleRequestBody
{
public User User { get; set; }
public Device Device { get; set; }
public Surface Surface { get; set; }
public Conversation Conversation { get; set; }
public Input[] Inputs { get; set; }
public bool IsInSandbox { get; set; }
public Surface[] AvailableSurfaces { get; set; }
}
public class Input
{
public RawInput[] RawInputs { get; set; }
public string Intent { get; set; }
public Argument[] Arguments { get; set; }
}
public class RawInput
{
public InputType InputType { get; set; }
public string Query { get; set; }
public string Url { get; set; }
}
public enum InputType
{
UNSPECIFIED_INPUT_TYPE,
TOUCH,
VOICE,
KEYBOARD,
URL
}
public class Conversation
{
public string ConversationId { get; set; }
public ConversationType Type { get; set; }
public string ConversationToken { get; set; }
}
public enum ConversationType
{
TYPE_UNSPECIFIED,
NEW,
ACTIVE
}
public class Surface
{
public Capability[] Capabilities { get; set; }
}
public class Capability
{
public string Name { get; set; }
}
public class User
{
public string UserId { get; set; }
public string IdToken { get; set; }
public string AccessToken { get; set; }
public string Locale { get; set; }
public string LastSeen { get; set; }
public string UserStorage { get; set; }
public UserProfile UserProfile { get; set; }
public Permission[] Permissions { get; set; }
public PackageEntitlement[] PackageEntitlements { get; set; }
}
public enum Permission
{
UNSPECIFIED_PERMISSION,
NAME,
DEVICE_PRECISE_LOCATION,
DEVICE_COARSE_LOCATION,
UPDATE
}
public class PackageEntitlement
{
public Entitlement[] Entitlements { get; set; }
}
public class Entitlement
{
public string Sku { get; set; }
public SkuType SkuTyoe { get; set; }
public SignedData InAppDetails { get; set; }
}
public class SignedData
{
public object InAppPurchaseData { get; set; }
public string InAppDataSignature { get; set; }
}
public enum SkuType
{
TYPE_UNSPECIFIED,
IN_APP,
SUBSCRIPTION,
APP
}
public class UserProfile
{
public string DisplayName { get; set; }
public string GivenName { get; set; }
public string FamilyName { get; set; }
}
public class Device
{
public Location Location { get; set; }
}
public class Location
{
public LatLng Coordinates { get; set; }
public string FormattedAddress { get; set; }
public string ZipCode { get; set; }
public string City { get; set; }
public PostAddress PostalAddress { get; set; }
public string Name { get; set; }
public string PhoneNumber { get; set; }
public string Notes { get; set; }
public string PlaceId { get; set; }
}
public class PostAddress
{
public int Revision { get; set; }
public string RegionCode { get; set; }
public string LanguageCode { get; set; }
public string PostalCode { get; set; }
public string SortingCode { get; set; }
public string AdministrativeArea { get; set; }
public string Locality { get; set; }
public string Sublocality { get; set; }
public string[] AddressLines { get; set; }
public string[] Recipients { get; set; }
public string Organization { get; set; }
}
public class LatLng
{
public double Latitude { get; set; }
public double Longitude { get; set; }
}
}