google-apis-chat_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module ChatV1
18
+ # Version of the google-apis-chat_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20201211"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,573 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ChatV1
24
+
25
+ class ActionParameter
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class ActionResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Annotation
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Attachment
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class AttachmentDataRef
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Button
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class Card
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class CardAction
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class CardHeader
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class DeprecatedEvent
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class DriveDataRef
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Empty
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class FormAction
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class Image
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class ImageButton
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class KeyValue
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class ListMembershipsResponse
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class ListSpacesResponse
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Media
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class Membership
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class Message
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class OnClick
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class OpenLink
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class Section
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class SlashCommand
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
175
+ class SlashCommandMetadata
176
+ class Representation < Google::Apis::Core::JsonRepresentation; end
177
+
178
+ include Google::Apis::Core::JsonObjectSupport
179
+ end
180
+
181
+ class Space
182
+ class Representation < Google::Apis::Core::JsonRepresentation; end
183
+
184
+ include Google::Apis::Core::JsonObjectSupport
185
+ end
186
+
187
+ class TextButton
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
193
+ class TextParagraph
194
+ class Representation < Google::Apis::Core::JsonRepresentation; end
195
+
196
+ include Google::Apis::Core::JsonObjectSupport
197
+ end
198
+
199
+ class Thread
200
+ class Representation < Google::Apis::Core::JsonRepresentation; end
201
+
202
+ include Google::Apis::Core::JsonObjectSupport
203
+ end
204
+
205
+ class User
206
+ class Representation < Google::Apis::Core::JsonRepresentation; end
207
+
208
+ include Google::Apis::Core::JsonObjectSupport
209
+ end
210
+
211
+ class UserMentionMetadata
212
+ class Representation < Google::Apis::Core::JsonRepresentation; end
213
+
214
+ include Google::Apis::Core::JsonObjectSupport
215
+ end
216
+
217
+ class WidgetMarkup
218
+ class Representation < Google::Apis::Core::JsonRepresentation; end
219
+
220
+ include Google::Apis::Core::JsonObjectSupport
221
+ end
222
+
223
+ class ActionParameter
224
+ # @private
225
+ class Representation < Google::Apis::Core::JsonRepresentation
226
+ property :key, as: 'key'
227
+ property :value, as: 'value'
228
+ end
229
+ end
230
+
231
+ class ActionResponse
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ property :type, as: 'type'
235
+ property :url, as: 'url'
236
+ end
237
+ end
238
+
239
+ class Annotation
240
+ # @private
241
+ class Representation < Google::Apis::Core::JsonRepresentation
242
+ property :length, as: 'length'
243
+ property :slash_command, as: 'slashCommand', class: Google::Apis::ChatV1::SlashCommandMetadata, decorator: Google::Apis::ChatV1::SlashCommandMetadata::Representation
244
+
245
+ property :start_index, as: 'startIndex'
246
+ property :type, as: 'type'
247
+ property :user_mention, as: 'userMention', class: Google::Apis::ChatV1::UserMentionMetadata, decorator: Google::Apis::ChatV1::UserMentionMetadata::Representation
248
+
249
+ end
250
+ end
251
+
252
+ class Attachment
253
+ # @private
254
+ class Representation < Google::Apis::Core::JsonRepresentation
255
+ property :attachment_data_ref, as: 'attachmentDataRef', class: Google::Apis::ChatV1::AttachmentDataRef, decorator: Google::Apis::ChatV1::AttachmentDataRef::Representation
256
+
257
+ property :content_name, as: 'contentName'
258
+ property :content_type, as: 'contentType'
259
+ property :download_uri, as: 'downloadUri'
260
+ property :drive_data_ref, as: 'driveDataRef', class: Google::Apis::ChatV1::DriveDataRef, decorator: Google::Apis::ChatV1::DriveDataRef::Representation
261
+
262
+ property :name, as: 'name'
263
+ property :source, as: 'source'
264
+ property :thumbnail_uri, as: 'thumbnailUri'
265
+ end
266
+ end
267
+
268
+ class AttachmentDataRef
269
+ # @private
270
+ class Representation < Google::Apis::Core::JsonRepresentation
271
+ property :resource_name, as: 'resourceName'
272
+ end
273
+ end
274
+
275
+ class Button
276
+ # @private
277
+ class Representation < Google::Apis::Core::JsonRepresentation
278
+ property :image_button, as: 'imageButton', class: Google::Apis::ChatV1::ImageButton, decorator: Google::Apis::ChatV1::ImageButton::Representation
279
+
280
+ property :text_button, as: 'textButton', class: Google::Apis::ChatV1::TextButton, decorator: Google::Apis::ChatV1::TextButton::Representation
281
+
282
+ end
283
+ end
284
+
285
+ class Card
286
+ # @private
287
+ class Representation < Google::Apis::Core::JsonRepresentation
288
+ collection :card_actions, as: 'cardActions', class: Google::Apis::ChatV1::CardAction, decorator: Google::Apis::ChatV1::CardAction::Representation
289
+
290
+ property :header, as: 'header', class: Google::Apis::ChatV1::CardHeader, decorator: Google::Apis::ChatV1::CardHeader::Representation
291
+
292
+ property :name, as: 'name'
293
+ collection :sections, as: 'sections', class: Google::Apis::ChatV1::Section, decorator: Google::Apis::ChatV1::Section::Representation
294
+
295
+ end
296
+ end
297
+
298
+ class CardAction
299
+ # @private
300
+ class Representation < Google::Apis::Core::JsonRepresentation
301
+ property :action_label, as: 'actionLabel'
302
+ property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation
303
+
304
+ end
305
+ end
306
+
307
+ class CardHeader
308
+ # @private
309
+ class Representation < Google::Apis::Core::JsonRepresentation
310
+ property :image_style, as: 'imageStyle'
311
+ property :image_url, as: 'imageUrl'
312
+ property :subtitle, as: 'subtitle'
313
+ property :title, as: 'title'
314
+ end
315
+ end
316
+
317
+ class DeprecatedEvent
318
+ # @private
319
+ class Representation < Google::Apis::Core::JsonRepresentation
320
+ property :action, as: 'action', class: Google::Apis::ChatV1::FormAction, decorator: Google::Apis::ChatV1::FormAction::Representation
321
+
322
+ property :config_complete_redirect_url, as: 'configCompleteRedirectUrl'
323
+ property :event_time, as: 'eventTime'
324
+ property :message, as: 'message', class: Google::Apis::ChatV1::Message, decorator: Google::Apis::ChatV1::Message::Representation
325
+
326
+ property :space, as: 'space', class: Google::Apis::ChatV1::Space, decorator: Google::Apis::ChatV1::Space::Representation
327
+
328
+ property :thread_key, as: 'threadKey'
329
+ property :token, as: 'token'
330
+ property :type, as: 'type'
331
+ property :user, as: 'user', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation
332
+
333
+ end
334
+ end
335
+
336
+ class DriveDataRef
337
+ # @private
338
+ class Representation < Google::Apis::Core::JsonRepresentation
339
+ property :drive_file_id, as: 'driveFileId'
340
+ end
341
+ end
342
+
343
+ class Empty
344
+ # @private
345
+ class Representation < Google::Apis::Core::JsonRepresentation
346
+ end
347
+ end
348
+
349
+ class FormAction
350
+ # @private
351
+ class Representation < Google::Apis::Core::JsonRepresentation
352
+ property :action_method_name, as: 'actionMethodName'
353
+ collection :parameters, as: 'parameters', class: Google::Apis::ChatV1::ActionParameter, decorator: Google::Apis::ChatV1::ActionParameter::Representation
354
+
355
+ end
356
+ end
357
+
358
+ class Image
359
+ # @private
360
+ class Representation < Google::Apis::Core::JsonRepresentation
361
+ property :aspect_ratio, as: 'aspectRatio'
362
+ property :image_url, as: 'imageUrl'
363
+ property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation
364
+
365
+ end
366
+ end
367
+
368
+ class ImageButton
369
+ # @private
370
+ class Representation < Google::Apis::Core::JsonRepresentation
371
+ property :icon, as: 'icon'
372
+ property :icon_url, as: 'iconUrl'
373
+ property :name, as: 'name'
374
+ property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation
375
+
376
+ end
377
+ end
378
+
379
+ class KeyValue
380
+ # @private
381
+ class Representation < Google::Apis::Core::JsonRepresentation
382
+ property :bottom_label, as: 'bottomLabel'
383
+ property :button, as: 'button', class: Google::Apis::ChatV1::Button, decorator: Google::Apis::ChatV1::Button::Representation
384
+
385
+ property :content, as: 'content'
386
+ property :content_multiline, as: 'contentMultiline'
387
+ property :icon, as: 'icon'
388
+ property :icon_url, as: 'iconUrl'
389
+ property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation
390
+
391
+ property :top_label, as: 'topLabel'
392
+ end
393
+ end
394
+
395
+ class ListMembershipsResponse
396
+ # @private
397
+ class Representation < Google::Apis::Core::JsonRepresentation
398
+ collection :memberships, as: 'memberships', class: Google::Apis::ChatV1::Membership, decorator: Google::Apis::ChatV1::Membership::Representation
399
+
400
+ property :next_page_token, as: 'nextPageToken'
401
+ end
402
+ end
403
+
404
+ class ListSpacesResponse
405
+ # @private
406
+ class Representation < Google::Apis::Core::JsonRepresentation
407
+ property :next_page_token, as: 'nextPageToken'
408
+ collection :spaces, as: 'spaces', class: Google::Apis::ChatV1::Space, decorator: Google::Apis::ChatV1::Space::Representation
409
+
410
+ end
411
+ end
412
+
413
+ class Media
414
+ # @private
415
+ class Representation < Google::Apis::Core::JsonRepresentation
416
+ property :resource_name, as: 'resourceName'
417
+ end
418
+ end
419
+
420
+ class Membership
421
+ # @private
422
+ class Representation < Google::Apis::Core::JsonRepresentation
423
+ property :create_time, as: 'createTime'
424
+ property :member, as: 'member', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation
425
+
426
+ property :name, as: 'name'
427
+ property :state, as: 'state'
428
+ end
429
+ end
430
+
431
+ class Message
432
+ # @private
433
+ class Representation < Google::Apis::Core::JsonRepresentation
434
+ property :action_response, as: 'actionResponse', class: Google::Apis::ChatV1::ActionResponse, decorator: Google::Apis::ChatV1::ActionResponse::Representation
435
+
436
+ collection :annotations, as: 'annotations', class: Google::Apis::ChatV1::Annotation, decorator: Google::Apis::ChatV1::Annotation::Representation
437
+
438
+ property :argument_text, as: 'argumentText'
439
+ collection :attachment, as: 'attachment', class: Google::Apis::ChatV1::Attachment, decorator: Google::Apis::ChatV1::Attachment::Representation
440
+
441
+ collection :cards, as: 'cards', class: Google::Apis::ChatV1::Card, decorator: Google::Apis::ChatV1::Card::Representation
442
+
443
+ property :create_time, as: 'createTime'
444
+ property :fallback_text, as: 'fallbackText'
445
+ property :name, as: 'name'
446
+ property :preview_text, as: 'previewText'
447
+ property :sender, as: 'sender', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation
448
+
449
+ property :slash_command, as: 'slashCommand', class: Google::Apis::ChatV1::SlashCommand, decorator: Google::Apis::ChatV1::SlashCommand::Representation
450
+
451
+ property :space, as: 'space', class: Google::Apis::ChatV1::Space, decorator: Google::Apis::ChatV1::Space::Representation
452
+
453
+ property :text, as: 'text'
454
+ property :thread, as: 'thread', class: Google::Apis::ChatV1::Thread, decorator: Google::Apis::ChatV1::Thread::Representation
455
+
456
+ end
457
+ end
458
+
459
+ class OnClick
460
+ # @private
461
+ class Representation < Google::Apis::Core::JsonRepresentation
462
+ property :action, as: 'action', class: Google::Apis::ChatV1::FormAction, decorator: Google::Apis::ChatV1::FormAction::Representation
463
+
464
+ property :open_link, as: 'openLink', class: Google::Apis::ChatV1::OpenLink, decorator: Google::Apis::ChatV1::OpenLink::Representation
465
+
466
+ end
467
+ end
468
+
469
+ class OpenLink
470
+ # @private
471
+ class Representation < Google::Apis::Core::JsonRepresentation
472
+ property :url, as: 'url'
473
+ end
474
+ end
475
+
476
+ class Section
477
+ # @private
478
+ class Representation < Google::Apis::Core::JsonRepresentation
479
+ property :header, as: 'header'
480
+ collection :widgets, as: 'widgets', class: Google::Apis::ChatV1::WidgetMarkup, decorator: Google::Apis::ChatV1::WidgetMarkup::Representation
481
+
482
+ end
483
+ end
484
+
485
+ class SlashCommand
486
+ # @private
487
+ class Representation < Google::Apis::Core::JsonRepresentation
488
+ property :command_id, :numeric_string => true, as: 'commandId'
489
+ end
490
+ end
491
+
492
+ class SlashCommandMetadata
493
+ # @private
494
+ class Representation < Google::Apis::Core::JsonRepresentation
495
+ property :bot, as: 'bot', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation
496
+
497
+ property :command_id, :numeric_string => true, as: 'commandId'
498
+ property :command_name, as: 'commandName'
499
+ property :triggers_dialog, as: 'triggersDialog'
500
+ property :type, as: 'type'
501
+ end
502
+ end
503
+
504
+ class Space
505
+ # @private
506
+ class Representation < Google::Apis::Core::JsonRepresentation
507
+ property :display_name, as: 'displayName'
508
+ property :name, as: 'name'
509
+ property :single_user_bot_dm, as: 'singleUserBotDm'
510
+ property :threaded, as: 'threaded'
511
+ property :type, as: 'type'
512
+ end
513
+ end
514
+
515
+ class TextButton
516
+ # @private
517
+ class Representation < Google::Apis::Core::JsonRepresentation
518
+ property :on_click, as: 'onClick', class: Google::Apis::ChatV1::OnClick, decorator: Google::Apis::ChatV1::OnClick::Representation
519
+
520
+ property :text, as: 'text'
521
+ end
522
+ end
523
+
524
+ class TextParagraph
525
+ # @private
526
+ class Representation < Google::Apis::Core::JsonRepresentation
527
+ property :text, as: 'text'
528
+ end
529
+ end
530
+
531
+ class Thread
532
+ # @private
533
+ class Representation < Google::Apis::Core::JsonRepresentation
534
+ property :name, as: 'name'
535
+ end
536
+ end
537
+
538
+ class User
539
+ # @private
540
+ class Representation < Google::Apis::Core::JsonRepresentation
541
+ property :display_name, as: 'displayName'
542
+ property :domain_id, as: 'domainId'
543
+ property :is_anonymous, as: 'isAnonymous'
544
+ property :name, as: 'name'
545
+ property :type, as: 'type'
546
+ end
547
+ end
548
+
549
+ class UserMentionMetadata
550
+ # @private
551
+ class Representation < Google::Apis::Core::JsonRepresentation
552
+ property :type, as: 'type'
553
+ property :user, as: 'user', class: Google::Apis::ChatV1::User, decorator: Google::Apis::ChatV1::User::Representation
554
+
555
+ end
556
+ end
557
+
558
+ class WidgetMarkup
559
+ # @private
560
+ class Representation < Google::Apis::Core::JsonRepresentation
561
+ collection :buttons, as: 'buttons', class: Google::Apis::ChatV1::Button, decorator: Google::Apis::ChatV1::Button::Representation
562
+
563
+ property :image, as: 'image', class: Google::Apis::ChatV1::Image, decorator: Google::Apis::ChatV1::Image::Representation
564
+
565
+ property :key_value, as: 'keyValue', class: Google::Apis::ChatV1::KeyValue, decorator: Google::Apis::ChatV1::KeyValue::Representation
566
+
567
+ property :text_paragraph, as: 'textParagraph', class: Google::Apis::ChatV1::TextParagraph, decorator: Google::Apis::ChatV1::TextParagraph::Representation
568
+
569
+ end
570
+ end
571
+ end
572
+ end
573
+ end