google-apis-chat_v1 0.44.0 → 0.69.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +104 -0
- data/lib/google/apis/chat_v1/classes.rb +1520 -404
- data/lib/google/apis/chat_v1/gem_version.rb +3 -3
- data/lib/google/apis/chat_v1/representations.rb +317 -1
- data/lib/google/apis/chat_v1/service.rb +728 -246
- data/lib/google/apis/chat_v1.rb +45 -0
- metadata +6 -6
@@ -23,9 +23,9 @@ module Google
|
|
23
23
|
module ChatV1
|
24
24
|
|
25
25
|
# List of string parameters to supply when the action method is invoked. For
|
26
|
-
# example, consider three snooze buttons: snooze now, snooze
|
27
|
-
# week. You might use action method = snooze()
|
28
|
-
# snooze time in the list of string parameters.
|
26
|
+
# example, consider three snooze buttons: snooze now, snooze one day, snooze
|
27
|
+
# next week. You might use `action method = snooze()`, passing the snooze type
|
28
|
+
# and snooze time in the list of string parameters.
|
29
29
|
class ActionParameter
|
30
30
|
include Google::Apis::Core::Hashable
|
31
31
|
|
@@ -50,7 +50,7 @@ module Google
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
# Parameters that a Chat app can use to configure how
|
53
|
+
# Parameters that a Chat app can use to configure how its response is posted.
|
54
54
|
class ActionResponse
|
55
55
|
include Google::Apis::Core::Hashable
|
56
56
|
|
@@ -65,8 +65,8 @@ module Google
|
|
65
65
|
# @return [String]
|
66
66
|
attr_accessor :type
|
67
67
|
|
68
|
-
# Input only. URL for users to
|
69
|
-
# types.)
|
68
|
+
# Input only. URL for users to authenticate or configure. (Only for `
|
69
|
+
# REQUEST_CONFIG` response types.)
|
70
70
|
# Corresponds to the JSON property `url`
|
71
71
|
# @return [String]
|
72
72
|
attr_accessor :url
|
@@ -113,9 +113,9 @@ module Google
|
|
113
113
|
# Annotations associated with the plain-text body of the message. Example plain-
|
114
114
|
# text message body: ``` Hello @FooBot how are you!" ``` The corresponding
|
115
115
|
# annotations metadata: ``` "annotations":[` "type":"USER_MENTION", "startIndex":
|
116
|
-
# 6, "length":7, "userMention": ` "user": ` "name":"users
|
117
|
-
# "
|
118
|
-
#
|
116
|
+
# 6, "length":7, "userMention": ` "user": ` "name":"users/`user`", "displayName":
|
117
|
+
# "FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" `, "type":"MENTION"
|
118
|
+
# ` `] ```
|
119
119
|
class Annotation
|
120
120
|
include Google::Apis::Core::Hashable
|
121
121
|
|
@@ -160,27 +160,47 @@ module Google
|
|
160
160
|
end
|
161
161
|
end
|
162
162
|
|
163
|
+
# A GIF image that's specified by a URL.
|
164
|
+
class AttachedGif
|
165
|
+
include Google::Apis::Core::Hashable
|
166
|
+
|
167
|
+
# Output only. The URL that hosts the GIF image.
|
168
|
+
# Corresponds to the JSON property `uri`
|
169
|
+
# @return [String]
|
170
|
+
attr_accessor :uri
|
171
|
+
|
172
|
+
def initialize(**args)
|
173
|
+
update!(**args)
|
174
|
+
end
|
175
|
+
|
176
|
+
# Update properties of this object
|
177
|
+
def update!(**args)
|
178
|
+
@uri = args[:uri] if args.key?(:uri)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
163
182
|
# An attachment in Google Chat.
|
164
183
|
class Attachment
|
165
184
|
include Google::Apis::Core::Hashable
|
166
185
|
|
167
|
-
# A reference to the data
|
186
|
+
# A reference to the attachment data. This field is used with the media API to
|
187
|
+
# download the attachment data.
|
168
188
|
# Corresponds to the JSON property `attachmentDataRef`
|
169
189
|
# @return [Google::Apis::ChatV1::AttachmentDataRef]
|
170
190
|
attr_accessor :attachment_data_ref
|
171
191
|
|
172
|
-
# The original file name for the content, not the full path.
|
192
|
+
# Output only. The original file name for the content, not the full path.
|
173
193
|
# Corresponds to the JSON property `contentName`
|
174
194
|
# @return [String]
|
175
195
|
attr_accessor :content_name
|
176
196
|
|
177
|
-
# The content type (MIME type) of the file.
|
197
|
+
# Output only. The content type (MIME type) of the file.
|
178
198
|
# Corresponds to the JSON property `contentType`
|
179
199
|
# @return [String]
|
180
200
|
attr_accessor :content_type
|
181
201
|
|
182
202
|
# Output only. The download URL which should be used to allow a human user to
|
183
|
-
# download the attachment. Chat apps
|
203
|
+
# download the attachment. Chat apps shouldn't use this URL to download
|
184
204
|
# attachment content.
|
185
205
|
# Corresponds to the JSON property `downloadUri`
|
186
206
|
# @return [String]
|
@@ -191,19 +211,19 @@ module Google
|
|
191
211
|
# @return [Google::Apis::ChatV1::DriveDataRef]
|
192
212
|
attr_accessor :drive_data_ref
|
193
213
|
|
194
|
-
# Resource name of the attachment, in the form
|
195
|
-
#
|
214
|
+
# Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*
|
215
|
+
# `.
|
196
216
|
# Corresponds to the JSON property `name`
|
197
217
|
# @return [String]
|
198
218
|
attr_accessor :name
|
199
219
|
|
200
|
-
# The source of the attachment.
|
220
|
+
# Output only. The source of the attachment.
|
201
221
|
# Corresponds to the JSON property `source`
|
202
222
|
# @return [String]
|
203
223
|
attr_accessor :source
|
204
224
|
|
205
225
|
# Output only. The thumbnail URL which should be used to preview the attachment
|
206
|
-
# to a human user. Chat apps
|
226
|
+
# to a human user. Chat apps shouldn't use this URL to download attachment
|
207
227
|
# content.
|
208
228
|
# Corresponds to the JSON property `thumbnailUri`
|
209
229
|
# @return [String]
|
@@ -226,12 +246,19 @@ module Google
|
|
226
246
|
end
|
227
247
|
end
|
228
248
|
|
229
|
-
#
|
249
|
+
#
|
230
250
|
class AttachmentDataRef
|
231
251
|
include Google::Apis::Core::Hashable
|
232
252
|
|
233
|
-
#
|
234
|
-
#
|
253
|
+
# Opaque token containing a reference to an uploaded attachment. Treated by
|
254
|
+
# clients as an opaque string and used to create or update Chat messages with
|
255
|
+
# attachments.
|
256
|
+
# Corresponds to the JSON property `attachmentUploadToken`
|
257
|
+
# @return [String]
|
258
|
+
attr_accessor :attachment_upload_token
|
259
|
+
|
260
|
+
# The resource name of the attachment data. This field is used with the media
|
261
|
+
# API to download the attachment data.
|
235
262
|
# Corresponds to the JSON property `resourceName`
|
236
263
|
# @return [String]
|
237
264
|
attr_accessor :resource_name
|
@@ -242,6 +269,7 @@ module Google
|
|
242
269
|
|
243
270
|
# Update properties of this object
|
244
271
|
def update!(**args)
|
272
|
+
@attachment_upload_token = args[:attachment_upload_token] if args.key?(:attachment_upload_token)
|
245
273
|
@resource_name = args[:resource_name] if args.key?(:resource_name)
|
246
274
|
end
|
247
275
|
end
|
@@ -250,12 +278,12 @@ module Google
|
|
250
278
|
class Button
|
251
279
|
include Google::Apis::Core::Hashable
|
252
280
|
|
253
|
-
# An image button with an onclick action.
|
281
|
+
# An image button with an `onclick` action.
|
254
282
|
# Corresponds to the JSON property `imageButton`
|
255
283
|
# @return [Google::Apis::ChatV1::ImageButton]
|
256
284
|
attr_accessor :image_button
|
257
285
|
|
258
|
-
# A button with text and onclick action.
|
286
|
+
# A button with text and `onclick` action.
|
259
287
|
# Corresponds to the JSON property `textButton`
|
260
288
|
# @return [Google::Apis::ChatV1::TextButton]
|
261
289
|
attr_accessor :text_button
|
@@ -271,7 +299,7 @@ module Google
|
|
271
299
|
end
|
272
300
|
end
|
273
301
|
|
274
|
-
# A card is a UI element that can contain UI widgets such as
|
302
|
+
# A card is a UI element that can contain UI widgets such as text and images.
|
275
303
|
class Card
|
276
304
|
include Google::Apis::Core::Hashable
|
277
305
|
|
@@ -310,7 +338,7 @@ module Google
|
|
310
338
|
|
311
339
|
# A card action is the action associated with the card. For an invoice card, a
|
312
340
|
# typical action would be: delete invoice, email invoice or open the invoice in
|
313
|
-
# browser.
|
341
|
+
# browser. Not supported by Google Chat apps.
|
314
342
|
class CardAction
|
315
343
|
include Google::Apis::Core::Hashable
|
316
344
|
|
@@ -319,7 +347,7 @@ module Google
|
|
319
347
|
# @return [String]
|
320
348
|
attr_accessor :action_label
|
321
349
|
|
322
|
-
# An onclick action (
|
350
|
+
# An `onclick` action (for example, open a link).
|
323
351
|
# Corresponds to the JSON property `onClick`
|
324
352
|
# @return [Google::Apis::ChatV1::OnClick]
|
325
353
|
attr_accessor :on_click
|
@@ -339,7 +367,7 @@ module Google
|
|
339
367
|
class CardHeader
|
340
368
|
include Google::Apis::Core::Hashable
|
341
369
|
|
342
|
-
# The image's type (
|
370
|
+
# The image's type (for example, square border or circular border).
|
343
371
|
# Corresponds to the JSON property `imageStyle`
|
344
372
|
# @return [String]
|
345
373
|
attr_accessor :image_style
|
@@ -355,8 +383,8 @@ module Google
|
|
355
383
|
attr_accessor :subtitle
|
356
384
|
|
357
385
|
# The title must be specified. The header has a fixed height: if both a title
|
358
|
-
# and subtitle is specified, each
|
359
|
-
# specified, it
|
386
|
+
# and subtitle is specified, each takes up one line. If only the title is
|
387
|
+
# specified, it takes up both lines.
|
360
388
|
# Corresponds to the JSON property `title`
|
361
389
|
# @return [String]
|
362
390
|
attr_accessor :title
|
@@ -374,34 +402,42 @@ module Google
|
|
374
402
|
end
|
375
403
|
end
|
376
404
|
|
377
|
-
#
|
405
|
+
# A [card](https://developers.google.com/chat/api/reference/rest/v1/cards) in a
|
406
|
+
# Google Chat message. Only Chat apps can create cards. If your Chat app [
|
407
|
+
# authenticates as a user](https://developers.google.com/chat/api/guides/auth/
|
408
|
+
# users), the message can't contain cards.
|
378
409
|
class CardWithId
|
379
410
|
include Google::Apis::Core::Hashable
|
380
411
|
|
381
|
-
# A card
|
382
|
-
#
|
383
|
-
#
|
384
|
-
#
|
385
|
-
#
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
# :
|
390
|
-
#
|
391
|
-
#
|
392
|
-
# "
|
393
|
-
#
|
394
|
-
#
|
395
|
-
# , "
|
396
|
-
# uncollapsibleWidgetsCount":
|
397
|
-
#
|
398
|
-
# `
|
412
|
+
# A card interface displayed in a Google Chat message or Google Workspace Add-on.
|
413
|
+
# Cards support a defined layout, interactive UI elements like buttons, and
|
414
|
+
# rich media like images. Use cards to present detailed information, gather
|
415
|
+
# information from users, and guide users to take a next step. To learn how to
|
416
|
+
# build cards, see the following documentation: * For Google Chat apps, see [
|
417
|
+
# Design dynamic, interactive, and consistent UIs with cards](https://developers.
|
418
|
+
# google.com/chat/ui). * For Google Workspace Add-ons, see [Card-based
|
419
|
+
# interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
|
420
|
+
# **Example: Card message for a Google Chat app** ![Example contact card](https:/
|
421
|
+
# /developers.google.com/chat/images/card_api_reference.png) To create the
|
422
|
+
# sample card message in Google Chat, use the following JSON: ``` ` "cardsV2": [
|
423
|
+
# ` "cardId": "unique-card-id", "card": ` "header": ` "title": "Sasha", "
|
424
|
+
# subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/
|
425
|
+
# chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText":
|
426
|
+
# "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info", "collapsible":
|
427
|
+
# true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "
|
428
|
+
# startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "
|
429
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `,
|
430
|
+
# `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (
|
431
|
+
# 555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "
|
432
|
+
# onClick": ` "openLink": ` "url": "https://example.com/share", ` ` `, ` "text":
|
433
|
+
# "Edit", "onClick": ` "action": ` "function": "goToView", "parameters": [ ` "
|
434
|
+
# key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
399
435
|
# Corresponds to the JSON property `card`
|
400
436
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
|
401
437
|
attr_accessor :card
|
402
438
|
|
403
|
-
# Required
|
404
|
-
#
|
439
|
+
# Required if the message contains multiple cards. A unique identifier for a
|
440
|
+
# card in a message.
|
405
441
|
# Corresponds to the JSON property `cardId`
|
406
442
|
# @return [String]
|
407
443
|
attr_accessor :card_id
|
@@ -457,19 +493,42 @@ module Google
|
|
457
493
|
end
|
458
494
|
end
|
459
495
|
|
496
|
+
# Chat apps only. For a `SelectionInput` widget that uses a multi-select menu, a
|
497
|
+
# data source from Google Chat. For example, a list of Google Chat spaces of
|
498
|
+
# which the user is a member. [Developer Preview](https://developers.google.com/
|
499
|
+
# workspace/preview).
|
500
|
+
class ChatClientDataSourceMarkup
|
501
|
+
include Google::Apis::Core::Hashable
|
502
|
+
|
503
|
+
# A data source representing a Google Chat space. Format: spaces/`space` [
|
504
|
+
# Developer Preview](https://developers.google.com/workspace/preview).
|
505
|
+
# Corresponds to the JSON property `spaceDataSource`
|
506
|
+
# @return [Google::Apis::ChatV1::SpaceDataSource]
|
507
|
+
attr_accessor :space_data_source
|
508
|
+
|
509
|
+
def initialize(**args)
|
510
|
+
update!(**args)
|
511
|
+
end
|
512
|
+
|
513
|
+
# Update properties of this object
|
514
|
+
def update!(**args)
|
515
|
+
@space_data_source = args[:space_data_source] if args.key?(:space_data_source)
|
516
|
+
end
|
517
|
+
end
|
518
|
+
|
460
519
|
# Represents a color in the RGBA color space. This representation is designed
|
461
|
-
# for simplicity of conversion to
|
520
|
+
# for simplicity of conversion to and from color representations in various
|
462
521
|
# languages over compactness. For example, the fields of this representation can
|
463
522
|
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
464
523
|
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
465
524
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
466
|
-
# CSS `rgba()` string in JavaScript. This reference page doesn't
|
525
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't have
|
467
526
|
# information about the absolute color space that should be used to interpret
|
468
|
-
# the RGB value
|
527
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
469
528
|
# applications should assume the sRGB color space. When color equality needs to
|
470
529
|
# be decided, implementations, unless documented otherwise, treat two colors as
|
471
|
-
# equal if all their red, green, blue, and alpha values each differ by at most
|
472
|
-
# 1e-5
|
530
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
531
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
473
532
|
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
474
533
|
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
475
534
|
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
@@ -588,14 +647,17 @@ module Google
|
|
588
647
|
# @return [String]
|
589
648
|
attr_accessor :platform
|
590
649
|
|
591
|
-
# The timezone ID and offset from Coordinated Universal Time (UTC).
|
592
|
-
# supported
|
650
|
+
# The timezone ID and offset from Coordinated Universal Time (UTC). Only
|
651
|
+
# supported for the event types [`CARD_CLICKED`](https://developers.google.com/
|
652
|
+
# chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`
|
653
|
+
# SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/
|
654
|
+
# DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).
|
593
655
|
# Corresponds to the JSON property `timeZone`
|
594
656
|
# @return [Google::Apis::ChatV1::TimeZone]
|
595
657
|
attr_accessor :time_zone
|
596
658
|
|
597
659
|
# The full `locale.displayName` in the format of [ISO 639 language code]-[ISO
|
598
|
-
# 3166 country/region code] such as "en-US".
|
660
|
+
# 3166 country/region code] such as "en-US".
|
599
661
|
# Corresponds to the JSON property `userLocale`
|
600
662
|
# @return [String]
|
601
663
|
attr_accessor :user_locale
|
@@ -616,7 +678,26 @@ module Google
|
|
616
678
|
end
|
617
679
|
end
|
618
680
|
|
619
|
-
#
|
681
|
+
# Represents a custom emoji.
|
682
|
+
class CustomEmoji
|
683
|
+
include Google::Apis::Core::Hashable
|
684
|
+
|
685
|
+
# Unique key for the custom emoji resource.
|
686
|
+
# Corresponds to the JSON property `uid`
|
687
|
+
# @return [String]
|
688
|
+
attr_accessor :uid
|
689
|
+
|
690
|
+
def initialize(**args)
|
691
|
+
update!(**args)
|
692
|
+
end
|
693
|
+
|
694
|
+
# Update properties of this object
|
695
|
+
def update!(**args)
|
696
|
+
@uid = args[:uid] if args.key?(:uid)
|
697
|
+
end
|
698
|
+
end
|
699
|
+
|
700
|
+
# Date input values.
|
620
701
|
class DateInput
|
621
702
|
include Google::Apis::Core::Hashable
|
622
703
|
|
@@ -635,7 +716,7 @@ module Google
|
|
635
716
|
end
|
636
717
|
end
|
637
718
|
|
638
|
-
# Date and time input values.
|
719
|
+
# Date and time input values.
|
639
720
|
class DateTimeInput
|
640
721
|
include Google::Apis::Core::Hashable
|
641
722
|
|
@@ -668,12 +749,37 @@ module Google
|
|
668
749
|
end
|
669
750
|
end
|
670
751
|
|
671
|
-
#
|
752
|
+
# Information about a deleted message. A message is deleted when `delete_time`
|
753
|
+
# is set.
|
754
|
+
class DeletionMetadata
|
755
|
+
include Google::Apis::Core::Hashable
|
756
|
+
|
757
|
+
# Indicates who deleted the message.
|
758
|
+
# Corresponds to the JSON property `deletionType`
|
759
|
+
# @return [String]
|
760
|
+
attr_accessor :deletion_type
|
761
|
+
|
762
|
+
def initialize(**args)
|
763
|
+
update!(**args)
|
764
|
+
end
|
765
|
+
|
766
|
+
# Update properties of this object
|
767
|
+
def update!(**args)
|
768
|
+
@deletion_type = args[:deletion_type] if args.key?(:deletion_type)
|
769
|
+
end
|
770
|
+
end
|
771
|
+
|
772
|
+
# A Google Chat app interaction event. To learn about interaction events, see [
|
773
|
+
# Receive and respond to interactions with your Google Chat app](https://
|
774
|
+
# developers.google.com/chat/api/guides/message-formats). To learn about event
|
775
|
+
# types and for example event payloads, see [Types of Google Chat app
|
776
|
+
# interaction events](https://developers.google.com/chat/api/guides/message-
|
777
|
+
# formats/events).
|
672
778
|
class DeprecatedEvent
|
673
779
|
include Google::Apis::Core::Hashable
|
674
780
|
|
675
781
|
# A form action describes the behavior when the form is submitted. For example,
|
676
|
-
#
|
782
|
+
# you can invoke Apps Script to handle the form.
|
677
783
|
# Corresponds to the JSON property `action`
|
678
784
|
# @return [Google::Apis::ChatV1::FormAction]
|
679
785
|
attr_accessor :action
|
@@ -687,32 +793,32 @@ module Google
|
|
687
793
|
attr_accessor :common
|
688
794
|
|
689
795
|
# The URL the Chat app should redirect the user to after they have completed an
|
690
|
-
# authorization or configuration flow outside of Google Chat.
|
691
|
-
#
|
692
|
-
#
|
796
|
+
# authorization or configuration flow outside of Google Chat. For more
|
797
|
+
# information, see [Connect a Chat app with other services & tools](https://
|
798
|
+
# developers.google.com/chat/how-tos/connect-web-services-tools).
|
693
799
|
# Corresponds to the JSON property `configCompleteRedirectUrl`
|
694
800
|
# @return [String]
|
695
801
|
attr_accessor :config_complete_redirect_url
|
696
802
|
|
697
|
-
# The type of [dialog](https://developers.google.com/chat/how-tos/dialogs)
|
698
|
-
# received.
|
803
|
+
# The type of [dialog](https://developers.google.com/chat/how-tos/dialogs)
|
804
|
+
# interaction event received.
|
699
805
|
# Corresponds to the JSON property `dialogEventType`
|
700
806
|
# @return [String]
|
701
807
|
attr_accessor :dialog_event_type
|
702
808
|
|
703
|
-
# The timestamp indicating when the event occurred.
|
809
|
+
# The timestamp indicating when the interaction event occurred.
|
704
810
|
# Corresponds to the JSON property `eventTime`
|
705
811
|
# @return [String]
|
706
812
|
attr_accessor :event_time
|
707
813
|
|
708
|
-
#
|
709
|
-
# how-tos/dialogs).
|
814
|
+
# For `CARD_CLICKED` interaction events, whether the user interacted with a [
|
815
|
+
# dialog](https://developers.google.com/chat/how-tos/dialogs).
|
710
816
|
# Corresponds to the JSON property `isDialogEvent`
|
711
817
|
# @return [Boolean]
|
712
818
|
attr_accessor :is_dialog_event
|
713
819
|
alias_method :is_dialog_event?, :is_dialog_event
|
714
820
|
|
715
|
-
# A message in Google Chat.
|
821
|
+
# A message in a Google Chat space.
|
716
822
|
# Corresponds to the JSON property `message`
|
717
823
|
# @return [Google::Apis::ChatV1::Message]
|
718
824
|
attr_accessor :message
|
@@ -723,8 +829,9 @@ module Google
|
|
723
829
|
# @return [Google::Apis::ChatV1::Space]
|
724
830
|
attr_accessor :space
|
725
831
|
|
726
|
-
# The Chat app-defined key for the thread related to the event. See
|
727
|
-
#
|
832
|
+
# The Chat app-defined key for the thread related to the interaction event. See [
|
833
|
+
# `spaces.messages.thread.threadKey`](/chat/api/reference/rest/v1/spaces.
|
834
|
+
# messages#Thread.FIELDS.thread_key) for more information.
|
728
835
|
# Corresponds to the JSON property `threadKey`
|
729
836
|
# @return [String]
|
730
837
|
attr_accessor :thread_key
|
@@ -740,12 +847,17 @@ module Google
|
|
740
847
|
# @return [String]
|
741
848
|
attr_accessor :token
|
742
849
|
|
743
|
-
# The type of
|
850
|
+
# The type of interaction event. For details, see [Types of Google Chat app
|
851
|
+
# interaction events](https://developers.google.com/chat/api/guides/message-
|
852
|
+
# formats/events).
|
744
853
|
# Corresponds to the JSON property `type`
|
745
854
|
# @return [String]
|
746
855
|
attr_accessor :type
|
747
856
|
|
748
|
-
# A user in Google Chat.
|
857
|
+
# A user in Google Chat. When returned as an output from a request, if your Chat
|
858
|
+
# app [authenticates as a user](https://developers.google.com/chat/api/guides/
|
859
|
+
# auth/users), the output for a `User` resource only populates the user's `name`
|
860
|
+
# and `type`.
|
749
861
|
# Corresponds to the JSON property `user`
|
750
862
|
# @return [Google::Apis::ChatV1::User]
|
751
863
|
attr_accessor :user
|
@@ -775,24 +887,29 @@ module Google
|
|
775
887
|
class Dialog
|
776
888
|
include Google::Apis::Core::Hashable
|
777
889
|
|
778
|
-
# A card
|
779
|
-
#
|
780
|
-
#
|
781
|
-
#
|
782
|
-
#
|
783
|
-
#
|
784
|
-
#
|
785
|
-
#
|
786
|
-
# :
|
787
|
-
#
|
788
|
-
#
|
789
|
-
# "
|
790
|
-
#
|
791
|
-
#
|
792
|
-
# , "
|
793
|
-
# uncollapsibleWidgetsCount":
|
794
|
-
#
|
795
|
-
# `
|
890
|
+
# A card interface displayed in a Google Chat message or Google Workspace Add-on.
|
891
|
+
# Cards support a defined layout, interactive UI elements like buttons, and
|
892
|
+
# rich media like images. Use cards to present detailed information, gather
|
893
|
+
# information from users, and guide users to take a next step. To learn how to
|
894
|
+
# build cards, see the following documentation: * For Google Chat apps, see [
|
895
|
+
# Design dynamic, interactive, and consistent UIs with cards](https://developers.
|
896
|
+
# google.com/chat/ui). * For Google Workspace Add-ons, see [Card-based
|
897
|
+
# interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
|
898
|
+
# **Example: Card message for a Google Chat app** ![Example contact card](https:/
|
899
|
+
# /developers.google.com/chat/images/card_api_reference.png) To create the
|
900
|
+
# sample card message in Google Chat, use the following JSON: ``` ` "cardsV2": [
|
901
|
+
# ` "cardId": "unique-card-id", "card": ` "header": ` "title": "Sasha", "
|
902
|
+
# subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/
|
903
|
+
# chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText":
|
904
|
+
# "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info", "collapsible":
|
905
|
+
# true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "
|
906
|
+
# startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "
|
907
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `,
|
908
|
+
# `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (
|
909
|
+
# 555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "
|
910
|
+
# onClick": ` "openLink": ` "url": "https://example.com/share", ` ` `, ` "text":
|
911
|
+
# "Edit", "onClick": ` "action": ` "function": "goToView", "parameters": [ ` "
|
912
|
+
# key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
796
913
|
# Corresponds to the JSON property `body`
|
797
914
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
|
798
915
|
attr_accessor :body
|
@@ -838,7 +955,7 @@ module Google
|
|
838
955
|
class DriveDataRef
|
839
956
|
include Google::Apis::Core::Hashable
|
840
957
|
|
841
|
-
# The
|
958
|
+
# The ID for the drive file. Use with the Drive API.
|
842
959
|
# Corresponds to the JSON property `driveFileId`
|
843
960
|
# @return [String]
|
844
961
|
attr_accessor :drive_file_id
|
@@ -853,6 +970,56 @@ module Google
|
|
853
970
|
end
|
854
971
|
end
|
855
972
|
|
973
|
+
# An emoji that is used as a reaction to a message.
|
974
|
+
class Emoji
|
975
|
+
include Google::Apis::Core::Hashable
|
976
|
+
|
977
|
+
# Represents a custom emoji.
|
978
|
+
# Corresponds to the JSON property `customEmoji`
|
979
|
+
# @return [Google::Apis::ChatV1::CustomEmoji]
|
980
|
+
attr_accessor :custom_emoji
|
981
|
+
|
982
|
+
# A basic emoji represented by a unicode string.
|
983
|
+
# Corresponds to the JSON property `unicode`
|
984
|
+
# @return [String]
|
985
|
+
attr_accessor :unicode
|
986
|
+
|
987
|
+
def initialize(**args)
|
988
|
+
update!(**args)
|
989
|
+
end
|
990
|
+
|
991
|
+
# Update properties of this object
|
992
|
+
def update!(**args)
|
993
|
+
@custom_emoji = args[:custom_emoji] if args.key?(:custom_emoji)
|
994
|
+
@unicode = args[:unicode] if args.key?(:unicode)
|
995
|
+
end
|
996
|
+
end
|
997
|
+
|
998
|
+
# The number of people who reacted to a message with a specific emoji.
|
999
|
+
class EmojiReactionSummary
|
1000
|
+
include Google::Apis::Core::Hashable
|
1001
|
+
|
1002
|
+
# An emoji that is used as a reaction to a message.
|
1003
|
+
# Corresponds to the JSON property `emoji`
|
1004
|
+
# @return [Google::Apis::ChatV1::Emoji]
|
1005
|
+
attr_accessor :emoji
|
1006
|
+
|
1007
|
+
# The total number of reactions using the associated emoji.
|
1008
|
+
# Corresponds to the JSON property `reactionCount`
|
1009
|
+
# @return [Fixnum]
|
1010
|
+
attr_accessor :reaction_count
|
1011
|
+
|
1012
|
+
def initialize(**args)
|
1013
|
+
update!(**args)
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
# Update properties of this object
|
1017
|
+
def update!(**args)
|
1018
|
+
@emoji = args[:emoji] if args.key?(:emoji)
|
1019
|
+
@reaction_count = args[:reaction_count] if args.key?(:reaction_count)
|
1020
|
+
end
|
1021
|
+
end
|
1022
|
+
|
856
1023
|
# A generic empty message that you can re-use to avoid defining duplicated empty
|
857
1024
|
# messages in your APIs. A typical example is to use it as the request or the
|
858
1025
|
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
@@ -870,14 +1037,14 @@ module Google
|
|
870
1037
|
end
|
871
1038
|
|
872
1039
|
# A form action describes the behavior when the form is submitted. For example,
|
873
|
-
#
|
1040
|
+
# you can invoke Apps Script to handle the form.
|
874
1041
|
class FormAction
|
875
1042
|
include Google::Apis::Core::Hashable
|
876
1043
|
|
877
1044
|
# The method name is used to identify which part of the form triggered the form
|
878
1045
|
# submission. This information is echoed back to the Chat app as part of the
|
879
|
-
# card click event.
|
880
|
-
# trigger a common behavior
|
1046
|
+
# card click event. You can use the same method name for several elements that
|
1047
|
+
# trigger a common behavior.
|
881
1048
|
# Corresponds to the JSON property `actionMethodName`
|
882
1049
|
# @return [String]
|
883
1050
|
attr_accessor :action_method_name
|
@@ -899,16 +1066,32 @@ module Google
|
|
899
1066
|
end
|
900
1067
|
|
901
1068
|
# An action that describes the behavior when the form is submitted. For example,
|
902
|
-
# an Apps Script
|
1069
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
1070
|
+
# triggered, the form values are sent to the server.
|
903
1071
|
class GoogleAppsCardV1Action
|
904
1072
|
include Google::Apis::Core::Hashable
|
905
1073
|
|
906
|
-
#
|
907
|
-
# activated.
|
1074
|
+
# A custom function to invoke when the containing element is clicked or othrwise
|
1075
|
+
# activated. For example usage, see [Create interactive cards](https://
|
1076
|
+
# developers.google.com/chat/how-tos/cards-onclick).
|
908
1077
|
# Corresponds to the JSON property `function`
|
909
1078
|
# @return [String]
|
910
1079
|
attr_accessor :function
|
911
1080
|
|
1081
|
+
# Optional. Required when opening a [dialog](https://developers.google.com/chat/
|
1082
|
+
# how-tos/dialogs). What to do in response to an interaction with a user, such
|
1083
|
+
# as a user clicking a button in a card message. If unspecified, the app
|
1084
|
+
# responds by executing an `action`—like opening a link or running a function—as
|
1085
|
+
# normal. By specifying an `interaction`, the app can respond in special
|
1086
|
+
# interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the
|
1087
|
+
# app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs).
|
1088
|
+
# When specified, a loading indicator isn't shown. Supported by Chat apps, but
|
1089
|
+
# not Google Workspace Add-ons. If specified for an add-on, the entire card is
|
1090
|
+
# stripped and nothing is shown in the client.
|
1091
|
+
# Corresponds to the JSON property `interaction`
|
1092
|
+
# @return [String]
|
1093
|
+
attr_accessor :interaction
|
1094
|
+
|
912
1095
|
# Specifies the loading indicator that the action displays while making the call
|
913
1096
|
# to the action.
|
914
1097
|
# Corresponds to the JSON property `loadIndicator`
|
@@ -921,17 +1104,19 @@ module Google
|
|
921
1104
|
attr_accessor :parameters
|
922
1105
|
|
923
1106
|
# Indicates whether form values persist after the action. The default value is `
|
924
|
-
# false`. If `true`, form values remain after the action is triggered.
|
925
|
-
#
|
926
|
-
# reference/rpc/google.apps.
|
927
|
-
#
|
928
|
-
#
|
929
|
-
#
|
930
|
-
#
|
931
|
-
#
|
932
|
-
#
|
933
|
-
#
|
934
|
-
#
|
1107
|
+
# false`. If `true`, form values remain after the action is triggered. To let
|
1108
|
+
# the user make changes while the action is being processed, set [`LoadIndicator`
|
1109
|
+
# ](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.
|
1110
|
+
# card.v1#loadindicator) to `NONE`. For [card messages](https://developers.
|
1111
|
+
# google.com/chat/api/guides/message-formats/cards) in Chat apps, you must also
|
1112
|
+
# set the action's [`ResponseType`](https://developers.google.com/chat/api/
|
1113
|
+
# reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use
|
1114
|
+
# the same [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/
|
1115
|
+
# spaces.messages#CardWithId) from the card that contained the action. If `false`
|
1116
|
+
# , the form values are cleared when the action is triggered. To prevent the
|
1117
|
+
# user from making changes while the action is being processed, set [`
|
1118
|
+
# LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/
|
1119
|
+
# google.apps.card.v1#loadindicator) to `SPINNER`.
|
935
1120
|
# Corresponds to the JSON property `persistValues`
|
936
1121
|
# @return [Boolean]
|
937
1122
|
attr_accessor :persist_values
|
@@ -944,6 +1129,7 @@ module Google
|
|
944
1129
|
# Update properties of this object
|
945
1130
|
def update!(**args)
|
946
1131
|
@function = args[:function] if args.key?(:function)
|
1132
|
+
@interaction = args[:interaction] if args.key?(:interaction)
|
947
1133
|
@load_indicator = args[:load_indicator] if args.key?(:load_indicator)
|
948
1134
|
@parameters = args[:parameters] if args.key?(:parameters)
|
949
1135
|
@persist_values = args[:persist_values] if args.key?(:persist_values)
|
@@ -951,9 +1137,11 @@ module Google
|
|
951
1137
|
end
|
952
1138
|
|
953
1139
|
# List of string parameters to supply when the action method is invoked. For
|
954
|
-
# example, consider three snooze buttons: snooze now, snooze
|
955
|
-
# week. You might use action method = snooze()
|
956
|
-
# snooze time in the list of string parameters.
|
1140
|
+
# example, consider three snooze buttons: snooze now, snooze one day, or snooze
|
1141
|
+
# next week. You might use `action method = snooze()`, passing the snooze type
|
1142
|
+
# and snooze time in the list of string parameters. To learn more, see [`
|
1143
|
+
# CommonEventObject`](https://developers.google.com/chat/api/reference/rest/v1/
|
1144
|
+
# Event#commoneventobject).
|
957
1145
|
class GoogleAppsCardV1ActionParameter
|
958
1146
|
include Google::Apis::Core::Hashable
|
959
1147
|
|
@@ -978,7 +1166,8 @@ module Google
|
|
978
1166
|
end
|
979
1167
|
end
|
980
1168
|
|
981
|
-
#
|
1169
|
+
# The style options for the border of a card or widget, including the border
|
1170
|
+
# type and color.
|
982
1171
|
class GoogleAppsCardV1BorderStyle
|
983
1172
|
include Google::Apis::Core::Hashable
|
984
1173
|
|
@@ -988,18 +1177,18 @@ module Google
|
|
988
1177
|
attr_accessor :corner_radius
|
989
1178
|
|
990
1179
|
# Represents a color in the RGBA color space. This representation is designed
|
991
|
-
# for simplicity of conversion to
|
1180
|
+
# for simplicity of conversion to and from color representations in various
|
992
1181
|
# languages over compactness. For example, the fields of this representation can
|
993
1182
|
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
994
1183
|
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
995
1184
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
996
|
-
# CSS `rgba()` string in JavaScript. This reference page doesn't
|
1185
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't have
|
997
1186
|
# information about the absolute color space that should be used to interpret
|
998
|
-
# the RGB value
|
1187
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
999
1188
|
# applications should assume the sRGB color space. When color equality needs to
|
1000
1189
|
# be decided, implementations, unless documented otherwise, treat two colors as
|
1001
|
-
# equal if all their red, green, blue, and alpha values each differ by at most
|
1002
|
-
# 1e-5
|
1190
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
1191
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
1003
1192
|
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1004
1193
|
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1005
1194
|
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
@@ -1053,29 +1242,34 @@ module Google
|
|
1053
1242
|
end
|
1054
1243
|
end
|
1055
1244
|
|
1056
|
-
# A
|
1245
|
+
# A text, icon, or text and icon button that users can click. For an example in
|
1246
|
+
# Google Chat apps, see [Button list](https://developers.google.com/chat/ui/
|
1247
|
+
# widgets/button-list). To make an image a clickable button, specify an `Image` (
|
1248
|
+
# not an `ImageComponent`) and set an `onClick` action.
|
1057
1249
|
class GoogleAppsCardV1Button
|
1058
1250
|
include Google::Apis::Core::Hashable
|
1059
1251
|
|
1060
|
-
# The alternative text used for accessibility.
|
1061
|
-
#
|
1252
|
+
# The alternative text that's used for accessibility. Set descriptive text that
|
1253
|
+
# lets users know what the button does. For example, if a button opens a
|
1254
|
+
# hyperlink, you might write: "Opens a new browser tab and navigates to the
|
1255
|
+
# Google Chat developer documentation at https://developers.google.com/chat".
|
1062
1256
|
# Corresponds to the JSON property `altText`
|
1063
1257
|
# @return [String]
|
1064
1258
|
attr_accessor :alt_text
|
1065
1259
|
|
1066
1260
|
# Represents a color in the RGBA color space. This representation is designed
|
1067
|
-
# for simplicity of conversion to
|
1261
|
+
# for simplicity of conversion to and from color representations in various
|
1068
1262
|
# languages over compactness. For example, the fields of this representation can
|
1069
1263
|
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1070
1264
|
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1071
1265
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1072
|
-
# CSS `rgba()` string in JavaScript. This reference page doesn't
|
1266
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't have
|
1073
1267
|
# information about the absolute color space that should be used to interpret
|
1074
|
-
# the RGB value
|
1268
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
1075
1269
|
# applications should assume the sRGB color space. When color equality needs to
|
1076
1270
|
# be decided, implementations, unless documented otherwise, treat two colors as
|
1077
|
-
# equal if all their red, green, blue, and alpha values each differ by at most
|
1078
|
-
# 1e-5
|
1271
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
1272
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
1079
1273
|
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1080
1274
|
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1081
1275
|
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
@@ -1112,24 +1306,29 @@ module Google
|
|
1112
1306
|
# @return [Google::Apis::ChatV1::Color]
|
1113
1307
|
attr_accessor :color
|
1114
1308
|
|
1115
|
-
# If `true`, the button is displayed in
|
1309
|
+
# If `true`, the button is displayed in an inactive state and doesn't respond to
|
1116
1310
|
# user actions.
|
1117
1311
|
# Corresponds to the JSON property `disabled`
|
1118
1312
|
# @return [Boolean]
|
1119
1313
|
attr_accessor :disabled
|
1120
1314
|
alias_method :disabled?, :disabled
|
1121
1315
|
|
1122
|
-
#
|
1316
|
+
# An icon displayed in a widget on a card. For an example in Google Chat apps,
|
1317
|
+
# see [Icon](https://developers.google.com/chat/ui/widgets/icon). Supports [
|
1318
|
+
# built-in](https://developers.google.com/chat/api/guides/message-formats/cards#
|
1319
|
+
# builtinicons) and [custom](https://developers.google.com/chat/api/guides/
|
1320
|
+
# message-formats/cards#customicons) icons.
|
1123
1321
|
# Corresponds to the JSON property `icon`
|
1124
1322
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
|
1125
1323
|
attr_accessor :icon
|
1126
1324
|
|
1127
|
-
# Represents
|
1325
|
+
# Represents how to respond when users click an interactive element on a card,
|
1326
|
+
# such as a button.
|
1128
1327
|
# Corresponds to the JSON property `onClick`
|
1129
1328
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
|
1130
1329
|
attr_accessor :on_click
|
1131
1330
|
|
1132
|
-
# The text
|
1331
|
+
# The text displayed inside the button.
|
1133
1332
|
# Corresponds to the JSON property `text`
|
1134
1333
|
# @return [String]
|
1135
1334
|
attr_accessor :text
|
@@ -1149,7 +1348,8 @@ module Google
|
|
1149
1348
|
end
|
1150
1349
|
end
|
1151
1350
|
|
1152
|
-
# A list of buttons layed out horizontally.
|
1351
|
+
# A list of buttons layed out horizontally. For an example in Google Chat apps,
|
1352
|
+
# see [Button list](https://developers.google.com/chat/ui/widgets/button-list).
|
1153
1353
|
class GoogleAppsCardV1ButtonList
|
1154
1354
|
include Google::Apis::Core::Hashable
|
1155
1355
|
|
@@ -1168,30 +1368,36 @@ module Google
|
|
1168
1368
|
end
|
1169
1369
|
end
|
1170
1370
|
|
1171
|
-
# A card
|
1172
|
-
#
|
1173
|
-
#
|
1174
|
-
#
|
1175
|
-
#
|
1176
|
-
#
|
1177
|
-
#
|
1178
|
-
#
|
1179
|
-
# :
|
1180
|
-
#
|
1181
|
-
#
|
1182
|
-
# "
|
1183
|
-
#
|
1184
|
-
#
|
1185
|
-
# , "
|
1186
|
-
# uncollapsibleWidgetsCount":
|
1187
|
-
#
|
1188
|
-
# `
|
1371
|
+
# A card interface displayed in a Google Chat message or Google Workspace Add-on.
|
1372
|
+
# Cards support a defined layout, interactive UI elements like buttons, and
|
1373
|
+
# rich media like images. Use cards to present detailed information, gather
|
1374
|
+
# information from users, and guide users to take a next step. To learn how to
|
1375
|
+
# build cards, see the following documentation: * For Google Chat apps, see [
|
1376
|
+
# Design dynamic, interactive, and consistent UIs with cards](https://developers.
|
1377
|
+
# google.com/chat/ui). * For Google Workspace Add-ons, see [Card-based
|
1378
|
+
# interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
|
1379
|
+
# **Example: Card message for a Google Chat app** ![Example contact card](https:/
|
1380
|
+
# /developers.google.com/chat/images/card_api_reference.png) To create the
|
1381
|
+
# sample card message in Google Chat, use the following JSON: ``` ` "cardsV2": [
|
1382
|
+
# ` "cardId": "unique-card-id", "card": ` "header": ` "title": "Sasha", "
|
1383
|
+
# subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/
|
1384
|
+
# chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText":
|
1385
|
+
# "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info", "collapsible":
|
1386
|
+
# true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "
|
1387
|
+
# startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "
|
1388
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `,
|
1389
|
+
# `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (
|
1390
|
+
# 555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "
|
1391
|
+
# onClick": ` "openLink": ` "url": "https://example.com/share", ` ` `, ` "text":
|
1392
|
+
# "Edit", "onClick": ` "action": ` "function": "goToView", "parameters": [ ` "
|
1393
|
+
# key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
1189
1394
|
class GoogleAppsCardV1Card
|
1190
1395
|
include Google::Apis::Core::Hashable
|
1191
1396
|
|
1192
|
-
# The card's actions. Actions are added to the card's
|
1193
|
-
#
|
1194
|
-
#
|
1397
|
+
# The card's actions. Actions are added to the card's toolbar menu. Because Chat
|
1398
|
+
# app cards have no toolbar, `cardActions[]` isn't supported by Chat apps. For
|
1399
|
+
# example, the following JSON constructs a card action menu with `Settings` and `
|
1400
|
+
# Send Feedback` options: ``` "card_actions": [ ` "actionLabel": "Settings", "
|
1195
1401
|
# onClick": ` "action": ` "functionName": "goToView", "parameters": [ ` "key": "
|
1196
1402
|
# viewType", "value": "SETTING" ` ], "loadIndicator": "LoadIndicator.SPINNER" ` `
|
1197
1403
|
# `, ` "actionLabel": "Send Feedback", "onClick": ` "openLink": ` "url": "https:
|
@@ -1200,32 +1406,51 @@ module Google
|
|
1200
1406
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1CardAction>]
|
1201
1407
|
attr_accessor :card_actions
|
1202
1408
|
|
1203
|
-
#
|
1409
|
+
# In Google Workspace add-ons, sets the display properties of the `
|
1410
|
+
# peekCardHeader`. Not supported by Chat apps.
|
1204
1411
|
# Corresponds to the JSON property `displayStyle`
|
1205
1412
|
# @return [String]
|
1206
1413
|
attr_accessor :display_style
|
1207
1414
|
|
1208
|
-
# A persistent (sticky) footer that
|
1415
|
+
# A persistent (sticky) footer that that appears at the bottom of the card. For
|
1416
|
+
# an example in Google Chat apps, see [Card footer](https://developers.google.
|
1417
|
+
# com/chat/ui/widgets/card-fixed-footer). Setting `fixedFooter` without
|
1418
|
+
# specifying a `primaryButton` or a `secondaryButton` causes an error. Supported
|
1419
|
+
# by Google Workspace Add-ons and Chat apps. For Chat apps, you can use fixed
|
1420
|
+
# footers in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but
|
1421
|
+
# not [card messages](https://developers.google.com/chat/api/guides/message-
|
1422
|
+
# formats/cards).
|
1209
1423
|
# Corresponds to the JSON property `fixedFooter`
|
1210
1424
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1CardFixedFooter]
|
1211
1425
|
attr_accessor :fixed_footer
|
1212
1426
|
|
1213
|
-
# Represents a card header.
|
1427
|
+
# Represents a card header. For an example in Google Chat apps, see [Card header]
|
1428
|
+
# (https://developers.google.com/chat/ui/widgets/card-header).
|
1214
1429
|
# Corresponds to the JSON property `header`
|
1215
1430
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1CardHeader]
|
1216
1431
|
attr_accessor :header
|
1217
1432
|
|
1218
|
-
# Name of the card. Used as a card identifier in card navigation.
|
1433
|
+
# Name of the card. Used as a card identifier in card navigation. Because Chat
|
1434
|
+
# apps don't support card navigation, they ignore this field.
|
1219
1435
|
# Corresponds to the JSON property `name`
|
1220
1436
|
# @return [String]
|
1221
1437
|
attr_accessor :name
|
1222
1438
|
|
1223
|
-
# Represents a card header.
|
1439
|
+
# Represents a card header. For an example in Google Chat apps, see [Card header]
|
1440
|
+
# (https://developers.google.com/chat/ui/widgets/card-header).
|
1224
1441
|
# Corresponds to the JSON property `peekCardHeader`
|
1225
1442
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1CardHeader]
|
1226
1443
|
attr_accessor :peek_card_header
|
1227
1444
|
|
1228
|
-
#
|
1445
|
+
# The divider style between sections.
|
1446
|
+
# Corresponds to the JSON property `sectionDividerStyle`
|
1447
|
+
# @return [String]
|
1448
|
+
attr_accessor :section_divider_style
|
1449
|
+
|
1450
|
+
# Contains a collection of widgets. Each section has its own, optional header.
|
1451
|
+
# Sections are visually separated by a line divider. For an example in Google
|
1452
|
+
# Chat apps, see [Card section](https://developers.google.com/chat/ui/widgets/
|
1453
|
+
# card-section).
|
1229
1454
|
# Corresponds to the JSON property `sections`
|
1230
1455
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Section>]
|
1231
1456
|
attr_accessor :sections
|
@@ -1242,13 +1467,14 @@ module Google
|
|
1242
1467
|
@header = args[:header] if args.key?(:header)
|
1243
1468
|
@name = args[:name] if args.key?(:name)
|
1244
1469
|
@peek_card_header = args[:peek_card_header] if args.key?(:peek_card_header)
|
1470
|
+
@section_divider_style = args[:section_divider_style] if args.key?(:section_divider_style)
|
1245
1471
|
@sections = args[:sections] if args.key?(:sections)
|
1246
1472
|
end
|
1247
1473
|
end
|
1248
1474
|
|
1249
1475
|
# A card action is the action associated with the card. For example, an invoice
|
1250
1476
|
# card might include actions such as delete invoice, email invoice, or open the
|
1251
|
-
# invoice in a browser.
|
1477
|
+
# invoice in a browser. Not supported by Chat apps.
|
1252
1478
|
class GoogleAppsCardV1CardAction
|
1253
1479
|
include Google::Apis::Core::Hashable
|
1254
1480
|
|
@@ -1257,7 +1483,8 @@ module Google
|
|
1257
1483
|
# @return [String]
|
1258
1484
|
attr_accessor :action_label
|
1259
1485
|
|
1260
|
-
# Represents
|
1486
|
+
# Represents how to respond when users click an interactive element on a card,
|
1487
|
+
# such as a button.
|
1261
1488
|
# Corresponds to the JSON property `onClick`
|
1262
1489
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
|
1263
1490
|
attr_accessor :on_click
|
@@ -1273,16 +1500,29 @@ module Google
|
|
1273
1500
|
end
|
1274
1501
|
end
|
1275
1502
|
|
1276
|
-
# A persistent (sticky) footer that
|
1503
|
+
# A persistent (sticky) footer that that appears at the bottom of the card. For
|
1504
|
+
# an example in Google Chat apps, see [Card footer](https://developers.google.
|
1505
|
+
# com/chat/ui/widgets/card-fixed-footer). Setting `fixedFooter` without
|
1506
|
+
# specifying a `primaryButton` or a `secondaryButton` causes an error. Supported
|
1507
|
+
# by Google Workspace Add-ons and Chat apps. For Chat apps, you can use fixed
|
1508
|
+
# footers in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but
|
1509
|
+
# not [card messages](https://developers.google.com/chat/api/guides/message-
|
1510
|
+
# formats/cards).
|
1277
1511
|
class GoogleAppsCardV1CardFixedFooter
|
1278
1512
|
include Google::Apis::Core::Hashable
|
1279
1513
|
|
1280
|
-
# A
|
1514
|
+
# A text, icon, or text and icon button that users can click. For an example in
|
1515
|
+
# Google Chat apps, see [Button list](https://developers.google.com/chat/ui/
|
1516
|
+
# widgets/button-list). To make an image a clickable button, specify an `Image` (
|
1517
|
+
# not an `ImageComponent`) and set an `onClick` action.
|
1281
1518
|
# Corresponds to the JSON property `primaryButton`
|
1282
1519
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
|
1283
1520
|
attr_accessor :primary_button
|
1284
1521
|
|
1285
|
-
# A
|
1522
|
+
# A text, icon, or text and icon button that users can click. For an example in
|
1523
|
+
# Google Chat apps, see [Button list](https://developers.google.com/chat/ui/
|
1524
|
+
# widgets/button-list). To make an image a clickable button, specify an `Image` (
|
1525
|
+
# not an `ImageComponent`) and set an `onClick` action.
|
1286
1526
|
# Corresponds to the JSON property `secondaryButton`
|
1287
1527
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
|
1288
1528
|
attr_accessor :secondary_button
|
@@ -1298,26 +1538,28 @@ module Google
|
|
1298
1538
|
end
|
1299
1539
|
end
|
1300
1540
|
|
1301
|
-
# Represents a card header.
|
1541
|
+
# Represents a card header. For an example in Google Chat apps, see [Card header]
|
1542
|
+
# (https://developers.google.com/chat/ui/widgets/card-header).
|
1302
1543
|
class GoogleAppsCardV1CardHeader
|
1303
1544
|
include Google::Apis::Core::Hashable
|
1304
1545
|
|
1305
|
-
# The alternative text of this image
|
1546
|
+
# The alternative text of this image that's used for accessibility.
|
1306
1547
|
# Corresponds to the JSON property `imageAltText`
|
1307
1548
|
# @return [String]
|
1308
1549
|
attr_accessor :image_alt_text
|
1309
1550
|
|
1310
|
-
# The image
|
1551
|
+
# The shape used to crop the image.
|
1311
1552
|
# Corresponds to the JSON property `imageType`
|
1312
1553
|
# @return [String]
|
1313
1554
|
attr_accessor :image_type
|
1314
1555
|
|
1315
|
-
# The URL of the image in the card header.
|
1556
|
+
# The HTTPS URL of the image in the card header.
|
1316
1557
|
# Corresponds to the JSON property `imageUrl`
|
1317
1558
|
# @return [String]
|
1318
1559
|
attr_accessor :image_url
|
1319
1560
|
|
1320
|
-
# The subtitle of the card header.
|
1561
|
+
# The subtitle of the card header. If specified, appears on its own line below
|
1562
|
+
# the `title`.
|
1321
1563
|
# Corresponds to the JSON property `subtitle`
|
1322
1564
|
# @return [String]
|
1323
1565
|
attr_accessor :subtitle
|
@@ -1343,45 +1585,127 @@ module Google
|
|
1343
1585
|
end
|
1344
1586
|
end
|
1345
1587
|
|
1346
|
-
#
|
1347
|
-
|
1588
|
+
# A column.
|
1589
|
+
class GoogleAppsCardV1Column
|
1590
|
+
include Google::Apis::Core::Hashable
|
1591
|
+
|
1592
|
+
# Specifies whether widgets align to the left, right, or center of a column.
|
1593
|
+
# Corresponds to the JSON property `horizontalAlignment`
|
1594
|
+
# @return [String]
|
1595
|
+
attr_accessor :horizontal_alignment
|
1596
|
+
|
1597
|
+
# Specifies how a column fills the width of the card.
|
1598
|
+
# Corresponds to the JSON property `horizontalSizeStyle`
|
1599
|
+
# @return [String]
|
1600
|
+
attr_accessor :horizontal_size_style
|
1601
|
+
|
1602
|
+
# Specifies whether widgets align to the top, bottom, or center of a column.
|
1603
|
+
# Corresponds to the JSON property `verticalAlignment`
|
1604
|
+
# @return [String]
|
1605
|
+
attr_accessor :vertical_alignment
|
1606
|
+
|
1607
|
+
# An array of widgets included in a column. Widgets appear in the order that
|
1608
|
+
# they are specified.
|
1609
|
+
# Corresponds to the JSON property `widgets`
|
1610
|
+
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Widgets>]
|
1611
|
+
attr_accessor :widgets
|
1612
|
+
|
1613
|
+
def initialize(**args)
|
1614
|
+
update!(**args)
|
1615
|
+
end
|
1616
|
+
|
1617
|
+
# Update properties of this object
|
1618
|
+
def update!(**args)
|
1619
|
+
@horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
|
1620
|
+
@horizontal_size_style = args[:horizontal_size_style] if args.key?(:horizontal_size_style)
|
1621
|
+
@vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment)
|
1622
|
+
@widgets = args[:widgets] if args.key?(:widgets)
|
1623
|
+
end
|
1624
|
+
end
|
1625
|
+
|
1626
|
+
# The `Columns` widget displays up to 2 columns in a card message or dialog. You
|
1627
|
+
# can add widgets to each column; the widgets appear in the order that they are
|
1628
|
+
# specified. For an example in Google Chat apps, see [Columns](https://
|
1629
|
+
# developers.google.com/chat/ui/widgets/columns). The height of each column is
|
1630
|
+
# determined by the taller column. For example, if the first column is taller
|
1631
|
+
# than the second column, both columns have the height of the first column.
|
1632
|
+
# Because each column can contain a different number of widgets, you can't
|
1633
|
+
# define rows or align widgets between the columns. Columns are displayed side-
|
1634
|
+
# by-side. You can customize the width of each column using the `
|
1635
|
+
# HorizontalSizeStyle` field. If the user's screen width is too narrow, the
|
1636
|
+
# second column wraps below the first: * On web, the second column wraps if the
|
1637
|
+
# screen width is less than or equal to 480 pixels. * On iOS devices, the second
|
1638
|
+
# column wraps if the screen width is less than or equal to 300 pt. * On Android
|
1639
|
+
# devices, the second column wraps if the screen width is less than or equal to
|
1640
|
+
# 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget.
|
1641
|
+
# Supported by Chat apps, but not Google Workspace Add-ons.
|
1642
|
+
class GoogleAppsCardV1Columns
|
1643
|
+
include Google::Apis::Core::Hashable
|
1644
|
+
|
1645
|
+
# An array of columns. You can include up to 2 columns in a card or dialog.
|
1646
|
+
# Corresponds to the JSON property `columnItems`
|
1647
|
+
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Column>]
|
1648
|
+
attr_accessor :column_items
|
1649
|
+
|
1650
|
+
def initialize(**args)
|
1651
|
+
update!(**args)
|
1652
|
+
end
|
1653
|
+
|
1654
|
+
# Update properties of this object
|
1655
|
+
def update!(**args)
|
1656
|
+
@column_items = args[:column_items] if args.key?(:column_items)
|
1657
|
+
end
|
1658
|
+
end
|
1659
|
+
|
1660
|
+
# Lets users input a date, a time, or both a date and a time. For an example in
|
1661
|
+
# Google Chat apps, see [Date time picker](https://developers.google.com/chat/ui/
|
1662
|
+
# widgets/date-time-picker). Users can input text or use the picker to select
|
1663
|
+
# dates and times. If users input an invalid date or time, the picker shows an
|
1664
|
+
# error that prompts users to input the information correctly.
|
1348
1665
|
class GoogleAppsCardV1DateTimePicker
|
1349
1666
|
include Google::Apis::Core::Hashable
|
1350
1667
|
|
1351
|
-
# The
|
1668
|
+
# The text that prompts users to input a date, a time, or a date and time. For
|
1669
|
+
# example, if users are scheduling an appointment, use a label such as `
|
1670
|
+
# Appointment date` or `Appointment date and time`.
|
1352
1671
|
# Corresponds to the JSON property `label`
|
1353
1672
|
# @return [String]
|
1354
1673
|
attr_accessor :label
|
1355
1674
|
|
1356
|
-
# The name
|
1357
|
-
#
|
1675
|
+
# The name by which the `DateTimePicker` is identified in a form input event.
|
1676
|
+
# For details about working with form inputs, see [Receive form data](https://
|
1677
|
+
# developers.google.com/chat/ui/read-form-data).
|
1358
1678
|
# Corresponds to the JSON property `name`
|
1359
1679
|
# @return [String]
|
1360
1680
|
attr_accessor :name
|
1361
1681
|
|
1362
1682
|
# An action that describes the behavior when the form is submitted. For example,
|
1363
|
-
# an Apps Script
|
1683
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
1684
|
+
# triggered, the form values are sent to the server.
|
1364
1685
|
# Corresponds to the JSON property `onChangeAction`
|
1365
1686
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1366
1687
|
attr_accessor :on_change_action
|
1367
1688
|
|
1368
1689
|
# The number representing the time zone offset from UTC, in minutes. If set, the
|
1369
|
-
# `value_ms_epoch` is displayed in the specified time zone. If
|
1370
|
-
# the user's time zone setting
|
1690
|
+
# `value_ms_epoch` is displayed in the specified time zone. If unset, the value
|
1691
|
+
# defaults to the user's time zone setting.
|
1371
1692
|
# Corresponds to the JSON property `timezoneOffsetDate`
|
1372
1693
|
# @return [Fixnum]
|
1373
1694
|
attr_accessor :timezone_offset_date
|
1374
1695
|
|
1375
|
-
#
|
1696
|
+
# Whether the widget supports inputting a date, a time, or the date and time.
|
1376
1697
|
# Corresponds to the JSON property `type`
|
1377
1698
|
# @return [String]
|
1378
1699
|
attr_accessor :type
|
1379
1700
|
|
1380
|
-
# The value
|
1381
|
-
#
|
1382
|
-
# type
|
1383
|
-
#
|
1384
|
-
#
|
1701
|
+
# The default value displayed in the widget, in milliseconds since [Unix epoch
|
1702
|
+
# time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the
|
1703
|
+
# type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and
|
1704
|
+
# time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `
|
1705
|
+
# 1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example,
|
1706
|
+
# to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in
|
1707
|
+
# UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 *
|
1708
|
+
# 1000`).
|
1385
1709
|
# Corresponds to the JSON property `valueMsEpoch`
|
1386
1710
|
# @return [Fixnum]
|
1387
1711
|
attr_accessor :value_ms_epoch
|
@@ -1402,58 +1726,81 @@ module Google
|
|
1402
1726
|
end
|
1403
1727
|
|
1404
1728
|
# A widget that displays text with optional decorations such as a label above or
|
1405
|
-
# below the text, an icon in front of the text, a selection widget or a button
|
1406
|
-
# after the text.
|
1729
|
+
# below the text, an icon in front of the text, a selection widget, or a button
|
1730
|
+
# after the text. For an example in Google Chat apps, see [Decorated text](https:
|
1731
|
+
# //developers.google.com/chat/ui/widgets/decorated-text).
|
1407
1732
|
class GoogleAppsCardV1DecoratedText
|
1408
1733
|
include Google::Apis::Core::Hashable
|
1409
1734
|
|
1410
|
-
# The
|
1735
|
+
# The text that appears below `text`. Always wraps.
|
1411
1736
|
# Corresponds to the JSON property `bottomLabel`
|
1412
1737
|
# @return [String]
|
1413
1738
|
attr_accessor :bottom_label
|
1414
1739
|
|
1415
|
-
# A
|
1740
|
+
# A text, icon, or text and icon button that users can click. For an example in
|
1741
|
+
# Google Chat apps, see [Button list](https://developers.google.com/chat/ui/
|
1742
|
+
# widgets/button-list). To make an image a clickable button, specify an `Image` (
|
1743
|
+
# not an `ImageComponent`) and set an `onClick` action.
|
1416
1744
|
# Corresponds to the JSON property `button`
|
1417
1745
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
|
1418
1746
|
attr_accessor :button
|
1419
1747
|
|
1420
|
-
# An icon displayed
|
1748
|
+
# An icon displayed in a widget on a card. For an example in Google Chat apps,
|
1749
|
+
# see [Icon](https://developers.google.com/chat/ui/widgets/icon). Supports [
|
1750
|
+
# built-in](https://developers.google.com/chat/api/guides/message-formats/cards#
|
1751
|
+
# builtinicons) and [custom](https://developers.google.com/chat/api/guides/
|
1752
|
+
# message-formats/cards#customicons) icons.
|
1421
1753
|
# Corresponds to the JSON property `endIcon`
|
1422
1754
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
|
1423
1755
|
attr_accessor :end_icon
|
1424
1756
|
|
1425
|
-
#
|
1757
|
+
# An icon displayed in a widget on a card. For an example in Google Chat apps,
|
1758
|
+
# see [Icon](https://developers.google.com/chat/ui/widgets/icon). Supports [
|
1759
|
+
# built-in](https://developers.google.com/chat/api/guides/message-formats/cards#
|
1760
|
+
# builtinicons) and [custom](https://developers.google.com/chat/api/guides/
|
1761
|
+
# message-formats/cards#customicons) icons.
|
1426
1762
|
# Corresponds to the JSON property `icon`
|
1427
1763
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
|
1428
1764
|
attr_accessor :icon
|
1429
1765
|
|
1430
|
-
# Represents
|
1766
|
+
# Represents how to respond when users click an interactive element on a card,
|
1767
|
+
# such as a button.
|
1431
1768
|
# Corresponds to the JSON property `onClick`
|
1432
1769
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
|
1433
1770
|
attr_accessor :on_click
|
1434
1771
|
|
1435
|
-
#
|
1772
|
+
# An icon displayed in a widget on a card. For an example in Google Chat apps,
|
1773
|
+
# see [Icon](https://developers.google.com/chat/ui/widgets/icon). Supports [
|
1774
|
+
# built-in](https://developers.google.com/chat/api/guides/message-formats/cards#
|
1775
|
+
# builtinicons) and [custom](https://developers.google.com/chat/api/guides/
|
1776
|
+
# message-formats/cards#customicons) icons.
|
1436
1777
|
# Corresponds to the JSON property `startIcon`
|
1437
1778
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
|
1438
1779
|
attr_accessor :start_icon
|
1439
1780
|
|
1440
|
-
# Either a toggle-style switch or a checkbox.
|
1781
|
+
# Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
|
1782
|
+
# Only supported in the `decoratedText` widget.
|
1441
1783
|
# Corresponds to the JSON property `switchControl`
|
1442
1784
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1SwitchControl]
|
1443
1785
|
attr_accessor :switch_control
|
1444
1786
|
|
1445
|
-
# Required. The
|
1787
|
+
# Required. The primary text. Supports simple formatting. For more information
|
1788
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
1789
|
+
# developers.google.com/chat/api/guides/message-formats/cards#card-formatting)
|
1790
|
+
# and [Formatting text in Google Workspace Add-ons](https://developers.google.
|
1791
|
+
# com/apps-script/add-ons/concepts/widgets#text_formatting).
|
1446
1792
|
# Corresponds to the JSON property `text`
|
1447
1793
|
# @return [String]
|
1448
1794
|
attr_accessor :text
|
1449
1795
|
|
1450
|
-
# The
|
1796
|
+
# The text that appears above `text`. Always truncates.
|
1451
1797
|
# Corresponds to the JSON property `topLabel`
|
1452
1798
|
# @return [String]
|
1453
1799
|
attr_accessor :top_label
|
1454
1800
|
|
1455
|
-
# The wrap text setting. If `true`, the text
|
1456
|
-
#
|
1801
|
+
# The wrap text setting. If `true`, the text wraps and displays on multiple
|
1802
|
+
# lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel`
|
1803
|
+
# and `bottomLabel`.
|
1457
1804
|
# Corresponds to the JSON property `wrapText`
|
1458
1805
|
# @return [Boolean]
|
1459
1806
|
attr_accessor :wrap_text
|
@@ -1478,7 +1825,10 @@ module Google
|
|
1478
1825
|
end
|
1479
1826
|
end
|
1480
1827
|
|
1481
|
-
#
|
1828
|
+
# Displays a divider between widgets as a horizontal line. For an example in
|
1829
|
+
# Google Chat apps, see [Divider](https://developers.google.com/chat/ui/widgets/
|
1830
|
+
# divider). For example, the following JSON creates a divider: ``` "divider": ``
|
1831
|
+
# ```
|
1482
1832
|
class GoogleAppsCardV1Divider
|
1483
1833
|
include Google::Apis::Core::Hashable
|
1484
1834
|
|
@@ -1491,11 +1841,24 @@ module Google
|
|
1491
1841
|
end
|
1492
1842
|
end
|
1493
1843
|
|
1494
|
-
#
|
1844
|
+
# Displays a grid with a collection of items. Items can only include text or
|
1845
|
+
# images. For responsive columns, or to include more than text or images, use `
|
1846
|
+
# Columns`. For an example in Google Chat apps, see [Grid](https://developers.
|
1847
|
+
# google.com/chat/ui/widgets/grid). A grid supports any number of columns and
|
1848
|
+
# items. The number of rows is determined by items divided by columns. A grid
|
1849
|
+
# with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has
|
1850
|
+
# 6 rows. For example, the following JSON creates a 2 column grid with a single
|
1851
|
+
# item: ``` "grid": ` "title": "A fine collection of items", "columnCount": 2, "
|
1852
|
+
# borderStyle": ` "type": "STROKE", "cornerRadius": 4 `, "items": [ ` "image": `
|
1853
|
+
# "imageUri": "https://www.example.com/image.png", "cropStyle": ` "type": "
|
1854
|
+
# SQUARE" `, "borderStyle": ` "type": "STROKE" ` `, "title": "An item", "
|
1855
|
+
# textAlignment": "CENTER" ` ], "onClick": ` "openLink": ` "url": "https://www.
|
1856
|
+
# example.com" ` ` ` ```
|
1495
1857
|
class GoogleAppsCardV1Grid
|
1496
1858
|
include Google::Apis::Core::Hashable
|
1497
1859
|
|
1498
|
-
#
|
1860
|
+
# The style options for the border of a card or widget, including the border
|
1861
|
+
# type and color.
|
1499
1862
|
# Corresponds to the JSON property `borderStyle`
|
1500
1863
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1BorderStyle]
|
1501
1864
|
attr_accessor :border_style
|
@@ -1512,7 +1875,8 @@ module Google
|
|
1512
1875
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1GridItem>]
|
1513
1876
|
attr_accessor :items
|
1514
1877
|
|
1515
|
-
# Represents
|
1878
|
+
# Represents how to respond when users click an interactive element on a card,
|
1879
|
+
# such as a button.
|
1516
1880
|
# Corresponds to the JSON property `onClick`
|
1517
1881
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
|
1518
1882
|
attr_accessor :on_click
|
@@ -1536,12 +1900,13 @@ module Google
|
|
1536
1900
|
end
|
1537
1901
|
end
|
1538
1902
|
|
1539
|
-
# Represents
|
1903
|
+
# Represents an item in a grid layout. Items can contain text, an image, or both
|
1904
|
+
# text and an image.
|
1540
1905
|
class GoogleAppsCardV1GridItem
|
1541
1906
|
include Google::Apis::Core::Hashable
|
1542
1907
|
|
1543
1908
|
# A user-specified identifier for this grid item. This identifier is returned in
|
1544
|
-
# the parent
|
1909
|
+
# the parent grid's `onClick` callback parameters.
|
1545
1910
|
# Corresponds to the JSON property `id`
|
1546
1911
|
# @return [String]
|
1547
1912
|
attr_accessor :id
|
@@ -1561,11 +1926,6 @@ module Google
|
|
1561
1926
|
# @return [String]
|
1562
1927
|
attr_accessor :subtitle
|
1563
1928
|
|
1564
|
-
# The horizontal alignment of the grid item's text.
|
1565
|
-
# Corresponds to the JSON property `textAlignment`
|
1566
|
-
# @return [String]
|
1567
|
-
attr_accessor :text_alignment
|
1568
|
-
|
1569
1929
|
# The grid item's title.
|
1570
1930
|
# Corresponds to the JSON property `title`
|
1571
1931
|
# @return [String]
|
@@ -1581,33 +1941,47 @@ module Google
|
|
1581
1941
|
@image = args[:image] if args.key?(:image)
|
1582
1942
|
@layout = args[:layout] if args.key?(:layout)
|
1583
1943
|
@subtitle = args[:subtitle] if args.key?(:subtitle)
|
1584
|
-
@text_alignment = args[:text_alignment] if args.key?(:text_alignment)
|
1585
1944
|
@title = args[:title] if args.key?(:title)
|
1586
1945
|
end
|
1587
1946
|
end
|
1588
1947
|
|
1589
|
-
#
|
1948
|
+
# An icon displayed in a widget on a card. For an example in Google Chat apps,
|
1949
|
+
# see [Icon](https://developers.google.com/chat/ui/widgets/icon). Supports [
|
1950
|
+
# built-in](https://developers.google.com/chat/api/guides/message-formats/cards#
|
1951
|
+
# builtinicons) and [custom](https://developers.google.com/chat/api/guides/
|
1952
|
+
# message-formats/cards#customicons) icons.
|
1590
1953
|
class GoogleAppsCardV1Icon
|
1591
1954
|
include Google::Apis::Core::Hashable
|
1592
1955
|
|
1593
|
-
#
|
1594
|
-
# provided
|
1956
|
+
# Optional. A description of the icon used for accessibility. If unspecified,
|
1957
|
+
# the default value `Button` is provided. As a best practice, you should set a
|
1958
|
+
# helpful description for what the icon displays, and if applicable, what it
|
1959
|
+
# does. For example, `A user's account portrait`, or `Opens a new browser tab
|
1960
|
+
# and navigates to the Google Chat developer documentation at https://developers.
|
1961
|
+
# google.com/chat`. If the icon is set in a `Button`, the `altText` appears as
|
1962
|
+
# helper text when the user hovers over the button. However, if the button also
|
1963
|
+
# sets `text`, the icon's `altText` is ignored.
|
1595
1964
|
# Corresponds to the JSON property `altText`
|
1596
1965
|
# @return [String]
|
1597
1966
|
attr_accessor :alt_text
|
1598
1967
|
|
1599
|
-
#
|
1968
|
+
# Display a custom icon hosted at an HTTPS URL. For example: ``` "iconUrl": "
|
1969
|
+
# https://developers.google.com/chat/images/quickstart-app-avatar.png" ```
|
1970
|
+
# Supported file types include `.png` and `.jpg`.
|
1600
1971
|
# Corresponds to the JSON property `iconUrl`
|
1601
1972
|
# @return [String]
|
1602
1973
|
attr_accessor :icon_url
|
1603
1974
|
|
1604
1975
|
# The crop style applied to the image. In some cases, applying a `CIRCLE` crop
|
1605
|
-
# causes the image to be drawn larger than a
|
1976
|
+
# causes the image to be drawn larger than a built-in icon.
|
1606
1977
|
# Corresponds to the JSON property `imageType`
|
1607
1978
|
# @return [String]
|
1608
1979
|
attr_accessor :image_type
|
1609
1980
|
|
1610
|
-
#
|
1981
|
+
# Display one of the built-in icons provided by Google Workspace. For example,
|
1982
|
+
# to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For
|
1983
|
+
# a full list of supported icons, see [built-in icons](https://developers.google.
|
1984
|
+
# com/chat/api/guides/message-formats/cards#builtinicons).
|
1611
1985
|
# Corresponds to the JSON property `knownIcon`
|
1612
1986
|
# @return [String]
|
1613
1987
|
attr_accessor :known_icon
|
@@ -1625,21 +1999,24 @@ module Google
|
|
1625
1999
|
end
|
1626
2000
|
end
|
1627
2001
|
|
1628
|
-
# An image that is specified by a URL and can have an `onClick` action.
|
2002
|
+
# An image that is specified by a URL and can have an `onClick` action. For an
|
2003
|
+
# example, see [Image](https://developers.google.com/chat/ui/widgets/image).
|
1629
2004
|
class GoogleAppsCardV1Image
|
1630
2005
|
include Google::Apis::Core::Hashable
|
1631
2006
|
|
1632
|
-
# The alternative text of this image
|
2007
|
+
# The alternative text of this image that's used for accessibility.
|
1633
2008
|
# Corresponds to the JSON property `altText`
|
1634
2009
|
# @return [String]
|
1635
2010
|
attr_accessor :alt_text
|
1636
2011
|
|
1637
|
-
#
|
2012
|
+
# The HTTPS URL that hosts the image. For example: ``` https://developers.google.
|
2013
|
+
# com/chat/images/quickstart-app-avatar.png ```
|
1638
2014
|
# Corresponds to the JSON property `imageUrl`
|
1639
2015
|
# @return [String]
|
1640
2016
|
attr_accessor :image_url
|
1641
2017
|
|
1642
|
-
# Represents
|
2018
|
+
# Represents how to respond when users click an interactive element on a card,
|
2019
|
+
# such as a button.
|
1643
2020
|
# Corresponds to the JSON property `onClick`
|
1644
2021
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
|
1645
2022
|
attr_accessor :on_click
|
@@ -1665,12 +2042,15 @@ module Google
|
|
1665
2042
|
# @return [String]
|
1666
2043
|
attr_accessor :alt_text
|
1667
2044
|
|
1668
|
-
#
|
2045
|
+
# The style options for the border of a card or widget, including the border
|
2046
|
+
# type and color.
|
1669
2047
|
# Corresponds to the JSON property `borderStyle`
|
1670
2048
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1BorderStyle]
|
1671
2049
|
attr_accessor :border_style
|
1672
2050
|
|
1673
|
-
# Represents the crop style applied to an image.
|
2051
|
+
# Represents the crop style applied to an image. For example, here's how to
|
2052
|
+
# apply a 16:9 aspect ratio: ``` cropStyle ` "type": "RECTANGLE_CUSTOM", "
|
2053
|
+
# aspectRatio": 16/9 ` ```
|
1674
2054
|
# Corresponds to the JSON property `cropStyle`
|
1675
2055
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1ImageCropStyle]
|
1676
2056
|
attr_accessor :crop_style
|
@@ -1693,11 +2073,15 @@ module Google
|
|
1693
2073
|
end
|
1694
2074
|
end
|
1695
2075
|
|
1696
|
-
# Represents the crop style applied to an image.
|
2076
|
+
# Represents the crop style applied to an image. For example, here's how to
|
2077
|
+
# apply a 16:9 aspect ratio: ``` cropStyle ` "type": "RECTANGLE_CUSTOM", "
|
2078
|
+
# aspectRatio": 16/9 ` ```
|
1697
2079
|
class GoogleAppsCardV1ImageCropStyle
|
1698
2080
|
include Google::Apis::Core::Hashable
|
1699
2081
|
|
1700
|
-
# The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
|
2082
|
+
# The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example,
|
2083
|
+
# here's how to apply a 16:9 aspect ratio: ``` cropStyle ` "type": "
|
2084
|
+
# RECTANGLE_CUSTOM", "aspectRatio": 16/9 ` ```
|
1701
2085
|
# Corresponds to the JSON property `aspectRatio`
|
1702
2086
|
# @return [Float]
|
1703
2087
|
attr_accessor :aspect_ratio
|
@@ -1718,40 +2102,48 @@ module Google
|
|
1718
2102
|
end
|
1719
2103
|
end
|
1720
2104
|
|
1721
|
-
# Represents
|
2105
|
+
# Represents how to respond when users click an interactive element on a card,
|
2106
|
+
# such as a button.
|
1722
2107
|
class GoogleAppsCardV1OnClick
|
1723
2108
|
include Google::Apis::Core::Hashable
|
1724
2109
|
|
1725
2110
|
# An action that describes the behavior when the form is submitted. For example,
|
1726
|
-
# an Apps Script
|
2111
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2112
|
+
# triggered, the form values are sent to the server.
|
1727
2113
|
# Corresponds to the JSON property `action`
|
1728
2114
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1729
2115
|
attr_accessor :action
|
1730
2116
|
|
1731
|
-
# A card
|
1732
|
-
#
|
1733
|
-
#
|
1734
|
-
#
|
1735
|
-
#
|
1736
|
-
#
|
1737
|
-
#
|
1738
|
-
#
|
1739
|
-
# :
|
1740
|
-
#
|
1741
|
-
#
|
1742
|
-
# "
|
1743
|
-
#
|
1744
|
-
#
|
1745
|
-
# , "
|
1746
|
-
# uncollapsibleWidgetsCount":
|
1747
|
-
#
|
1748
|
-
# `
|
2117
|
+
# A card interface displayed in a Google Chat message or Google Workspace Add-on.
|
2118
|
+
# Cards support a defined layout, interactive UI elements like buttons, and
|
2119
|
+
# rich media like images. Use cards to present detailed information, gather
|
2120
|
+
# information from users, and guide users to take a next step. To learn how to
|
2121
|
+
# build cards, see the following documentation: * For Google Chat apps, see [
|
2122
|
+
# Design dynamic, interactive, and consistent UIs with cards](https://developers.
|
2123
|
+
# google.com/chat/ui). * For Google Workspace Add-ons, see [Card-based
|
2124
|
+
# interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
|
2125
|
+
# **Example: Card message for a Google Chat app** ![Example contact card](https:/
|
2126
|
+
# /developers.google.com/chat/images/card_api_reference.png) To create the
|
2127
|
+
# sample card message in Google Chat, use the following JSON: ``` ` "cardsV2": [
|
2128
|
+
# ` "cardId": "unique-card-id", "card": ` "header": ` "title": "Sasha", "
|
2129
|
+
# subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/
|
2130
|
+
# chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText":
|
2131
|
+
# "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info", "collapsible":
|
2132
|
+
# true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "
|
2133
|
+
# startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "
|
2134
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `,
|
2135
|
+
# `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (
|
2136
|
+
# 555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "
|
2137
|
+
# onClick": ` "openLink": ` "url": "https://example.com/share", ` ` `, ` "text":
|
2138
|
+
# "Edit", "onClick": ` "action": ` "function": "goToView", "parameters": [ ` "
|
2139
|
+
# key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
1749
2140
|
# Corresponds to the JSON property `card`
|
1750
2141
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
|
1751
2142
|
attr_accessor :card
|
1752
2143
|
|
1753
2144
|
# An action that describes the behavior when the form is submitted. For example,
|
1754
|
-
# an Apps Script
|
2145
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2146
|
+
# triggered, the form values are sent to the server.
|
1755
2147
|
# Corresponds to the JSON property `openDynamicLinkAction`
|
1756
2148
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1757
2149
|
attr_accessor :open_dynamic_link_action
|
@@ -1806,34 +2198,75 @@ module Google
|
|
1806
2198
|
end
|
1807
2199
|
end
|
1808
2200
|
|
2201
|
+
# Chat apps only. For a `SelectionInput` widget that uses a multi-select menu,
|
2202
|
+
# the data from a [Google Workspace host application](https://developers.google.
|
2203
|
+
# com/chat/api/reference/rest/v1/HostApp). Used to populate the items in the
|
2204
|
+
# multi-select menu. [Developer Preview](https://developers.google.com/workspace/
|
2205
|
+
# preview).
|
2206
|
+
class GoogleAppsCardV1PlatformDataSource
|
2207
|
+
include Google::Apis::Core::Hashable
|
2208
|
+
|
2209
|
+
# For a `SelectionInput` widget that uses a multi-select menu, a data source
|
2210
|
+
# shared by all Google Workspace host applications, such as users in a Google
|
2211
|
+
# Workspace organization. [Developer Preview](https://developers.google.com/
|
2212
|
+
# workspace/preview).
|
2213
|
+
# Corresponds to the JSON property `commonDataSource`
|
2214
|
+
# @return [String]
|
2215
|
+
attr_accessor :common_data_source
|
2216
|
+
|
2217
|
+
# Chat apps only. For a `SelectionInput` widget that uses a multi-select menu, a
|
2218
|
+
# data source from a Google Workspace host application. [Developer Preview](
|
2219
|
+
# https://developers.google.com/workspace/preview).
|
2220
|
+
# Corresponds to the JSON property `hostAppDataSource`
|
2221
|
+
# @return [Google::Apis::ChatV1::HostAppDataSourceMarkup]
|
2222
|
+
attr_accessor :host_app_data_source
|
2223
|
+
|
2224
|
+
def initialize(**args)
|
2225
|
+
update!(**args)
|
2226
|
+
end
|
2227
|
+
|
2228
|
+
# Update properties of this object
|
2229
|
+
def update!(**args)
|
2230
|
+
@common_data_source = args[:common_data_source] if args.key?(:common_data_source)
|
2231
|
+
@host_app_data_source = args[:host_app_data_source] if args.key?(:host_app_data_source)
|
2232
|
+
end
|
2233
|
+
end
|
2234
|
+
|
1809
2235
|
# A section contains a collection of widgets that are rendered vertically in the
|
1810
|
-
# order that they
|
1811
|
-
# width, so there is currently no need for layout properties, for example, float.
|
2236
|
+
# order that they're specified.
|
1812
2237
|
class GoogleAppsCardV1Section
|
1813
2238
|
include Google::Apis::Core::Hashable
|
1814
2239
|
|
1815
|
-
# Indicates whether this section is collapsible.
|
1816
|
-
# the
|
2240
|
+
# Indicates whether this section is collapsible. Collapsible sections hide some
|
2241
|
+
# or all widgets, but users can expand the section to reveal the hidden widgets
|
2242
|
+
# by clicking **Show more**. Users can hide the widgets again by clicking **Show
|
2243
|
+
# less**. To determine which widgets are hidden, specify `
|
2244
|
+
# uncollapsibleWidgetsCount`.
|
1817
2245
|
# Corresponds to the JSON property `collapsible`
|
1818
2246
|
# @return [Boolean]
|
1819
2247
|
attr_accessor :collapsible
|
1820
2248
|
alias_method :collapsible?, :collapsible
|
1821
2249
|
|
1822
|
-
#
|
2250
|
+
# Text that appears at the top of a section. Supports simple HTML formatted text.
|
2251
|
+
# For more information about formatting text, see [Formatting text in Google
|
2252
|
+
# Chat apps](https://developers.google.com/chat/api/guides/message-formats/cards#
|
2253
|
+
# card-formatting) and [Formatting text in Google Workspace Add-ons](https://
|
2254
|
+
# developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
1823
2255
|
# Corresponds to the JSON property `header`
|
1824
2256
|
# @return [String]
|
1825
2257
|
attr_accessor :header
|
1826
2258
|
|
1827
|
-
# The number of uncollapsible widgets
|
1828
|
-
#
|
1829
|
-
#
|
2259
|
+
# The number of uncollapsible widgets which remain visible even when a section
|
2260
|
+
# is collapsed. For example, when a section contains five widgets and the `
|
2261
|
+
# uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always
|
2262
|
+
# shown and the last three are collapsed by default. The `
|
1830
2263
|
# uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `
|
1831
2264
|
# true`.
|
1832
2265
|
# Corresponds to the JSON property `uncollapsibleWidgetsCount`
|
1833
2266
|
# @return [Fixnum]
|
1834
2267
|
attr_accessor :uncollapsible_widgets_count
|
1835
2268
|
|
1836
|
-
#
|
2269
|
+
# All the widgets in the section. Must contain at least one widget.
|
1837
2270
|
# Corresponds to the JSON property `widgets`
|
1838
2271
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Widget>]
|
1839
2272
|
attr_accessor :widgets
|
@@ -1851,33 +2284,81 @@ module Google
|
|
1851
2284
|
end
|
1852
2285
|
end
|
1853
2286
|
|
1854
|
-
# A widget that creates
|
1855
|
-
# a dropdown menu.
|
2287
|
+
# A widget that creates one or more UI items that users can select. For example,
|
2288
|
+
# a dropdown menu or checkboxes. You can use this widget to collect data that
|
2289
|
+
# can be predicted or enumerated. For an example in Google Chat apps, see [
|
2290
|
+
# Selection input](https://developers.google.com/chat/ui/widgets/selection-input)
|
2291
|
+
# . Chat apps can process the value of items that users select or input. For
|
2292
|
+
# details about working with form inputs, see [Receive form data](https://
|
2293
|
+
# developers.google.com/chat/ui/read-form-data). To collect undefined or
|
2294
|
+
# abstract data from users, use the TextInput widget.
|
1856
2295
|
class GoogleAppsCardV1SelectionInput
|
1857
2296
|
include Google::Apis::Core::Hashable
|
1858
2297
|
|
1859
|
-
# An
|
2298
|
+
# An action that describes the behavior when the form is submitted. For example,
|
2299
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2300
|
+
# triggered, the form values are sent to the server.
|
2301
|
+
# Corresponds to the JSON property `externalDataSource`
|
2302
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
2303
|
+
attr_accessor :external_data_source
|
2304
|
+
|
2305
|
+
# An array of selectable items. For example, an array of radio buttons or
|
2306
|
+
# checkboxes. Supports up to 100 items.
|
1860
2307
|
# Corresponds to the JSON property `items`
|
1861
2308
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>]
|
1862
2309
|
attr_accessor :items
|
1863
2310
|
|
1864
|
-
# The
|
2311
|
+
# The text that appears above the selection input field in the user interface.
|
2312
|
+
# Specify text that helps the user enter the information your app needs. For
|
2313
|
+
# example, if users are selecting the urgency of a work ticket from a drop-down
|
2314
|
+
# menu, the label might be "Urgency" or "Select urgency".
|
1865
2315
|
# Corresponds to the JSON property `label`
|
1866
2316
|
# @return [String]
|
1867
2317
|
attr_accessor :label
|
1868
2318
|
|
1869
|
-
#
|
2319
|
+
# For multi-select menus, the maximum number of items that a user can select.
|
2320
|
+
# Minimum value is 1 item. If unspecified, set to 3 items. [Developer Preview](
|
2321
|
+
# https://developers.google.com/workspace/preview).
|
2322
|
+
# Corresponds to the JSON property `multiSelectMaxSelectedItems`
|
2323
|
+
# @return [Fixnum]
|
2324
|
+
attr_accessor :multi_select_max_selected_items
|
2325
|
+
|
2326
|
+
# For multi-select menus, the number of text characters that a user inputs
|
2327
|
+
# before the Chat app queries autocomplete and displays suggested items on the
|
2328
|
+
# card. If unspecified, set to 0 characters for static data sources and 3
|
2329
|
+
# characters for external data sources. [Developer Preview](https://developers.
|
2330
|
+
# google.com/workspace/preview).
|
2331
|
+
# Corresponds to the JSON property `multiSelectMinQueryLength`
|
2332
|
+
# @return [Fixnum]
|
2333
|
+
attr_accessor :multi_select_min_query_length
|
2334
|
+
|
2335
|
+
# The name that identifies the selection input in a form input event. For
|
2336
|
+
# details about working with form inputs, see [Receive form data](https://
|
2337
|
+
# developers.google.com/chat/ui/read-form-data).
|
1870
2338
|
# Corresponds to the JSON property `name`
|
1871
2339
|
# @return [String]
|
1872
2340
|
attr_accessor :name
|
1873
2341
|
|
1874
2342
|
# An action that describes the behavior when the form is submitted. For example,
|
1875
|
-
# an Apps Script
|
2343
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2344
|
+
# triggered, the form values are sent to the server.
|
1876
2345
|
# Corresponds to the JSON property `onChangeAction`
|
1877
2346
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1878
2347
|
attr_accessor :on_change_action
|
1879
2348
|
|
1880
|
-
#
|
2349
|
+
# Chat apps only. For a `SelectionInput` widget that uses a multi-select menu,
|
2350
|
+
# the data from a [Google Workspace host application](https://developers.google.
|
2351
|
+
# com/chat/api/reference/rest/v1/HostApp). Used to populate the items in the
|
2352
|
+
# multi-select menu. [Developer Preview](https://developers.google.com/workspace/
|
2353
|
+
# preview).
|
2354
|
+
# Corresponds to the JSON property `platformDataSource`
|
2355
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1PlatformDataSource]
|
2356
|
+
attr_accessor :platform_data_source
|
2357
|
+
|
2358
|
+
# The type of items that are displayed to users in a `SelectionInput` widget.
|
2359
|
+
# Selection types support different types of interactions. For example, users
|
2360
|
+
# can select one or more checkboxes, but they can only select one value from a
|
2361
|
+
# dropdown menu.
|
1881
2362
|
# Corresponds to the JSON property `type`
|
1882
2363
|
# @return [String]
|
1883
2364
|
attr_accessor :type
|
@@ -1888,32 +2369,54 @@ module Google
|
|
1888
2369
|
|
1889
2370
|
# Update properties of this object
|
1890
2371
|
def update!(**args)
|
2372
|
+
@external_data_source = args[:external_data_source] if args.key?(:external_data_source)
|
1891
2373
|
@items = args[:items] if args.key?(:items)
|
1892
2374
|
@label = args[:label] if args.key?(:label)
|
2375
|
+
@multi_select_max_selected_items = args[:multi_select_max_selected_items] if args.key?(:multi_select_max_selected_items)
|
2376
|
+
@multi_select_min_query_length = args[:multi_select_min_query_length] if args.key?(:multi_select_min_query_length)
|
1893
2377
|
@name = args[:name] if args.key?(:name)
|
1894
2378
|
@on_change_action = args[:on_change_action] if args.key?(:on_change_action)
|
2379
|
+
@platform_data_source = args[:platform_data_source] if args.key?(:platform_data_source)
|
1895
2380
|
@type = args[:type] if args.key?(:type)
|
1896
2381
|
end
|
1897
2382
|
end
|
1898
2383
|
|
1899
|
-
#
|
2384
|
+
# An item that users can select in a selection input, such as a checkbox or
|
2385
|
+
# switch.
|
1900
2386
|
class GoogleAppsCardV1SelectionItem
|
1901
2387
|
include Google::Apis::Core::Hashable
|
1902
2388
|
|
1903
|
-
#
|
1904
|
-
#
|
2389
|
+
# For multi-select menus, a text description or label that's displayed below the
|
2390
|
+
# item's `text` field. [Developer Preview](https://developers.google.com/
|
2391
|
+
# workspace/preview).
|
2392
|
+
# Corresponds to the JSON property `bottomText`
|
2393
|
+
# @return [String]
|
2394
|
+
attr_accessor :bottom_text
|
2395
|
+
|
2396
|
+
# Whether the item is selected by default. If the selection input only accepts
|
2397
|
+
# one value (such as for radio buttons or a dropdown menu), only set this field
|
2398
|
+
# for one item.
|
1905
2399
|
# Corresponds to the JSON property `selected`
|
1906
2400
|
# @return [Boolean]
|
1907
2401
|
attr_accessor :selected
|
1908
2402
|
alias_method :selected?, :selected
|
1909
2403
|
|
1910
|
-
#
|
2404
|
+
# For multi-select menus, the URL for the icon displayed next to the item's `
|
2405
|
+
# text` field. Supports PNG and JPEG files. Must be an `HTTPS` URL. For example,
|
2406
|
+
# `https://developers.google.com/chat/images/quickstart-app-avatar.png`. [
|
2407
|
+
# Developer Preview](https://developers.google.com/workspace/preview).
|
2408
|
+
# Corresponds to the JSON property `startIconUri`
|
2409
|
+
# @return [String]
|
2410
|
+
attr_accessor :start_icon_uri
|
2411
|
+
|
2412
|
+
# The text that identifies or describes the item to users.
|
1911
2413
|
# Corresponds to the JSON property `text`
|
1912
2414
|
# @return [String]
|
1913
2415
|
attr_accessor :text
|
1914
2416
|
|
1915
2417
|
# The value associated with this item. The client should use this as a form
|
1916
|
-
# input value.
|
2418
|
+
# input value. For details about working with form inputs, see [Receive form
|
2419
|
+
# data](https://developers.google.com/chat/ui/read-form-data).
|
1917
2420
|
# Corresponds to the JSON property `value`
|
1918
2421
|
# @return [String]
|
1919
2422
|
attr_accessor :value
|
@@ -1924,17 +2427,20 @@ module Google
|
|
1924
2427
|
|
1925
2428
|
# Update properties of this object
|
1926
2429
|
def update!(**args)
|
2430
|
+
@bottom_text = args[:bottom_text] if args.key?(:bottom_text)
|
1927
2431
|
@selected = args[:selected] if args.key?(:selected)
|
2432
|
+
@start_icon_uri = args[:start_icon_uri] if args.key?(:start_icon_uri)
|
1928
2433
|
@text = args[:text] if args.key?(:text)
|
1929
2434
|
@value = args[:value] if args.key?(:value)
|
1930
2435
|
end
|
1931
2436
|
end
|
1932
2437
|
|
1933
|
-
#
|
2438
|
+
# One suggested value that users can enter in a text input field.
|
1934
2439
|
class GoogleAppsCardV1SuggestionItem
|
1935
2440
|
include Google::Apis::Core::Hashable
|
1936
2441
|
|
1937
|
-
# The suggested
|
2442
|
+
# The value of a suggested input to a text input field. This is equivalent to
|
2443
|
+
# what users enter themselves.
|
1938
2444
|
# Corresponds to the JSON property `text`
|
1939
2445
|
# @return [String]
|
1940
2446
|
attr_accessor :text
|
@@ -1949,12 +2455,21 @@ module Google
|
|
1949
2455
|
end
|
1950
2456
|
end
|
1951
2457
|
|
1952
|
-
#
|
1953
|
-
# text input
|
2458
|
+
# Suggested values that users can enter. These values appear when users click
|
2459
|
+
# inside the text input field. As users type, the suggested values dynamically
|
2460
|
+
# filter to match what the users have typed. For example, a text input field for
|
2461
|
+
# programming language might suggest Java, JavaScript, Python, and C++. When
|
2462
|
+
# users start typing `Jav`, the list of suggestions filters to show `Java` and `
|
2463
|
+
# JavaScript`. Suggested values help guide users to enter values that your app
|
2464
|
+
# can make sense of. When referring to JavaScript, some users might enter `
|
2465
|
+
# javascript` and others `java script`. Suggesting `JavaScript` can standardize
|
2466
|
+
# how users interact with your app. When specified, `TextInput.type` is always `
|
2467
|
+
# SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`.
|
1954
2468
|
class GoogleAppsCardV1Suggestions
|
1955
2469
|
include Google::Apis::Core::Hashable
|
1956
2470
|
|
1957
|
-
# A list of suggestions used for autocomplete recommendations
|
2471
|
+
# A list of suggestions used for autocomplete recommendations in text input
|
2472
|
+
# fields.
|
1958
2473
|
# Corresponds to the JSON property `items`
|
1959
2474
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1SuggestionItem>]
|
1960
2475
|
attr_accessor :items
|
@@ -1969,33 +2484,39 @@ module Google
|
|
1969
2484
|
end
|
1970
2485
|
end
|
1971
2486
|
|
1972
|
-
# Either a toggle-style switch or a checkbox.
|
2487
|
+
# Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
|
2488
|
+
# Only supported in the `decoratedText` widget.
|
1973
2489
|
class GoogleAppsCardV1SwitchControl
|
1974
2490
|
include Google::Apis::Core::Hashable
|
1975
2491
|
|
1976
|
-
#
|
2492
|
+
# How the switch appears in the user interface.
|
1977
2493
|
# Corresponds to the JSON property `controlType`
|
1978
2494
|
# @return [String]
|
1979
2495
|
attr_accessor :control_type
|
1980
2496
|
|
1981
|
-
# The name
|
2497
|
+
# The name by which the switch widget is identified in a form input event. For
|
2498
|
+
# details about working with form inputs, see [Receive form data](https://
|
2499
|
+
# developers.google.com/chat/ui/read-form-data).
|
1982
2500
|
# Corresponds to the JSON property `name`
|
1983
2501
|
# @return [String]
|
1984
2502
|
attr_accessor :name
|
1985
2503
|
|
1986
2504
|
# An action that describes the behavior when the form is submitted. For example,
|
1987
|
-
# an Apps Script
|
2505
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2506
|
+
# triggered, the form values are sent to the server.
|
1988
2507
|
# Corresponds to the JSON property `onChangeAction`
|
1989
2508
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1990
2509
|
attr_accessor :on_change_action
|
1991
2510
|
|
1992
|
-
#
|
2511
|
+
# When `true`, the switch is selected.
|
1993
2512
|
# Corresponds to the JSON property `selected`
|
1994
2513
|
# @return [Boolean]
|
1995
2514
|
attr_accessor :selected
|
1996
2515
|
alias_method :selected?, :selected
|
1997
2516
|
|
1998
|
-
# The value
|
2517
|
+
# The value entered by a user, returned as part of a form input event. For
|
2518
|
+
# details about working with form inputs, see [Receive form data](https://
|
2519
|
+
# developers.google.com/chat/ui/read-form-data).
|
1999
2520
|
# Corresponds to the JSON property `value`
|
2000
2521
|
# @return [String]
|
2001
2522
|
attr_accessor :value
|
@@ -2014,50 +2535,77 @@ module Google
|
|
2014
2535
|
end
|
2015
2536
|
end
|
2016
2537
|
|
2017
|
-
# A
|
2018
|
-
#
|
2538
|
+
# A field in which users can enter text. Supports suggestions and on-change
|
2539
|
+
# actions. For an example in Google Chat apps, see [Text input](https://
|
2540
|
+
# developers.google.com/chat/ui/widgets/text-input). Chat apps receive and can
|
2541
|
+
# process the value of entered text during form input events. For details about
|
2542
|
+
# working with form inputs, see [Receive form data](https://developers.google.
|
2543
|
+
# com/chat/ui/read-form-data). When you need to collect undefined or abstract
|
2544
|
+
# data from users, use a text input. To collect defined or enumerated data from
|
2545
|
+
# users, use the SelectionInput widget.
|
2019
2546
|
class GoogleAppsCardV1TextInput
|
2020
2547
|
include Google::Apis::Core::Hashable
|
2021
2548
|
|
2022
2549
|
# An action that describes the behavior when the form is submitted. For example,
|
2023
|
-
# an Apps Script
|
2550
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2551
|
+
# triggered, the form values are sent to the server.
|
2024
2552
|
# Corresponds to the JSON property `autoCompleteAction`
|
2025
2553
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
2026
2554
|
attr_accessor :auto_complete_action
|
2027
2555
|
|
2028
|
-
#
|
2556
|
+
# Text that appears below the text input field meant to assist users by
|
2557
|
+
# prompting them to enter a certain value. This text is always visible. Required
|
2558
|
+
# if `label` is unspecified. Otherwise, optional.
|
2029
2559
|
# Corresponds to the JSON property `hintText`
|
2030
2560
|
# @return [String]
|
2031
2561
|
attr_accessor :hint_text
|
2032
2562
|
|
2033
|
-
#
|
2034
|
-
# text input
|
2563
|
+
# Suggested values that users can enter. These values appear when users click
|
2564
|
+
# inside the text input field. As users type, the suggested values dynamically
|
2565
|
+
# filter to match what the users have typed. For example, a text input field for
|
2566
|
+
# programming language might suggest Java, JavaScript, Python, and C++. When
|
2567
|
+
# users start typing `Jav`, the list of suggestions filters to show `Java` and `
|
2568
|
+
# JavaScript`. Suggested values help guide users to enter values that your app
|
2569
|
+
# can make sense of. When referring to JavaScript, some users might enter `
|
2570
|
+
# javascript` and others `java script`. Suggesting `JavaScript` can standardize
|
2571
|
+
# how users interact with your app. When specified, `TextInput.type` is always `
|
2572
|
+
# SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`.
|
2035
2573
|
# Corresponds to the JSON property `initialSuggestions`
|
2036
2574
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Suggestions]
|
2037
2575
|
attr_accessor :initial_suggestions
|
2038
2576
|
|
2039
|
-
#
|
2577
|
+
# The text that appears above the text input field in the user interface.
|
2578
|
+
# Specify text that helps the user enter the information your app needs. For
|
2579
|
+
# example, if you are asking someone's name, but specifically need their surname,
|
2580
|
+
# write `surname` instead of `name`. Required if `hintText` is unspecified.
|
2581
|
+
# Otherwise, optional.
|
2040
2582
|
# Corresponds to the JSON property `label`
|
2041
2583
|
# @return [String]
|
2042
2584
|
attr_accessor :label
|
2043
2585
|
|
2044
|
-
# The name
|
2586
|
+
# The name by which the text input is identified in a form input event. For
|
2587
|
+
# details about working with form inputs, see [Receive form data](https://
|
2588
|
+
# developers.google.com/chat/ui/read-form-data).
|
2045
2589
|
# Corresponds to the JSON property `name`
|
2046
2590
|
# @return [String]
|
2047
2591
|
attr_accessor :name
|
2048
2592
|
|
2049
2593
|
# An action that describes the behavior when the form is submitted. For example,
|
2050
|
-
# an Apps Script
|
2594
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2595
|
+
# triggered, the form values are sent to the server.
|
2051
2596
|
# Corresponds to the JSON property `onChangeAction`
|
2052
2597
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
2053
2598
|
attr_accessor :on_change_action
|
2054
2599
|
|
2055
|
-
#
|
2600
|
+
# How a text input field appears in the user interface. For example, whether the
|
2601
|
+
# field is single or multi-line.
|
2056
2602
|
# Corresponds to the JSON property `type`
|
2057
2603
|
# @return [String]
|
2058
2604
|
attr_accessor :type
|
2059
2605
|
|
2060
|
-
# The
|
2606
|
+
# The value entered by a user, returned as part of a form input event. For
|
2607
|
+
# details about working with form inputs, see [Receive form data](https://
|
2608
|
+
# developers.google.com/chat/ui/read-form-data).
|
2061
2609
|
# Corresponds to the JSON property `value`
|
2062
2610
|
# @return [String]
|
2063
2611
|
attr_accessor :value
|
@@ -2079,9 +2627,13 @@ module Google
|
|
2079
2627
|
end
|
2080
2628
|
end
|
2081
2629
|
|
2082
|
-
# A paragraph of text that supports formatting.
|
2083
|
-
# developers.google.com/
|
2084
|
-
#
|
2630
|
+
# A paragraph of text that supports formatting. For an example in Google Chat
|
2631
|
+
# apps, see [Text paragraph](https://developers.google.com/chat/ui/widgets/text-
|
2632
|
+
# paragraph). For more information about formatting text, see [Formatting text
|
2633
|
+
# in Google Chat apps](https://developers.google.com/chat/api/guides/message-
|
2634
|
+
# formats/cards##card-formatting) and [Formatting text in Google Workspace Add-
|
2635
|
+
# ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#
|
2636
|
+
# text_formatting).
|
2085
2637
|
class GoogleAppsCardV1TextParagraph
|
2086
2638
|
include Google::Apis::Core::Hashable
|
2087
2639
|
|
@@ -2100,63 +2652,121 @@ module Google
|
|
2100
2652
|
end
|
2101
2653
|
end
|
2102
2654
|
|
2103
|
-
# A widget is a
|
2655
|
+
# Each card is made up of widgets. A widget is a composite object that can
|
2656
|
+
# represent one of text, images, buttons, and other object types.
|
2104
2657
|
class GoogleAppsCardV1Widget
|
2105
2658
|
include Google::Apis::Core::Hashable
|
2106
2659
|
|
2107
|
-
# A list of buttons layed out horizontally.
|
2660
|
+
# A list of buttons layed out horizontally. For an example in Google Chat apps,
|
2661
|
+
# see [Button list](https://developers.google.com/chat/ui/widgets/button-list).
|
2108
2662
|
# Corresponds to the JSON property `buttonList`
|
2109
2663
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1ButtonList]
|
2110
2664
|
attr_accessor :button_list
|
2111
2665
|
|
2112
|
-
# The widget
|
2113
|
-
#
|
2666
|
+
# The `Columns` widget displays up to 2 columns in a card message or dialog. You
|
2667
|
+
# can add widgets to each column; the widgets appear in the order that they are
|
2668
|
+
# specified. For an example in Google Chat apps, see [Columns](https://
|
2669
|
+
# developers.google.com/chat/ui/widgets/columns). The height of each column is
|
2670
|
+
# determined by the taller column. For example, if the first column is taller
|
2671
|
+
# than the second column, both columns have the height of the first column.
|
2672
|
+
# Because each column can contain a different number of widgets, you can't
|
2673
|
+
# define rows or align widgets between the columns. Columns are displayed side-
|
2674
|
+
# by-side. You can customize the width of each column using the `
|
2675
|
+
# HorizontalSizeStyle` field. If the user's screen width is too narrow, the
|
2676
|
+
# second column wraps below the first: * On web, the second column wraps if the
|
2677
|
+
# screen width is less than or equal to 480 pixels. * On iOS devices, the second
|
2678
|
+
# column wraps if the screen width is less than or equal to 300 pt. * On Android
|
2679
|
+
# devices, the second column wraps if the screen width is less than or equal to
|
2680
|
+
# 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget.
|
2681
|
+
# Supported by Chat apps, but not Google Workspace Add-ons.
|
2682
|
+
# Corresponds to the JSON property `columns`
|
2683
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Columns]
|
2684
|
+
attr_accessor :columns
|
2685
|
+
|
2686
|
+
# Lets users input a date, a time, or both a date and a time. For an example in
|
2687
|
+
# Google Chat apps, see [Date time picker](https://developers.google.com/chat/ui/
|
2688
|
+
# widgets/date-time-picker). Users can input text or use the picker to select
|
2689
|
+
# dates and times. If users input an invalid date or time, the picker shows an
|
2690
|
+
# error that prompts users to input the information correctly.
|
2114
2691
|
# Corresponds to the JSON property `dateTimePicker`
|
2115
2692
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker]
|
2116
2693
|
attr_accessor :date_time_picker
|
2117
2694
|
|
2118
2695
|
# A widget that displays text with optional decorations such as a label above or
|
2119
|
-
# below the text, an icon in front of the text, a selection widget or a button
|
2120
|
-
# after the text.
|
2696
|
+
# below the text, an icon in front of the text, a selection widget, or a button
|
2697
|
+
# after the text. For an example in Google Chat apps, see [Decorated text](https:
|
2698
|
+
# //developers.google.com/chat/ui/widgets/decorated-text).
|
2121
2699
|
# Corresponds to the JSON property `decoratedText`
|
2122
2700
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DecoratedText]
|
2123
2701
|
attr_accessor :decorated_text
|
2124
2702
|
|
2125
|
-
#
|
2703
|
+
# Displays a divider between widgets as a horizontal line. For an example in
|
2704
|
+
# Google Chat apps, see [Divider](https://developers.google.com/chat/ui/widgets/
|
2705
|
+
# divider). For example, the following JSON creates a divider: ``` "divider": ``
|
2706
|
+
# ```
|
2126
2707
|
# Corresponds to the JSON property `divider`
|
2127
2708
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Divider]
|
2128
2709
|
attr_accessor :divider
|
2129
2710
|
|
2130
|
-
#
|
2711
|
+
# Displays a grid with a collection of items. Items can only include text or
|
2712
|
+
# images. For responsive columns, or to include more than text or images, use `
|
2713
|
+
# Columns`. For an example in Google Chat apps, see [Grid](https://developers.
|
2714
|
+
# google.com/chat/ui/widgets/grid). A grid supports any number of columns and
|
2715
|
+
# items. The number of rows is determined by items divided by columns. A grid
|
2716
|
+
# with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has
|
2717
|
+
# 6 rows. For example, the following JSON creates a 2 column grid with a single
|
2718
|
+
# item: ``` "grid": ` "title": "A fine collection of items", "columnCount": 2, "
|
2719
|
+
# borderStyle": ` "type": "STROKE", "cornerRadius": 4 `, "items": [ ` "image": `
|
2720
|
+
# "imageUri": "https://www.example.com/image.png", "cropStyle": ` "type": "
|
2721
|
+
# SQUARE" `, "borderStyle": ` "type": "STROKE" ` `, "title": "An item", "
|
2722
|
+
# textAlignment": "CENTER" ` ], "onClick": ` "openLink": ` "url": "https://www.
|
2723
|
+
# example.com" ` ` ` ```
|
2131
2724
|
# Corresponds to the JSON property `grid`
|
2132
2725
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Grid]
|
2133
2726
|
attr_accessor :grid
|
2134
2727
|
|
2135
|
-
#
|
2728
|
+
# Specifies whether widgets align to the left, right, or center of a column.
|
2136
2729
|
# Corresponds to the JSON property `horizontalAlignment`
|
2137
2730
|
# @return [String]
|
2138
2731
|
attr_accessor :horizontal_alignment
|
2139
2732
|
|
2140
|
-
# An image that is specified by a URL and can have an `onClick` action.
|
2733
|
+
# An image that is specified by a URL and can have an `onClick` action. For an
|
2734
|
+
# example, see [Image](https://developers.google.com/chat/ui/widgets/image).
|
2141
2735
|
# Corresponds to the JSON property `image`
|
2142
2736
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Image]
|
2143
2737
|
attr_accessor :image
|
2144
2738
|
|
2145
|
-
# A widget that creates
|
2146
|
-
# a dropdown menu.
|
2739
|
+
# A widget that creates one or more UI items that users can select. For example,
|
2740
|
+
# a dropdown menu or checkboxes. You can use this widget to collect data that
|
2741
|
+
# can be predicted or enumerated. For an example in Google Chat apps, see [
|
2742
|
+
# Selection input](https://developers.google.com/chat/ui/widgets/selection-input)
|
2743
|
+
# . Chat apps can process the value of items that users select or input. For
|
2744
|
+
# details about working with form inputs, see [Receive form data](https://
|
2745
|
+
# developers.google.com/chat/ui/read-form-data). To collect undefined or
|
2746
|
+
# abstract data from users, use the TextInput widget.
|
2147
2747
|
# Corresponds to the JSON property `selectionInput`
|
2148
2748
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput]
|
2149
2749
|
attr_accessor :selection_input
|
2150
2750
|
|
2151
|
-
# A
|
2152
|
-
#
|
2751
|
+
# A field in which users can enter text. Supports suggestions and on-change
|
2752
|
+
# actions. For an example in Google Chat apps, see [Text input](https://
|
2753
|
+
# developers.google.com/chat/ui/widgets/text-input). Chat apps receive and can
|
2754
|
+
# process the value of entered text during form input events. For details about
|
2755
|
+
# working with form inputs, see [Receive form data](https://developers.google.
|
2756
|
+
# com/chat/ui/read-form-data). When you need to collect undefined or abstract
|
2757
|
+
# data from users, use a text input. To collect defined or enumerated data from
|
2758
|
+
# users, use the SelectionInput widget.
|
2153
2759
|
# Corresponds to the JSON property `textInput`
|
2154
2760
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextInput]
|
2155
2761
|
attr_accessor :text_input
|
2156
2762
|
|
2157
|
-
# A paragraph of text that supports formatting.
|
2158
|
-
# developers.google.com/
|
2159
|
-
#
|
2763
|
+
# A paragraph of text that supports formatting. For an example in Google Chat
|
2764
|
+
# apps, see [Text paragraph](https://developers.google.com/chat/ui/widgets/text-
|
2765
|
+
# paragraph). For more information about formatting text, see [Formatting text
|
2766
|
+
# in Google Chat apps](https://developers.google.com/chat/api/guides/message-
|
2767
|
+
# formats/cards##card-formatting) and [Formatting text in Google Workspace Add-
|
2768
|
+
# ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#
|
2769
|
+
# text_formatting).
|
2160
2770
|
# Corresponds to the JSON property `textParagraph`
|
2161
2771
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextParagraph]
|
2162
2772
|
attr_accessor :text_paragraph
|
@@ -2168,6 +2778,7 @@ module Google
|
|
2168
2778
|
# Update properties of this object
|
2169
2779
|
def update!(**args)
|
2170
2780
|
@button_list = args[:button_list] if args.key?(:button_list)
|
2781
|
+
@columns = args[:columns] if args.key?(:columns)
|
2171
2782
|
@date_time_picker = args[:date_time_picker] if args.key?(:date_time_picker)
|
2172
2783
|
@decorated_text = args[:decorated_text] if args.key?(:decorated_text)
|
2173
2784
|
@divider = args[:divider] if args.key?(:divider)
|
@@ -2180,14 +2791,122 @@ module Google
|
|
2180
2791
|
end
|
2181
2792
|
end
|
2182
2793
|
|
2183
|
-
#
|
2794
|
+
# The supported widgets that you can include in a column.
|
2795
|
+
class GoogleAppsCardV1Widgets
|
2796
|
+
include Google::Apis::Core::Hashable
|
2797
|
+
|
2798
|
+
# A list of buttons layed out horizontally. For an example in Google Chat apps,
|
2799
|
+
# see [Button list](https://developers.google.com/chat/ui/widgets/button-list).
|
2800
|
+
# Corresponds to the JSON property `buttonList`
|
2801
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1ButtonList]
|
2802
|
+
attr_accessor :button_list
|
2803
|
+
|
2804
|
+
# Lets users input a date, a time, or both a date and a time. For an example in
|
2805
|
+
# Google Chat apps, see [Date time picker](https://developers.google.com/chat/ui/
|
2806
|
+
# widgets/date-time-picker). Users can input text or use the picker to select
|
2807
|
+
# dates and times. If users input an invalid date or time, the picker shows an
|
2808
|
+
# error that prompts users to input the information correctly.
|
2809
|
+
# Corresponds to the JSON property `dateTimePicker`
|
2810
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker]
|
2811
|
+
attr_accessor :date_time_picker
|
2812
|
+
|
2813
|
+
# A widget that displays text with optional decorations such as a label above or
|
2814
|
+
# below the text, an icon in front of the text, a selection widget, or a button
|
2815
|
+
# after the text. For an example in Google Chat apps, see [Decorated text](https:
|
2816
|
+
# //developers.google.com/chat/ui/widgets/decorated-text).
|
2817
|
+
# Corresponds to the JSON property `decoratedText`
|
2818
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DecoratedText]
|
2819
|
+
attr_accessor :decorated_text
|
2820
|
+
|
2821
|
+
# An image that is specified by a URL and can have an `onClick` action. For an
|
2822
|
+
# example, see [Image](https://developers.google.com/chat/ui/widgets/image).
|
2823
|
+
# Corresponds to the JSON property `image`
|
2824
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Image]
|
2825
|
+
attr_accessor :image
|
2826
|
+
|
2827
|
+
# A widget that creates one or more UI items that users can select. For example,
|
2828
|
+
# a dropdown menu or checkboxes. You can use this widget to collect data that
|
2829
|
+
# can be predicted or enumerated. For an example in Google Chat apps, see [
|
2830
|
+
# Selection input](https://developers.google.com/chat/ui/widgets/selection-input)
|
2831
|
+
# . Chat apps can process the value of items that users select or input. For
|
2832
|
+
# details about working with form inputs, see [Receive form data](https://
|
2833
|
+
# developers.google.com/chat/ui/read-form-data). To collect undefined or
|
2834
|
+
# abstract data from users, use the TextInput widget.
|
2835
|
+
# Corresponds to the JSON property `selectionInput`
|
2836
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput]
|
2837
|
+
attr_accessor :selection_input
|
2838
|
+
|
2839
|
+
# A field in which users can enter text. Supports suggestions and on-change
|
2840
|
+
# actions. For an example in Google Chat apps, see [Text input](https://
|
2841
|
+
# developers.google.com/chat/ui/widgets/text-input). Chat apps receive and can
|
2842
|
+
# process the value of entered text during form input events. For details about
|
2843
|
+
# working with form inputs, see [Receive form data](https://developers.google.
|
2844
|
+
# com/chat/ui/read-form-data). When you need to collect undefined or abstract
|
2845
|
+
# data from users, use a text input. To collect defined or enumerated data from
|
2846
|
+
# users, use the SelectionInput widget.
|
2847
|
+
# Corresponds to the JSON property `textInput`
|
2848
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextInput]
|
2849
|
+
attr_accessor :text_input
|
2850
|
+
|
2851
|
+
# A paragraph of text that supports formatting. For an example in Google Chat
|
2852
|
+
# apps, see [Text paragraph](https://developers.google.com/chat/ui/widgets/text-
|
2853
|
+
# paragraph). For more information about formatting text, see [Formatting text
|
2854
|
+
# in Google Chat apps](https://developers.google.com/chat/api/guides/message-
|
2855
|
+
# formats/cards##card-formatting) and [Formatting text in Google Workspace Add-
|
2856
|
+
# ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#
|
2857
|
+
# text_formatting).
|
2858
|
+
# Corresponds to the JSON property `textParagraph`
|
2859
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextParagraph]
|
2860
|
+
attr_accessor :text_paragraph
|
2861
|
+
|
2862
|
+
def initialize(**args)
|
2863
|
+
update!(**args)
|
2864
|
+
end
|
2865
|
+
|
2866
|
+
# Update properties of this object
|
2867
|
+
def update!(**args)
|
2868
|
+
@button_list = args[:button_list] if args.key?(:button_list)
|
2869
|
+
@date_time_picker = args[:date_time_picker] if args.key?(:date_time_picker)
|
2870
|
+
@decorated_text = args[:decorated_text] if args.key?(:decorated_text)
|
2871
|
+
@image = args[:image] if args.key?(:image)
|
2872
|
+
@selection_input = args[:selection_input] if args.key?(:selection_input)
|
2873
|
+
@text_input = args[:text_input] if args.key?(:text_input)
|
2874
|
+
@text_paragraph = args[:text_paragraph] if args.key?(:text_paragraph)
|
2875
|
+
end
|
2876
|
+
end
|
2877
|
+
|
2878
|
+
# Chat apps only. For a `SelectionInput` widget that uses a multi-select menu, a
|
2879
|
+
# data source from a Google Workspace host application. [Developer Preview](
|
2880
|
+
# https://developers.google.com/workspace/preview).
|
2881
|
+
class HostAppDataSourceMarkup
|
2882
|
+
include Google::Apis::Core::Hashable
|
2883
|
+
|
2884
|
+
# Chat apps only. For a `SelectionInput` widget that uses a multi-select menu, a
|
2885
|
+
# data source from Google Chat. For example, a list of Google Chat spaces of
|
2886
|
+
# which the user is a member. [Developer Preview](https://developers.google.com/
|
2887
|
+
# workspace/preview).
|
2888
|
+
# Corresponds to the JSON property `chatDataSource`
|
2889
|
+
# @return [Google::Apis::ChatV1::ChatClientDataSourceMarkup]
|
2890
|
+
attr_accessor :chat_data_source
|
2891
|
+
|
2892
|
+
def initialize(**args)
|
2893
|
+
update!(**args)
|
2894
|
+
end
|
2895
|
+
|
2896
|
+
# Update properties of this object
|
2897
|
+
def update!(**args)
|
2898
|
+
@chat_data_source = args[:chat_data_source] if args.key?(:chat_data_source)
|
2899
|
+
end
|
2900
|
+
end
|
2901
|
+
|
2902
|
+
# An image that's specified by a URL and can have an `onclick` action.
|
2184
2903
|
class Image
|
2185
2904
|
include Google::Apis::Core::Hashable
|
2186
2905
|
|
2187
|
-
# The aspect ratio of this image (width
|
2188
|
-
#
|
2189
|
-
#
|
2190
|
-
#
|
2906
|
+
# The aspect ratio of this image (width and height). This field lets you reserve
|
2907
|
+
# the right height for the image while waiting for it to load. It's not meant to
|
2908
|
+
# override the built-in aspect ratio of the image. If unset, the server fills it
|
2909
|
+
# by prefetching the image.
|
2191
2910
|
# Corresponds to the JSON property `aspectRatio`
|
2192
2911
|
# @return [Float]
|
2193
2912
|
attr_accessor :aspect_ratio
|
@@ -2197,7 +2916,7 @@ module Google
|
|
2197
2916
|
# @return [String]
|
2198
2917
|
attr_accessor :image_url
|
2199
2918
|
|
2200
|
-
# An onclick action (
|
2919
|
+
# An `onclick` action (for example, open a link).
|
2201
2920
|
# Corresponds to the JSON property `onClick`
|
2202
2921
|
# @return [Google::Apis::ChatV1::OnClick]
|
2203
2922
|
attr_accessor :on_click
|
@@ -2214,11 +2933,11 @@ module Google
|
|
2214
2933
|
end
|
2215
2934
|
end
|
2216
2935
|
|
2217
|
-
# An image button with an onclick action.
|
2936
|
+
# An image button with an `onclick` action.
|
2218
2937
|
class ImageButton
|
2219
2938
|
include Google::Apis::Core::Hashable
|
2220
2939
|
|
2221
|
-
# The icon specified by an enum that indices to an icon provided by Chat API.
|
2940
|
+
# The icon specified by an `enum` that indices to an icon provided by Chat API.
|
2222
2941
|
# Corresponds to the JSON property `icon`
|
2223
2942
|
# @return [String]
|
2224
2943
|
attr_accessor :icon
|
@@ -2228,13 +2947,13 @@ module Google
|
|
2228
2947
|
# @return [String]
|
2229
2948
|
attr_accessor :icon_url
|
2230
2949
|
|
2231
|
-
# The name of this image_button
|
2232
|
-
#
|
2950
|
+
# The name of this `image_button` that's used for accessibility. Default value
|
2951
|
+
# is provided if this name isn't specified.
|
2233
2952
|
# Corresponds to the JSON property `name`
|
2234
2953
|
# @return [String]
|
2235
2954
|
attr_accessor :name
|
2236
2955
|
|
2237
|
-
# An onclick action (
|
2956
|
+
# An `onclick` action (for example, open a link).
|
2238
2957
|
# Corresponds to the JSON property `onClick`
|
2239
2958
|
# @return [Google::Apis::ChatV1::OnClick]
|
2240
2959
|
attr_accessor :on_click
|
@@ -2252,16 +2971,18 @@ module Google
|
|
2252
2971
|
end
|
2253
2972
|
end
|
2254
2973
|
|
2255
|
-
# Types of data
|
2974
|
+
# Types of data that users can enter on cards or dialogs. To learn how to
|
2975
|
+
# process information from users, see [Read form data input by users on cards](
|
2976
|
+
# https://developers.google.com/chat/ui/read-form-data).
|
2256
2977
|
class Inputs
|
2257
2978
|
include Google::Apis::Core::Hashable
|
2258
2979
|
|
2259
|
-
# Date input values.
|
2980
|
+
# Date input values.
|
2260
2981
|
# Corresponds to the JSON property `dateInput`
|
2261
2982
|
# @return [Google::Apis::ChatV1::DateInput]
|
2262
2983
|
attr_accessor :date_input
|
2263
2984
|
|
2264
|
-
# Date and time input values.
|
2985
|
+
# Date and time input values.
|
2265
2986
|
# Corresponds to the JSON property `dateTimeInput`
|
2266
2987
|
# @return [Google::Apis::ChatV1::DateTimeInput]
|
2267
2988
|
attr_accessor :date_time_input
|
@@ -2273,7 +2994,7 @@ module Google
|
|
2273
2994
|
# @return [Google::Apis::ChatV1::StringInputs]
|
2274
2995
|
attr_accessor :string_inputs
|
2275
2996
|
|
2276
|
-
# Time input values.
|
2997
|
+
# Time input values.
|
2277
2998
|
# Corresponds to the JSON property `timeInput`
|
2278
2999
|
# @return [Google::Apis::ChatV1::TimeInput]
|
2279
3000
|
attr_accessor :time_input
|
@@ -2291,12 +3012,16 @@ module Google
|
|
2291
3012
|
end
|
2292
3013
|
end
|
2293
3014
|
|
2294
|
-
# A UI element contains a key (label) and a value (content).
|
2295
|
-
#
|
3015
|
+
# A UI element contains a key (label) and a value (content). This element can
|
3016
|
+
# also contain some actions such as `onclick` button.
|
2296
3017
|
class KeyValue
|
2297
3018
|
include Google::Apis::Core::Hashable
|
2298
3019
|
|
2299
|
-
# The text of the bottom label. Formatted text supported.
|
3020
|
+
# The text of the bottom label. Formatted text supported. For more information
|
3021
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
3022
|
+
# developers.google.com/chat/api/guides/message-formats/cards#
|
3023
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
3024
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2300
3025
|
# Corresponds to the JSON property `bottomLabel`
|
2301
3026
|
# @return [String]
|
2302
3027
|
attr_accessor :bottom_label
|
@@ -2306,7 +3031,11 @@ module Google
|
|
2306
3031
|
# @return [Google::Apis::ChatV1::Button]
|
2307
3032
|
attr_accessor :button
|
2308
3033
|
|
2309
|
-
# The text of the content. Formatted text supported and always required.
|
3034
|
+
# The text of the content. Formatted text supported and always required. For
|
3035
|
+
# more information about formatting text, see [Formatting text in Google Chat
|
3036
|
+
# apps](https://developers.google.com/chat/api/guides/message-formats/cards#
|
3037
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
3038
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2310
3039
|
# Corresponds to the JSON property `content`
|
2311
3040
|
# @return [String]
|
2312
3041
|
attr_accessor :content
|
@@ -2317,8 +3046,8 @@ module Google
|
|
2317
3046
|
attr_accessor :content_multiline
|
2318
3047
|
alias_method :content_multiline?, :content_multiline
|
2319
3048
|
|
2320
|
-
# An enum value that
|
2321
|
-
#
|
3049
|
+
# An enum value that's replaced by the Chat API with the corresponding icon
|
3050
|
+
# image.
|
2322
3051
|
# Corresponds to the JSON property `icon`
|
2323
3052
|
# @return [String]
|
2324
3053
|
attr_accessor :icon
|
@@ -2328,12 +3057,16 @@ module Google
|
|
2328
3057
|
# @return [String]
|
2329
3058
|
attr_accessor :icon_url
|
2330
3059
|
|
2331
|
-
# An onclick action (
|
3060
|
+
# An `onclick` action (for example, open a link).
|
2332
3061
|
# Corresponds to the JSON property `onClick`
|
2333
3062
|
# @return [Google::Apis::ChatV1::OnClick]
|
2334
3063
|
attr_accessor :on_click
|
2335
3064
|
|
2336
|
-
# The text of the top label. Formatted text supported.
|
3065
|
+
# The text of the top label. Formatted text supported. For more information
|
3066
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
3067
|
+
# developers.google.com/chat/api/guides/message-formats/cards#
|
3068
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
3069
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2337
3070
|
# Corresponds to the JSON property `topLabel`
|
2338
3071
|
# @return [String]
|
2339
3072
|
attr_accessor :top_label
|
@@ -2364,8 +3097,8 @@ module Google
|
|
2364
3097
|
# @return [Array<Google::Apis::ChatV1::Membership>]
|
2365
3098
|
attr_accessor :memberships
|
2366
3099
|
|
2367
|
-
#
|
2368
|
-
#
|
3100
|
+
# A token that you can send as `pageToken` to retrieve the next page of results.
|
3101
|
+
# If empty, there are no subsequent pages.
|
2369
3102
|
# Corresponds to the JSON property `nextPageToken`
|
2370
3103
|
# @return [String]
|
2371
3104
|
attr_accessor :next_page_token
|
@@ -2381,13 +3114,64 @@ module Google
|
|
2381
3114
|
end
|
2382
3115
|
end
|
2383
3116
|
|
3117
|
+
#
|
3118
|
+
class ListMessagesResponse
|
3119
|
+
include Google::Apis::Core::Hashable
|
3120
|
+
|
3121
|
+
# List of messages.
|
3122
|
+
# Corresponds to the JSON property `messages`
|
3123
|
+
# @return [Array<Google::Apis::ChatV1::Message>]
|
3124
|
+
attr_accessor :messages
|
3125
|
+
|
3126
|
+
# You can send a token as `pageToken` to retrieve the next page of results. If
|
3127
|
+
# empty, there are no subsequent pages.
|
3128
|
+
# Corresponds to the JSON property `nextPageToken`
|
3129
|
+
# @return [String]
|
3130
|
+
attr_accessor :next_page_token
|
3131
|
+
|
3132
|
+
def initialize(**args)
|
3133
|
+
update!(**args)
|
3134
|
+
end
|
3135
|
+
|
3136
|
+
# Update properties of this object
|
3137
|
+
def update!(**args)
|
3138
|
+
@messages = args[:messages] if args.key?(:messages)
|
3139
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
3140
|
+
end
|
3141
|
+
end
|
3142
|
+
|
3143
|
+
#
|
3144
|
+
class ListReactionsResponse
|
3145
|
+
include Google::Apis::Core::Hashable
|
3146
|
+
|
3147
|
+
# Continuation token to retrieve the next page of results. It's empty for the
|
3148
|
+
# last page of results.
|
3149
|
+
# Corresponds to the JSON property `nextPageToken`
|
3150
|
+
# @return [String]
|
3151
|
+
attr_accessor :next_page_token
|
3152
|
+
|
3153
|
+
# List of reactions in the requested (or first) page.
|
3154
|
+
# Corresponds to the JSON property `reactions`
|
3155
|
+
# @return [Array<Google::Apis::ChatV1::Reaction>]
|
3156
|
+
attr_accessor :reactions
|
3157
|
+
|
3158
|
+
def initialize(**args)
|
3159
|
+
update!(**args)
|
3160
|
+
end
|
3161
|
+
|
3162
|
+
# Update properties of this object
|
3163
|
+
def update!(**args)
|
3164
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
3165
|
+
@reactions = args[:reactions] if args.key?(:reactions)
|
3166
|
+
end
|
3167
|
+
end
|
3168
|
+
|
2384
3169
|
#
|
2385
3170
|
class ListSpacesResponse
|
2386
3171
|
include Google::Apis::Core::Hashable
|
2387
3172
|
|
2388
|
-
#
|
2389
|
-
#
|
2390
|
-
# expired token is passed.
|
3173
|
+
# You can send a token as `pageToken` to retrieve the next page of results. If
|
3174
|
+
# empty, there are no subsequent pages.
|
2391
3175
|
# Corresponds to the JSON property `nextPageToken`
|
2392
3176
|
# @return [String]
|
2393
3177
|
attr_accessor :next_page_token
|
@@ -2408,13 +3192,13 @@ module Google
|
|
2408
3192
|
end
|
2409
3193
|
end
|
2410
3194
|
|
2411
|
-
# A matched
|
2412
|
-
# information,
|
2413
|
-
#
|
3195
|
+
# A matched URL in a Chat message. Chat apps can preview matched URLs. For more
|
3196
|
+
# information, see [Preview links](https://developers.google.com/chat/how-tos/
|
3197
|
+
# preview-links).
|
2414
3198
|
class MatchedUrl
|
2415
3199
|
include Google::Apis::Core::Hashable
|
2416
3200
|
|
2417
|
-
# Output only. The
|
3201
|
+
# Output only. The URL that was matched.
|
2418
3202
|
# Corresponds to the JSON property `url`
|
2419
3203
|
# @return [String]
|
2420
3204
|
attr_accessor :url
|
@@ -2459,12 +3243,16 @@ module Google
|
|
2459
3243
|
# @return [String]
|
2460
3244
|
attr_accessor :create_time
|
2461
3245
|
|
2462
|
-
# A user in Google Chat.
|
3246
|
+
# A user in Google Chat. When returned as an output from a request, if your Chat
|
3247
|
+
# app [authenticates as a user](https://developers.google.com/chat/api/guides/
|
3248
|
+
# auth/users), the output for a `User` resource only populates the user's `name`
|
3249
|
+
# and `type`.
|
2463
3250
|
# Corresponds to the JSON property `member`
|
2464
3251
|
# @return [Google::Apis::ChatV1::User]
|
2465
3252
|
attr_accessor :member
|
2466
3253
|
|
2467
|
-
# Resource name of the membership. Format: spaces/`
|
3254
|
+
# Resource name of the membership, assigned by the server. Format: `spaces/`
|
3255
|
+
# space`/members/`member``
|
2468
3256
|
# Corresponds to the JSON property `name`
|
2469
3257
|
# @return [String]
|
2470
3258
|
attr_accessor :name
|
@@ -2494,56 +3282,98 @@ module Google
|
|
2494
3282
|
end
|
2495
3283
|
end
|
2496
3284
|
|
2497
|
-
# A message in Google Chat.
|
3285
|
+
# A message in a Google Chat space.
|
2498
3286
|
class Message
|
2499
3287
|
include Google::Apis::Core::Hashable
|
2500
3288
|
|
2501
|
-
# Parameters that a Chat app can use to configure how
|
3289
|
+
# Parameters that a Chat app can use to configure how its response is posted.
|
2502
3290
|
# Corresponds to the JSON property `actionResponse`
|
2503
3291
|
# @return [Google::Apis::ChatV1::ActionResponse]
|
2504
3292
|
attr_accessor :action_response
|
2505
3293
|
|
2506
|
-
# Output only. Annotations associated with the text in this message.
|
3294
|
+
# Output only. Annotations associated with the `text` in this message.
|
2507
3295
|
# Corresponds to the JSON property `annotations`
|
2508
3296
|
# @return [Array<Google::Apis::ChatV1::Annotation>]
|
2509
3297
|
attr_accessor :annotations
|
2510
3298
|
|
2511
|
-
# Plain-text body of the message with all Chat app mentions
|
3299
|
+
# Output only. Plain-text body of the message with all Chat app mentions
|
3300
|
+
# stripped out.
|
2512
3301
|
# Corresponds to the JSON property `argumentText`
|
2513
3302
|
# @return [String]
|
2514
3303
|
attr_accessor :argument_text
|
2515
3304
|
|
2516
|
-
#
|
3305
|
+
# Output only. GIF images that are attached to the message.
|
3306
|
+
# Corresponds to the JSON property `attachedGifs`
|
3307
|
+
# @return [Array<Google::Apis::ChatV1::AttachedGif>]
|
3308
|
+
attr_accessor :attached_gifs
|
3309
|
+
|
3310
|
+
# User-uploaded attachment.
|
2517
3311
|
# Corresponds to the JSON property `attachment`
|
2518
3312
|
# @return [Array<Google::Apis::ChatV1::Attachment>]
|
2519
3313
|
attr_accessor :attachment
|
2520
3314
|
|
2521
|
-
# Rich, formatted and interactive cards
|
2522
|
-
# such as: formatted texts, buttons,
|
2523
|
-
# displayed below the plain-text body of
|
3315
|
+
# Deprecated: Use `cards_v2` instead. Rich, formatted, and interactive cards
|
3316
|
+
# that you can use to display UI elements such as: formatted texts, buttons, and
|
3317
|
+
# clickable images. Cards are normally displayed below the plain-text body of
|
3318
|
+
# the message. `cards` and `cards_v2` can have a maximum size of 32 KB.
|
2524
3319
|
# Corresponds to the JSON property `cards`
|
2525
3320
|
# @return [Array<Google::Apis::ChatV1::Card>]
|
2526
3321
|
attr_accessor :cards
|
2527
3322
|
|
2528
|
-
#
|
2529
|
-
#
|
2530
|
-
#
|
2531
|
-
#
|
2532
|
-
# (https://developers.google.
|
2533
|
-
#
|
2534
|
-
# values. Currently supported widgets include: - `TextParagraph` - `
|
2535
|
-
# DecoratedText` - `Image` - `ButtonList`
|
3323
|
+
# An array of [cards](https://developers.google.com/chat/api/reference/rest/v1/
|
3324
|
+
# cards). Only Chat apps can create cards. If your Chat app [authenticates as a
|
3325
|
+
# user](https://developers.google.com/chat/api/guides/auth/users), the messages
|
3326
|
+
# can't contain cards. To learn about cards and how to create them, see [Design
|
3327
|
+
# dynamic, interactive, and consistent UIs with cards](https://developers.google.
|
3328
|
+
# com/chat/ui).
|
2536
3329
|
# Corresponds to the JSON property `cardsV2`
|
2537
3330
|
# @return [Array<Google::Apis::ChatV1::CardWithId>]
|
2538
3331
|
attr_accessor :cards_v2
|
2539
3332
|
|
2540
|
-
#
|
3333
|
+
# A custom name for a Chat message assigned at creation. Must start with `client-
|
3334
|
+
# ` and contain only lowercase letters, numbers, and hyphens up to 63 characters
|
3335
|
+
# in length. Specify this field to get, update, or delete the message with the
|
3336
|
+
# specified value. Assigning a custom name lets a Chat app recall the message
|
3337
|
+
# without saving the message `name` from the [response body](/chat/api/reference/
|
3338
|
+
# rest/v1/spaces.messages/get#response-body) returned when creating the message.
|
3339
|
+
# Assigning a custom name doesn't replace the generated `name` field, the
|
3340
|
+
# message's resource name. Instead, it sets the custom name as the `
|
3341
|
+
# clientAssignedMessageId` field, which you can reference while processing later
|
3342
|
+
# operations, like updating or deleting the message. For example usage, see [
|
3343
|
+
# Name a created message](https://developers.google.com/chat/api/guides/v1/
|
3344
|
+
# messages/create#name_a_created_message).
|
3345
|
+
# Corresponds to the JSON property `clientAssignedMessageId`
|
3346
|
+
# @return [String]
|
3347
|
+
attr_accessor :client_assigned_message_id
|
3348
|
+
|
3349
|
+
# For spaces created in Chat, the time at which the message was created. This
|
3350
|
+
# field is output only, except when used in imported spaces. [Developer Preview](
|
3351
|
+
# https://developers.google.com/workspace/preview): For imported spaces, set
|
3352
|
+
# this field to the historical timestamp at which the message was created in the
|
3353
|
+
# source in order to preserve the original creation time.
|
2541
3354
|
# Corresponds to the JSON property `createTime`
|
2542
3355
|
# @return [String]
|
2543
3356
|
attr_accessor :create_time
|
2544
3357
|
|
3358
|
+
# Output only. The time at which the message was deleted in Google Chat. If the
|
3359
|
+
# message is never deleted, this field is empty.
|
3360
|
+
# Corresponds to the JSON property `deleteTime`
|
3361
|
+
# @return [String]
|
3362
|
+
attr_accessor :delete_time
|
3363
|
+
|
3364
|
+
# Information about a deleted message. A message is deleted when `delete_time`
|
3365
|
+
# is set.
|
3366
|
+
# Corresponds to the JSON property `deletionMetadata`
|
3367
|
+
# @return [Google::Apis::ChatV1::DeletionMetadata]
|
3368
|
+
attr_accessor :deletion_metadata
|
3369
|
+
|
3370
|
+
# Output only. The list of emoji reaction summaries on the message.
|
3371
|
+
# Corresponds to the JSON property `emojiReactionSummaries`
|
3372
|
+
# @return [Array<Google::Apis::ChatV1::EmojiReactionSummary>]
|
3373
|
+
attr_accessor :emoji_reaction_summaries
|
3374
|
+
|
2545
3375
|
# A plain-text description of the message's cards, used when the actual cards
|
2546
|
-
#
|
3376
|
+
# can't be displayed—for example, mobile notifications.
|
2547
3377
|
# Corresponds to the JSON property `fallbackText`
|
2548
3378
|
# @return [String]
|
2549
3379
|
attr_accessor :fallback_text
|
@@ -2554,9 +3384,9 @@ module Google
|
|
2554
3384
|
# @return [String]
|
2555
3385
|
attr_accessor :last_update_time
|
2556
3386
|
|
2557
|
-
# A matched
|
2558
|
-
# information,
|
2559
|
-
#
|
3387
|
+
# A matched URL in a Chat message. Chat apps can preview matched URLs. For more
|
3388
|
+
# information, see [Preview links](https://developers.google.com/chat/how-tos/
|
3389
|
+
# preview-links).
|
2560
3390
|
# Corresponds to the JSON property `matchedUrl`
|
2561
3391
|
# @return [Google::Apis::ChatV1::MatchedUrl]
|
2562
3392
|
attr_accessor :matched_url
|
@@ -2567,7 +3397,15 @@ module Google
|
|
2567
3397
|
# @return [String]
|
2568
3398
|
attr_accessor :name
|
2569
3399
|
|
2570
|
-
#
|
3400
|
+
# Information about a quoted message.
|
3401
|
+
# Corresponds to the JSON property `quotedMessageMetadata`
|
3402
|
+
# @return [Google::Apis::ChatV1::QuotedMessageMetadata]
|
3403
|
+
attr_accessor :quoted_message_metadata
|
3404
|
+
|
3405
|
+
# A user in Google Chat. When returned as an output from a request, if your Chat
|
3406
|
+
# app [authenticates as a user](https://developers.google.com/chat/api/guides/
|
3407
|
+
# auth/users), the output for a `User` resource only populates the user's `name`
|
3408
|
+
# and `type`.
|
2571
3409
|
# Corresponds to the JSON property `sender`
|
2572
3410
|
# @return [Google::Apis::ChatV1::User]
|
2573
3411
|
attr_accessor :sender
|
@@ -2584,17 +3422,31 @@ module Google
|
|
2584
3422
|
# @return [Google::Apis::ChatV1::Space]
|
2585
3423
|
attr_accessor :space
|
2586
3424
|
|
2587
|
-
# Plain-text body of the message. The first link to an image, video, web page
|
2588
|
-
#
|
3425
|
+
# Plain-text body of the message. The first link to an image, video, or web page
|
3426
|
+
# generates a preview chip. You can also @mention a Google Chat user, or
|
3427
|
+
# everyone in the space. To learn about creating text messages, see [Create a
|
3428
|
+
# text message](https://developers.google.com/chat/api/guides/message-formats/
|
3429
|
+
# text).
|
2589
3430
|
# Corresponds to the JSON property `text`
|
2590
3431
|
# @return [String]
|
2591
3432
|
attr_accessor :text
|
2592
3433
|
|
2593
|
-
# A thread in Google Chat.
|
3434
|
+
# A thread in a Google Chat space. For example usage, see [Start or reply to a
|
3435
|
+
# message thread](https://developers.google.com/chat/api/guides/crudl/messages#
|
3436
|
+
# start_or_reply_to_a_message_thread).
|
2594
3437
|
# Corresponds to the JSON property `thread`
|
2595
3438
|
# @return [Google::Apis::ChatV1::Thread]
|
2596
3439
|
attr_accessor :thread
|
2597
3440
|
|
3441
|
+
# Output only. When `true`, the message is a response in a reply thread. When `
|
3442
|
+
# false`, the message is visible in the space's top-level conversation as either
|
3443
|
+
# the first message of a thread or a message with no threaded replies. If the
|
3444
|
+
# space doesn't support reply in threads, this field is always `false`.
|
3445
|
+
# Corresponds to the JSON property `threadReply`
|
3446
|
+
# @return [Boolean]
|
3447
|
+
attr_accessor :thread_reply
|
3448
|
+
alias_method :thread_reply?, :thread_reply
|
3449
|
+
|
2598
3450
|
def initialize(**args)
|
2599
3451
|
update!(**args)
|
2600
3452
|
end
|
@@ -2604,28 +3456,35 @@ module Google
|
|
2604
3456
|
@action_response = args[:action_response] if args.key?(:action_response)
|
2605
3457
|
@annotations = args[:annotations] if args.key?(:annotations)
|
2606
3458
|
@argument_text = args[:argument_text] if args.key?(:argument_text)
|
3459
|
+
@attached_gifs = args[:attached_gifs] if args.key?(:attached_gifs)
|
2607
3460
|
@attachment = args[:attachment] if args.key?(:attachment)
|
2608
3461
|
@cards = args[:cards] if args.key?(:cards)
|
2609
3462
|
@cards_v2 = args[:cards_v2] if args.key?(:cards_v2)
|
3463
|
+
@client_assigned_message_id = args[:client_assigned_message_id] if args.key?(:client_assigned_message_id)
|
2610
3464
|
@create_time = args[:create_time] if args.key?(:create_time)
|
3465
|
+
@delete_time = args[:delete_time] if args.key?(:delete_time)
|
3466
|
+
@deletion_metadata = args[:deletion_metadata] if args.key?(:deletion_metadata)
|
3467
|
+
@emoji_reaction_summaries = args[:emoji_reaction_summaries] if args.key?(:emoji_reaction_summaries)
|
2611
3468
|
@fallback_text = args[:fallback_text] if args.key?(:fallback_text)
|
2612
3469
|
@last_update_time = args[:last_update_time] if args.key?(:last_update_time)
|
2613
3470
|
@matched_url = args[:matched_url] if args.key?(:matched_url)
|
2614
3471
|
@name = args[:name] if args.key?(:name)
|
3472
|
+
@quoted_message_metadata = args[:quoted_message_metadata] if args.key?(:quoted_message_metadata)
|
2615
3473
|
@sender = args[:sender] if args.key?(:sender)
|
2616
3474
|
@slash_command = args[:slash_command] if args.key?(:slash_command)
|
2617
3475
|
@space = args[:space] if args.key?(:space)
|
2618
3476
|
@text = args[:text] if args.key?(:text)
|
2619
3477
|
@thread = args[:thread] if args.key?(:thread)
|
3478
|
+
@thread_reply = args[:thread_reply] if args.key?(:thread_reply)
|
2620
3479
|
end
|
2621
3480
|
end
|
2622
3481
|
|
2623
|
-
# An onclick action (
|
3482
|
+
# An `onclick` action (for example, open a link).
|
2624
3483
|
class OnClick
|
2625
3484
|
include Google::Apis::Core::Hashable
|
2626
3485
|
|
2627
3486
|
# A form action describes the behavior when the form is submitted. For example,
|
2628
|
-
#
|
3487
|
+
# you can invoke Apps Script to handle the form.
|
2629
3488
|
# Corresponds to the JSON property `action`
|
2630
3489
|
# @return [Google::Apis::ChatV1::FormAction]
|
2631
3490
|
attr_accessor :action
|
@@ -2665,18 +3524,85 @@ module Google
|
|
2665
3524
|
end
|
2666
3525
|
end
|
2667
3526
|
|
3527
|
+
# Information about a quoted message.
|
3528
|
+
class QuotedMessageMetadata
|
3529
|
+
include Google::Apis::Core::Hashable
|
3530
|
+
|
3531
|
+
# Output only. The timestamp when the quoted message was created or when the
|
3532
|
+
# quoted message was last updated.
|
3533
|
+
# Corresponds to the JSON property `lastUpdateTime`
|
3534
|
+
# @return [String]
|
3535
|
+
attr_accessor :last_update_time
|
3536
|
+
|
3537
|
+
# Output only. Resource name of the quoted message. Format: `spaces/`space`/
|
3538
|
+
# messages/`message``
|
3539
|
+
# Corresponds to the JSON property `name`
|
3540
|
+
# @return [String]
|
3541
|
+
attr_accessor :name
|
3542
|
+
|
3543
|
+
def initialize(**args)
|
3544
|
+
update!(**args)
|
3545
|
+
end
|
3546
|
+
|
3547
|
+
# Update properties of this object
|
3548
|
+
def update!(**args)
|
3549
|
+
@last_update_time = args[:last_update_time] if args.key?(:last_update_time)
|
3550
|
+
@name = args[:name] if args.key?(:name)
|
3551
|
+
end
|
3552
|
+
end
|
3553
|
+
|
3554
|
+
# A reaction to a message.
|
3555
|
+
class Reaction
|
3556
|
+
include Google::Apis::Core::Hashable
|
3557
|
+
|
3558
|
+
# An emoji that is used as a reaction to a message.
|
3559
|
+
# Corresponds to the JSON property `emoji`
|
3560
|
+
# @return [Google::Apis::ChatV1::Emoji]
|
3561
|
+
attr_accessor :emoji
|
3562
|
+
|
3563
|
+
# The resource name of the reaction. Format: `spaces/`space`/messages/`message`/
|
3564
|
+
# reactions/`reaction``
|
3565
|
+
# Corresponds to the JSON property `name`
|
3566
|
+
# @return [String]
|
3567
|
+
attr_accessor :name
|
3568
|
+
|
3569
|
+
# A user in Google Chat. When returned as an output from a request, if your Chat
|
3570
|
+
# app [authenticates as a user](https://developers.google.com/chat/api/guides/
|
3571
|
+
# auth/users), the output for a `User` resource only populates the user's `name`
|
3572
|
+
# and `type`.
|
3573
|
+
# Corresponds to the JSON property `user`
|
3574
|
+
# @return [Google::Apis::ChatV1::User]
|
3575
|
+
attr_accessor :user
|
3576
|
+
|
3577
|
+
def initialize(**args)
|
3578
|
+
update!(**args)
|
3579
|
+
end
|
3580
|
+
|
3581
|
+
# Update properties of this object
|
3582
|
+
def update!(**args)
|
3583
|
+
@emoji = args[:emoji] if args.key?(:emoji)
|
3584
|
+
@name = args[:name] if args.key?(:name)
|
3585
|
+
@user = args[:user] if args.key?(:user)
|
3586
|
+
end
|
3587
|
+
end
|
3588
|
+
|
2668
3589
|
# A section contains a collection of widgets that are rendered (vertically) in
|
2669
3590
|
# the order that they are specified. Across all platforms, cards have a narrow
|
2670
|
-
# fixed width, so there
|
3591
|
+
# fixed width, so there's currently no need for layout properties (for example,
|
3592
|
+
# float).
|
2671
3593
|
class Section
|
2672
3594
|
include Google::Apis::Core::Hashable
|
2673
3595
|
|
2674
|
-
# The header of the section
|
3596
|
+
# The header of the section. Formatted text is supported. For more information
|
3597
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
3598
|
+
# developers.google.com/chat/api/guides/message-formats/cards#
|
3599
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
3600
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2675
3601
|
# Corresponds to the JSON property `header`
|
2676
3602
|
# @return [String]
|
2677
3603
|
attr_accessor :header
|
2678
3604
|
|
2679
|
-
# A section must contain at least
|
3605
|
+
# A section must contain at least one widget.
|
2680
3606
|
# Corresponds to the JSON property `widgets`
|
2681
3607
|
# @return [Array<Google::Apis::ChatV1::WidgetMarkup>]
|
2682
3608
|
attr_accessor :widgets
|
@@ -2692,12 +3618,62 @@ module Google
|
|
2692
3618
|
end
|
2693
3619
|
end
|
2694
3620
|
|
3621
|
+
#
|
3622
|
+
class SetUpSpaceRequest
|
3623
|
+
include Google::Apis::Core::Hashable
|
3624
|
+
|
3625
|
+
# Optional. The Google Chat users to invite to join the space. Omit the calling
|
3626
|
+
# user, as they are added automatically. The set currently allows up to 20
|
3627
|
+
# memberships (in addition to the caller). The `Membership.member` field must
|
3628
|
+
# contain a `user` with `name` populated (format: `users/`user``) and `type` set
|
3629
|
+
# to `User.Type.HUMAN`. You can only add human users when setting up a space (
|
3630
|
+
# adding Chat apps is only supported for direct message setup with the calling
|
3631
|
+
# app). You can also add members using the user's email as an alias for `user`.
|
3632
|
+
# For example, the `user.name` can be `users/example@gmail.com`." To invite
|
3633
|
+
# Gmail users or users from external Google Workspace domains, user's email must
|
3634
|
+
# be used for ``user``. Optional when setting `Space.spaceType` to `SPACE`.
|
3635
|
+
# Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least
|
3636
|
+
# two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE`
|
3637
|
+
# with a human user, along with exactly one membership. Must be empty when
|
3638
|
+
# creating a 1:1 conversation between a human and the calling Chat app (when
|
3639
|
+
# setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `
|
3640
|
+
# true`).
|
3641
|
+
# Corresponds to the JSON property `memberships`
|
3642
|
+
# @return [Array<Google::Apis::ChatV1::Membership>]
|
3643
|
+
attr_accessor :memberships
|
3644
|
+
|
3645
|
+
# Optional. A unique identifier for this request. A random UUID is recommended.
|
3646
|
+
# Specifying an existing request ID returns the space created with that ID
|
3647
|
+
# instead of creating a new space. Specifying an existing request ID from the
|
3648
|
+
# same Chat app with a different authenticated user returns an error.
|
3649
|
+
# Corresponds to the JSON property `requestId`
|
3650
|
+
# @return [String]
|
3651
|
+
attr_accessor :request_id
|
3652
|
+
|
3653
|
+
# A space in Google Chat. Spaces are conversations between two or more users or
|
3654
|
+
# 1:1 messages between a user and a Chat app.
|
3655
|
+
# Corresponds to the JSON property `space`
|
3656
|
+
# @return [Google::Apis::ChatV1::Space]
|
3657
|
+
attr_accessor :space
|
3658
|
+
|
3659
|
+
def initialize(**args)
|
3660
|
+
update!(**args)
|
3661
|
+
end
|
3662
|
+
|
3663
|
+
# Update properties of this object
|
3664
|
+
def update!(**args)
|
3665
|
+
@memberships = args[:memberships] if args.key?(:memberships)
|
3666
|
+
@request_id = args[:request_id] if args.key?(:request_id)
|
3667
|
+
@space = args[:space] if args.key?(:space)
|
3668
|
+
end
|
3669
|
+
end
|
3670
|
+
|
2695
3671
|
# A [slash command](https://developers.google.com/chat/how-tos/slash-commands)
|
2696
3672
|
# in Google Chat.
|
2697
3673
|
class SlashCommand
|
2698
3674
|
include Google::Apis::Core::Hashable
|
2699
3675
|
|
2700
|
-
# The
|
3676
|
+
# The ID of the slash command invoked.
|
2701
3677
|
# Corresponds to the JSON property `commandId`
|
2702
3678
|
# @return [Fixnum]
|
2703
3679
|
attr_accessor :command_id
|
@@ -2716,12 +3692,15 @@ module Google
|
|
2716
3692
|
class SlashCommandMetadata
|
2717
3693
|
include Google::Apis::Core::Hashable
|
2718
3694
|
|
2719
|
-
# A user in Google Chat.
|
3695
|
+
# A user in Google Chat. When returned as an output from a request, if your Chat
|
3696
|
+
# app [authenticates as a user](https://developers.google.com/chat/api/guides/
|
3697
|
+
# auth/users), the output for a `User` resource only populates the user's `name`
|
3698
|
+
# and `type`.
|
2720
3699
|
# Corresponds to the JSON property `bot`
|
2721
3700
|
# @return [Google::Apis::ChatV1::User]
|
2722
3701
|
attr_accessor :bot
|
2723
3702
|
|
2724
|
-
# The command
|
3703
|
+
# The command ID of the invoked slash command.
|
2725
3704
|
# Corresponds to the JSON property `commandId`
|
2726
3705
|
# @return [Fixnum]
|
2727
3706
|
attr_accessor :command_id
|
@@ -2731,7 +3710,7 @@ module Google
|
|
2731
3710
|
# @return [String]
|
2732
3711
|
attr_accessor :command_name
|
2733
3712
|
|
2734
|
-
#
|
3713
|
+
# Indicates whether the slash command is for a dialog.
|
2735
3714
|
# Corresponds to the JSON property `triggersDialog`
|
2736
3715
|
# @return [Boolean]
|
2737
3716
|
attr_accessor :triggers_dialog
|
@@ -2761,13 +3740,37 @@ module Google
|
|
2761
3740
|
class Space
|
2762
3741
|
include Google::Apis::Core::Hashable
|
2763
3742
|
|
2764
|
-
#
|
2765
|
-
#
|
3743
|
+
# Output only. Whether the Chat app was installed by a Google Workspace
|
3744
|
+
# administrator. Administrators can install a Chat app for their domain,
|
3745
|
+
# organizational unit, or a group of users. Administrators can only install Chat
|
3746
|
+
# apps for direct messaging between users and the app. To support admin install,
|
3747
|
+
# your app must feature direct messaging.
|
3748
|
+
# Corresponds to the JSON property `adminInstalled`
|
3749
|
+
# @return [Boolean]
|
3750
|
+
attr_accessor :admin_installed
|
3751
|
+
alias_method :admin_installed?, :admin_installed
|
3752
|
+
|
3753
|
+
# The space's display name. Required when [creating a space](https://developers.
|
3754
|
+
# google.com/chat/api/reference/rest/v1/spaces/create). If you receive the error
|
3755
|
+
# message `ALREADY_EXISTS` when creating a space or updating the `displayName`,
|
3756
|
+
# try a different `displayName`. An existing space within the Google Workspace
|
3757
|
+
# organization might already use this display name. For direct messages, this
|
3758
|
+
# field might be empty. Supports up to 128 characters.
|
2766
3759
|
# Corresponds to the JSON property `displayName`
|
2767
3760
|
# @return [String]
|
2768
3761
|
attr_accessor :display_name
|
2769
3762
|
|
2770
|
-
#
|
3763
|
+
# Immutable. Whether this space permits any Google Chat user as a member. Input
|
3764
|
+
# when creating a space in a Google Workspace organization. For Google Chat
|
3765
|
+
# users that use a Google Account, omit this field when creating a space (By
|
3766
|
+
# default, the space permits any Google Chat user). For existing spaces, this
|
3767
|
+
# field is output only.
|
3768
|
+
# Corresponds to the JSON property `externalUserAllowed`
|
3769
|
+
# @return [Boolean]
|
3770
|
+
attr_accessor :external_user_allowed
|
3771
|
+
alias_method :external_user_allowed?, :external_user_allowed
|
3772
|
+
|
3773
|
+
# Resource name of the space. Format: `spaces/`space``
|
2771
3774
|
# Corresponds to the JSON property `name`
|
2772
3775
|
# @return [String]
|
2773
3776
|
attr_accessor :name
|
@@ -2783,14 +3786,30 @@ module Google
|
|
2783
3786
|
# @return [Google::Apis::ChatV1::SpaceDetails]
|
2784
3787
|
attr_accessor :space_details
|
2785
3788
|
|
2786
|
-
#
|
3789
|
+
# The message history state for messages and threads in this space.
|
3790
|
+
# Corresponds to the JSON property `spaceHistoryState`
|
3791
|
+
# @return [String]
|
3792
|
+
attr_accessor :space_history_state
|
3793
|
+
|
3794
|
+
# Output only. The threading state in the Chat space.
|
3795
|
+
# Corresponds to the JSON property `spaceThreadingState`
|
3796
|
+
# @return [String]
|
3797
|
+
attr_accessor :space_threading_state
|
3798
|
+
|
3799
|
+
# The type of space. Required when creating a space or updating the space type
|
3800
|
+
# of a space. Output only for other usage.
|
3801
|
+
# Corresponds to the JSON property `spaceType`
|
3802
|
+
# @return [String]
|
3803
|
+
attr_accessor :space_type
|
3804
|
+
|
3805
|
+
# Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages
|
3806
|
+
# are threaded in this space.
|
2787
3807
|
# Corresponds to the JSON property `threaded`
|
2788
3808
|
# @return [Boolean]
|
2789
3809
|
attr_accessor :threaded
|
2790
3810
|
alias_method :threaded?, :threaded
|
2791
3811
|
|
2792
|
-
# Output only. Deprecated: Use `
|
2793
|
-
# preview) instead. The type of a space.
|
3812
|
+
# Output only. Deprecated: Use `space_type` instead. The type of a space.
|
2794
3813
|
# Corresponds to the JSON property `type`
|
2795
3814
|
# @return [String]
|
2796
3815
|
attr_accessor :type
|
@@ -2801,26 +3820,56 @@ module Google
|
|
2801
3820
|
|
2802
3821
|
# Update properties of this object
|
2803
3822
|
def update!(**args)
|
3823
|
+
@admin_installed = args[:admin_installed] if args.key?(:admin_installed)
|
2804
3824
|
@display_name = args[:display_name] if args.key?(:display_name)
|
3825
|
+
@external_user_allowed = args[:external_user_allowed] if args.key?(:external_user_allowed)
|
2805
3826
|
@name = args[:name] if args.key?(:name)
|
2806
3827
|
@single_user_bot_dm = args[:single_user_bot_dm] if args.key?(:single_user_bot_dm)
|
2807
3828
|
@space_details = args[:space_details] if args.key?(:space_details)
|
3829
|
+
@space_history_state = args[:space_history_state] if args.key?(:space_history_state)
|
3830
|
+
@space_threading_state = args[:space_threading_state] if args.key?(:space_threading_state)
|
3831
|
+
@space_type = args[:space_type] if args.key?(:space_type)
|
2808
3832
|
@threaded = args[:threaded] if args.key?(:threaded)
|
2809
3833
|
@type = args[:type] if args.key?(:type)
|
2810
3834
|
end
|
2811
3835
|
end
|
2812
3836
|
|
3837
|
+
# A data source representing a Google Chat space. Format: spaces/`space` [
|
3838
|
+
# Developer Preview](https://developers.google.com/workspace/preview).
|
3839
|
+
class SpaceDataSource
|
3840
|
+
include Google::Apis::Core::Hashable
|
3841
|
+
|
3842
|
+
# When `true`, uses the card's Google Chat space as the default selection. The
|
3843
|
+
# default value is `false`. [Developer Preview](https://developers.google.com/
|
3844
|
+
# workspace/preview).
|
3845
|
+
# Corresponds to the JSON property `defaultToCurrentSpace`
|
3846
|
+
# @return [Boolean]
|
3847
|
+
attr_accessor :default_to_current_space
|
3848
|
+
alias_method :default_to_current_space?, :default_to_current_space
|
3849
|
+
|
3850
|
+
def initialize(**args)
|
3851
|
+
update!(**args)
|
3852
|
+
end
|
3853
|
+
|
3854
|
+
# Update properties of this object
|
3855
|
+
def update!(**args)
|
3856
|
+
@default_to_current_space = args[:default_to_current_space] if args.key?(:default_to_current_space)
|
3857
|
+
end
|
3858
|
+
end
|
3859
|
+
|
2813
3860
|
# Details about the space including description and rules.
|
2814
3861
|
class SpaceDetails
|
2815
3862
|
include Google::Apis::Core::Hashable
|
2816
3863
|
|
2817
|
-
# Optional. A description of the space.
|
2818
|
-
# topic, functional purpose, or participants.
|
3864
|
+
# Optional. A description of the space. For example, describe the space's
|
3865
|
+
# discussion topic, functional purpose, or participants. Supports up to 150
|
3866
|
+
# characters.
|
2819
3867
|
# Corresponds to the JSON property `description`
|
2820
3868
|
# @return [String]
|
2821
3869
|
attr_accessor :description
|
2822
3870
|
|
2823
|
-
# Optional. The space's rules, expectations, and etiquette.
|
3871
|
+
# Optional. The space's rules, expectations, and etiquette. Supports up to 5,000
|
3872
|
+
# characters.
|
2824
3873
|
# Corresponds to the JSON property `guidelines`
|
2825
3874
|
# @return [String]
|
2826
3875
|
attr_accessor :guidelines
|
@@ -2896,11 +3945,11 @@ module Google
|
|
2896
3945
|
end
|
2897
3946
|
end
|
2898
3947
|
|
2899
|
-
# A button with text and onclick action.
|
3948
|
+
# A button with text and `onclick` action.
|
2900
3949
|
class TextButton
|
2901
3950
|
include Google::Apis::Core::Hashable
|
2902
3951
|
|
2903
|
-
# An onclick action (
|
3952
|
+
# An `onclick` action (for example, open a link).
|
2904
3953
|
# Corresponds to the JSON property `onClick`
|
2905
3954
|
# @return [Google::Apis::ChatV1::OnClick]
|
2906
3955
|
attr_accessor :on_click
|
@@ -2921,7 +3970,11 @@ module Google
|
|
2921
3970
|
end
|
2922
3971
|
end
|
2923
3972
|
|
2924
|
-
# A paragraph of text. Formatted text supported.
|
3973
|
+
# A paragraph of text. Formatted text supported. For more information about
|
3974
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
3975
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
3976
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
3977
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
2925
3978
|
class TextParagraph
|
2926
3979
|
include Google::Apis::Core::Hashable
|
2927
3980
|
|
@@ -2940,16 +3993,23 @@ module Google
|
|
2940
3993
|
end
|
2941
3994
|
end
|
2942
3995
|
|
2943
|
-
# A thread in Google Chat.
|
3996
|
+
# A thread in a Google Chat space. For example usage, see [Start or reply to a
|
3997
|
+
# message thread](https://developers.google.com/chat/api/guides/crudl/messages#
|
3998
|
+
# start_or_reply_to_a_message_thread).
|
2944
3999
|
class Thread
|
2945
4000
|
include Google::Apis::Core::Hashable
|
2946
4001
|
|
2947
|
-
# Resource name
|
2948
|
-
# threads/TTTTTTTTTTT
|
4002
|
+
# Resource name of the thread. Example: `spaces/`space`/threads/`thread``
|
2949
4003
|
# Corresponds to the JSON property `name`
|
2950
4004
|
# @return [String]
|
2951
4005
|
attr_accessor :name
|
2952
4006
|
|
4007
|
+
# Optional. ID for the thread. Supports up to 4000 characters. Input for
|
4008
|
+
# creating or updating a thread. Otherwise, output only.
|
4009
|
+
# Corresponds to the JSON property `threadKey`
|
4010
|
+
# @return [String]
|
4011
|
+
attr_accessor :thread_key
|
4012
|
+
|
2953
4013
|
def initialize(**args)
|
2954
4014
|
update!(**args)
|
2955
4015
|
end
|
@@ -2957,10 +4017,11 @@ module Google
|
|
2957
4017
|
# Update properties of this object
|
2958
4018
|
def update!(**args)
|
2959
4019
|
@name = args[:name] if args.key?(:name)
|
4020
|
+
@thread_key = args[:thread_key] if args.key?(:thread_key)
|
2960
4021
|
end
|
2961
4022
|
end
|
2962
4023
|
|
2963
|
-
# Time input values.
|
4024
|
+
# Time input values.
|
2964
4025
|
class TimeInput
|
2965
4026
|
include Google::Apis::Core::Hashable
|
2966
4027
|
|
@@ -2985,8 +4046,11 @@ module Google
|
|
2985
4046
|
end
|
2986
4047
|
end
|
2987
4048
|
|
2988
|
-
# The timezone ID and offset from Coordinated Universal Time (UTC).
|
2989
|
-
# supported
|
4049
|
+
# The timezone ID and offset from Coordinated Universal Time (UTC). Only
|
4050
|
+
# supported for the event types [`CARD_CLICKED`](https://developers.google.com/
|
4051
|
+
# chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`
|
4052
|
+
# SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/
|
4053
|
+
# DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).
|
2990
4054
|
class TimeZone
|
2991
4055
|
include Google::Apis::Core::Hashable
|
2992
4056
|
|
@@ -3013,7 +4077,48 @@ module Google
|
|
3013
4077
|
end
|
3014
4078
|
end
|
3015
4079
|
|
3016
|
-
#
|
4080
|
+
#
|
4081
|
+
class UploadAttachmentRequest
|
4082
|
+
include Google::Apis::Core::Hashable
|
4083
|
+
|
4084
|
+
# Required. The filename of the attachment, including the file extension.
|
4085
|
+
# Corresponds to the JSON property `filename`
|
4086
|
+
# @return [String]
|
4087
|
+
attr_accessor :filename
|
4088
|
+
|
4089
|
+
def initialize(**args)
|
4090
|
+
update!(**args)
|
4091
|
+
end
|
4092
|
+
|
4093
|
+
# Update properties of this object
|
4094
|
+
def update!(**args)
|
4095
|
+
@filename = args[:filename] if args.key?(:filename)
|
4096
|
+
end
|
4097
|
+
end
|
4098
|
+
|
4099
|
+
#
|
4100
|
+
class UploadAttachmentResponse
|
4101
|
+
include Google::Apis::Core::Hashable
|
4102
|
+
|
4103
|
+
# Reference to the uploaded attachment.
|
4104
|
+
# Corresponds to the JSON property `attachmentDataRef`
|
4105
|
+
# @return [Google::Apis::ChatV1::AttachmentDataRef]
|
4106
|
+
attr_accessor :attachment_data_ref
|
4107
|
+
|
4108
|
+
def initialize(**args)
|
4109
|
+
update!(**args)
|
4110
|
+
end
|
4111
|
+
|
4112
|
+
# Update properties of this object
|
4113
|
+
def update!(**args)
|
4114
|
+
@attachment_data_ref = args[:attachment_data_ref] if args.key?(:attachment_data_ref)
|
4115
|
+
end
|
4116
|
+
end
|
4117
|
+
|
4118
|
+
# A user in Google Chat. When returned as an output from a request, if your Chat
|
4119
|
+
# app [authenticates as a user](https://developers.google.com/chat/api/guides/
|
4120
|
+
# auth/users), the output for a `User` resource only populates the user's `name`
|
4121
|
+
# and `type`.
|
3017
4122
|
class User
|
3018
4123
|
include Google::Apis::Core::Hashable
|
3019
4124
|
|
@@ -3033,10 +4138,14 @@ module Google
|
|
3033
4138
|
attr_accessor :is_anonymous
|
3034
4139
|
alias_method :is_anonymous?, :is_anonymous
|
3035
4140
|
|
3036
|
-
# Resource name for a Google Chat user.
|
3037
|
-
#
|
3038
|
-
# https://
|
3039
|
-
#
|
4141
|
+
# Resource name for a Google Chat user. Format: `users/`user``. `users/app` can
|
4142
|
+
# be used as an alias for the calling app bot user. For human users, ``user`` is
|
4143
|
+
# the same user identifier as: - the ``person_id`` for the [Person](https://
|
4144
|
+
# developers.google.com/people/api/rest/v1/people) in the People API, where the
|
4145
|
+
# Person `resource_name` is `people/`person_id``. For example, `users/123456789`
|
4146
|
+
# in Chat API represents the same person as `people/123456789` in People API. -
|
4147
|
+
# the `id` for a [user](https://developers.google.com/admin-sdk/directory/
|
4148
|
+
# reference/rest/v1/users) in the Admin SDK Directory API.
|
3040
4149
|
# Corresponds to the JSON property `name`
|
3041
4150
|
# @return [String]
|
3042
4151
|
attr_accessor :name
|
@@ -3069,7 +4178,10 @@ module Google
|
|
3069
4178
|
# @return [String]
|
3070
4179
|
attr_accessor :type
|
3071
4180
|
|
3072
|
-
# A user in Google Chat.
|
4181
|
+
# A user in Google Chat. When returned as an output from a request, if your Chat
|
4182
|
+
# app [authenticates as a user](https://developers.google.com/chat/api/guides/
|
4183
|
+
# auth/users), the output for a `User` resource only populates the user's `name`
|
4184
|
+
# and `type`.
|
3073
4185
|
# Corresponds to the JSON property `user`
|
3074
4186
|
# @return [Google::Apis::ChatV1::User]
|
3075
4187
|
attr_accessor :user
|
@@ -3085,28 +4197,32 @@ module Google
|
|
3085
4197
|
end
|
3086
4198
|
end
|
3087
4199
|
|
3088
|
-
# A widget is a UI element that presents
|
4200
|
+
# A widget is a UI element that presents text and images.
|
3089
4201
|
class WidgetMarkup
|
3090
4202
|
include Google::Apis::Core::Hashable
|
3091
4203
|
|
3092
|
-
# A list of buttons. Buttons is also oneof data and only one of these fields
|
4204
|
+
# A list of buttons. Buttons is also `oneof data` and only one of these fields
|
3093
4205
|
# should be set.
|
3094
4206
|
# Corresponds to the JSON property `buttons`
|
3095
4207
|
# @return [Array<Google::Apis::ChatV1::Button>]
|
3096
4208
|
attr_accessor :buttons
|
3097
4209
|
|
3098
|
-
# An image that
|
4210
|
+
# An image that's specified by a URL and can have an `onclick` action.
|
3099
4211
|
# Corresponds to the JSON property `image`
|
3100
4212
|
# @return [Google::Apis::ChatV1::Image]
|
3101
4213
|
attr_accessor :image
|
3102
4214
|
|
3103
|
-
# A UI element contains a key (label) and a value (content).
|
3104
|
-
#
|
4215
|
+
# A UI element contains a key (label) and a value (content). This element can
|
4216
|
+
# also contain some actions such as `onclick` button.
|
3105
4217
|
# Corresponds to the JSON property `keyValue`
|
3106
4218
|
# @return [Google::Apis::ChatV1::KeyValue]
|
3107
4219
|
attr_accessor :key_value
|
3108
4220
|
|
3109
|
-
# A paragraph of text. Formatted text supported.
|
4221
|
+
# A paragraph of text. Formatted text supported. For more information about
|
4222
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
4223
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
4224
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
4225
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
3110
4226
|
# Corresponds to the JSON property `textParagraph`
|
3111
4227
|
# @return [Google::Apis::ChatV1::TextParagraph]
|
3112
4228
|
attr_accessor :text_paragraph
|