google-apis-chat_v1 0.57.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/google/apis/chat_v1/classes.rb +942 -360
- data/lib/google/apis/chat_v1/gem_version.rb +2 -2
- data/lib/google/apis/chat_v1/representations.rb +239 -0
- data/lib/google/apis/chat_v1/service.rb +686 -56
- data/lib/google/apis/chat_v1.rb +18 -0
- metadata +3 -3
@@ -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
|
|
@@ -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
|
@@ -164,7 +164,7 @@ module Google
|
|
164
164
|
class Attachment
|
165
165
|
include Google::Apis::Core::Hashable
|
166
166
|
|
167
|
-
# A reference to the attachment data. This is used with the media API to
|
167
|
+
# A reference to the attachment data. This field is used with the media API to
|
168
168
|
# download the attachment data.
|
169
169
|
# Corresponds to the JSON property `attachmentDataRef`
|
170
170
|
# @return [Google::Apis::ChatV1::AttachmentDataRef]
|
@@ -181,7 +181,7 @@ module Google
|
|
181
181
|
attr_accessor :content_type
|
182
182
|
|
183
183
|
# Output only. The download URL which should be used to allow a human user to
|
184
|
-
# download the attachment. Chat apps
|
184
|
+
# download the attachment. Chat apps shouldn't use this URL to download
|
185
185
|
# attachment content.
|
186
186
|
# Corresponds to the JSON property `downloadUri`
|
187
187
|
# @return [String]
|
@@ -192,8 +192,8 @@ module Google
|
|
192
192
|
# @return [Google::Apis::ChatV1::DriveDataRef]
|
193
193
|
attr_accessor :drive_data_ref
|
194
194
|
|
195
|
-
# Resource name of the attachment, in the form
|
196
|
-
#
|
195
|
+
# Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*
|
196
|
+
# `.
|
197
197
|
# Corresponds to the JSON property `name`
|
198
198
|
# @return [String]
|
199
199
|
attr_accessor :name
|
@@ -204,7 +204,7 @@ module Google
|
|
204
204
|
attr_accessor :source
|
205
205
|
|
206
206
|
# Output only. The thumbnail URL which should be used to preview the attachment
|
207
|
-
# to a human user. Chat apps
|
207
|
+
# to a human user. Chat apps shouldn't use this URL to download attachment
|
208
208
|
# content.
|
209
209
|
# Corresponds to the JSON property `thumbnailUri`
|
210
210
|
# @return [String]
|
@@ -231,8 +231,16 @@ module Google
|
|
231
231
|
class AttachmentDataRef
|
232
232
|
include Google::Apis::Core::Hashable
|
233
233
|
|
234
|
-
#
|
235
|
-
#
|
234
|
+
# Opaque token containing a reference to an uploaded attachment. Treated by
|
235
|
+
# clients as an opaque string and used to create or update Chat messages with
|
236
|
+
# attachments. [Developer Preview](https://developers.google.com/workspace/
|
237
|
+
# preview).
|
238
|
+
# Corresponds to the JSON property `attachmentUploadToken`
|
239
|
+
# @return [String]
|
240
|
+
attr_accessor :attachment_upload_token
|
241
|
+
|
242
|
+
# The resource name of the attachment data. This field is used with the media
|
243
|
+
# API to download the attachment data.
|
236
244
|
# Corresponds to the JSON property `resourceName`
|
237
245
|
# @return [String]
|
238
246
|
attr_accessor :resource_name
|
@@ -243,6 +251,7 @@ module Google
|
|
243
251
|
|
244
252
|
# Update properties of this object
|
245
253
|
def update!(**args)
|
254
|
+
@attachment_upload_token = args[:attachment_upload_token] if args.key?(:attachment_upload_token)
|
246
255
|
@resource_name = args[:resource_name] if args.key?(:resource_name)
|
247
256
|
end
|
248
257
|
end
|
@@ -251,12 +260,12 @@ module Google
|
|
251
260
|
class Button
|
252
261
|
include Google::Apis::Core::Hashable
|
253
262
|
|
254
|
-
# An image button with an onclick action.
|
263
|
+
# An image button with an `onclick` action.
|
255
264
|
# Corresponds to the JSON property `imageButton`
|
256
265
|
# @return [Google::Apis::ChatV1::ImageButton]
|
257
266
|
attr_accessor :image_button
|
258
267
|
|
259
|
-
# A button with text and onclick action.
|
268
|
+
# A button with text and `onclick` action.
|
260
269
|
# Corresponds to the JSON property `textButton`
|
261
270
|
# @return [Google::Apis::ChatV1::TextButton]
|
262
271
|
attr_accessor :text_button
|
@@ -272,7 +281,7 @@ module Google
|
|
272
281
|
end
|
273
282
|
end
|
274
283
|
|
275
|
-
# A card is a UI element that can contain UI widgets such as
|
284
|
+
# A card is a UI element that can contain UI widgets such as text and images.
|
276
285
|
class Card
|
277
286
|
include Google::Apis::Core::Hashable
|
278
287
|
|
@@ -320,7 +329,7 @@ module Google
|
|
320
329
|
# @return [String]
|
321
330
|
attr_accessor :action_label
|
322
331
|
|
323
|
-
# An onclick action (
|
332
|
+
# An `onclick` action (for example, open a link).
|
324
333
|
# Corresponds to the JSON property `onClick`
|
325
334
|
# @return [Google::Apis::ChatV1::OnClick]
|
326
335
|
attr_accessor :on_click
|
@@ -340,7 +349,7 @@ module Google
|
|
340
349
|
class CardHeader
|
341
350
|
include Google::Apis::Core::Hashable
|
342
351
|
|
343
|
-
# The image's type (
|
352
|
+
# The image's type (for example, square border or circular border).
|
344
353
|
# Corresponds to the JSON property `imageStyle`
|
345
354
|
# @return [String]
|
346
355
|
attr_accessor :image_style
|
@@ -356,8 +365,8 @@ module Google
|
|
356
365
|
attr_accessor :subtitle
|
357
366
|
|
358
367
|
# The title must be specified. The header has a fixed height: if both a title
|
359
|
-
# and subtitle is specified, each
|
360
|
-
# specified, it
|
368
|
+
# and subtitle is specified, each takes up one line. If only the title is
|
369
|
+
# specified, it takes up both lines.
|
361
370
|
# Corresponds to the JSON property `title`
|
362
371
|
# @return [String]
|
363
372
|
attr_accessor :title
|
@@ -386,22 +395,22 @@ module Google
|
|
386
395
|
# text message, just beneath the text message. - As a [dialog](https://
|
387
396
|
# developers.google.com/chat/how-tos/dialogs). The following example JSON
|
388
397
|
# creates a "contact card" that features: - A header with the contact's name,
|
389
|
-
# job title, avatar picture. - A section with the contact information,
|
390
|
-
# formatted text. - Buttons that users can click to share the contact
|
391
|
-
# more or less
|
392
|
-
# images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "
|
393
|
-
# "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
394
|
-
# imageUrl": "https://developers.google.com/chat/images/quickstart-
|
395
|
-
# png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
396
|
-
# [ ` "header": "Contact Info", "collapsible": true, "
|
397
|
-
# : 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
398
|
-
# "text": "sasha@example.com", ` `, ` "decoratedText":
|
399
|
-
# knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
400
|
-
# startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
401
|
-
# buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
402
|
-
# : "https://example.com/share", ` ` `, ` "text": "Edit", "
|
403
|
-
# ` "function": "goToView", "parameters": [ ` "key": "
|
404
|
-
# ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
398
|
+
# job title, and avatar picture. - A section with the contact information,
|
399
|
+
# including formatted text. - Buttons that users can click to share the contact,
|
400
|
+
# or see more or less information.  ``` ` "cardsV2": [ ` "cardId": "
|
402
|
+
# unique-card-id", "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
403
|
+
# Engineer", "imageUrl": "https://developers.google.com/chat/images/quickstart-
|
404
|
+
# app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
405
|
+
# "sections": [ ` "header": "Contact Info", "collapsible": true, "
|
406
|
+
# uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
407
|
+
# "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "decoratedText":
|
408
|
+
# ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
409
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
410
|
+
# 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
411
|
+
# "openLink": ` "url": "https://example.com/share", ` ` `, ` "text": "Edit", "
|
412
|
+
# onClick": ` "action": ` "function": "goToView", "parameters": [ ` "key": "
|
413
|
+
# viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
405
414
|
# Corresponds to the JSON property `card`
|
406
415
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
|
407
416
|
attr_accessor :card
|
@@ -464,18 +473,18 @@ module Google
|
|
464
473
|
end
|
465
474
|
|
466
475
|
# Represents a color in the RGBA color space. This representation is designed
|
467
|
-
# for simplicity of conversion to
|
476
|
+
# for simplicity of conversion to and from color representations in various
|
468
477
|
# languages over compactness. For example, the fields of this representation can
|
469
478
|
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
470
479
|
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
471
480
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
472
|
-
# CSS `rgba()` string in JavaScript. This reference page
|
481
|
+
# CSS `rgba()` string in JavaScript. This reference page does not have
|
473
482
|
# information about the absolute color space that should be used to interpret
|
474
|
-
# the RGB value
|
483
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
475
484
|
# applications should assume the sRGB color space. When color equality needs to
|
476
485
|
# be decided, implementations, unless documented otherwise, treat two colors as
|
477
|
-
# equal if all their red, green, blue, and alpha values each differ by at most
|
478
|
-
# 1e-5
|
486
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
487
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
479
488
|
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
480
489
|
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
481
490
|
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
@@ -594,14 +603,17 @@ module Google
|
|
594
603
|
# @return [String]
|
595
604
|
attr_accessor :platform
|
596
605
|
|
597
|
-
# The timezone ID and offset from Coordinated Universal Time (UTC).
|
598
|
-
# supported
|
606
|
+
# The timezone ID and offset from Coordinated Universal Time (UTC). Only
|
607
|
+
# supported for the event types [`CARD_CLICKED`](https://developers.google.com/
|
608
|
+
# chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`
|
609
|
+
# SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/
|
610
|
+
# DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).
|
599
611
|
# Corresponds to the JSON property `timeZone`
|
600
612
|
# @return [Google::Apis::ChatV1::TimeZone]
|
601
613
|
attr_accessor :time_zone
|
602
614
|
|
603
615
|
# The full `locale.displayName` in the format of [ISO 639 language code]-[ISO
|
604
|
-
# 3166 country/region code] such as "en-US".
|
616
|
+
# 3166 country/region code] such as "en-US".
|
605
617
|
# Corresponds to the JSON property `userLocale`
|
606
618
|
# @return [String]
|
607
619
|
attr_accessor :user_locale
|
@@ -622,7 +634,27 @@ module Google
|
|
622
634
|
end
|
623
635
|
end
|
624
636
|
|
625
|
-
#
|
637
|
+
# Represents a custom emoji. [Developer Preview](https://developers.google.com/
|
638
|
+
# workspace/preview).
|
639
|
+
class CustomEmoji
|
640
|
+
include Google::Apis::Core::Hashable
|
641
|
+
|
642
|
+
# Unique key for the custom emoji resource.
|
643
|
+
# Corresponds to the JSON property `uid`
|
644
|
+
# @return [String]
|
645
|
+
attr_accessor :uid
|
646
|
+
|
647
|
+
def initialize(**args)
|
648
|
+
update!(**args)
|
649
|
+
end
|
650
|
+
|
651
|
+
# Update properties of this object
|
652
|
+
def update!(**args)
|
653
|
+
@uid = args[:uid] if args.key?(:uid)
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
# Date input values.
|
626
658
|
class DateInput
|
627
659
|
include Google::Apis::Core::Hashable
|
628
660
|
|
@@ -641,7 +673,7 @@ module Google
|
|
641
673
|
end
|
642
674
|
end
|
643
675
|
|
644
|
-
# Date and time input values.
|
676
|
+
# Date and time input values.
|
645
677
|
class DateTimeInput
|
646
678
|
include Google::Apis::Core::Hashable
|
647
679
|
|
@@ -674,12 +706,32 @@ module Google
|
|
674
706
|
end
|
675
707
|
end
|
676
708
|
|
709
|
+
# Information about a deleted message. A message is deleted when `delete_time`
|
710
|
+
# is set. [Developer Preview](https://developers.google.com/workspace/preview).
|
711
|
+
class DeletionMetadata
|
712
|
+
include Google::Apis::Core::Hashable
|
713
|
+
|
714
|
+
# Indicates who deleted the message.
|
715
|
+
# Corresponds to the JSON property `deletionType`
|
716
|
+
# @return [String]
|
717
|
+
attr_accessor :deletion_type
|
718
|
+
|
719
|
+
def initialize(**args)
|
720
|
+
update!(**args)
|
721
|
+
end
|
722
|
+
|
723
|
+
# Update properties of this object
|
724
|
+
def update!(**args)
|
725
|
+
@deletion_type = args[:deletion_type] if args.key?(:deletion_type)
|
726
|
+
end
|
727
|
+
end
|
728
|
+
|
677
729
|
# Google Chat events.
|
678
730
|
class DeprecatedEvent
|
679
731
|
include Google::Apis::Core::Hashable
|
680
732
|
|
681
733
|
# A form action describes the behavior when the form is submitted. For example,
|
682
|
-
#
|
734
|
+
# you can invoke Apps Script to handle the form.
|
683
735
|
# Corresponds to the JSON property `action`
|
684
736
|
# @return [Google::Apis::ChatV1::FormAction]
|
685
737
|
attr_accessor :action
|
@@ -789,22 +841,22 @@ module Google
|
|
789
841
|
# text message, just beneath the text message. - As a [dialog](https://
|
790
842
|
# developers.google.com/chat/how-tos/dialogs). The following example JSON
|
791
843
|
# creates a "contact card" that features: - A header with the contact's name,
|
792
|
-
# job title, avatar picture. - A section with the contact information,
|
793
|
-
# formatted text. - Buttons that users can click to share the contact
|
794
|
-
# more or less
|
795
|
-
# images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "
|
796
|
-
# "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
797
|
-
# imageUrl": "https://developers.google.com/chat/images/quickstart-
|
798
|
-
# png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
799
|
-
# [ ` "header": "Contact Info", "collapsible": true, "
|
800
|
-
# : 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
801
|
-
# "text": "sasha@example.com", ` `, ` "decoratedText":
|
802
|
-
# knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
803
|
-
# startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
804
|
-
# buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
805
|
-
# : "https://example.com/share", ` ` `, ` "text": "Edit", "
|
806
|
-
# ` "function": "goToView", "parameters": [ ` "key": "
|
807
|
-
# ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
844
|
+
# job title, and avatar picture. - A section with the contact information,
|
845
|
+
# including formatted text. - Buttons that users can click to share the contact,
|
846
|
+
# or see more or less information.  ``` ` "cardsV2": [ ` "cardId": "
|
848
|
+
# unique-card-id", "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
849
|
+
# Engineer", "imageUrl": "https://developers.google.com/chat/images/quickstart-
|
850
|
+
# app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
851
|
+
# "sections": [ ` "header": "Contact Info", "collapsible": true, "
|
852
|
+
# uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
853
|
+
# "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "decoratedText":
|
854
|
+
# ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
855
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
856
|
+
# 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
857
|
+
# "openLink": ` "url": "https://example.com/share", ` ` `, ` "text": "Edit", "
|
858
|
+
# onClick": ` "action": ` "function": "goToView", "parameters": [ ` "key": "
|
859
|
+
# viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
808
860
|
# Corresponds to the JSON property `body`
|
809
861
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
|
810
862
|
attr_accessor :body
|
@@ -850,7 +902,7 @@ module Google
|
|
850
902
|
class DriveDataRef
|
851
903
|
include Google::Apis::Core::Hashable
|
852
904
|
|
853
|
-
# The
|
905
|
+
# The ID for the drive file. Use with the Drive API.
|
854
906
|
# Corresponds to the JSON property `driveFileId`
|
855
907
|
# @return [String]
|
856
908
|
attr_accessor :drive_file_id
|
@@ -865,6 +917,60 @@ module Google
|
|
865
917
|
end
|
866
918
|
end
|
867
919
|
|
920
|
+
# An emoji that is used as a reaction to a message. [Developer Preview](https://
|
921
|
+
# developers.google.com/workspace/preview).
|
922
|
+
class Emoji
|
923
|
+
include Google::Apis::Core::Hashable
|
924
|
+
|
925
|
+
# Represents a custom emoji. [Developer Preview](https://developers.google.com/
|
926
|
+
# workspace/preview).
|
927
|
+
# Corresponds to the JSON property `customEmoji`
|
928
|
+
# @return [Google::Apis::ChatV1::CustomEmoji]
|
929
|
+
attr_accessor :custom_emoji
|
930
|
+
|
931
|
+
# A basic emoji represented by a unicode string.
|
932
|
+
# Corresponds to the JSON property `unicode`
|
933
|
+
# @return [String]
|
934
|
+
attr_accessor :unicode
|
935
|
+
|
936
|
+
def initialize(**args)
|
937
|
+
update!(**args)
|
938
|
+
end
|
939
|
+
|
940
|
+
# Update properties of this object
|
941
|
+
def update!(**args)
|
942
|
+
@custom_emoji = args[:custom_emoji] if args.key?(:custom_emoji)
|
943
|
+
@unicode = args[:unicode] if args.key?(:unicode)
|
944
|
+
end
|
945
|
+
end
|
946
|
+
|
947
|
+
# The number of people who reacted to a message with a specific emoji. [
|
948
|
+
# Developer Preview](https://developers.google.com/workspace/preview).
|
949
|
+
class EmojiReactionSummary
|
950
|
+
include Google::Apis::Core::Hashable
|
951
|
+
|
952
|
+
# An emoji that is used as a reaction to a message. [Developer Preview](https://
|
953
|
+
# developers.google.com/workspace/preview).
|
954
|
+
# Corresponds to the JSON property `emoji`
|
955
|
+
# @return [Google::Apis::ChatV1::Emoji]
|
956
|
+
attr_accessor :emoji
|
957
|
+
|
958
|
+
# The total number of reactions using the associated emoji.
|
959
|
+
# Corresponds to the JSON property `reactionCount`
|
960
|
+
# @return [Fixnum]
|
961
|
+
attr_accessor :reaction_count
|
962
|
+
|
963
|
+
def initialize(**args)
|
964
|
+
update!(**args)
|
965
|
+
end
|
966
|
+
|
967
|
+
# Update properties of this object
|
968
|
+
def update!(**args)
|
969
|
+
@emoji = args[:emoji] if args.key?(:emoji)
|
970
|
+
@reaction_count = args[:reaction_count] if args.key?(:reaction_count)
|
971
|
+
end
|
972
|
+
end
|
973
|
+
|
868
974
|
# A generic empty message that you can re-use to avoid defining duplicated empty
|
869
975
|
# messages in your APIs. A typical example is to use it as the request or the
|
870
976
|
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
@@ -882,14 +988,14 @@ module Google
|
|
882
988
|
end
|
883
989
|
|
884
990
|
# A form action describes the behavior when the form is submitted. For example,
|
885
|
-
#
|
991
|
+
# you can invoke Apps Script to handle the form.
|
886
992
|
class FormAction
|
887
993
|
include Google::Apis::Core::Hashable
|
888
994
|
|
889
995
|
# The method name is used to identify which part of the form triggered the form
|
890
996
|
# submission. This information is echoed back to the Chat app as part of the
|
891
|
-
# card click event.
|
892
|
-
# trigger a common behavior
|
997
|
+
# card click event. You can use the same method name for several elements that
|
998
|
+
# trigger a common behavior.
|
893
999
|
# Corresponds to the JSON property `actionMethodName`
|
894
1000
|
# @return [String]
|
895
1001
|
attr_accessor :action_method_name
|
@@ -911,8 +1017,8 @@ module Google
|
|
911
1017
|
end
|
912
1018
|
|
913
1019
|
# An action that describes the behavior when the form is submitted. For example,
|
914
|
-
# an Apps Script
|
915
|
-
# the form values are sent to the server.
|
1020
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
1021
|
+
# triggered, the form values are sent to the server.
|
916
1022
|
class GoogleAppsCardV1Action
|
917
1023
|
include Google::Apis::Core::Hashable
|
918
1024
|
|
@@ -925,12 +1031,12 @@ module Google
|
|
925
1031
|
|
926
1032
|
# Optional. Required when opening a [dialog](https://developers.google.com/chat/
|
927
1033
|
# how-tos/dialogs). What to do in response to an interaction with a user, such
|
928
|
-
# as a user clicking button
|
929
|
-
# by executing an `action
|
1034
|
+
# as a user clicking a button in a card message. If unspecified, the app
|
1035
|
+
# responds by executing an `action`—like opening a link or running a function—as
|
930
1036
|
# normal. By specifying an `interaction`, the app can respond in special
|
931
1037
|
# interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the
|
932
1038
|
# app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs).
|
933
|
-
# When specified, a loading indicator
|
1039
|
+
# When specified, a loading indicator isn't shown. Supported by Chat apps, but
|
934
1040
|
# not Google Workspace Add-ons. If specified for an add-on, the entire card is
|
935
1041
|
# stripped and nothing is shown in the client.
|
936
1042
|
# Corresponds to the JSON property `interaction`
|
@@ -950,18 +1056,18 @@ module Google
|
|
950
1056
|
|
951
1057
|
# Indicates whether form values persist after the action. The default value is `
|
952
1058
|
# false`. If `true`, form values remain after the action is triggered. To let
|
953
|
-
# the user make changes while the action is being processed, set [LoadIndicator
|
954
|
-
# https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.
|
955
|
-
# v1#loadindicator) to `NONE`. For [card messages](https://developers.
|
956
|
-
# chat/api/guides/message-formats/cards) in Chat apps, you must also
|
957
|
-
# action's [ResponseType](https://developers.google.com/chat/api/
|
958
|
-
# v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use
|
959
|
-
# card_id`](https://developers.google.com/chat/api/reference/rest/v1/
|
960
|
-
# messages#CardWithId) from the card that contained the action. If `false
|
961
|
-
# form values are cleared when the action is triggered. To prevent the
|
962
|
-
# making changes while the action is being processed, set [
|
963
|
-
#
|
964
|
-
# loadindicator) to `SPINNER`.
|
1059
|
+
# the user make changes while the action is being processed, set [`LoadIndicator`
|
1060
|
+
# ](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.
|
1061
|
+
# card.v1#loadindicator) to `NONE`. For [card messages](https://developers.
|
1062
|
+
# google.com/chat/api/guides/message-formats/cards) in Chat apps, you must also
|
1063
|
+
# set the action's [`ResponseType`](https://developers.google.com/chat/api/
|
1064
|
+
# reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use
|
1065
|
+
# the same [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/
|
1066
|
+
# spaces.messages#CardWithId) from the card that contained the action. If `false`
|
1067
|
+
# , the form values are cleared when the action is triggered. To prevent the
|
1068
|
+
# user from making changes while the action is being processed, set [`
|
1069
|
+
# LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/
|
1070
|
+
# google.apps.card.v1#loadindicator) to `SPINNER`.
|
965
1071
|
# Corresponds to the JSON property `persistValues`
|
966
1072
|
# @return [Boolean]
|
967
1073
|
attr_accessor :persist_values
|
@@ -982,10 +1088,10 @@ module Google
|
|
982
1088
|
end
|
983
1089
|
|
984
1090
|
# List of string parameters to supply when the action method is invoked. For
|
985
|
-
# example, consider three snooze buttons: snooze now, snooze
|
986
|
-
# week. You might use action method = snooze()
|
987
|
-
# snooze time in the list of string parameters. To learn more, see [
|
988
|
-
# CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/
|
1091
|
+
# example, consider three snooze buttons: snooze now, snooze one day, or snooze
|
1092
|
+
# next week. You might use `action method = snooze()`, passing the snooze type
|
1093
|
+
# and snooze time in the list of string parameters. To learn more, see [`
|
1094
|
+
# CommonEventObject`](https://developers.google.com/chat/api/reference/rest/v1/
|
989
1095
|
# Event#commoneventobject).
|
990
1096
|
class GoogleAppsCardV1ActionParameter
|
991
1097
|
include Google::Apis::Core::Hashable
|
@@ -1022,18 +1128,18 @@ module Google
|
|
1022
1128
|
attr_accessor :corner_radius
|
1023
1129
|
|
1024
1130
|
# Represents a color in the RGBA color space. This representation is designed
|
1025
|
-
# for simplicity of conversion to
|
1131
|
+
# for simplicity of conversion to and from color representations in various
|
1026
1132
|
# languages over compactness. For example, the fields of this representation can
|
1027
1133
|
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1028
1134
|
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1029
1135
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1030
|
-
# CSS `rgba()` string in JavaScript. This reference page
|
1136
|
+
# CSS `rgba()` string in JavaScript. This reference page does not have
|
1031
1137
|
# information about the absolute color space that should be used to interpret
|
1032
|
-
# the RGB value
|
1138
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
1033
1139
|
# applications should assume the sRGB color space. When color equality needs to
|
1034
1140
|
# be decided, implementations, unless documented otherwise, treat two colors as
|
1035
|
-
# equal if all their red, green, blue, and alpha values each differ by at most
|
1036
|
-
# 1e-5
|
1141
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
1142
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
1037
1143
|
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1038
1144
|
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1039
1145
|
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
@@ -1087,36 +1193,33 @@ module Google
|
|
1087
1193
|
end
|
1088
1194
|
end
|
1089
1195
|
|
1090
|
-
# A text, icon, or text
|
1091
|
-
# clickable button, specify an Image (not an ImageComponent) and set an `
|
1092
|
-
# action.
|
1093
|
-
# developers.google.com/chat/how-tos/dialogs) and [card messages] (https://
|
1094
|
-
# developers.google.com/chat/api/guides/message-formats/cards)) and Google
|
1095
|
-
# Workspace Add-ons.
|
1196
|
+
# A text, icon, or text and icon button that users can click. To make an image a
|
1197
|
+
# clickable button, specify an `Image` (not an `ImageComponent`) and set an `
|
1198
|
+
# onClick` action.
|
1096
1199
|
class GoogleAppsCardV1Button
|
1097
1200
|
include Google::Apis::Core::Hashable
|
1098
1201
|
|
1099
|
-
# The alternative text used for accessibility. Set descriptive text that
|
1100
|
-
# users know what the button does. For example, if a button opens a
|
1101
|
-
# you might write: "Opens a new browser tab and navigates to the
|
1102
|
-
# developer documentation at https://developers.google.com/chat".
|
1202
|
+
# The alternative text that's used for accessibility. Set descriptive text that
|
1203
|
+
# lets users know what the button does. For example, if a button opens a
|
1204
|
+
# hyperlink, you might write: "Opens a new browser tab and navigates to the
|
1205
|
+
# Google Chat developer documentation at https://developers.google.com/chat".
|
1103
1206
|
# Corresponds to the JSON property `altText`
|
1104
1207
|
# @return [String]
|
1105
1208
|
attr_accessor :alt_text
|
1106
1209
|
|
1107
1210
|
# Represents a color in the RGBA color space. This representation is designed
|
1108
|
-
# for simplicity of conversion to
|
1211
|
+
# for simplicity of conversion to and from color representations in various
|
1109
1212
|
# languages over compactness. For example, the fields of this representation can
|
1110
1213
|
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1111
1214
|
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1112
1215
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1113
|
-
# CSS `rgba()` string in JavaScript. This reference page
|
1216
|
+
# CSS `rgba()` string in JavaScript. This reference page does not have
|
1114
1217
|
# information about the absolute color space that should be used to interpret
|
1115
|
-
# the RGB value
|
1218
|
+
# the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
|
1116
1219
|
# applications should assume the sRGB color space. When color equality needs to
|
1117
1220
|
# be decided, implementations, unless documented otherwise, treat two colors as
|
1118
|
-
# equal if all their red, green, blue, and alpha values each differ by at most
|
1119
|
-
# 1e-5
|
1221
|
+
# equal if all their red, green, blue, and alpha values each differ by at most `
|
1222
|
+
# 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
|
1120
1223
|
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1121
1224
|
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1122
1225
|
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
@@ -1220,29 +1323,29 @@ module Google
|
|
1220
1323
|
# text message, just beneath the text message. - As a [dialog](https://
|
1221
1324
|
# developers.google.com/chat/how-tos/dialogs). The following example JSON
|
1222
1325
|
# creates a "contact card" that features: - A header with the contact's name,
|
1223
|
-
# job title, avatar picture. - A section with the contact information,
|
1224
|
-
# formatted text. - Buttons that users can click to share the contact
|
1225
|
-
# more or less
|
1226
|
-
# images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "
|
1227
|
-
# "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
1228
|
-
# imageUrl": "https://developers.google.com/chat/images/quickstart-
|
1229
|
-
# png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
1230
|
-
# [ ` "header": "Contact Info", "collapsible": true, "
|
1231
|
-
# : 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
1232
|
-
# "text": "sasha@example.com", ` `, ` "decoratedText":
|
1233
|
-
# knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
1234
|
-
# startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
1235
|
-
# buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
1236
|
-
# : "https://example.com/share", ` ` `, ` "text": "Edit", "
|
1237
|
-
# ` "function": "goToView", "parameters": [ ` "key": "
|
1238
|
-
# ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
1326
|
+
# job title, and avatar picture. - A section with the contact information,
|
1327
|
+
# including formatted text. - Buttons that users can click to share the contact,
|
1328
|
+
# or see more or less information.  ``` ` "cardsV2": [ ` "cardId": "
|
1330
|
+
# unique-card-id", "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
1331
|
+
# Engineer", "imageUrl": "https://developers.google.com/chat/images/quickstart-
|
1332
|
+
# app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
1333
|
+
# "sections": [ ` "header": "Contact Info", "collapsible": true, "
|
1334
|
+
# uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
1335
|
+
# "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "decoratedText":
|
1336
|
+
# ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
1337
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
1338
|
+
# 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
1339
|
+
# "openLink": ` "url": "https://example.com/share", ` ` `, ` "text": "Edit", "
|
1340
|
+
# onClick": ` "action": ` "function": "goToView", "parameters": [ ` "key": "
|
1341
|
+
# viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
1239
1342
|
class GoogleAppsCardV1Card
|
1240
1343
|
include Google::Apis::Core::Hashable
|
1241
1344
|
|
1242
1345
|
# The card's actions. Actions are added to the card's toolbar menu. Because Chat
|
1243
|
-
# app cards have no toolbar, `cardActions[]`
|
1244
|
-
# example, the following JSON constructs a card action menu with Settings and
|
1245
|
-
# Send Feedback options: ``` "card_actions": [ ` "actionLabel": "Settings", "
|
1346
|
+
# app cards have no toolbar, `cardActions[]` isn't supported by Chat apps. For
|
1347
|
+
# example, the following JSON constructs a card action menu with `Settings` and `
|
1348
|
+
# Send Feedback` options: ``` "card_actions": [ ` "actionLabel": "Settings", "
|
1246
1349
|
# onClick": ` "action": ` "functionName": "goToView", "parameters": [ ` "key": "
|
1247
1350
|
# viewType", "value": "SETTING" ` ], "loadIndicator": "LoadIndicator.SPINNER" ` `
|
1248
1351
|
# `, ` "actionLabel": "Send Feedback", "onClick": ` "openLink": ` "url": "https:
|
@@ -1259,9 +1362,10 @@ module Google
|
|
1259
1362
|
|
1260
1363
|
# A persistent (sticky) footer that that appears at the bottom of the card.
|
1261
1364
|
# Setting `fixedFooter` without specifying a `primaryButton` or a `
|
1262
|
-
# secondaryButton` causes an error.
|
1263
|
-
#
|
1264
|
-
#
|
1365
|
+
# secondaryButton` causes an error. Supported by Google Workspace Add-ons and
|
1366
|
+
# Chat apps. For Chat apps, you can use fixed footers in [dialogs](https://
|
1367
|
+
# developers.google.com/chat/how-tos/dialogs), but not [card messages](https://
|
1368
|
+
# developers.google.com/chat/api/guides/message-formats/cards).
|
1265
1369
|
# Corresponds to the JSON property `fixedFooter`
|
1266
1370
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1CardFixedFooter]
|
1267
1371
|
attr_accessor :fixed_footer
|
@@ -1334,32 +1438,33 @@ module Google
|
|
1334
1438
|
|
1335
1439
|
# A persistent (sticky) footer that that appears at the bottom of the card.
|
1336
1440
|
# Setting `fixedFooter` without specifying a `primaryButton` or a `
|
1337
|
-
# secondaryButton` causes an error.
|
1338
|
-
#
|
1339
|
-
#
|
1441
|
+
# secondaryButton` causes an error. Supported by Google Workspace Add-ons and
|
1442
|
+
# Chat apps. For Chat apps, you can use fixed footers in [dialogs](https://
|
1443
|
+
# developers.google.com/chat/how-tos/dialogs), but not [card messages](https://
|
1444
|
+
# developers.google.com/chat/api/guides/message-formats/cards).
|
1340
1445
|
class GoogleAppsCardV1CardFixedFooter
|
1341
1446
|
include Google::Apis::Core::Hashable
|
1342
1447
|
|
1343
|
-
# A text, icon, or text
|
1344
|
-
# clickable button, specify an Image (not an ImageComponent) and set an `
|
1345
|
-
# action.
|
1346
|
-
# developers.google.com/chat/how-tos/dialogs) and [card messages] (https://
|
1347
|
-
# developers.google.com/chat/api/guides/message-formats/cards)) and Google
|
1348
|
-
# Workspace Add-ons.
|
1448
|
+
# A text, icon, or text and icon button that users can click. To make an image a
|
1449
|
+
# clickable button, specify an `Image` (not an `ImageComponent`) and set an `
|
1450
|
+
# onClick` action.
|
1349
1451
|
# Corresponds to the JSON property `primaryButton`
|
1350
1452
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
|
1351
1453
|
attr_accessor :primary_button
|
1352
1454
|
|
1353
|
-
# A text, icon, or text
|
1354
|
-
# clickable button, specify an Image (not an ImageComponent) and set an `
|
1355
|
-
# action.
|
1356
|
-
# developers.google.com/chat/how-tos/dialogs) and [card messages] (https://
|
1357
|
-
# developers.google.com/chat/api/guides/message-formats/cards)) and Google
|
1358
|
-
# Workspace Add-ons.
|
1455
|
+
# A text, icon, or text and icon button that users can click. To make an image a
|
1456
|
+
# clickable button, specify an `Image` (not an `ImageComponent`) and set an `
|
1457
|
+
# onClick` action.
|
1359
1458
|
# Corresponds to the JSON property `secondaryButton`
|
1360
1459
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
|
1361
1460
|
attr_accessor :secondary_button
|
1362
1461
|
|
1462
|
+
# A list of widgets included in the card footer. Primary button and secondary
|
1463
|
+
# button are rendered below these widgets.
|
1464
|
+
# Corresponds to the JSON property `widgets`
|
1465
|
+
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1FooterWidget>]
|
1466
|
+
attr_accessor :widgets
|
1467
|
+
|
1363
1468
|
def initialize(**args)
|
1364
1469
|
update!(**args)
|
1365
1470
|
end
|
@@ -1368,6 +1473,7 @@ module Google
|
|
1368
1473
|
def update!(**args)
|
1369
1474
|
@primary_button = args[:primary_button] if args.key?(:primary_button)
|
1370
1475
|
@secondary_button = args[:secondary_button] if args.key?(:secondary_button)
|
1476
|
+
@widgets = args[:widgets] if args.key?(:widgets)
|
1371
1477
|
end
|
1372
1478
|
end
|
1373
1479
|
|
@@ -1375,7 +1481,7 @@ module Google
|
|
1375
1481
|
class GoogleAppsCardV1CardHeader
|
1376
1482
|
include Google::Apis::Core::Hashable
|
1377
1483
|
|
1378
|
-
# The alternative text of this image
|
1484
|
+
# The alternative text of this image that's used for accessibility.
|
1379
1485
|
# Corresponds to the JSON property `imageAltText`
|
1380
1486
|
# @return [String]
|
1381
1487
|
attr_accessor :image_alt_text
|
@@ -1417,54 +1523,125 @@ module Google
|
|
1417
1523
|
end
|
1418
1524
|
end
|
1419
1525
|
|
1420
|
-
#
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1526
|
+
# A column.
|
1527
|
+
class GoogleAppsCardV1Column
|
1528
|
+
include Google::Apis::Core::Hashable
|
1529
|
+
|
1530
|
+
# Specifies whether widgets align to the left, right, or center of a column.
|
1531
|
+
# Corresponds to the JSON property `horizontalAlignment`
|
1532
|
+
# @return [String]
|
1533
|
+
attr_accessor :horizontal_alignment
|
1534
|
+
|
1535
|
+
# Specifies how a column fills the width of the card.
|
1536
|
+
# Corresponds to the JSON property `horizontalSizeStyle`
|
1537
|
+
# @return [String]
|
1538
|
+
attr_accessor :horizontal_size_style
|
1539
|
+
|
1540
|
+
# Specifies whether widgets align to the top, bottom, or center of a column.
|
1541
|
+
# Corresponds to the JSON property `verticalAlignment`
|
1542
|
+
# @return [String]
|
1543
|
+
attr_accessor :vertical_alignment
|
1544
|
+
|
1545
|
+
# An array of widgets included in a column. Widgets appear in the order that
|
1546
|
+
# they are specified.
|
1547
|
+
# Corresponds to the JSON property `widgets`
|
1548
|
+
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Widgets>]
|
1549
|
+
attr_accessor :widgets
|
1550
|
+
|
1551
|
+
def initialize(**args)
|
1552
|
+
update!(**args)
|
1553
|
+
end
|
1554
|
+
|
1555
|
+
# Update properties of this object
|
1556
|
+
def update!(**args)
|
1557
|
+
@horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
|
1558
|
+
@horizontal_size_style = args[:horizontal_size_style] if args.key?(:horizontal_size_style)
|
1559
|
+
@vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment)
|
1560
|
+
@widgets = args[:widgets] if args.key?(:widgets)
|
1561
|
+
end
|
1562
|
+
end
|
1563
|
+
|
1564
|
+
# The `Columns` widget displays up to 2 columns in a card message or dialog. You
|
1565
|
+
# can add widgets to each column; the widgets appear in the order that they are
|
1566
|
+
# specified. The height of each column is determined by the taller column. For
|
1567
|
+
# example, if the first column is taller than the second column, both columns
|
1568
|
+
# have the height of the first column. Because each column can contain a
|
1569
|
+
# different number of widgets, you can't define rows or align widgets between
|
1570
|
+
# the columns. Columns are displayed side-by-side. You can customize the width
|
1571
|
+
# of each column using the `HorizontalSizeStyle` field. If the user's screen
|
1572
|
+
# width is too narrow, the second column wraps below the first: * On web, the
|
1573
|
+
# second column wraps if the screen width is less than or equal to 480 pixels. *
|
1574
|
+
# On iOS devices, the second column wraps if the screen width is less than or
|
1575
|
+
# equal to 300 pt. * On Android devices, the second column wraps if the screen
|
1576
|
+
# width is less than or equal to 320 dp. To include more than 2 columns, or to
|
1577
|
+
# use rows, use the `Grid` widget. Supported by Chat apps, but not Google
|
1578
|
+
# Workspace Add-ons.
|
1579
|
+
class GoogleAppsCardV1Columns
|
1580
|
+
include Google::Apis::Core::Hashable
|
1581
|
+
|
1582
|
+
# An array of columns. You can include up to 2 columns in a card or dialog.
|
1583
|
+
# Corresponds to the JSON property `columnItems`
|
1584
|
+
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Column>]
|
1585
|
+
attr_accessor :column_items
|
1586
|
+
|
1587
|
+
def initialize(**args)
|
1588
|
+
update!(**args)
|
1589
|
+
end
|
1590
|
+
|
1591
|
+
# Update properties of this object
|
1592
|
+
def update!(**args)
|
1593
|
+
@column_items = args[:column_items] if args.key?(:column_items)
|
1594
|
+
end
|
1595
|
+
end
|
1596
|
+
|
1597
|
+
# Lets users input a date, a time, or both a date and a time. Users can input
|
1598
|
+
# text or use the picker to select dates and times. If users input an invalid
|
1599
|
+
# date or time, the picker shows an error that prompts users to input the
|
1600
|
+
# information correctly.
|
1425
1601
|
class GoogleAppsCardV1DateTimePicker
|
1426
1602
|
include Google::Apis::Core::Hashable
|
1427
1603
|
|
1428
|
-
# The text that prompts users to
|
1429
|
-
#
|
1430
|
-
#
|
1431
|
-
# Appointment date and time" might work well.
|
1604
|
+
# The text that prompts users to input a date, a time, or a date and time. For
|
1605
|
+
# example, if users are scheduling an appointment, use a label such as `
|
1606
|
+
# Appointment date` or `Appointment date and time`.
|
1432
1607
|
# Corresponds to the JSON property `label`
|
1433
1608
|
# @return [String]
|
1434
1609
|
attr_accessor :label
|
1435
1610
|
|
1436
|
-
# The name by which the
|
1437
|
-
# details about working with form inputs, see [Receive form data](https://
|
1611
|
+
# The name by which the `DateTimePicker` is identified in a form input event.
|
1612
|
+
# For details about working with form inputs, see [Receive form data](https://
|
1438
1613
|
# developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
|
1439
1614
|
# Corresponds to the JSON property `name`
|
1440
1615
|
# @return [String]
|
1441
1616
|
attr_accessor :name
|
1442
1617
|
|
1443
1618
|
# An action that describes the behavior when the form is submitted. For example,
|
1444
|
-
# an Apps Script
|
1445
|
-
# the form values are sent to the server.
|
1619
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
1620
|
+
# triggered, the form values are sent to the server.
|
1446
1621
|
# Corresponds to the JSON property `onChangeAction`
|
1447
1622
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1448
1623
|
attr_accessor :on_change_action
|
1449
1624
|
|
1450
1625
|
# The number representing the time zone offset from UTC, in minutes. If set, the
|
1451
|
-
# `value_ms_epoch` is displayed in the specified time zone. If
|
1452
|
-
# the user's time zone setting
|
1626
|
+
# `value_ms_epoch` is displayed in the specified time zone. If unset, the value
|
1627
|
+
# defaults to the user's time zone setting.
|
1453
1628
|
# Corresponds to the JSON property `timezoneOffsetDate`
|
1454
1629
|
# @return [Fixnum]
|
1455
1630
|
attr_accessor :timezone_offset_date
|
1456
1631
|
|
1457
|
-
#
|
1632
|
+
# Whether the widget supports inputting a date, a time, or the date and time.
|
1458
1633
|
# Corresponds to the JSON property `type`
|
1459
1634
|
# @return [String]
|
1460
1635
|
attr_accessor :type
|
1461
1636
|
|
1462
|
-
# The value displayed
|
1463
|
-
#
|
1464
|
-
#
|
1465
|
-
#
|
1466
|
-
#
|
1467
|
-
#
|
1637
|
+
# The default value displayed in the widget, in milliseconds since [Unix epoch
|
1638
|
+
# time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the
|
1639
|
+
# type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and
|
1640
|
+
# time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `
|
1641
|
+
# 1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example,
|
1642
|
+
# to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in
|
1643
|
+
# UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 *
|
1644
|
+
# 1000`).
|
1468
1645
|
# Corresponds to the JSON property `valueMsEpoch`
|
1469
1646
|
# @return [Fixnum]
|
1470
1647
|
attr_accessor :value_ms_epoch
|
@@ -1485,7 +1662,7 @@ module Google
|
|
1485
1662
|
end
|
1486
1663
|
|
1487
1664
|
# A widget that displays text with optional decorations such as a label above or
|
1488
|
-
# below the text, an icon in front of the text, a selection widget or a button
|
1665
|
+
# below the text, an icon in front of the text, a selection widget, or a button
|
1489
1666
|
# after the text.
|
1490
1667
|
class GoogleAppsCardV1DecoratedText
|
1491
1668
|
include Google::Apis::Core::Hashable
|
@@ -1495,12 +1672,9 @@ module Google
|
|
1495
1672
|
# @return [String]
|
1496
1673
|
attr_accessor :bottom_label
|
1497
1674
|
|
1498
|
-
# A text, icon, or text
|
1499
|
-
# clickable button, specify an Image (not an ImageComponent) and set an `
|
1500
|
-
# action.
|
1501
|
-
# developers.google.com/chat/how-tos/dialogs) and [card messages] (https://
|
1502
|
-
# developers.google.com/chat/api/guides/message-formats/cards)) and Google
|
1503
|
-
# Workspace Add-ons.
|
1675
|
+
# A text, icon, or text and icon button that users can click. To make an image a
|
1676
|
+
# clickable button, specify an `Image` (not an `ImageComponent`) and set an `
|
1677
|
+
# onClick` action.
|
1504
1678
|
# Corresponds to the JSON property `button`
|
1505
1679
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
|
1506
1680
|
attr_accessor :button
|
@@ -1536,13 +1710,16 @@ module Google
|
|
1536
1710
|
attr_accessor :start_icon
|
1537
1711
|
|
1538
1712
|
# Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
|
1539
|
-
# Only supported
|
1713
|
+
# Only supported in the `decoratedText` widget.
|
1540
1714
|
# Corresponds to the JSON property `switchControl`
|
1541
1715
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1SwitchControl]
|
1542
1716
|
attr_accessor :switch_control
|
1543
1717
|
|
1544
|
-
# Required. The primary text. Supports simple formatting.
|
1545
|
-
#
|
1718
|
+
# Required. The primary text. Supports simple formatting. For more information
|
1719
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
1720
|
+
# developers.google.com/chat/api/guides/message-formats/cards#
|
1721
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
1722
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
1546
1723
|
# Corresponds to the JSON property `text`
|
1547
1724
|
# @return [String]
|
1548
1725
|
attr_accessor :text
|
@@ -1579,7 +1756,7 @@ module Google
|
|
1579
1756
|
end
|
1580
1757
|
end
|
1581
1758
|
|
1582
|
-
# Displays a divider between widgets
|
1759
|
+
# Displays a divider between widgets as a horizontal line. For example, the
|
1583
1760
|
# following JSON creates a divider: ``` "divider": `` ```
|
1584
1761
|
class GoogleAppsCardV1Divider
|
1585
1762
|
include Google::Apis::Core::Hashable
|
@@ -1593,16 +1770,75 @@ module Google
|
|
1593
1770
|
end
|
1594
1771
|
end
|
1595
1772
|
|
1596
|
-
#
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1773
|
+
# The CardFixedFooter can contain a list of these widgets.
|
1774
|
+
class GoogleAppsCardV1FooterWidget
|
1775
|
+
include Google::Apis::Core::Hashable
|
1776
|
+
|
1777
|
+
# A list of buttons layed out horizontally.
|
1778
|
+
# Corresponds to the JSON property `buttonList`
|
1779
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1ButtonList]
|
1780
|
+
attr_accessor :button_list
|
1781
|
+
|
1782
|
+
# Lets users input a date, a time, or both a date and a time. Users can input
|
1783
|
+
# text or use the picker to select dates and times. If users input an invalid
|
1784
|
+
# date or time, the picker shows an error that prompts users to input the
|
1785
|
+
# information correctly.
|
1786
|
+
# Corresponds to the JSON property `dateTimePicker`
|
1787
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker]
|
1788
|
+
attr_accessor :date_time_picker
|
1789
|
+
|
1790
|
+
# A widget that displays text with optional decorations such as a label above or
|
1791
|
+
# below the text, an icon in front of the text, a selection widget, or a button
|
1792
|
+
# after the text.
|
1793
|
+
# Corresponds to the JSON property `decoratedText`
|
1794
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DecoratedText]
|
1795
|
+
attr_accessor :decorated_text
|
1796
|
+
|
1797
|
+
# A field in which users can enter text. Supports suggestions and on-change
|
1798
|
+
# actions. Chat apps receive and can process the value of entered text during
|
1799
|
+
# form input events. For details about working with form inputs, see [Receive
|
1800
|
+
# form data](https://developers.google.com/chat/how-tos/dialogs#
|
1801
|
+
# receive_form_data_from_dialogs). When you need to collect undefined or
|
1802
|
+
# abstract data from users, use a text input. To collect defined or enumerated
|
1803
|
+
# data from users, use the SelectionInput widget.
|
1804
|
+
# Corresponds to the JSON property `textInput`
|
1805
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextInput]
|
1806
|
+
attr_accessor :text_input
|
1807
|
+
|
1808
|
+
# A paragraph of text that supports formatting. For more information about
|
1809
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
1810
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
1811
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
1812
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
1813
|
+
# Corresponds to the JSON property `textParagraph`
|
1814
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextParagraph]
|
1815
|
+
attr_accessor :text_paragraph
|
1816
|
+
|
1817
|
+
def initialize(**args)
|
1818
|
+
update!(**args)
|
1819
|
+
end
|
1820
|
+
|
1821
|
+
# Update properties of this object
|
1822
|
+
def update!(**args)
|
1823
|
+
@button_list = args[:button_list] if args.key?(:button_list)
|
1824
|
+
@date_time_picker = args[:date_time_picker] if args.key?(:date_time_picker)
|
1825
|
+
@decorated_text = args[:decorated_text] if args.key?(:decorated_text)
|
1826
|
+
@text_input = args[:text_input] if args.key?(:text_input)
|
1827
|
+
@text_paragraph = args[:text_paragraph] if args.key?(:text_paragraph)
|
1828
|
+
end
|
1829
|
+
end
|
1830
|
+
|
1831
|
+
# Displays a grid with a collection of items. Items can only include text or
|
1832
|
+
# images. A grid supports any number of columns and items. The number of rows is
|
1833
|
+
# determined by items divided by columns. A grid with 10 items and 2 columns has
|
1834
|
+
# 5 rows. A grid with 11 items and 2 columns has 6 rows. For responsive columns,
|
1835
|
+
# or to include more than text or images, use `Columns`. For example, the
|
1836
|
+
# following JSON creates a 2 column grid with a single item: ``` "grid": ` "
|
1837
|
+
# title": "A fine collection of items", "columnCount": 2, "borderStyle": ` "type"
|
1838
|
+
# : "STROKE", "cornerRadius": 4 `, "items": [ ` "image": ` "imageUri": "https://
|
1839
|
+
# www.example.com/image.png", "cropStyle": ` "type": "SQUARE" `, "borderStyle": `
|
1840
|
+
# "type": "STROKE" ` `, "title": "An item", "textAlignment": "CENTER" ` ], "
|
1841
|
+
# onClick": ` "openLink": ` "url": "https://www.example.com" ` ` ` ```
|
1606
1842
|
class GoogleAppsCardV1Grid
|
1607
1843
|
include Google::Apis::Core::Hashable
|
1608
1844
|
|
@@ -1649,12 +1885,13 @@ module Google
|
|
1649
1885
|
end
|
1650
1886
|
end
|
1651
1887
|
|
1652
|
-
# Represents
|
1888
|
+
# Represents an item in a grid layout. Items can contain text, an image, or both
|
1889
|
+
# text and an image.
|
1653
1890
|
class GoogleAppsCardV1GridItem
|
1654
1891
|
include Google::Apis::Core::Hashable
|
1655
1892
|
|
1656
1893
|
# A user-specified identifier for this grid item. This identifier is returned in
|
1657
|
-
# the parent
|
1894
|
+
# the parent grid's `onClick` callback parameters.
|
1658
1895
|
# Corresponds to the JSON property `id`
|
1659
1896
|
# @return [String]
|
1660
1897
|
attr_accessor :id
|
@@ -1701,11 +1938,11 @@ module Google
|
|
1701
1938
|
include Google::Apis::Core::Hashable
|
1702
1939
|
|
1703
1940
|
# Optional. A description of the icon used for accessibility. If unspecified,
|
1704
|
-
# the default value
|
1941
|
+
# the default value `Button` is provided. As a best practice, you should set a
|
1705
1942
|
# helpful description for what the icon displays, and if applicable, what it
|
1706
1943
|
# does. For example, `A user's account portrait`, or `Opens a new browser tab
|
1707
1944
|
# and navigates to the Google Chat developer documentation at https://developers.
|
1708
|
-
# google.com/chat`. If the icon is set in a Button
|
1945
|
+
# google.com/chat`. If the icon is set in a `Button`, the `altText` appears as
|
1709
1946
|
# helper text when the user hovers over the button. However, if the button also
|
1710
1947
|
# sets `text`, the icon's `altText` is ignored.
|
1711
1948
|
# Corresponds to the JSON property `altText`
|
@@ -1750,13 +1987,13 @@ module Google
|
|
1750
1987
|
class GoogleAppsCardV1Image
|
1751
1988
|
include Google::Apis::Core::Hashable
|
1752
1989
|
|
1753
|
-
# The alternative text of this image
|
1990
|
+
# The alternative text of this image that's used for accessibility.
|
1754
1991
|
# Corresponds to the JSON property `altText`
|
1755
1992
|
# @return [String]
|
1756
1993
|
attr_accessor :alt_text
|
1757
1994
|
|
1758
|
-
# The
|
1759
|
-
#
|
1995
|
+
# The HTTPS URL that hosts the image. For example: ``` https://developers.google.
|
1996
|
+
# com/chat/images/quickstart-app-avatar.png ```
|
1760
1997
|
# Corresponds to the JSON property `imageUrl`
|
1761
1998
|
# @return [String]
|
1762
1999
|
attr_accessor :image_url
|
@@ -1795,7 +2032,7 @@ module Google
|
|
1795
2032
|
attr_accessor :border_style
|
1796
2033
|
|
1797
2034
|
# Represents the crop style applied to an image. For example, here's how to
|
1798
|
-
# apply a 16
|
2035
|
+
# apply a 16:9 aspect ratio: ``` cropStyle ` "type": "RECTANGLE_CUSTOM", "
|
1799
2036
|
# aspectRatio": 16/9 ` ```
|
1800
2037
|
# Corresponds to the JSON property `cropStyle`
|
1801
2038
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1ImageCropStyle]
|
@@ -1820,13 +2057,13 @@ module Google
|
|
1820
2057
|
end
|
1821
2058
|
|
1822
2059
|
# Represents the crop style applied to an image. For example, here's how to
|
1823
|
-
# apply a 16
|
2060
|
+
# apply a 16:9 aspect ratio: ``` cropStyle ` "type": "RECTANGLE_CUSTOM", "
|
1824
2061
|
# aspectRatio": 16/9 ` ```
|
1825
2062
|
class GoogleAppsCardV1ImageCropStyle
|
1826
2063
|
include Google::Apis::Core::Hashable
|
1827
2064
|
|
1828
2065
|
# The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example,
|
1829
|
-
# here's how to apply a 16
|
2066
|
+
# here's how to apply a 16:9 aspect ratio: ``` cropStyle ` "type": "
|
1830
2067
|
# RECTANGLE_CUSTOM", "aspectRatio": 16/9 ` ```
|
1831
2068
|
# Corresponds to the JSON property `aspectRatio`
|
1832
2069
|
# @return [Float]
|
@@ -1854,8 +2091,8 @@ module Google
|
|
1854
2091
|
include Google::Apis::Core::Hashable
|
1855
2092
|
|
1856
2093
|
# An action that describes the behavior when the form is submitted. For example,
|
1857
|
-
# an Apps Script
|
1858
|
-
# the form values are sent to the server.
|
2094
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2095
|
+
# triggered, the form values are sent to the server.
|
1859
2096
|
# Corresponds to the JSON property `action`
|
1860
2097
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1861
2098
|
attr_accessor :action
|
@@ -1867,29 +2104,29 @@ module Google
|
|
1867
2104
|
# text message, just beneath the text message. - As a [dialog](https://
|
1868
2105
|
# developers.google.com/chat/how-tos/dialogs). The following example JSON
|
1869
2106
|
# creates a "contact card" that features: - A header with the contact's name,
|
1870
|
-
# job title, avatar picture. - A section with the contact information,
|
1871
|
-
# formatted text. - Buttons that users can click to share the contact
|
1872
|
-
# more or less
|
1873
|
-
# images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "
|
1874
|
-
# "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
1875
|
-
# imageUrl": "https://developers.google.com/chat/images/quickstart-
|
1876
|
-
# png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
1877
|
-
# [ ` "header": "Contact Info", "collapsible": true, "
|
1878
|
-
# : 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
1879
|
-
# "text": "sasha@example.com", ` `, ` "decoratedText":
|
1880
|
-
# knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
1881
|
-
# startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
1882
|
-
# buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
1883
|
-
# : "https://example.com/share", ` ` `, ` "text": "Edit", "
|
1884
|
-
# ` "function": "goToView", "parameters": [ ` "key": "
|
1885
|
-
# ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
2107
|
+
# job title, and avatar picture. - A section with the contact information,
|
2108
|
+
# including formatted text. - Buttons that users can click to share the contact,
|
2109
|
+
# or see more or less information.  ``` ` "cardsV2": [ ` "cardId": "
|
2111
|
+
# unique-card-id", "card": ` "header": ` "title": "Sasha", "subtitle": "Software
|
2112
|
+
# Engineer", "imageUrl": "https://developers.google.com/chat/images/quickstart-
|
2113
|
+
# app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `,
|
2114
|
+
# "sections": [ ` "header": "Contact Info", "collapsible": true, "
|
2115
|
+
# uncollapsibleWidgetsCount": 1, "widgets": [ ` "decoratedText": ` "startIcon": `
|
2116
|
+
# "knownIcon": "EMAIL", `, "text": "sasha@example.com", ` `, ` "decoratedText":
|
2117
|
+
# ` "startIcon": ` "knownIcon": "PERSON", `, "text": "Online", `, `, ` "
|
2118
|
+
# decoratedText": ` "startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555)
|
2119
|
+
# 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "text": "Share", "onClick": `
|
2120
|
+
# "openLink": ` "url": "https://example.com/share", ` ` `, ` "text": "Edit", "
|
2121
|
+
# onClick": ` "action": ` "function": "goToView", "parameters": [ ` "key": "
|
2122
|
+
# viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
|
1886
2123
|
# Corresponds to the JSON property `card`
|
1887
2124
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
|
1888
2125
|
attr_accessor :card
|
1889
2126
|
|
1890
2127
|
# An action that describes the behavior when the form is submitted. For example,
|
1891
|
-
# an Apps Script
|
1892
|
-
# the form values are sent to the server.
|
2128
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2129
|
+
# triggered, the form values are sent to the server.
|
1893
2130
|
# Corresponds to the JSON property `openDynamicLinkAction`
|
1894
2131
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
1895
2132
|
attr_accessor :open_dynamic_link_action
|
@@ -1945,7 +2182,7 @@ module Google
|
|
1945
2182
|
end
|
1946
2183
|
|
1947
2184
|
# A section contains a collection of widgets that are rendered vertically in the
|
1948
|
-
# order that they
|
2185
|
+
# order that they're specified.
|
1949
2186
|
class GoogleAppsCardV1Section
|
1950
2187
|
include Google::Apis::Core::Hashable
|
1951
2188
|
|
@@ -1959,9 +2196,11 @@ module Google
|
|
1959
2196
|
attr_accessor :collapsible
|
1960
2197
|
alias_method :collapsible?, :collapsible
|
1961
2198
|
|
1962
|
-
# Text that appears at the top of a section. Supports
|
1963
|
-
# text
|
1964
|
-
#
|
2199
|
+
# Text that appears at the top of a section. Supports simple HTML formatted text.
|
2200
|
+
# For more information about formatting text, see [Formatting text in Google
|
2201
|
+
# Chat apps](https://developers.google.com/chat/api/guides/message-formats/cards#
|
2202
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
2203
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
1965
2204
|
# Corresponds to the JSON property `header`
|
1966
2205
|
# @return [String]
|
1967
2206
|
attr_accessor :header
|
@@ -1976,7 +2215,7 @@ module Google
|
|
1976
2215
|
# @return [Fixnum]
|
1977
2216
|
attr_accessor :uncollapsible_widgets_count
|
1978
2217
|
|
1979
|
-
# All the widgets in the section. Must contain at least
|
2218
|
+
# All the widgets in the section. Must contain at least one widget.
|
1980
2219
|
# Corresponds to the JSON property `widgets`
|
1981
2220
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Widget>]
|
1982
2221
|
attr_accessor :widgets
|
@@ -1994,17 +2233,18 @@ module Google
|
|
1994
2233
|
end
|
1995
2234
|
end
|
1996
2235
|
|
1997
|
-
# A widget that creates
|
1998
|
-
# a dropdown menu or
|
1999
|
-
#
|
2000
|
-
# inputs, see [
|
2001
|
-
#
|
2002
|
-
#
|
2003
|
-
#
|
2236
|
+
# A widget that creates one or more UI items that users can select. For example,
|
2237
|
+
# a dropdown menu or checkboxes. You can use this widget to collect data that
|
2238
|
+
# can be predicted or enumerated. Chat apps can process the value of items that
|
2239
|
+
# users select or input. For details about working with form inputs, see [
|
2240
|
+
# Receive form data](https://developers.google.com/chat/how-tos/dialogs#
|
2241
|
+
# receive_form_data_from_dialogs). To collect undefined or abstract data from
|
2242
|
+
# users, use the TextInput widget.
|
2004
2243
|
class GoogleAppsCardV1SelectionInput
|
2005
2244
|
include Google::Apis::Core::Hashable
|
2006
2245
|
|
2007
|
-
# An array of
|
2246
|
+
# An array of selectable items. For example, an array of radio buttons or
|
2247
|
+
# checkboxes. Supports up to 100 items.
|
2008
2248
|
# Corresponds to the JSON property `items`
|
2009
2249
|
# @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>]
|
2010
2250
|
attr_accessor :items
|
@@ -2017,7 +2257,7 @@ module Google
|
|
2017
2257
|
# @return [String]
|
2018
2258
|
attr_accessor :label
|
2019
2259
|
|
2020
|
-
# The name
|
2260
|
+
# The name that identifies the selection input in a form input event. For
|
2021
2261
|
# details about working with form inputs, see [Receive form data](https://
|
2022
2262
|
# developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
|
2023
2263
|
# Corresponds to the JSON property `name`
|
@@ -2025,17 +2265,16 @@ module Google
|
|
2025
2265
|
attr_accessor :name
|
2026
2266
|
|
2027
2267
|
# An action that describes the behavior when the form is submitted. For example,
|
2028
|
-
# an Apps Script
|
2029
|
-
# the form values are sent to the server.
|
2268
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2269
|
+
# triggered, the form values are sent to the server.
|
2030
2270
|
# Corresponds to the JSON property `onChangeAction`
|
2031
2271
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
2032
2272
|
attr_accessor :on_change_action
|
2033
2273
|
|
2034
|
-
# The
|
2035
|
-
# types of interactions. For example, users
|
2036
|
-
# can
|
2037
|
-
#
|
2038
|
-
# supported.
|
2274
|
+
# The type of items that are displayed to users in a `SelectionInput` widget.
|
2275
|
+
# Selection types support different types of interactions. For example, users
|
2276
|
+
# can select one or more checkboxes, but they can only select one value from a
|
2277
|
+
# dropdown menu.
|
2039
2278
|
# Corresponds to the JSON property `type`
|
2040
2279
|
# @return [String]
|
2041
2280
|
attr_accessor :type
|
@@ -2054,7 +2293,8 @@ module Google
|
|
2054
2293
|
end
|
2055
2294
|
end
|
2056
2295
|
|
2057
|
-
#
|
2296
|
+
# An item that users can select in a selection input, such as a checkbox or
|
2297
|
+
# switch.
|
2058
2298
|
class GoogleAppsCardV1SelectionItem
|
2059
2299
|
include Google::Apis::Core::Hashable
|
2060
2300
|
|
@@ -2066,7 +2306,7 @@ module Google
|
|
2066
2306
|
attr_accessor :selected
|
2067
2307
|
alias_method :selected?, :selected
|
2068
2308
|
|
2069
|
-
# The text
|
2309
|
+
# The text that identifies or describes the item to users.
|
2070
2310
|
# Corresponds to the JSON property `text`
|
2071
2311
|
# @return [String]
|
2072
2312
|
attr_accessor :text
|
@@ -2096,7 +2336,7 @@ module Google
|
|
2096
2336
|
include Google::Apis::Core::Hashable
|
2097
2337
|
|
2098
2338
|
# The value of a suggested input to a text input field. This is equivalent to
|
2099
|
-
# what users
|
2339
|
+
# what users enter themselves.
|
2100
2340
|
# Corresponds to the JSON property `text`
|
2101
2341
|
# @return [String]
|
2102
2342
|
attr_accessor :text
|
@@ -2115,12 +2355,12 @@ module Google
|
|
2115
2355
|
# inside the text input field. As users type, the suggested values dynamically
|
2116
2356
|
# filter to match what the users have typed. For example, a text input field for
|
2117
2357
|
# programming language might suggest Java, JavaScript, Python, and C++. When
|
2118
|
-
# users start typing
|
2119
|
-
#
|
2120
|
-
#
|
2121
|
-
# javascript
|
2358
|
+
# users start typing `Jav`, the list of suggestions filters to show `Java` and `
|
2359
|
+
# JavaScript`. Suggested values help guide users to enter values that your app
|
2360
|
+
# can make sense of. When referring to JavaScript, some users might enter `
|
2361
|
+
# javascript` and others `java script`. Suggesting `JavaScript` can standardize
|
2122
2362
|
# how users interact with your app. When specified, `TextInput.type` is always `
|
2123
|
-
# SINGLE_LINE`, even if it
|
2363
|
+
# SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`.
|
2124
2364
|
class GoogleAppsCardV1Suggestions
|
2125
2365
|
include Google::Apis::Core::Hashable
|
2126
2366
|
|
@@ -2141,7 +2381,7 @@ module Google
|
|
2141
2381
|
end
|
2142
2382
|
|
2143
2383
|
# Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
|
2144
|
-
# Only supported
|
2384
|
+
# Only supported in the `decoratedText` widget.
|
2145
2385
|
class GoogleAppsCardV1SwitchControl
|
2146
2386
|
include Google::Apis::Core::Hashable
|
2147
2387
|
|
@@ -2158,8 +2398,8 @@ module Google
|
|
2158
2398
|
attr_accessor :name
|
2159
2399
|
|
2160
2400
|
# An action that describes the behavior when the form is submitted. For example,
|
2161
|
-
# an Apps Script
|
2162
|
-
# the form values are sent to the server.
|
2401
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2402
|
+
# triggered, the form values are sent to the server.
|
2163
2403
|
# Corresponds to the JSON property `onChangeAction`
|
2164
2404
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
2165
2405
|
attr_accessor :on_change_action
|
@@ -2195,15 +2435,15 @@ module Google
|
|
2195
2435
|
# actions. Chat apps receive and can process the value of entered text during
|
2196
2436
|
# form input events. For details about working with form inputs, see [Receive
|
2197
2437
|
# form data](https://developers.google.com/chat/how-tos/dialogs#
|
2198
|
-
# receive_form_data_from_dialogs). When you need to collect
|
2199
|
-
# users, use a text input. To collect defined
|
2200
|
-
#
|
2438
|
+
# receive_form_data_from_dialogs). When you need to collect undefined or
|
2439
|
+
# abstract data from users, use a text input. To collect defined or enumerated
|
2440
|
+
# data from users, use the SelectionInput widget.
|
2201
2441
|
class GoogleAppsCardV1TextInput
|
2202
2442
|
include Google::Apis::Core::Hashable
|
2203
2443
|
|
2204
2444
|
# An action that describes the behavior when the form is submitted. For example,
|
2205
|
-
# an Apps Script
|
2206
|
-
# the form values are sent to the server.
|
2445
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2446
|
+
# triggered, the form values are sent to the server.
|
2207
2447
|
# Corresponds to the JSON property `autoCompleteAction`
|
2208
2448
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
2209
2449
|
attr_accessor :auto_complete_action
|
@@ -2219,12 +2459,12 @@ module Google
|
|
2219
2459
|
# inside the text input field. As users type, the suggested values dynamically
|
2220
2460
|
# filter to match what the users have typed. For example, a text input field for
|
2221
2461
|
# programming language might suggest Java, JavaScript, Python, and C++. When
|
2222
|
-
# users start typing
|
2223
|
-
#
|
2224
|
-
#
|
2225
|
-
# javascript
|
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
|
2226
2466
|
# how users interact with your app. When specified, `TextInput.type` is always `
|
2227
|
-
# SINGLE_LINE`, even if it
|
2467
|
+
# SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`.
|
2228
2468
|
# Corresponds to the JSON property `initialSuggestions`
|
2229
2469
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Suggestions]
|
2230
2470
|
attr_accessor :initial_suggestions
|
@@ -2232,7 +2472,7 @@ module Google
|
|
2232
2472
|
# The text that appears above the text input field in the user interface.
|
2233
2473
|
# Specify text that helps the user enter the information your app needs. For
|
2234
2474
|
# example, if you are asking someone's name, but specifically need their surname,
|
2235
|
-
# write
|
2475
|
+
# write `surname` instead of `name`. Required if `hintText` is unspecified.
|
2236
2476
|
# Otherwise, optional.
|
2237
2477
|
# Corresponds to the JSON property `label`
|
2238
2478
|
# @return [String]
|
@@ -2246,8 +2486,8 @@ module Google
|
|
2246
2486
|
attr_accessor :name
|
2247
2487
|
|
2248
2488
|
# An action that describes the behavior when the form is submitted. For example,
|
2249
|
-
# an Apps Script
|
2250
|
-
# the form values are sent to the server.
|
2489
|
+
# you can invoke an Apps Script script to handle the form. If the action is
|
2490
|
+
# triggered, the form values are sent to the server.
|
2251
2491
|
# Corresponds to the JSON property `onChangeAction`
|
2252
2492
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
|
2253
2493
|
attr_accessor :on_change_action
|
@@ -2282,9 +2522,11 @@ module Google
|
|
2282
2522
|
end
|
2283
2523
|
end
|
2284
2524
|
|
2285
|
-
# A paragraph of text that supports formatting.
|
2286
|
-
# developers.
|
2287
|
-
#
|
2525
|
+
# A paragraph of text that supports formatting. For more information about
|
2526
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
2527
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
2528
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
2529
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
2288
2530
|
class GoogleAppsCardV1TextParagraph
|
2289
2531
|
include Google::Apis::Core::Hashable
|
2290
2532
|
|
@@ -2313,54 +2555,78 @@ module Google
|
|
2313
2555
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1ButtonList]
|
2314
2556
|
attr_accessor :button_list
|
2315
2557
|
|
2316
|
-
#
|
2317
|
-
#
|
2318
|
-
#
|
2319
|
-
#
|
2320
|
-
#
|
2558
|
+
# The `Columns` widget displays up to 2 columns in a card message or dialog. You
|
2559
|
+
# can add widgets to each column; the widgets appear in the order that they are
|
2560
|
+
# specified. The height of each column is determined by the taller column. For
|
2561
|
+
# example, if the first column is taller than the second column, both columns
|
2562
|
+
# have the height of the first column. Because each column can contain a
|
2563
|
+
# different number of widgets, you can't define rows or align widgets between
|
2564
|
+
# the columns. Columns are displayed side-by-side. You can customize the width
|
2565
|
+
# of each column using the `HorizontalSizeStyle` field. If the user's screen
|
2566
|
+
# width is too narrow, the second column wraps below the first: * On web, the
|
2567
|
+
# second column wraps if the screen width is less than or equal to 480 pixels. *
|
2568
|
+
# On iOS devices, the second column wraps if the screen width is less than or
|
2569
|
+
# equal to 300 pt. * On Android devices, the second column wraps if the screen
|
2570
|
+
# width is less than or equal to 320 dp. To include more than 2 columns, or to
|
2571
|
+
# use rows, use the `Grid` widget. Supported by Chat apps, but not Google
|
2572
|
+
# Workspace Add-ons.
|
2573
|
+
# Corresponds to the JSON property `columns`
|
2574
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Columns]
|
2575
|
+
attr_accessor :columns
|
2576
|
+
|
2577
|
+
# Lets users input a date, a time, or both a date and a time. Users can input
|
2578
|
+
# text or use the picker to select dates and times. If users input an invalid
|
2579
|
+
# date or time, the picker shows an error that prompts users to input the
|
2580
|
+
# information correctly.
|
2321
2581
|
# Corresponds to the JSON property `dateTimePicker`
|
2322
2582
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker]
|
2323
2583
|
attr_accessor :date_time_picker
|
2324
2584
|
|
2325
2585
|
# A widget that displays text with optional decorations such as a label above or
|
2326
|
-
# below the text, an icon in front of the text, a selection widget or a button
|
2586
|
+
# below the text, an icon in front of the text, a selection widget, or a button
|
2327
2587
|
# after the text.
|
2328
2588
|
# Corresponds to the JSON property `decoratedText`
|
2329
2589
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DecoratedText]
|
2330
2590
|
attr_accessor :decorated_text
|
2331
2591
|
|
2332
|
-
# Displays a divider between widgets
|
2592
|
+
# Displays a divider between widgets as a horizontal line. For example, the
|
2333
2593
|
# following JSON creates a divider: ``` "divider": `` ```
|
2334
2594
|
# Corresponds to the JSON property `divider`
|
2335
2595
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Divider]
|
2336
2596
|
attr_accessor :divider
|
2337
2597
|
|
2338
|
-
# Displays a grid with a collection of items.
|
2339
|
-
# columns and items. The number of rows is
|
2340
|
-
# columns. A grid with 10 items and 2 columns has
|
2341
|
-
# and 2 columns has 6 rows. For
|
2342
|
-
#
|
2343
|
-
#
|
2344
|
-
#
|
2345
|
-
#
|
2346
|
-
#
|
2347
|
-
#
|
2598
|
+
# Displays a grid with a collection of items. Items can only include text or
|
2599
|
+
# images. A grid supports any number of columns and items. The number of rows is
|
2600
|
+
# determined by items divided by columns. A grid with 10 items and 2 columns has
|
2601
|
+
# 5 rows. A grid with 11 items and 2 columns has 6 rows. For responsive columns,
|
2602
|
+
# or to include more than text or images, use `Columns`. For example, the
|
2603
|
+
# following JSON creates a 2 column grid with a single item: ``` "grid": ` "
|
2604
|
+
# title": "A fine collection of items", "columnCount": 2, "borderStyle": ` "type"
|
2605
|
+
# : "STROKE", "cornerRadius": 4 `, "items": [ ` "image": ` "imageUri": "https://
|
2606
|
+
# www.example.com/image.png", "cropStyle": ` "type": "SQUARE" `, "borderStyle": `
|
2607
|
+
# "type": "STROKE" ` `, "title": "An item", "textAlignment": "CENTER" ` ], "
|
2608
|
+
# onClick": ` "openLink": ` "url": "https://www.example.com" ` ` ` ```
|
2348
2609
|
# Corresponds to the JSON property `grid`
|
2349
2610
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Grid]
|
2350
2611
|
attr_accessor :grid
|
2351
2612
|
|
2613
|
+
# Specifies whether widgets align to the left, right, or center of a column.
|
2614
|
+
# Corresponds to the JSON property `horizontalAlignment`
|
2615
|
+
# @return [String]
|
2616
|
+
attr_accessor :horizontal_alignment
|
2617
|
+
|
2352
2618
|
# An image that is specified by a URL and can have an `onClick` action.
|
2353
2619
|
# Corresponds to the JSON property `image`
|
2354
2620
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Image]
|
2355
2621
|
attr_accessor :image
|
2356
2622
|
|
2357
|
-
# A widget that creates
|
2358
|
-
# a dropdown menu or
|
2359
|
-
#
|
2360
|
-
# inputs, see [
|
2361
|
-
#
|
2362
|
-
#
|
2363
|
-
#
|
2623
|
+
# A widget that creates one or more UI items that users can select. For example,
|
2624
|
+
# a dropdown menu or checkboxes. You can use this widget to collect data that
|
2625
|
+
# can be predicted or enumerated. Chat apps can process the value of items that
|
2626
|
+
# users select or input. For details about working with form inputs, see [
|
2627
|
+
# Receive form data](https://developers.google.com/chat/how-tos/dialogs#
|
2628
|
+
# receive_form_data_from_dialogs). To collect undefined or abstract data from
|
2629
|
+
# users, use the TextInput widget.
|
2364
2630
|
# Corresponds to the JSON property `selectionInput`
|
2365
2631
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput]
|
2366
2632
|
attr_accessor :selection_input
|
@@ -2369,16 +2635,18 @@ module Google
|
|
2369
2635
|
# actions. Chat apps receive and can process the value of entered text during
|
2370
2636
|
# form input events. For details about working with form inputs, see [Receive
|
2371
2637
|
# form data](https://developers.google.com/chat/how-tos/dialogs#
|
2372
|
-
# receive_form_data_from_dialogs). When you need to collect
|
2373
|
-
# users, use a text input. To collect defined
|
2374
|
-
#
|
2638
|
+
# receive_form_data_from_dialogs). When you need to collect undefined or
|
2639
|
+
# abstract data from users, use a text input. To collect defined or enumerated
|
2640
|
+
# data from users, use the SelectionInput widget.
|
2375
2641
|
# Corresponds to the JSON property `textInput`
|
2376
2642
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextInput]
|
2377
2643
|
attr_accessor :text_input
|
2378
2644
|
|
2379
|
-
# A paragraph of text that supports formatting.
|
2380
|
-
# developers.
|
2381
|
-
#
|
2645
|
+
# A paragraph of text that supports formatting. For more information about
|
2646
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
2647
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
2648
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
2649
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
2382
2650
|
# Corresponds to the JSON property `textParagraph`
|
2383
2651
|
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextParagraph]
|
2384
2652
|
attr_accessor :text_paragraph
|
@@ -2390,10 +2658,88 @@ module Google
|
|
2390
2658
|
# Update properties of this object
|
2391
2659
|
def update!(**args)
|
2392
2660
|
@button_list = args[:button_list] if args.key?(:button_list)
|
2661
|
+
@columns = args[:columns] if args.key?(:columns)
|
2393
2662
|
@date_time_picker = args[:date_time_picker] if args.key?(:date_time_picker)
|
2394
2663
|
@decorated_text = args[:decorated_text] if args.key?(:decorated_text)
|
2395
2664
|
@divider = args[:divider] if args.key?(:divider)
|
2396
2665
|
@grid = args[:grid] if args.key?(:grid)
|
2666
|
+
@horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
|
2667
|
+
@image = args[:image] if args.key?(:image)
|
2668
|
+
@selection_input = args[:selection_input] if args.key?(:selection_input)
|
2669
|
+
@text_input = args[:text_input] if args.key?(:text_input)
|
2670
|
+
@text_paragraph = args[:text_paragraph] if args.key?(:text_paragraph)
|
2671
|
+
end
|
2672
|
+
end
|
2673
|
+
|
2674
|
+
# The supported widgets that you can include in a column.
|
2675
|
+
class GoogleAppsCardV1Widgets
|
2676
|
+
include Google::Apis::Core::Hashable
|
2677
|
+
|
2678
|
+
# A list of buttons layed out horizontally.
|
2679
|
+
# Corresponds to the JSON property `buttonList`
|
2680
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1ButtonList]
|
2681
|
+
attr_accessor :button_list
|
2682
|
+
|
2683
|
+
# Lets users input a date, a time, or both a date and a time. Users can input
|
2684
|
+
# text or use the picker to select dates and times. If users input an invalid
|
2685
|
+
# date or time, the picker shows an error that prompts users to input the
|
2686
|
+
# information correctly.
|
2687
|
+
# Corresponds to the JSON property `dateTimePicker`
|
2688
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker]
|
2689
|
+
attr_accessor :date_time_picker
|
2690
|
+
|
2691
|
+
# A widget that displays text with optional decorations such as a label above or
|
2692
|
+
# below the text, an icon in front of the text, a selection widget, or a button
|
2693
|
+
# after the text.
|
2694
|
+
# Corresponds to the JSON property `decoratedText`
|
2695
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1DecoratedText]
|
2696
|
+
attr_accessor :decorated_text
|
2697
|
+
|
2698
|
+
# An image that is specified by a URL and can have an `onClick` action.
|
2699
|
+
# Corresponds to the JSON property `image`
|
2700
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1Image]
|
2701
|
+
attr_accessor :image
|
2702
|
+
|
2703
|
+
# A widget that creates one or more UI items that users can select. For example,
|
2704
|
+
# a dropdown menu or checkboxes. You can use this widget to collect data that
|
2705
|
+
# can be predicted or enumerated. Chat apps can process the value of items that
|
2706
|
+
# users select or input. For details about working with form inputs, see [
|
2707
|
+
# Receive form data](https://developers.google.com/chat/how-tos/dialogs#
|
2708
|
+
# receive_form_data_from_dialogs). To collect undefined or abstract data from
|
2709
|
+
# users, use the TextInput widget.
|
2710
|
+
# Corresponds to the JSON property `selectionInput`
|
2711
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput]
|
2712
|
+
attr_accessor :selection_input
|
2713
|
+
|
2714
|
+
# A field in which users can enter text. Supports suggestions and on-change
|
2715
|
+
# actions. Chat apps receive and can process the value of entered text during
|
2716
|
+
# form input events. For details about working with form inputs, see [Receive
|
2717
|
+
# form data](https://developers.google.com/chat/how-tos/dialogs#
|
2718
|
+
# receive_form_data_from_dialogs). When you need to collect undefined or
|
2719
|
+
# abstract data from users, use a text input. To collect defined or enumerated
|
2720
|
+
# data from users, use the SelectionInput widget.
|
2721
|
+
# Corresponds to the JSON property `textInput`
|
2722
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextInput]
|
2723
|
+
attr_accessor :text_input
|
2724
|
+
|
2725
|
+
# A paragraph of text that supports formatting. For more information about
|
2726
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
2727
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
2728
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
2729
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
2730
|
+
# Corresponds to the JSON property `textParagraph`
|
2731
|
+
# @return [Google::Apis::ChatV1::GoogleAppsCardV1TextParagraph]
|
2732
|
+
attr_accessor :text_paragraph
|
2733
|
+
|
2734
|
+
def initialize(**args)
|
2735
|
+
update!(**args)
|
2736
|
+
end
|
2737
|
+
|
2738
|
+
# Update properties of this object
|
2739
|
+
def update!(**args)
|
2740
|
+
@button_list = args[:button_list] if args.key?(:button_list)
|
2741
|
+
@date_time_picker = args[:date_time_picker] if args.key?(:date_time_picker)
|
2742
|
+
@decorated_text = args[:decorated_text] if args.key?(:decorated_text)
|
2397
2743
|
@image = args[:image] if args.key?(:image)
|
2398
2744
|
@selection_input = args[:selection_input] if args.key?(:selection_input)
|
2399
2745
|
@text_input = args[:text_input] if args.key?(:text_input)
|
@@ -2401,14 +2747,14 @@ module Google
|
|
2401
2747
|
end
|
2402
2748
|
end
|
2403
2749
|
|
2404
|
-
# An image that
|
2750
|
+
# An image that's specified by a URL and can have an `onclick` action.
|
2405
2751
|
class Image
|
2406
2752
|
include Google::Apis::Core::Hashable
|
2407
2753
|
|
2408
|
-
# The aspect ratio of this image (width
|
2409
|
-
#
|
2410
|
-
#
|
2411
|
-
#
|
2754
|
+
# The aspect ratio of this image (width and height). This field lets you reserve
|
2755
|
+
# the right height for the image while waiting for it to load. It's not meant to
|
2756
|
+
# override the built-in aspect ratio of the image. If unset, the server fills it
|
2757
|
+
# by prefetching the image.
|
2412
2758
|
# Corresponds to the JSON property `aspectRatio`
|
2413
2759
|
# @return [Float]
|
2414
2760
|
attr_accessor :aspect_ratio
|
@@ -2418,7 +2764,7 @@ module Google
|
|
2418
2764
|
# @return [String]
|
2419
2765
|
attr_accessor :image_url
|
2420
2766
|
|
2421
|
-
# An onclick action (
|
2767
|
+
# An `onclick` action (for example, open a link).
|
2422
2768
|
# Corresponds to the JSON property `onClick`
|
2423
2769
|
# @return [Google::Apis::ChatV1::OnClick]
|
2424
2770
|
attr_accessor :on_click
|
@@ -2435,11 +2781,11 @@ module Google
|
|
2435
2781
|
end
|
2436
2782
|
end
|
2437
2783
|
|
2438
|
-
# An image button with an onclick action.
|
2784
|
+
# An image button with an `onclick` action.
|
2439
2785
|
class ImageButton
|
2440
2786
|
include Google::Apis::Core::Hashable
|
2441
2787
|
|
2442
|
-
# The icon specified by an enum that indices to an icon provided by Chat API.
|
2788
|
+
# The icon specified by an `enum` that indices to an icon provided by Chat API.
|
2443
2789
|
# Corresponds to the JSON property `icon`
|
2444
2790
|
# @return [String]
|
2445
2791
|
attr_accessor :icon
|
@@ -2449,13 +2795,13 @@ module Google
|
|
2449
2795
|
# @return [String]
|
2450
2796
|
attr_accessor :icon_url
|
2451
2797
|
|
2452
|
-
# The name of this image_button
|
2453
|
-
#
|
2798
|
+
# The name of this `image_button` that's used for accessibility. Default value
|
2799
|
+
# is provided if this name isn't specified.
|
2454
2800
|
# Corresponds to the JSON property `name`
|
2455
2801
|
# @return [String]
|
2456
2802
|
attr_accessor :name
|
2457
2803
|
|
2458
|
-
# An onclick action (
|
2804
|
+
# An `onclick` action (for example, open a link).
|
2459
2805
|
# Corresponds to the JSON property `onClick`
|
2460
2806
|
# @return [Google::Apis::ChatV1::OnClick]
|
2461
2807
|
attr_accessor :on_click
|
@@ -2477,12 +2823,12 @@ module Google
|
|
2477
2823
|
class Inputs
|
2478
2824
|
include Google::Apis::Core::Hashable
|
2479
2825
|
|
2480
|
-
# Date input values.
|
2826
|
+
# Date input values.
|
2481
2827
|
# Corresponds to the JSON property `dateInput`
|
2482
2828
|
# @return [Google::Apis::ChatV1::DateInput]
|
2483
2829
|
attr_accessor :date_input
|
2484
2830
|
|
2485
|
-
# Date and time input values.
|
2831
|
+
# Date and time input values.
|
2486
2832
|
# Corresponds to the JSON property `dateTimeInput`
|
2487
2833
|
# @return [Google::Apis::ChatV1::DateTimeInput]
|
2488
2834
|
attr_accessor :date_time_input
|
@@ -2494,7 +2840,7 @@ module Google
|
|
2494
2840
|
# @return [Google::Apis::ChatV1::StringInputs]
|
2495
2841
|
attr_accessor :string_inputs
|
2496
2842
|
|
2497
|
-
# Time input values.
|
2843
|
+
# Time input values.
|
2498
2844
|
# Corresponds to the JSON property `timeInput`
|
2499
2845
|
# @return [Google::Apis::ChatV1::TimeInput]
|
2500
2846
|
attr_accessor :time_input
|
@@ -2512,12 +2858,16 @@ module Google
|
|
2512
2858
|
end
|
2513
2859
|
end
|
2514
2860
|
|
2515
|
-
# A UI element contains a key (label) and a value (content).
|
2516
|
-
#
|
2861
|
+
# A UI element contains a key (label) and a value (content). This element can
|
2862
|
+
# also contain some actions such as `onclick` button.
|
2517
2863
|
class KeyValue
|
2518
2864
|
include Google::Apis::Core::Hashable
|
2519
2865
|
|
2520
|
-
# The text of the bottom label. Formatted text supported.
|
2866
|
+
# The text of the bottom label. Formatted text supported. For more information
|
2867
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
2868
|
+
# developers.google.com/chat/api/guides/message-formats/cards#
|
2869
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
2870
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2521
2871
|
# Corresponds to the JSON property `bottomLabel`
|
2522
2872
|
# @return [String]
|
2523
2873
|
attr_accessor :bottom_label
|
@@ -2527,7 +2877,11 @@ module Google
|
|
2527
2877
|
# @return [Google::Apis::ChatV1::Button]
|
2528
2878
|
attr_accessor :button
|
2529
2879
|
|
2530
|
-
# The text of the content. Formatted text supported and always required.
|
2880
|
+
# The text of the content. Formatted text supported and always required. For
|
2881
|
+
# more information about formatting text, see [Formatting text in Google Chat
|
2882
|
+
# apps](https://developers.google.com/chat/api/guides/message-formats/cards#
|
2883
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
2884
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2531
2885
|
# Corresponds to the JSON property `content`
|
2532
2886
|
# @return [String]
|
2533
2887
|
attr_accessor :content
|
@@ -2538,8 +2892,8 @@ module Google
|
|
2538
2892
|
attr_accessor :content_multiline
|
2539
2893
|
alias_method :content_multiline?, :content_multiline
|
2540
2894
|
|
2541
|
-
# An enum value that
|
2542
|
-
#
|
2895
|
+
# An enum value that's replaced by the Chat API with the corresponding icon
|
2896
|
+
# image.
|
2543
2897
|
# Corresponds to the JSON property `icon`
|
2544
2898
|
# @return [String]
|
2545
2899
|
attr_accessor :icon
|
@@ -2549,12 +2903,16 @@ module Google
|
|
2549
2903
|
# @return [String]
|
2550
2904
|
attr_accessor :icon_url
|
2551
2905
|
|
2552
|
-
# An onclick action (
|
2906
|
+
# An `onclick` action (for example, open a link).
|
2553
2907
|
# Corresponds to the JSON property `onClick`
|
2554
2908
|
# @return [Google::Apis::ChatV1::OnClick]
|
2555
2909
|
attr_accessor :on_click
|
2556
2910
|
|
2557
|
-
# The text of the top label. Formatted text supported.
|
2911
|
+
# The text of the top label. Formatted text supported. For more information
|
2912
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
2913
|
+
# developers.google.com/chat/api/guides/message-formats/cards#
|
2914
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
2915
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2558
2916
|
# Corresponds to the JSON property `topLabel`
|
2559
2917
|
# @return [String]
|
2560
2918
|
attr_accessor :top_label
|
@@ -2585,7 +2943,7 @@ module Google
|
|
2585
2943
|
# @return [Array<Google::Apis::ChatV1::Membership>]
|
2586
2944
|
attr_accessor :memberships
|
2587
2945
|
|
2588
|
-
# A token that can
|
2946
|
+
# A token that you can send as `pageToken` to retrieve the next page of results.
|
2589
2947
|
# If empty, there are no subsequent pages.
|
2590
2948
|
# Corresponds to the JSON property `nextPageToken`
|
2591
2949
|
# @return [String]
|
@@ -2602,12 +2960,64 @@ module Google
|
|
2602
2960
|
end
|
2603
2961
|
end
|
2604
2962
|
|
2963
|
+
#
|
2964
|
+
class ListMessagesResponse
|
2965
|
+
include Google::Apis::Core::Hashable
|
2966
|
+
|
2967
|
+
# List of messages.
|
2968
|
+
# Corresponds to the JSON property `messages`
|
2969
|
+
# @return [Array<Google::Apis::ChatV1::Message>]
|
2970
|
+
attr_accessor :messages
|
2971
|
+
|
2972
|
+
# You can send a token as `pageToken` to retrieve the next page of results. If
|
2973
|
+
# empty, there are no subsequent pages.
|
2974
|
+
# Corresponds to the JSON property `nextPageToken`
|
2975
|
+
# @return [String]
|
2976
|
+
attr_accessor :next_page_token
|
2977
|
+
|
2978
|
+
def initialize(**args)
|
2979
|
+
update!(**args)
|
2980
|
+
end
|
2981
|
+
|
2982
|
+
# Update properties of this object
|
2983
|
+
def update!(**args)
|
2984
|
+
@messages = args[:messages] if args.key?(:messages)
|
2985
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2986
|
+
end
|
2987
|
+
end
|
2988
|
+
|
2989
|
+
#
|
2990
|
+
class ListReactionsResponse
|
2991
|
+
include Google::Apis::Core::Hashable
|
2992
|
+
|
2993
|
+
# Continuation token to retrieve the next page of results. It's empty for the
|
2994
|
+
# last page of results.
|
2995
|
+
# Corresponds to the JSON property `nextPageToken`
|
2996
|
+
# @return [String]
|
2997
|
+
attr_accessor :next_page_token
|
2998
|
+
|
2999
|
+
# List of reactions in the requested (or first) page.
|
3000
|
+
# Corresponds to the JSON property `reactions`
|
3001
|
+
# @return [Array<Google::Apis::ChatV1::Reaction>]
|
3002
|
+
attr_accessor :reactions
|
3003
|
+
|
3004
|
+
def initialize(**args)
|
3005
|
+
update!(**args)
|
3006
|
+
end
|
3007
|
+
|
3008
|
+
# Update properties of this object
|
3009
|
+
def update!(**args)
|
3010
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
3011
|
+
@reactions = args[:reactions] if args.key?(:reactions)
|
3012
|
+
end
|
3013
|
+
end
|
3014
|
+
|
2605
3015
|
#
|
2606
3016
|
class ListSpacesResponse
|
2607
3017
|
include Google::Apis::Core::Hashable
|
2608
3018
|
|
2609
|
-
#
|
2610
|
-
#
|
3019
|
+
# You can send a token as `pageToken` to retrieve the next page of results. If
|
3020
|
+
# empty, there are no subsequent pages.
|
2611
3021
|
# Corresponds to the JSON property `nextPageToken`
|
2612
3022
|
# @return [String]
|
2613
3023
|
attr_accessor :next_page_token
|
@@ -2628,13 +3038,13 @@ module Google
|
|
2628
3038
|
end
|
2629
3039
|
end
|
2630
3040
|
|
2631
|
-
# A matched
|
2632
|
-
# information,
|
2633
|
-
#
|
3041
|
+
# A matched URL in a Chat message. Chat apps can preview matched URLs. For more
|
3042
|
+
# information, see [Preview links](https://developers.google.com/chat/how-tos/
|
3043
|
+
# preview-links).
|
2634
3044
|
class MatchedUrl
|
2635
3045
|
include Google::Apis::Core::Hashable
|
2636
3046
|
|
2637
|
-
# Output only. The
|
3047
|
+
# Output only. The URL that was matched.
|
2638
3048
|
# Corresponds to the JSON property `url`
|
2639
3049
|
# @return [String]
|
2640
3050
|
attr_accessor :url
|
@@ -2684,8 +3094,8 @@ module Google
|
|
2684
3094
|
# @return [Google::Apis::ChatV1::User]
|
2685
3095
|
attr_accessor :member
|
2686
3096
|
|
2687
|
-
# Resource name of the membership, assigned by the server. Format: spaces/`
|
2688
|
-
#
|
3097
|
+
# Resource name of the membership, assigned by the server. Format: `spaces/`
|
3098
|
+
# space`/members/`member``
|
2689
3099
|
# Corresponds to the JSON property `name`
|
2690
3100
|
# @return [String]
|
2691
3101
|
attr_accessor :name
|
@@ -2724,7 +3134,7 @@ module Google
|
|
2724
3134
|
# @return [Google::Apis::ChatV1::ActionResponse]
|
2725
3135
|
attr_accessor :action_response
|
2726
3136
|
|
2727
|
-
# Output only. Annotations associated with the text in this message.
|
3137
|
+
# Output only. Annotations associated with the `text` in this message.
|
2728
3138
|
# Corresponds to the JSON property `annotations`
|
2729
3139
|
# @return [Array<Google::Apis::ChatV1::Annotation>]
|
2730
3140
|
attr_accessor :annotations
|
@@ -2740,8 +3150,8 @@ module Google
|
|
2740
3150
|
# @return [Array<Google::Apis::ChatV1::Attachment>]
|
2741
3151
|
attr_accessor :attachment
|
2742
3152
|
|
2743
|
-
# Deprecated: Use `cards_v2` instead. Rich, formatted and interactive cards
|
2744
|
-
# can
|
3153
|
+
# Deprecated: Use `cards_v2` instead. Rich, formatted, and interactive cards
|
3154
|
+
# that you can use to display UI elements such as: formatted texts, buttons, and
|
2745
3155
|
# clickable images. Cards are normally displayed below the plain-text body of
|
2746
3156
|
# the message. `cards` and `cards_v2` can have a maximum size of 32 KB.
|
2747
3157
|
# Corresponds to the JSON property `cards`
|
@@ -2770,13 +3180,32 @@ module Google
|
|
2770
3180
|
# @return [String]
|
2771
3181
|
attr_accessor :client_assigned_message_id
|
2772
3182
|
|
2773
|
-
# Output only. The time at which the message was created in Google Chat
|
3183
|
+
# Output only. The time at which the message was created in Google Chat.
|
2774
3184
|
# Corresponds to the JSON property `createTime`
|
2775
3185
|
# @return [String]
|
2776
3186
|
attr_accessor :create_time
|
2777
3187
|
|
3188
|
+
# Output only. The time at which the message was deleted in Google Chat server.
|
3189
|
+
# If the message is never deleted, this field is empty. [Developer Preview](
|
3190
|
+
# https://developers.google.com/workspace/preview).
|
3191
|
+
# Corresponds to the JSON property `deleteTime`
|
3192
|
+
# @return [String]
|
3193
|
+
attr_accessor :delete_time
|
3194
|
+
|
3195
|
+
# Information about a deleted message. A message is deleted when `delete_time`
|
3196
|
+
# is set. [Developer Preview](https://developers.google.com/workspace/preview).
|
3197
|
+
# Corresponds to the JSON property `deletionMetadata`
|
3198
|
+
# @return [Google::Apis::ChatV1::DeletionMetadata]
|
3199
|
+
attr_accessor :deletion_metadata
|
3200
|
+
|
3201
|
+
# Output only. The list of emoji reaction summaries on the message. [Developer
|
3202
|
+
# Preview](https://developers.google.com/workspace/preview).
|
3203
|
+
# Corresponds to the JSON property `emojiReactionSummaries`
|
3204
|
+
# @return [Array<Google::Apis::ChatV1::EmojiReactionSummary>]
|
3205
|
+
attr_accessor :emoji_reaction_summaries
|
3206
|
+
|
2778
3207
|
# A plain-text description of the message's cards, used when the actual cards
|
2779
|
-
#
|
3208
|
+
# can't be displayed—for example, mobile notifications.
|
2780
3209
|
# Corresponds to the JSON property `fallbackText`
|
2781
3210
|
# @return [String]
|
2782
3211
|
attr_accessor :fallback_text
|
@@ -2787,9 +3216,9 @@ module Google
|
|
2787
3216
|
# @return [String]
|
2788
3217
|
attr_accessor :last_update_time
|
2789
3218
|
|
2790
|
-
# A matched
|
2791
|
-
# information,
|
2792
|
-
#
|
3219
|
+
# A matched URL in a Chat message. Chat apps can preview matched URLs. For more
|
3220
|
+
# information, see [Preview links](https://developers.google.com/chat/how-tos/
|
3221
|
+
# preview-links).
|
2793
3222
|
# Corresponds to the JSON property `matchedUrl`
|
2794
3223
|
# @return [Google::Apis::ChatV1::MatchedUrl]
|
2795
3224
|
attr_accessor :matched_url
|
@@ -2851,6 +3280,9 @@ module Google
|
|
2851
3280
|
@cards_v2 = args[:cards_v2] if args.key?(:cards_v2)
|
2852
3281
|
@client_assigned_message_id = args[:client_assigned_message_id] if args.key?(:client_assigned_message_id)
|
2853
3282
|
@create_time = args[:create_time] if args.key?(:create_time)
|
3283
|
+
@delete_time = args[:delete_time] if args.key?(:delete_time)
|
3284
|
+
@deletion_metadata = args[:deletion_metadata] if args.key?(:deletion_metadata)
|
3285
|
+
@emoji_reaction_summaries = args[:emoji_reaction_summaries] if args.key?(:emoji_reaction_summaries)
|
2854
3286
|
@fallback_text = args[:fallback_text] if args.key?(:fallback_text)
|
2855
3287
|
@last_update_time = args[:last_update_time] if args.key?(:last_update_time)
|
2856
3288
|
@matched_url = args[:matched_url] if args.key?(:matched_url)
|
@@ -2864,12 +3296,12 @@ module Google
|
|
2864
3296
|
end
|
2865
3297
|
end
|
2866
3298
|
|
2867
|
-
# An onclick action (
|
3299
|
+
# An `onclick` action (for example, open a link).
|
2868
3300
|
class OnClick
|
2869
3301
|
include Google::Apis::Core::Hashable
|
2870
3302
|
|
2871
3303
|
# A form action describes the behavior when the form is submitted. For example,
|
2872
|
-
#
|
3304
|
+
# you can invoke Apps Script to handle the form.
|
2873
3305
|
# Corresponds to the JSON property `action`
|
2874
3306
|
# @return [Google::Apis::ChatV1::FormAction]
|
2875
3307
|
attr_accessor :action
|
@@ -2909,18 +3341,57 @@ module Google
|
|
2909
3341
|
end
|
2910
3342
|
end
|
2911
3343
|
|
3344
|
+
# A reaction to a message. [Developer Preview](https://developers.google.com/
|
3345
|
+
# workspace/preview).
|
3346
|
+
class Reaction
|
3347
|
+
include Google::Apis::Core::Hashable
|
3348
|
+
|
3349
|
+
# An emoji that is used as a reaction to a message. [Developer Preview](https://
|
3350
|
+
# developers.google.com/workspace/preview).
|
3351
|
+
# Corresponds to the JSON property `emoji`
|
3352
|
+
# @return [Google::Apis::ChatV1::Emoji]
|
3353
|
+
attr_accessor :emoji
|
3354
|
+
|
3355
|
+
# The resource name of the reaction. Format: `spaces/`space`/messages/`message`/
|
3356
|
+
# reactions/`reaction``
|
3357
|
+
# Corresponds to the JSON property `name`
|
3358
|
+
# @return [String]
|
3359
|
+
attr_accessor :name
|
3360
|
+
|
3361
|
+
# A user in Google Chat.
|
3362
|
+
# Corresponds to the JSON property `user`
|
3363
|
+
# @return [Google::Apis::ChatV1::User]
|
3364
|
+
attr_accessor :user
|
3365
|
+
|
3366
|
+
def initialize(**args)
|
3367
|
+
update!(**args)
|
3368
|
+
end
|
3369
|
+
|
3370
|
+
# Update properties of this object
|
3371
|
+
def update!(**args)
|
3372
|
+
@emoji = args[:emoji] if args.key?(:emoji)
|
3373
|
+
@name = args[:name] if args.key?(:name)
|
3374
|
+
@user = args[:user] if args.key?(:user)
|
3375
|
+
end
|
3376
|
+
end
|
3377
|
+
|
2912
3378
|
# A section contains a collection of widgets that are rendered (vertically) in
|
2913
3379
|
# the order that they are specified. Across all platforms, cards have a narrow
|
2914
|
-
# fixed width, so there
|
3380
|
+
# fixed width, so there's currently no need for layout properties (for example,
|
3381
|
+
# float).
|
2915
3382
|
class Section
|
2916
3383
|
include Google::Apis::Core::Hashable
|
2917
3384
|
|
2918
|
-
# The header of the section
|
3385
|
+
# The header of the section. Formatted text is supported. For more information
|
3386
|
+
# about formatting text, see [Formatting text in Google Chat apps](https://
|
3387
|
+
# developers.google.com/chat/api/guides/message-formats/cards#
|
3388
|
+
# card_text_formatting) and [Formatting text in Google Workspace Add-ons](https:/
|
3389
|
+
# /developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
2919
3390
|
# Corresponds to the JSON property `header`
|
2920
3391
|
# @return [String]
|
2921
3392
|
attr_accessor :header
|
2922
3393
|
|
2923
|
-
# A section must contain at least
|
3394
|
+
# A section must contain at least one widget.
|
2924
3395
|
# Corresponds to the JSON property `widgets`
|
2925
3396
|
# @return [Array<Google::Apis::ChatV1::WidgetMarkup>]
|
2926
3397
|
attr_accessor :widgets
|
@@ -2936,12 +3407,58 @@ module Google
|
|
2936
3407
|
end
|
2937
3408
|
end
|
2938
3409
|
|
3410
|
+
# [Developer Preview](https://developers.google.com/workspace/preview).
|
3411
|
+
class SetUpSpaceRequest
|
3412
|
+
include Google::Apis::Core::Hashable
|
3413
|
+
|
3414
|
+
# Optional. The initial set of in-domain users invited to join the space. The
|
3415
|
+
# calling user is automatically added to the space, and shouldn't be specified
|
3416
|
+
# as a membership. The set currently allows up to 20 memberships (in addition to
|
3417
|
+
# the caller). The `Membership.member` field must contain a user with `name`
|
3418
|
+
# populated and `User.Type.HUMAN`. All other fields are ignored. Optional when
|
3419
|
+
# setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType`
|
3420
|
+
# to `GROUP_CHAT`, along with at least two memberships. Required when setting `
|
3421
|
+
# Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one
|
3422
|
+
# membership. Must be empty when creating a 1:1 conversation between a human and
|
3423
|
+
# the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `
|
3424
|
+
# Space.singleUserBotDm` to `true`). Not supported: Inviting guest users, or
|
3425
|
+
# adding other Chat apps.
|
3426
|
+
# Corresponds to the JSON property `memberships`
|
3427
|
+
# @return [Array<Google::Apis::ChatV1::Membership>]
|
3428
|
+
attr_accessor :memberships
|
3429
|
+
|
3430
|
+
# Optional. A unique identifier for this request. A random UUID is recommended.
|
3431
|
+
# Specifying an existing request ID returns the space created with that ID
|
3432
|
+
# instead of creating a new space. Specifying an existing request ID from the
|
3433
|
+
# same Chat app with a different authenticated user returns an error.
|
3434
|
+
# Corresponds to the JSON property `requestId`
|
3435
|
+
# @return [String]
|
3436
|
+
attr_accessor :request_id
|
3437
|
+
|
3438
|
+
# A space in Google Chat. Spaces are conversations between two or more users or
|
3439
|
+
# 1:1 messages between a user and a Chat app.
|
3440
|
+
# Corresponds to the JSON property `space`
|
3441
|
+
# @return [Google::Apis::ChatV1::Space]
|
3442
|
+
attr_accessor :space
|
3443
|
+
|
3444
|
+
def initialize(**args)
|
3445
|
+
update!(**args)
|
3446
|
+
end
|
3447
|
+
|
3448
|
+
# Update properties of this object
|
3449
|
+
def update!(**args)
|
3450
|
+
@memberships = args[:memberships] if args.key?(:memberships)
|
3451
|
+
@request_id = args[:request_id] if args.key?(:request_id)
|
3452
|
+
@space = args[:space] if args.key?(:space)
|
3453
|
+
end
|
3454
|
+
end
|
3455
|
+
|
2939
3456
|
# A [slash command](https://developers.google.com/chat/how-tos/slash-commands)
|
2940
3457
|
# in Google Chat.
|
2941
3458
|
class SlashCommand
|
2942
3459
|
include Google::Apis::Core::Hashable
|
2943
3460
|
|
2944
|
-
# The
|
3461
|
+
# The ID of the slash command invoked.
|
2945
3462
|
# Corresponds to the JSON property `commandId`
|
2946
3463
|
# @return [Fixnum]
|
2947
3464
|
attr_accessor :command_id
|
@@ -2965,7 +3482,7 @@ module Google
|
|
2965
3482
|
# @return [Google::Apis::ChatV1::User]
|
2966
3483
|
attr_accessor :bot
|
2967
3484
|
|
2968
|
-
# The command
|
3485
|
+
# The command ID of the invoked slash command.
|
2969
3486
|
# Corresponds to the JSON property `commandId`
|
2970
3487
|
# @return [Fixnum]
|
2971
3488
|
attr_accessor :command_id
|
@@ -2975,7 +3492,7 @@ module Google
|
|
2975
3492
|
# @return [String]
|
2976
3493
|
attr_accessor :command_name
|
2977
3494
|
|
2978
|
-
#
|
3495
|
+
# Indicates whether the slash command is for a dialog.
|
2979
3496
|
# Corresponds to the JSON property `triggersDialog`
|
2980
3497
|
# @return [Boolean]
|
2981
3498
|
attr_accessor :triggers_dialog
|
@@ -3017,12 +3534,12 @@ module Google
|
|
3017
3534
|
|
3018
3535
|
# The space's display name. Required when [creating a space](https://developers.
|
3019
3536
|
# google.com/chat/api/reference/rest/v1/spaces/create). For direct messages,
|
3020
|
-
# this field
|
3537
|
+
# this field might be empty. Supports up to 128 characters.
|
3021
3538
|
# Corresponds to the JSON property `displayName`
|
3022
3539
|
# @return [String]
|
3023
3540
|
attr_accessor :display_name
|
3024
3541
|
|
3025
|
-
# Resource name of the space. Format: spaces/`space
|
3542
|
+
# Resource name of the space. Format: `spaces/`space``
|
3026
3543
|
# Corresponds to the JSON property `name`
|
3027
3544
|
# @return [String]
|
3028
3545
|
attr_accessor :name
|
@@ -3038,11 +3555,24 @@ module Google
|
|
3038
3555
|
# @return [Google::Apis::ChatV1::SpaceDetails]
|
3039
3556
|
attr_accessor :space_details
|
3040
3557
|
|
3558
|
+
# The message history state for messages and threads in this space. [Developer
|
3559
|
+
# Preview](https://developers.google.com/workspace/preview).
|
3560
|
+
# Corresponds to the JSON property `spaceHistoryState`
|
3561
|
+
# @return [String]
|
3562
|
+
attr_accessor :space_history_state
|
3563
|
+
|
3041
3564
|
# Output only. The threading state in the Chat space.
|
3042
3565
|
# Corresponds to the JSON property `spaceThreadingState`
|
3043
3566
|
# @return [String]
|
3044
3567
|
attr_accessor :space_threading_state
|
3045
3568
|
|
3569
|
+
# The type of space. Required when creating or updating a space. Output only for
|
3570
|
+
# other usage. [Developer Preview](https://developers.google.com/workspace/
|
3571
|
+
# preview).
|
3572
|
+
# Corresponds to the JSON property `spaceType`
|
3573
|
+
# @return [String]
|
3574
|
+
attr_accessor :space_type
|
3575
|
+
|
3046
3576
|
# Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages
|
3047
3577
|
# are threaded in this space.
|
3048
3578
|
# Corresponds to the JSON property `threaded`
|
@@ -3067,7 +3597,9 @@ module Google
|
|
3067
3597
|
@name = args[:name] if args.key?(:name)
|
3068
3598
|
@single_user_bot_dm = args[:single_user_bot_dm] if args.key?(:single_user_bot_dm)
|
3069
3599
|
@space_details = args[:space_details] if args.key?(:space_details)
|
3600
|
+
@space_history_state = args[:space_history_state] if args.key?(:space_history_state)
|
3070
3601
|
@space_threading_state = args[:space_threading_state] if args.key?(:space_threading_state)
|
3602
|
+
@space_type = args[:space_type] if args.key?(:space_type)
|
3071
3603
|
@threaded = args[:threaded] if args.key?(:threaded)
|
3072
3604
|
@type = args[:type] if args.key?(:type)
|
3073
3605
|
end
|
@@ -3077,8 +3609,9 @@ module Google
|
|
3077
3609
|
class SpaceDetails
|
3078
3610
|
include Google::Apis::Core::Hashable
|
3079
3611
|
|
3080
|
-
# Optional. A description of the space.
|
3081
|
-
# topic, functional purpose, or participants. Supports up to 150
|
3612
|
+
# Optional. A description of the space. For example, describe the space's
|
3613
|
+
# discussion topic, functional purpose, or participants. Supports up to 150
|
3614
|
+
# characters.
|
3082
3615
|
# Corresponds to the JSON property `description`
|
3083
3616
|
# @return [String]
|
3084
3617
|
attr_accessor :description
|
@@ -3160,11 +3693,11 @@ module Google
|
|
3160
3693
|
end
|
3161
3694
|
end
|
3162
3695
|
|
3163
|
-
# A button with text and onclick action.
|
3696
|
+
# A button with text and `onclick` action.
|
3164
3697
|
class TextButton
|
3165
3698
|
include Google::Apis::Core::Hashable
|
3166
3699
|
|
3167
|
-
# An onclick action (
|
3700
|
+
# An `onclick` action (for example, open a link).
|
3168
3701
|
# Corresponds to the JSON property `onClick`
|
3169
3702
|
# @return [Google::Apis::ChatV1::OnClick]
|
3170
3703
|
attr_accessor :on_click
|
@@ -3185,7 +3718,11 @@ module Google
|
|
3185
3718
|
end
|
3186
3719
|
end
|
3187
3720
|
|
3188
|
-
# A paragraph of text. Formatted text supported.
|
3721
|
+
# A paragraph of text. Formatted text supported. For more information about
|
3722
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
3723
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
3724
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
3725
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
3189
3726
|
class TextParagraph
|
3190
3727
|
include Google::Apis::Core::Hashable
|
3191
3728
|
|
@@ -3208,7 +3745,7 @@ module Google
|
|
3208
3745
|
class Thread
|
3209
3746
|
include Google::Apis::Core::Hashable
|
3210
3747
|
|
3211
|
-
# Resource name of the thread. Example: spaces/`space`/threads/`thread
|
3748
|
+
# Resource name of the thread. Example: `spaces/`space`/threads/`thread``
|
3212
3749
|
# Corresponds to the JSON property `name`
|
3213
3750
|
# @return [String]
|
3214
3751
|
attr_accessor :name
|
@@ -3233,7 +3770,7 @@ module Google
|
|
3233
3770
|
end
|
3234
3771
|
end
|
3235
3772
|
|
3236
|
-
# Time input values.
|
3773
|
+
# Time input values.
|
3237
3774
|
class TimeInput
|
3238
3775
|
include Google::Apis::Core::Hashable
|
3239
3776
|
|
@@ -3258,8 +3795,11 @@ module Google
|
|
3258
3795
|
end
|
3259
3796
|
end
|
3260
3797
|
|
3261
|
-
# The timezone ID and offset from Coordinated Universal Time (UTC).
|
3262
|
-
# supported
|
3798
|
+
# The timezone ID and offset from Coordinated Universal Time (UTC). Only
|
3799
|
+
# supported for the event types [`CARD_CLICKED`](https://developers.google.com/
|
3800
|
+
# chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`
|
3801
|
+
# SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/
|
3802
|
+
# DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).
|
3263
3803
|
class TimeZone
|
3264
3804
|
include Google::Apis::Core::Hashable
|
3265
3805
|
|
@@ -3286,6 +3826,44 @@ module Google
|
|
3286
3826
|
end
|
3287
3827
|
end
|
3288
3828
|
|
3829
|
+
# [Developer Preview](https://developers.google.com/workspace/preview).
|
3830
|
+
class UploadAttachmentRequest
|
3831
|
+
include Google::Apis::Core::Hashable
|
3832
|
+
|
3833
|
+
# Required. The filename of the attachment, including the file extension.
|
3834
|
+
# Corresponds to the JSON property `filename`
|
3835
|
+
# @return [String]
|
3836
|
+
attr_accessor :filename
|
3837
|
+
|
3838
|
+
def initialize(**args)
|
3839
|
+
update!(**args)
|
3840
|
+
end
|
3841
|
+
|
3842
|
+
# Update properties of this object
|
3843
|
+
def update!(**args)
|
3844
|
+
@filename = args[:filename] if args.key?(:filename)
|
3845
|
+
end
|
3846
|
+
end
|
3847
|
+
|
3848
|
+
#
|
3849
|
+
class UploadAttachmentResponse
|
3850
|
+
include Google::Apis::Core::Hashable
|
3851
|
+
|
3852
|
+
# Reference to the uploaded attachment.
|
3853
|
+
# Corresponds to the JSON property `attachmentDataRef`
|
3854
|
+
# @return [Google::Apis::ChatV1::AttachmentDataRef]
|
3855
|
+
attr_accessor :attachment_data_ref
|
3856
|
+
|
3857
|
+
def initialize(**args)
|
3858
|
+
update!(**args)
|
3859
|
+
end
|
3860
|
+
|
3861
|
+
# Update properties of this object
|
3862
|
+
def update!(**args)
|
3863
|
+
@attachment_data_ref = args[:attachment_data_ref] if args.key?(:attachment_data_ref)
|
3864
|
+
end
|
3865
|
+
end
|
3866
|
+
|
3289
3867
|
# A user in Google Chat.
|
3290
3868
|
class User
|
3291
3869
|
include Google::Apis::Core::Hashable
|
@@ -3362,28 +3940,32 @@ module Google
|
|
3362
3940
|
end
|
3363
3941
|
end
|
3364
3942
|
|
3365
|
-
# A widget is a UI element that presents
|
3943
|
+
# A widget is a UI element that presents text and images.
|
3366
3944
|
class WidgetMarkup
|
3367
3945
|
include Google::Apis::Core::Hashable
|
3368
3946
|
|
3369
|
-
# A list of buttons. Buttons is also oneof data and only one of these fields
|
3947
|
+
# A list of buttons. Buttons is also `oneof data` and only one of these fields
|
3370
3948
|
# should be set.
|
3371
3949
|
# Corresponds to the JSON property `buttons`
|
3372
3950
|
# @return [Array<Google::Apis::ChatV1::Button>]
|
3373
3951
|
attr_accessor :buttons
|
3374
3952
|
|
3375
|
-
# An image that
|
3953
|
+
# An image that's specified by a URL and can have an `onclick` action.
|
3376
3954
|
# Corresponds to the JSON property `image`
|
3377
3955
|
# @return [Google::Apis::ChatV1::Image]
|
3378
3956
|
attr_accessor :image
|
3379
3957
|
|
3380
|
-
# A UI element contains a key (label) and a value (content).
|
3381
|
-
#
|
3958
|
+
# A UI element contains a key (label) and a value (content). This element can
|
3959
|
+
# also contain some actions such as `onclick` button.
|
3382
3960
|
# Corresponds to the JSON property `keyValue`
|
3383
3961
|
# @return [Google::Apis::ChatV1::KeyValue]
|
3384
3962
|
attr_accessor :key_value
|
3385
3963
|
|
3386
|
-
# A paragraph of text. Formatted text supported.
|
3964
|
+
# A paragraph of text. Formatted text supported. For more information about
|
3965
|
+
# formatting text, see [Formatting text in Google Chat apps](https://developers.
|
3966
|
+
# google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [
|
3967
|
+
# Formatting text in Google Workspace Add-ons](https://developers.google.com/
|
3968
|
+
# apps-script/add-ons/concepts/widgets#text_formatting).
|
3387
3969
|
# Corresponds to the JSON property `textParagraph`
|
3388
3970
|
# @return [Google::Apis::ChatV1::TextParagraph]
|
3389
3971
|
attr_accessor :text_paragraph
|