google-apis-chat_v1 0.46.0 → 0.48.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.
@@ -164,7 +164,8 @@ module Google
164
164
  class Attachment
165
165
  include Google::Apis::Core::Hashable
166
166
 
167
- # A reference to the data of an attachment.
167
+ # A reference to the attachment data. This is used with the media API to
168
+ # download the attachment data.
168
169
  # Corresponds to the JSON property `attachmentDataRef`
169
170
  # @return [Google::Apis::ChatV1::AttachmentDataRef]
170
171
  attr_accessor :attachment_data_ref
@@ -226,7 +227,7 @@ module Google
226
227
  end
227
228
  end
228
229
 
229
- # A reference to the data of an attachment.
230
+ #
230
231
  class AttachmentDataRef
231
232
  include Google::Apis::Core::Hashable
232
233
 
@@ -387,20 +388,20 @@ module Google
387
388
  # creates a "contact card" that features: - A header with the contact's name,
388
389
  # job title, avatar picture. - A section with the contact information, including
389
390
  # formatted text. - Buttons that users can click to share the contact or see
390
- # more or less info. ![Example contact card](/chat/images/card_api_reference.png)
391
- # ``` ` "cardsV2": [ ` "cardId": "unique-card-id", "card": ` "header": ` "title"
392
- # : "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.
393
- # google.com/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "
394
- # imageAltText": "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info",
395
- # "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "
396
- # decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@
397
- # example.com", ` `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `
398
- # , "text": "Online", `, `, ` "decoratedText": ` "startIcon": ` "knownIcon": "
399
- # PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "
400
- # text": "Share", "onClick": ` "openLink": ` "url": "https://example.com/share",
401
- # ` ` `, ` "text": "Edit", "onClick": ` "action": ` "function": "goToView", "
402
- # parameters": [ ` "key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `,
403
- # ], `, ` ], ` ```
391
+ # more or less info. ![Example contact card](https://developers.google.com/chat/
392
+ # images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "unique-card-id",
393
+ # "card": ` "header": ` "title": "Sasha", "subtitle": "Software Engineer", "
394
+ # imageUrl": "https://developers.google.com/chat/images/quickstart-app-avatar.
395
+ # png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `, "sections":
396
+ # [ ` "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount"
397
+ # : 1, "widgets": [ ` "decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `,
398
+ # "text": "sasha@example.com", ` `, ` "decoratedText": ` "startIcon": ` "
399
+ # knownIcon": "PERSON", `, "text": "Online", `, `, ` "decoratedText": ` "
400
+ # startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "
401
+ # buttonList": ` "buttons": [ ` "text": "Share", "onClick": ` "openLink": ` "url"
402
+ # : "https://example.com/share", ` ` `, ` "text": "Edit", "onClick": ` "action":
403
+ # ` "function": "goToView", "parameters": [ ` "key": "viewType", "value": "EDIT",
404
+ # ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
404
405
  # Corresponds to the JSON property `card`
405
406
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
406
407
  attr_accessor :card
@@ -789,20 +790,20 @@ module Google
789
790
  # creates a "contact card" that features: - A header with the contact's name,
790
791
  # job title, avatar picture. - A section with the contact information, including
791
792
  # formatted text. - Buttons that users can click to share the contact or see
792
- # more or less info. ![Example contact card](/chat/images/card_api_reference.png)
793
- # ``` ` "cardsV2": [ ` "cardId": "unique-card-id", "card": ` "header": ` "title"
794
- # : "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.
795
- # google.com/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "
796
- # imageAltText": "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info",
797
- # "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "
798
- # decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@
799
- # example.com", ` `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `
800
- # , "text": "Online", `, `, ` "decoratedText": ` "startIcon": ` "knownIcon": "
801
- # PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "
802
- # text": "Share", "onClick": ` "openLink": ` "url": "https://example.com/share",
803
- # ` ` `, ` "text": "Edit", "onClick": ` "action": ` "function": "goToView", "
804
- # parameters": [ ` "key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `,
805
- # ], `, ` ], ` ```
793
+ # more or less info. ![Example contact card](https://developers.google.com/chat/
794
+ # images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "unique-card-id",
795
+ # "card": ` "header": ` "title": "Sasha", "subtitle": "Software Engineer", "
796
+ # imageUrl": "https://developers.google.com/chat/images/quickstart-app-avatar.
797
+ # png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `, "sections":
798
+ # [ ` "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount"
799
+ # : 1, "widgets": [ ` "decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `,
800
+ # "text": "sasha@example.com", ` `, ` "decoratedText": ` "startIcon": ` "
801
+ # knownIcon": "PERSON", `, "text": "Online", `, `, ` "decoratedText": ` "
802
+ # startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "
803
+ # buttonList": ` "buttons": [ ` "text": "Share", "onClick": ` "openLink": ` "url"
804
+ # : "https://example.com/share", ` ` `, ` "text": "Edit", "onClick": ` "action":
805
+ # ` "function": "goToView", "parameters": [ ` "key": "viewType", "value": "EDIT",
806
+ # ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
806
807
  # Corresponds to the JSON property `body`
807
808
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
808
809
  attr_accessor :body
@@ -913,12 +914,27 @@ module Google
913
914
  class GoogleAppsCardV1Action
914
915
  include Google::Apis::Core::Hashable
915
916
 
916
- # Apps Script function to invoke when the containing element is clicked/
917
- # activated.
917
+ # A custom function to invoke when the containing element is clicked or othrwise
918
+ # activated. For example usage, see [Create interactive cards](https://
919
+ # developers.google.com/chat/how-tos/cards-onclick).
918
920
  # Corresponds to the JSON property `function`
919
921
  # @return [String]
920
922
  attr_accessor :function
921
923
 
924
+ # Optional. Required when opening a [dialog](https://developers.google.com/chat/
925
+ # how-tos/dialogs). What to do in response to an interaction with a user, such
926
+ # as a user clicking button on a card message. If unspecified, the app responds
927
+ # by executing an `action` - like opening a link or running a function - as
928
+ # normal. By specifying an `interaction`, the app can respond in special
929
+ # interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the
930
+ # app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs).
931
+ # When specified, a loading indicator is not shown. Supported by Chat apps, but
932
+ # not Google Workspace Add-ons. If specified for an add-on, the entire card is
933
+ # stripped and nothing is shown in the client.
934
+ # Corresponds to the JSON property `interaction`
935
+ # @return [String]
936
+ attr_accessor :interaction
937
+
922
938
  # Specifies the loading indicator that the action displays while making the call
923
939
  # to the action.
924
940
  # Corresponds to the JSON property `loadIndicator`
@@ -941,7 +957,7 @@ module Google
941
957
  # card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-
942
958
  # ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this
943
959
  # locks the UI to ensure no changes are made by the user while the action is
944
- # being processed. Not supported by Google Chat apps.
960
+ # being processed. Not supported by Chat apps.
945
961
  # Corresponds to the JSON property `persistValues`
946
962
  # @return [Boolean]
947
963
  attr_accessor :persist_values
@@ -954,6 +970,7 @@ module Google
954
970
  # Update properties of this object
955
971
  def update!(**args)
956
972
  @function = args[:function] if args.key?(:function)
973
+ @interaction = args[:interaction] if args.key?(:interaction)
957
974
  @load_indicator = args[:load_indicator] if args.key?(:load_indicator)
958
975
  @parameters = args[:parameters] if args.key?(:parameters)
959
976
  @persist_values = args[:persist_values] if args.key?(:persist_values)
@@ -963,7 +980,9 @@ module Google
963
980
  # List of string parameters to supply when the action method is invoked. For
964
981
  # example, consider three snooze buttons: snooze now, snooze 1 day, snooze next
965
982
  # week. You might use action method = snooze(), passing the snooze type and
966
- # snooze time in the list of string parameters.
983
+ # snooze time in the list of string parameters. To learn more, see [
984
+ # CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/
985
+ # Event#commoneventobject).
967
986
  class GoogleAppsCardV1ActionParameter
968
987
  include Google::Apis::Core::Hashable
969
988
 
@@ -988,7 +1007,7 @@ module Google
988
1007
  end
989
1008
  end
990
1009
 
991
- # Represents the complete border style applied to widgets.
1010
+ # Represents the complete border style applied to items in a widget.
992
1011
  class GoogleAppsCardV1BorderStyle
993
1012
  include Google::Apis::Core::Hashable
994
1013
 
@@ -1063,12 +1082,17 @@ module Google
1063
1082
  end
1064
1083
  end
1065
1084
 
1066
- # A button. Can be a text button or an image button.
1085
+ # A text, icon, or text + icon button that users can click. To make an image a
1086
+ # clickable button, specify an Image (not an ImageComponent) and set an `onClick`
1087
+ # action.
1067
1088
  class GoogleAppsCardV1Button
1068
1089
  include Google::Apis::Core::Hashable
1069
1090
 
1070
- # The alternative text used for accessibility. Has no effect when an icon is set;
1071
- # use `icon.alt_text` instead.
1091
+ # The alternative text used for accessibility. Set descriptive text that lets
1092
+ # users know what the button does. For example, if a button opens a hyperlink,
1093
+ # you might write: "Opens a new browser tab and navigates to the Google Chat
1094
+ # developer documentation at https://developers.google.com/chat". Has no effect
1095
+ # when an icon is set; use `icon.alt_text` instead.
1072
1096
  # Corresponds to the JSON property `altText`
1073
1097
  # @return [String]
1074
1098
  attr_accessor :alt_text
@@ -1122,24 +1146,28 @@ module Google
1122
1146
  # @return [Google::Apis::ChatV1::Color]
1123
1147
  attr_accessor :color
1124
1148
 
1125
- # If `true`, the button is displayed in a disabled state and doesn't respond to
1149
+ # If `true`, the button is displayed in an inactive state and doesn't respond to
1126
1150
  # user actions.
1127
1151
  # Corresponds to the JSON property `disabled`
1128
1152
  # @return [Boolean]
1129
1153
  attr_accessor :disabled
1130
1154
  alias_method :disabled?, :disabled
1131
1155
 
1132
- # The icon image.
1156
+ # An icon displayed in a widget on a card. Supports [standard](https://
1157
+ # developers.google.com/chat/api/guides/message-formats/cards) and [custom](
1158
+ # https://developers.google.com/chat/api/guides/message-formats/cards#
1159
+ # customicons) icons.
1133
1160
  # Corresponds to the JSON property `icon`
1134
1161
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
1135
1162
  attr_accessor :icon
1136
1163
 
1137
- # Represents the response to an `onClick` event.
1164
+ # Represents how to respond when users click an interactive element on a card,
1165
+ # such as a button.
1138
1166
  # Corresponds to the JSON property `onClick`
1139
1167
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
1140
1168
  attr_accessor :on_click
1141
1169
 
1142
- # The text of the button.
1170
+ # The text displayed inside the button.
1143
1171
  # Corresponds to the JSON property `text`
1144
1172
  # @return [String]
1145
1173
  attr_accessor :text
@@ -1187,40 +1215,46 @@ module Google
1187
1215
  # creates a "contact card" that features: - A header with the contact's name,
1188
1216
  # job title, avatar picture. - A section with the contact information, including
1189
1217
  # formatted text. - Buttons that users can click to share the contact or see
1190
- # more or less info. ![Example contact card](/chat/images/card_api_reference.png)
1191
- # ``` ` "cardsV2": [ ` "cardId": "unique-card-id", "card": ` "header": ` "title"
1192
- # : "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.
1193
- # google.com/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "
1194
- # imageAltText": "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info",
1195
- # "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "
1196
- # decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@
1197
- # example.com", ` `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `
1198
- # , "text": "Online", `, `, ` "decoratedText": ` "startIcon": ` "knownIcon": "
1199
- # PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "
1200
- # text": "Share", "onClick": ` "openLink": ` "url": "https://example.com/share",
1201
- # ` ` `, ` "text": "Edit", "onClick": ` "action": ` "function": "goToView", "
1202
- # parameters": [ ` "key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `,
1203
- # ], `, ` ], ` ```
1218
+ # more or less info. ![Example contact card](https://developers.google.com/chat/
1219
+ # images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "unique-card-id",
1220
+ # "card": ` "header": ` "title": "Sasha", "subtitle": "Software Engineer", "
1221
+ # imageUrl": "https://developers.google.com/chat/images/quickstart-app-avatar.
1222
+ # png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `, "sections":
1223
+ # [ ` "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount"
1224
+ # : 1, "widgets": [ ` "decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `,
1225
+ # "text": "sasha@example.com", ` `, ` "decoratedText": ` "startIcon": ` "
1226
+ # knownIcon": "PERSON", `, "text": "Online", `, `, ` "decoratedText": ` "
1227
+ # startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "
1228
+ # buttonList": ` "buttons": [ ` "text": "Share", "onClick": ` "openLink": ` "url"
1229
+ # : "https://example.com/share", ` ` `, ` "text": "Edit", "onClick": ` "action":
1230
+ # ` "function": "goToView", "parameters": [ ` "key": "viewType", "value": "EDIT",
1231
+ # ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
1204
1232
  class GoogleAppsCardV1Card
1205
1233
  include Google::Apis::Core::Hashable
1206
1234
 
1207
- # The card's actions. Actions are added to the card's generated toolbar menu.
1208
- # Not supported by Google Chat apps. For example, the following JSON constructs
1209
- # a card action menu with Settings and Send Feedback options: ``` "card_actions":
1210
- # [ ` "actionLabel": "Settings", "onClick": ` "action": ` "functionName": "
1211
- # goToView", "parameters": [ ` "key": "viewType", "value": "SETTING" ` ], "
1212
- # loadIndicator": "LoadIndicator.SPINNER" ` ` `, ` "actionLabel": "Send Feedback"
1213
- # , "onClick": ` "openLink": ` "url": "https://example.com/feedback" ` ` ` ] ```
1235
+ # The card's actions. Actions are added to the card's toolbar menu. Because Chat
1236
+ # app cards have no toolbar, `cardActions[]` is not supported by Chat apps. For
1237
+ # example, the following JSON constructs a card action menu with Settings and
1238
+ # Send Feedback options: ``` "card_actions": [ ` "actionLabel": "Settings", "
1239
+ # onClick": ` "action": ` "functionName": "goToView", "parameters": [ ` "key": "
1240
+ # viewType", "value": "SETTING" ` ], "loadIndicator": "LoadIndicator.SPINNER" ` `
1241
+ # `, ` "actionLabel": "Send Feedback", "onClick": ` "openLink": ` "url": "https:
1242
+ # //example.com/feedback" ` ` ` ] ```
1214
1243
  # Corresponds to the JSON property `cardActions`
1215
1244
  # @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1CardAction>]
1216
1245
  attr_accessor :card_actions
1217
1246
 
1218
- # The `peekCardHeader` display style for. Not supported by Google Chat apps.
1247
+ # In Google Workspace add-ons, sets the display properties of the `
1248
+ # peekCardHeader`. Not supported by Chat apps.
1219
1249
  # Corresponds to the JSON property `displayStyle`
1220
1250
  # @return [String]
1221
1251
  attr_accessor :display_style
1222
1252
 
1223
- # A persistent (sticky) footer that is added to the bottom of the card.
1253
+ # A persistent (sticky) footer that that appears at the bottom of the card.
1254
+ # Setting `fixedFooter` without specifying a `primaryButton` or a `
1255
+ # secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](
1256
+ # https://developers.google.com/chat/how-tos/dialogs), but not in [card messages]
1257
+ # (https://developers.google.com/chat/api/guides/message-formats/cards).
1224
1258
  # Corresponds to the JSON property `fixedFooter`
1225
1259
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1CardFixedFooter]
1226
1260
  attr_accessor :fixed_footer
@@ -1230,7 +1264,8 @@ module Google
1230
1264
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1CardHeader]
1231
1265
  attr_accessor :header
1232
1266
 
1233
- # Name of the card. Used as a card identifier in card navigation.
1267
+ # Name of the card. Used as a card identifier in card navigation. Because Chat
1268
+ # apps don't support card navigation, they ignore this field.
1234
1269
  # Corresponds to the JSON property `name`
1235
1270
  # @return [String]
1236
1271
  attr_accessor :name
@@ -1240,7 +1275,8 @@ module Google
1240
1275
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1CardHeader]
1241
1276
  attr_accessor :peek_card_header
1242
1277
 
1243
- # Sections are separated by a line divider.
1278
+ # Contains a collection of widgets. Each section has its own, optional header.
1279
+ # Sections are visually separated by a line divider.
1244
1280
  # Corresponds to the JSON property `sections`
1245
1281
  # @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Section>]
1246
1282
  attr_accessor :sections
@@ -1263,7 +1299,7 @@ module Google
1263
1299
 
1264
1300
  # A card action is the action associated with the card. For example, an invoice
1265
1301
  # card might include actions such as delete invoice, email invoice, or open the
1266
- # invoice in a browser. Not supported by Google Chat apps.
1302
+ # invoice in a browser. Not supported by Chat apps.
1267
1303
  class GoogleAppsCardV1CardAction
1268
1304
  include Google::Apis::Core::Hashable
1269
1305
 
@@ -1272,7 +1308,8 @@ module Google
1272
1308
  # @return [String]
1273
1309
  attr_accessor :action_label
1274
1310
 
1275
- # Represents the response to an `onClick` event.
1311
+ # Represents how to respond when users click an interactive element on a card,
1312
+ # such as a button.
1276
1313
  # Corresponds to the JSON property `onClick`
1277
1314
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
1278
1315
  attr_accessor :on_click
@@ -1288,16 +1325,24 @@ module Google
1288
1325
  end
1289
1326
  end
1290
1327
 
1291
- # A persistent (sticky) footer that is added to the bottom of the card.
1328
+ # A persistent (sticky) footer that that appears at the bottom of the card.
1329
+ # Setting `fixedFooter` without specifying a `primaryButton` or a `
1330
+ # secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](
1331
+ # https://developers.google.com/chat/how-tos/dialogs), but not in [card messages]
1332
+ # (https://developers.google.com/chat/api/guides/message-formats/cards).
1292
1333
  class GoogleAppsCardV1CardFixedFooter
1293
1334
  include Google::Apis::Core::Hashable
1294
1335
 
1295
- # A button. Can be a text button or an image button.
1336
+ # A text, icon, or text + icon button that users can click. To make an image a
1337
+ # clickable button, specify an Image (not an ImageComponent) and set an `onClick`
1338
+ # action.
1296
1339
  # Corresponds to the JSON property `primaryButton`
1297
1340
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
1298
1341
  attr_accessor :primary_button
1299
1342
 
1300
- # A button. Can be a text button or an image button.
1343
+ # A text, icon, or text + icon button that users can click. To make an image a
1344
+ # clickable button, specify an Image (not an ImageComponent) and set an `onClick`
1345
+ # action.
1301
1346
  # Corresponds to the JSON property `secondaryButton`
1302
1347
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
1303
1348
  attr_accessor :secondary_button
@@ -1322,17 +1367,18 @@ module Google
1322
1367
  # @return [String]
1323
1368
  attr_accessor :image_alt_text
1324
1369
 
1325
- # The image's type.
1370
+ # The shape used to crop the image.
1326
1371
  # Corresponds to the JSON property `imageType`
1327
1372
  # @return [String]
1328
1373
  attr_accessor :image_type
1329
1374
 
1330
- # The URL of the image in the card header.
1375
+ # The HTTPS URL of the image in the card header.
1331
1376
  # Corresponds to the JSON property `imageUrl`
1332
1377
  # @return [String]
1333
1378
  attr_accessor :image_url
1334
1379
 
1335
- # The subtitle of the card header.
1380
+ # The subtitle of the card header. If specified, appears on its own line below
1381
+ # the `title`.
1336
1382
  # Corresponds to the JSON property `subtitle`
1337
1383
  # @return [String]
1338
1384
  attr_accessor :subtitle
@@ -1358,18 +1404,25 @@ module Google
1358
1404
  end
1359
1405
  end
1360
1406
 
1361
- # The widget that lets users to specify a date and time. Not supported by Google
1362
- # Chat apps.
1407
+ # Lets users specify a date, a time, or both a date and a time. Accepts text
1408
+ # input from users, but features an interactive date and time selector that
1409
+ # helps users enter correctly-formatted dates and times. If users enter a date
1410
+ # or time incorrectly, the widget shows an error that prompts users to enter the
1411
+ # correct format. Not supported by Chat apps. Support by Chat apps coming soon.
1363
1412
  class GoogleAppsCardV1DateTimePicker
1364
1413
  include Google::Apis::Core::Hashable
1365
1414
 
1366
- # The label for the field that displays to the user.
1415
+ # The text that prompts users to enter a date, time, or datetime. Specify text
1416
+ # that helps the user enter the information your app needs. For example, if
1417
+ # users are setting an appointment, then a label like "Appointment date" or "
1418
+ # Appointment date and time" might work well.
1367
1419
  # Corresponds to the JSON property `label`
1368
1420
  # @return [String]
1369
1421
  attr_accessor :label
1370
1422
 
1371
- # The name of the text input that's used in `formInput`, and uniquely identifies
1372
- # this input.
1423
+ # The name by which the datetime picker is identified in a form input event. For
1424
+ # details about working with form inputs, see [Receive form data](https://
1425
+ # developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
1373
1426
  # Corresponds to the JSON property `name`
1374
1427
  # @return [String]
1375
1428
  attr_accessor :name
@@ -1387,16 +1440,17 @@ module Google
1387
1440
  # @return [Fixnum]
1388
1441
  attr_accessor :timezone_offset_date
1389
1442
 
1390
- # The type of the date/time picker.
1443
+ # What kind of date and time input the datetime picker supports.
1391
1444
  # Corresponds to the JSON property `type`
1392
1445
  # @return [String]
1393
1446
  attr_accessor :type
1394
1447
 
1395
- # The value to display as the default value before user input or previous user
1396
- # input. It is represented in milliseconds (Epoch time). For `DATE_AND_TIME`
1397
- # type, the full epoch value is used. For `DATE_ONLY` type, only date of the
1398
- # epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used.
1399
- # For example, you can set epoch time to `3 * 60 * 60 * 1000` to represent 3am.
1448
+ # The value displayed as the default value before user input or previous user
1449
+ # input, represented in milliseconds ([Epoch time](https://en.wikipedia.org/wiki/
1450
+ # Unix_time)). For `DATE_AND_TIME` type, the full epoch value is used. For `
1451
+ # DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type,
1452
+ # only time of the epoch time is used. For example, to represent 3:00 AM, set
1453
+ # epoch time to `3 * 60 * 60 * 1000`.
1400
1454
  # Corresponds to the JSON property `valueMsEpoch`
1401
1455
  # @return [Fixnum]
1402
1456
  attr_accessor :value_ms_epoch
@@ -1422,53 +1476,73 @@ module Google
1422
1476
  class GoogleAppsCardV1DecoratedText
1423
1477
  include Google::Apis::Core::Hashable
1424
1478
 
1425
- # The formatted text label that shows below the main text.
1479
+ # The text that appears below `text`. Always truncates. Supports simple
1480
+ # formatting. See Text formatting for formatting details.
1426
1481
  # Corresponds to the JSON property `bottomLabel`
1427
1482
  # @return [String]
1428
1483
  attr_accessor :bottom_label
1429
1484
 
1430
- # A button. Can be a text button or an image button.
1485
+ # A text, icon, or text + icon button that users can click. To make an image a
1486
+ # clickable button, specify an Image (not an ImageComponent) and set an `onClick`
1487
+ # action.
1431
1488
  # Corresponds to the JSON property `button`
1432
1489
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Button]
1433
1490
  attr_accessor :button
1434
1491
 
1435
- # An icon displayed after the text.
1492
+ # An icon displayed in a widget on a card. Supports [standard](https://
1493
+ # developers.google.com/chat/api/guides/message-formats/cards) and [custom](
1494
+ # https://developers.google.com/chat/api/guides/message-formats/cards#
1495
+ # customicons) icons.
1436
1496
  # Corresponds to the JSON property `endIcon`
1437
1497
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
1438
1498
  attr_accessor :end_icon
1439
1499
 
1440
- # Deprecated in favor of start_icon.
1500
+ # An icon displayed in a widget on a card. Supports [standard](https://
1501
+ # developers.google.com/chat/api/guides/message-formats/cards) and [custom](
1502
+ # https://developers.google.com/chat/api/guides/message-formats/cards#
1503
+ # customicons) icons.
1441
1504
  # Corresponds to the JSON property `icon`
1442
1505
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
1443
1506
  attr_accessor :icon
1444
1507
 
1445
- # Represents the response to an `onClick` event.
1508
+ # Represents how to respond when users click an interactive element on a card,
1509
+ # such as a button.
1446
1510
  # Corresponds to the JSON property `onClick`
1447
1511
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
1448
1512
  attr_accessor :on_click
1449
1513
 
1450
- # The icon displayed in front of the text.
1514
+ # An icon displayed in a widget on a card. Supports [standard](https://
1515
+ # developers.google.com/chat/api/guides/message-formats/cards) and [custom](
1516
+ # https://developers.google.com/chat/api/guides/message-formats/cards#
1517
+ # customicons) icons.
1451
1518
  # Corresponds to the JSON property `startIcon`
1452
1519
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Icon]
1453
1520
  attr_accessor :start_icon
1454
1521
 
1455
- # Either a toggle-style switch or a checkbox.
1522
+ # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
1523
+ # Only supported on the `decoratedText` widget. Currently supported in [dialogs](
1524
+ # https://developers.google.com/chat/how-tos/dialogs). Support for [card
1525
+ # messages](https://developers.google.com/chat/api/guides/message-formats/cards)
1526
+ # is coming soon.
1456
1527
  # Corresponds to the JSON property `switchControl`
1457
1528
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1SwitchControl]
1458
1529
  attr_accessor :switch_control
1459
1530
 
1460
- # Required. The main widget formatted text. See Text formatting for details.
1531
+ # Required. The primary text. Supports simple formatting. See Text formatting
1532
+ # for formatting details.
1461
1533
  # Corresponds to the JSON property `text`
1462
1534
  # @return [String]
1463
1535
  attr_accessor :text
1464
1536
 
1465
- # The formatted text label that shows above the main text.
1537
+ # The text that appears above `text`. Always truncates. Supports simple
1538
+ # formatting. See Text formatting for formatting details.
1466
1539
  # Corresponds to the JSON property `topLabel`
1467
1540
  # @return [String]
1468
1541
  attr_accessor :top_label
1469
1542
 
1470
- # The wrap text setting. If `true`, the text is wrapped and displayed in
1471
- # multiline. Otherwise, the text is truncated.
1543
+ # The wrap text setting. If `true`, the text wraps and displays on multiple
1544
+ # lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel`
1545
+ # and `bottomLabel`.
1472
1546
  # Corresponds to the JSON property `wrapText`
1473
1547
  # @return [Boolean]
1474
1548
  attr_accessor :wrap_text
@@ -1493,7 +1567,8 @@ module Google
1493
1567
  end
1494
1568
  end
1495
1569
 
1496
- # A divider that appears in between widgets.
1570
+ # Displays a divider between widgets, a horizontal line. For example, the
1571
+ # following JSON creates a divider: ``` "divider": ` ` ```
1497
1572
  class GoogleAppsCardV1Divider
1498
1573
  include Google::Apis::Core::Hashable
1499
1574
 
@@ -1506,11 +1581,23 @@ module Google
1506
1581
  end
1507
1582
  end
1508
1583
 
1509
- # Represents a Grid widget that displays items in a configurable grid layout.
1584
+ # Displays a grid with a collection of items. A grid supports any number of
1585
+ # columns and items. The number of rows is determined by items divided by
1586
+ # columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items
1587
+ # and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.
1588
+ # google.com/chat/how-tos/dialogs). Support for [card messages](https://
1589
+ # developers.google.com/chat/api/guides/message-formats/cards) is coming soon.
1590
+ # For example, the following JSON creates a 2 column grid with a single item: ```
1591
+ # "grid": ` "title": "A fine collection of items", "numColumns": 2, "
1592
+ # borderStyle": ` "type": "STROKE", "cornerRadius": 4.0 `, "items": [ "image": `
1593
+ # "imageUri": "https://www.example.com/image.png", "cropStyle": ` "type": "
1594
+ # SQUARE" `, "borderStyle": ` "type": "STROKE" ` `, "title": "An item", "
1595
+ # textAlignment": "CENTER" ], "onClick": ` "openLink": ` "url":"https://www.
1596
+ # example.com" ` ` ` ```
1510
1597
  class GoogleAppsCardV1Grid
1511
1598
  include Google::Apis::Core::Hashable
1512
1599
 
1513
- # Represents the complete border style applied to widgets.
1600
+ # Represents the complete border style applied to items in a widget.
1514
1601
  # Corresponds to the JSON property `borderStyle`
1515
1602
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1BorderStyle]
1516
1603
  attr_accessor :border_style
@@ -1527,7 +1614,8 @@ module Google
1527
1614
  # @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1GridItem>]
1528
1615
  attr_accessor :items
1529
1616
 
1530
- # Represents the response to an `onClick` event.
1617
+ # Represents how to respond when users click an interactive element on a card,
1618
+ # such as a button.
1531
1619
  # Corresponds to the JSON property `onClick`
1532
1620
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
1533
1621
  attr_accessor :on_click
@@ -1576,11 +1664,6 @@ module Google
1576
1664
  # @return [String]
1577
1665
  attr_accessor :subtitle
1578
1666
 
1579
- # The horizontal alignment of the grid item's text.
1580
- # Corresponds to the JSON property `textAlignment`
1581
- # @return [String]
1582
- attr_accessor :text_alignment
1583
-
1584
1667
  # The grid item's title.
1585
1668
  # Corresponds to the JSON property `title`
1586
1669
  # @return [String]
@@ -1596,22 +1679,33 @@ module Google
1596
1679
  @image = args[:image] if args.key?(:image)
1597
1680
  @layout = args[:layout] if args.key?(:layout)
1598
1681
  @subtitle = args[:subtitle] if args.key?(:subtitle)
1599
- @text_alignment = args[:text_alignment] if args.key?(:text_alignment)
1600
1682
  @title = args[:title] if args.key?(:title)
1601
1683
  end
1602
1684
  end
1603
1685
 
1604
- #
1686
+ # An icon displayed in a widget on a card. Supports [standard](https://
1687
+ # developers.google.com/chat/api/guides/message-formats/cards) and [custom](
1688
+ # https://developers.google.com/chat/api/guides/message-formats/cards#
1689
+ # customicons) icons.
1605
1690
  class GoogleAppsCardV1Icon
1606
1691
  include Google::Apis::Core::Hashable
1607
1692
 
1608
- # The description of the icon, used for accessibility. The default value is
1609
- # provided if you don't specify one.
1693
+ # Optional. A description of the icon used for accessibility. If unspecified, a
1694
+ # default value is provided. As a best practice, you should set a helpful
1695
+ # description. For example, if an icon displays a user's account portrait, you
1696
+ # could describe it as "A user's account portrait." If the icon displays in a
1697
+ # Button, this alt text takes precedence and overwrites the button's alt text,
1698
+ # so you should write alt text for the button: Set descriptive text that lets
1699
+ # users know what the button does. For example, if a button opens a hyperlink,
1700
+ # you might write: "Opens a new browser tab and navigates to the Google Chat
1701
+ # developer documentation at https://developers.google.com/chat".
1610
1702
  # Corresponds to the JSON property `altText`
1611
1703
  # @return [String]
1612
1704
  attr_accessor :alt_text
1613
1705
 
1614
- # The icon specified by a URL.
1706
+ # Display a custom icon hosted at an HTTPS URL. For example: ``` "iconUrl": "
1707
+ # https://developers.google.com/chat/images/quickstart-app-avatar.png" ```
1708
+ # Supported file types include `.png` and `.jpg`.
1615
1709
  # Corresponds to the JSON property `iconUrl`
1616
1710
  # @return [String]
1617
1711
  attr_accessor :icon_url
@@ -1622,7 +1716,10 @@ module Google
1622
1716
  # @return [String]
1623
1717
  attr_accessor :image_type
1624
1718
 
1625
- # The icon specified by the string name of a list of known icons.
1719
+ # Display one of the standard icons provided by Google Workspace. For example,
1720
+ # to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For
1721
+ # a full list of supported icons, see [standard icons](https://developers.google.
1722
+ # com/chat/api/guides/message-formats/cards).
1626
1723
  # Corresponds to the JSON property `knownIcon`
1627
1724
  # @return [String]
1628
1725
  attr_accessor :known_icon
@@ -1649,12 +1746,14 @@ module Google
1649
1746
  # @return [String]
1650
1747
  attr_accessor :alt_text
1651
1748
 
1652
- # An image URL.
1749
+ # The `https` URL that hosts the image. For example: ``` https://developers.
1750
+ # google.com/chat/images/quickstart-app-avatar.png ```
1653
1751
  # Corresponds to the JSON property `imageUrl`
1654
1752
  # @return [String]
1655
1753
  attr_accessor :image_url
1656
1754
 
1657
- # Represents the response to an `onClick` event.
1755
+ # Represents how to respond when users click an interactive element on a card,
1756
+ # such as a button.
1658
1757
  # Corresponds to the JSON property `onClick`
1659
1758
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1OnClick]
1660
1759
  attr_accessor :on_click
@@ -1680,12 +1779,14 @@ module Google
1680
1779
  # @return [String]
1681
1780
  attr_accessor :alt_text
1682
1781
 
1683
- # Represents the complete border style applied to widgets.
1782
+ # Represents the complete border style applied to items in a widget.
1684
1783
  # Corresponds to the JSON property `borderStyle`
1685
1784
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1BorderStyle]
1686
1785
  attr_accessor :border_style
1687
1786
 
1688
- # Represents the crop style applied to an image.
1787
+ # Represents the crop style applied to an image. For example, here's how to
1788
+ # apply a 16 by 9 aspect ratio: ``` cropStyle ` "type": "RECTANGLE_CUSTOM", "
1789
+ # aspectRatio": 16/9 ` ```
1689
1790
  # Corresponds to the JSON property `cropStyle`
1690
1791
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1ImageCropStyle]
1691
1792
  attr_accessor :crop_style
@@ -1708,11 +1809,15 @@ module Google
1708
1809
  end
1709
1810
  end
1710
1811
 
1711
- # Represents the crop style applied to an image.
1812
+ # Represents the crop style applied to an image. For example, here's how to
1813
+ # apply a 16 by 9 aspect ratio: ``` cropStyle ` "type": "RECTANGLE_CUSTOM", "
1814
+ # aspectRatio": 16/9 ` ```
1712
1815
  class GoogleAppsCardV1ImageCropStyle
1713
1816
  include Google::Apis::Core::Hashable
1714
1817
 
1715
- # The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
1818
+ # The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example,
1819
+ # here's how to apply a 16 by 9 aspect ratio: ``` cropStyle ` "type": "
1820
+ # RECTANGLE_CUSTOM", "aspectRatio": 16/9 ` ```
1716
1821
  # Corresponds to the JSON property `aspectRatio`
1717
1822
  # @return [Float]
1718
1823
  attr_accessor :aspect_ratio
@@ -1733,7 +1838,8 @@ module Google
1733
1838
  end
1734
1839
  end
1735
1840
 
1736
- # Represents the response to an `onClick` event.
1841
+ # Represents how to respond when users click an interactive element on a card,
1842
+ # such as a button.
1737
1843
  class GoogleAppsCardV1OnClick
1738
1844
  include Google::Apis::Core::Hashable
1739
1845
 
@@ -1752,20 +1858,20 @@ module Google
1752
1858
  # creates a "contact card" that features: - A header with the contact's name,
1753
1859
  # job title, avatar picture. - A section with the contact information, including
1754
1860
  # formatted text. - Buttons that users can click to share the contact or see
1755
- # more or less info. ![Example contact card](/chat/images/card_api_reference.png)
1756
- # ``` ` "cardsV2": [ ` "cardId": "unique-card-id", "card": ` "header": ` "title"
1757
- # : "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.
1758
- # google.com/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "
1759
- # imageAltText": "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info",
1760
- # "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "
1761
- # decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@
1762
- # example.com", ` `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `
1763
- # , "text": "Online", `, `, ` "decoratedText": ` "startIcon": ` "knownIcon": "
1764
- # PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "
1765
- # text": "Share", "onClick": ` "openLink": ` "url": "https://example.com/share",
1766
- # ` ` `, ` "text": "Edit", "onClick": ` "action": ` "function": "goToView", "
1767
- # parameters": [ ` "key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `,
1768
- # ], `, ` ], ` ```
1861
+ # more or less info. ![Example contact card](https://developers.google.com/chat/
1862
+ # images/card_api_reference.png) ``` ` "cardsV2": [ ` "cardId": "unique-card-id",
1863
+ # "card": ` "header": ` "title": "Sasha", "subtitle": "Software Engineer", "
1864
+ # imageUrl": "https://developers.google.com/chat/images/quickstart-app-avatar.
1865
+ # png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", `, "sections":
1866
+ # [ ` "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount"
1867
+ # : 1, "widgets": [ ` "decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `,
1868
+ # "text": "sasha@example.com", ` `, ` "decoratedText": ` "startIcon": ` "
1869
+ # knownIcon": "PERSON", `, "text": "Online", `, `, ` "decoratedText": ` "
1870
+ # startIcon": ` "knownIcon": "PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "
1871
+ # buttonList": ` "buttons": [ ` "text": "Share", "onClick": ` "openLink": ` "url"
1872
+ # : "https://example.com/share", ` ` `, ` "text": "Edit", "onClick": ` "action":
1873
+ # ` "function": "goToView", "parameters": [ ` "key": "viewType", "value": "EDIT",
1874
+ # ` ], ` ` `, ], ` `, ], `, ], `, ` ], ` ```
1769
1875
  # Corresponds to the JSON property `card`
1770
1876
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Card]
1771
1877
  attr_accessor :card
@@ -1827,33 +1933,38 @@ module Google
1827
1933
  end
1828
1934
 
1829
1935
  # A section contains a collection of widgets that are rendered vertically in the
1830
- # order that they are specified. Across all platforms, cards have a narrow fixed
1831
- # width, so there is currently no need for layout properties, for example, float.
1936
+ # order that they are specified.
1832
1937
  class GoogleAppsCardV1Section
1833
1938
  include Google::Apis::Core::Hashable
1834
1939
 
1835
- # Indicates whether this section is collapsible. If a section is collapsible,
1836
- # the description must be given.
1940
+ # Indicates whether this section is collapsible. Collapsible sections hide some
1941
+ # or all widgets, but users can expand the section to reveal the hidden widgets
1942
+ # by clicking **Show more**. Users can hide the widgets again by clicking **Show
1943
+ # less**. To determine which widgets are hidden, specify `
1944
+ # uncollapsibleWidgetsCount`.
1837
1945
  # Corresponds to the JSON property `collapsible`
1838
1946
  # @return [Boolean]
1839
1947
  attr_accessor :collapsible
1840
1948
  alias_method :collapsible?, :collapsible
1841
1949
 
1842
- # The header of the section. Formatted text is supported.
1950
+ # Text that appears at the top of a section. Supports [simple HTML formatted
1951
+ # text](https://developers.google.com/apps-script/add-ons/concepts/widgets#
1952
+ # text_formatting).
1843
1953
  # Corresponds to the JSON property `header`
1844
1954
  # @return [String]
1845
1955
  attr_accessor :header
1846
1956
 
1847
- # The number of uncollapsible widgets. For example, when a section contains five
1848
- # widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two
1849
- # widgets are always shown and the last three are collapsed as default. The `
1957
+ # The number of uncollapsible widgets which remain visible even when a section
1958
+ # is collapsed. For example, when a section contains five widgets and the `
1959
+ # uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always
1960
+ # shown and the last three are collapsed by default. The `
1850
1961
  # uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `
1851
1962
  # true`.
1852
1963
  # Corresponds to the JSON property `uncollapsibleWidgetsCount`
1853
1964
  # @return [Fixnum]
1854
1965
  attr_accessor :uncollapsible_widgets_count
1855
1966
 
1856
- # A section must contain at least 1 widget.
1967
+ # All the widgets in the section. Must contain at least 1 widget.
1857
1968
  # Corresponds to the JSON property `widgets`
1858
1969
  # @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1Widget>]
1859
1970
  attr_accessor :widgets
@@ -1872,21 +1983,34 @@ module Google
1872
1983
  end
1873
1984
 
1874
1985
  # A widget that creates a UI item with options for users to select. For example,
1875
- # a dropdown menu.
1986
+ # a dropdown menu or check list. Chat apps receive and can process the value of
1987
+ # entered text during form input events. For details about working with form
1988
+ # inputs, see [Receive form data](https://developers.google.com/chat/how-tos/
1989
+ # dialogs#receive_form_data_from_dialogs). When you need to collect data from
1990
+ # users that matches options you set, use a selection input. To collect abstract
1991
+ # data from users, use the text input widget instead. Only supported in [dialogs]
1992
+ # (https://developers.google.com/chat/how-tos/dialogs). Support for [card
1993
+ # messages](https://developers.google.com/chat/api/guides/message-formats/cards)
1994
+ # coming soon.
1876
1995
  class GoogleAppsCardV1SelectionInput
1877
1996
  include Google::Apis::Core::Hashable
1878
1997
 
1879
- # An array of the selected items.
1998
+ # An array of the selected items. For example, all the selected check boxes.
1880
1999
  # Corresponds to the JSON property `items`
1881
2000
  # @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>]
1882
2001
  attr_accessor :items
1883
2002
 
1884
- # The label displayed ahead of the switch control.
2003
+ # The text that appears above the selection input field in the user interface.
2004
+ # Specify text that helps the user enter the information your app needs. For
2005
+ # example, if users are selecting the urgency of a work ticket from a drop-down
2006
+ # menu, the label might be "Urgency" or "Select urgency".
1885
2007
  # Corresponds to the JSON property `label`
1886
2008
  # @return [String]
1887
2009
  attr_accessor :label
1888
2010
 
1889
- # The name of the text input which is used in `formInput`.
2011
+ # The name by which the selection input is identified in a form input event. For
2012
+ # details about working with form inputs, see [Receive form data](https://
2013
+ # developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
1890
2014
  # Corresponds to the JSON property `name`
1891
2015
  # @return [String]
1892
2016
  attr_accessor :name
@@ -1897,7 +2021,11 @@ module Google
1897
2021
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
1898
2022
  attr_accessor :on_change_action
1899
2023
 
1900
- # The type of the selection.
2024
+ # The way that an option appears to users. Different options support different
2025
+ # types of interactions. For example, users can enable multiple check boxes, but
2026
+ # can only select one value from a dropdown menu. Each selection input supports
2027
+ # one type of selection. Mixing check boxes and switches, for example, is not
2028
+ # supported.
1901
2029
  # Corresponds to the JSON property `type`
1902
2030
  # @return [String]
1903
2031
  attr_accessor :type
@@ -1916,24 +2044,27 @@ module Google
1916
2044
  end
1917
2045
  end
1918
2046
 
1919
- # A selectable item in the switch control.
2047
+ # A selectable item in a selection input, such as a check box or a switch.
1920
2048
  class GoogleAppsCardV1SelectionItem
1921
2049
  include Google::Apis::Core::Hashable
1922
2050
 
1923
- # If more than one item is selected for `RADIO_BUTTON` and `DROPDOWN`, the first
1924
- # selected item is treated as selected and the ones after are ignored.
2051
+ # When `true`, more than one item is selected. If more than one item is selected
2052
+ # for radio buttons and dropdown menus, the first selected item is received and
2053
+ # the ones after are ignored.
1925
2054
  # Corresponds to the JSON property `selected`
1926
2055
  # @return [Boolean]
1927
2056
  attr_accessor :selected
1928
2057
  alias_method :selected?, :selected
1929
2058
 
1930
- # The text to be displayed.
2059
+ # The text displayed to users.
1931
2060
  # Corresponds to the JSON property `text`
1932
2061
  # @return [String]
1933
2062
  attr_accessor :text
1934
2063
 
1935
2064
  # The value associated with this item. The client should use this as a form
1936
- # input value.
2065
+ # input value. For details about working with form inputs, see [Receive form
2066
+ # data](https://developers.google.com/chat/how-tos/dialogs#
2067
+ # receive_form_data_from_dialogs).
1937
2068
  # Corresponds to the JSON property `value`
1938
2069
  # @return [String]
1939
2070
  attr_accessor :value
@@ -1950,11 +2081,12 @@ module Google
1950
2081
  end
1951
2082
  end
1952
2083
 
1953
- # A suggestion item.
2084
+ # One suggested value that users can enter in a text input field.
1954
2085
  class GoogleAppsCardV1SuggestionItem
1955
2086
  include Google::Apis::Core::Hashable
1956
2087
 
1957
- # The suggested autocomplete result.
2088
+ # The value of a suggested input to a text input field. This is equivalent to
2089
+ # what users would enter themselves.
1958
2090
  # Corresponds to the JSON property `text`
1959
2091
  # @return [String]
1960
2092
  attr_accessor :text
@@ -1969,12 +2101,21 @@ module Google
1969
2101
  end
1970
2102
  end
1971
2103
 
1972
- # A container wrapping elements necessary for showing suggestion items used in
1973
- # text input autocomplete.
2104
+ # Suggested values that users can enter. These values appear when users click
2105
+ # inside the text input field. As users type, the suggested values dynamically
2106
+ # filter to match what the users have typed. For example, a text input field for
2107
+ # programming language might suggest Java, JavaScript, Python, and C++. When
2108
+ # users start typing "Jav", the list of suggestions filters to show just Java
2109
+ # and JavaScript. Suggested values help guide users to enter values that your
2110
+ # app can make sense of. When referring to JavaScript, some users might enter "
2111
+ # javascript" and others "java script". Suggesting "JavaScript" can standardize
2112
+ # how users interact with your app. When specified, `TextInput.type` is always `
2113
+ # SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`.
1974
2114
  class GoogleAppsCardV1Suggestions
1975
2115
  include Google::Apis::Core::Hashable
1976
2116
 
1977
- # A list of suggestions used for autocomplete recommendations.
2117
+ # A list of suggestions used for autocomplete recommendations in text input
2118
+ # fields.
1978
2119
  # Corresponds to the JSON property `items`
1979
2120
  # @return [Array<Google::Apis::ChatV1::GoogleAppsCardV1SuggestionItem>]
1980
2121
  attr_accessor :items
@@ -1989,16 +2130,22 @@ module Google
1989
2130
  end
1990
2131
  end
1991
2132
 
1992
- # Either a toggle-style switch or a checkbox.
2133
+ # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
2134
+ # Only supported on the `decoratedText` widget. Currently supported in [dialogs](
2135
+ # https://developers.google.com/chat/how-tos/dialogs). Support for [card
2136
+ # messages](https://developers.google.com/chat/api/guides/message-formats/cards)
2137
+ # is coming soon.
1993
2138
  class GoogleAppsCardV1SwitchControl
1994
2139
  include Google::Apis::Core::Hashable
1995
2140
 
1996
- # The control type, either switch or checkbox.
2141
+ # How the switch appears in the user interface.
1997
2142
  # Corresponds to the JSON property `controlType`
1998
2143
  # @return [String]
1999
2144
  attr_accessor :control_type
2000
2145
 
2001
- # The name of the switch widget that's used in `formInput`.
2146
+ # The name by which the switch widget is identified in a form input event. For
2147
+ # details about working with form inputs, see [Receive form data](https://
2148
+ # developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
2002
2149
  # Corresponds to the JSON property `name`
2003
2150
  # @return [String]
2004
2151
  attr_accessor :name
@@ -2009,13 +2156,15 @@ module Google
2009
2156
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
2010
2157
  attr_accessor :on_change_action
2011
2158
 
2012
- # If the switch is selected.
2159
+ # When `true`, the switch is selected.
2013
2160
  # Corresponds to the JSON property `selected`
2014
2161
  # @return [Boolean]
2015
2162
  attr_accessor :selected
2016
2163
  alias_method :selected?, :selected
2017
2164
 
2018
- # The value is what is passed back in the callback.
2165
+ # The value entered by a user, returned as part of a form input event. For
2166
+ # details about working with form inputs, see [Receive form data](https://
2167
+ # developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
2019
2168
  # Corresponds to the JSON property `value`
2020
2169
  # @return [String]
2021
2170
  attr_accessor :value
@@ -2034,8 +2183,15 @@ module Google
2034
2183
  end
2035
2184
  end
2036
2185
 
2037
- # A text input is a UI item where users can input text. A text input can also
2038
- # have an onChange action and suggestions.
2186
+ # A field in which users can enter text. Supports suggestions and on-change
2187
+ # actions. Chat apps receive and can process the value of entered text during
2188
+ # form input events. For details about working with form inputs, see [Receive
2189
+ # form data](https://developers.google.com/chat/how-tos/dialogs#
2190
+ # receive_form_data_from_dialogs). When you need to collect abstract data from
2191
+ # users, use a text input. To collect defined data from users, use the selection
2192
+ # input widget instead. Only supported in [dialogs](https://developers.google.
2193
+ # com/chat/how-tos/dialogs). Support for [card messages](https://developers.
2194
+ # google.com/chat/api/guides/message-formats/cards) coming soon.
2039
2195
  class GoogleAppsCardV1TextInput
2040
2196
  include Google::Apis::Core::Hashable
2041
2197
 
@@ -2045,23 +2201,39 @@ module Google
2045
2201
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
2046
2202
  attr_accessor :auto_complete_action
2047
2203
 
2048
- # The hint text.
2204
+ # Text that appears inside the text input field meant to assist users by
2205
+ # prompting them to enter a certain value. This text is not visible after users
2206
+ # begin typing. Required if `label` is unspecified. Otherwise, optional.
2049
2207
  # Corresponds to the JSON property `hintText`
2050
2208
  # @return [String]
2051
2209
  attr_accessor :hint_text
2052
2210
 
2053
- # A container wrapping elements necessary for showing suggestion items used in
2054
- # text input autocomplete.
2211
+ # Suggested values that users can enter. These values appear when users click
2212
+ # inside the text input field. As users type, the suggested values dynamically
2213
+ # filter to match what the users have typed. For example, a text input field for
2214
+ # programming language might suggest Java, JavaScript, Python, and C++. When
2215
+ # users start typing "Jav", the list of suggestions filters to show just Java
2216
+ # and JavaScript. Suggested values help guide users to enter values that your
2217
+ # app can make sense of. When referring to JavaScript, some users might enter "
2218
+ # javascript" and others "java script". Suggesting "JavaScript" can standardize
2219
+ # how users interact with your app. When specified, `TextInput.type` is always `
2220
+ # SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`.
2055
2221
  # Corresponds to the JSON property `initialSuggestions`
2056
2222
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Suggestions]
2057
2223
  attr_accessor :initial_suggestions
2058
2224
 
2059
- # At least one of label and hintText must be specified.
2225
+ # The text that appears above the text input field in the user interface.
2226
+ # Specify text that helps the user enter the information your app needs. For
2227
+ # example, if you are asking someone's name, but specifically need their surname,
2228
+ # write "surname" instead of "name". Required if `hintText` is unspecified.
2229
+ # Otherwise, optional.
2060
2230
  # Corresponds to the JSON property `label`
2061
2231
  # @return [String]
2062
2232
  attr_accessor :label
2063
2233
 
2064
- # The name of the text input which is used in `formInput`.
2234
+ # The name by which the text input is identified in a form input event. For
2235
+ # details about working with form inputs, see [Receive form data](https://
2236
+ # developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
2065
2237
  # Corresponds to the JSON property `name`
2066
2238
  # @return [String]
2067
2239
  attr_accessor :name
@@ -2072,12 +2244,15 @@ module Google
2072
2244
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]
2073
2245
  attr_accessor :on_change_action
2074
2246
 
2075
- # The style of the text, for example, a single line or multiple lines.
2247
+ # How a text input field appears in the user interface. For example, whether the
2248
+ # field is single or multi-line.
2076
2249
  # Corresponds to the JSON property `type`
2077
2250
  # @return [String]
2078
2251
  attr_accessor :type
2079
2252
 
2080
- # The default value when there is no input from the user.
2253
+ # The value entered by a user, returned as part of a form input event. For
2254
+ # details about working with form inputs, see [Receive form data](https://
2255
+ # developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
2081
2256
  # Corresponds to the JSON property `value`
2082
2257
  # @return [String]
2083
2258
  attr_accessor :value
@@ -2120,7 +2295,8 @@ module Google
2120
2295
  end
2121
2296
  end
2122
2297
 
2123
- # A widget is a UI element that presents texts, images, etc.
2298
+ # Each card is made up of widgets. A widget is a composite object that can
2299
+ # represent one of text, images, buttons, and other object types.
2124
2300
  class GoogleAppsCardV1Widget
2125
2301
  include Google::Apis::Core::Hashable
2126
2302
 
@@ -2129,8 +2305,11 @@ module Google
2129
2305
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1ButtonList]
2130
2306
  attr_accessor :button_list
2131
2307
 
2132
- # The widget that lets users to specify a date and time. Not supported by Google
2133
- # Chat apps.
2308
+ # Lets users specify a date, a time, or both a date and a time. Accepts text
2309
+ # input from users, but features an interactive date and time selector that
2310
+ # helps users enter correctly-formatted dates and times. If users enter a date
2311
+ # or time incorrectly, the widget shows an error that prompts users to enter the
2312
+ # correct format. Not supported by Chat apps. Support by Chat apps coming soon.
2134
2313
  # Corresponds to the JSON property `dateTimePicker`
2135
2314
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1DateTimePicker]
2136
2315
  attr_accessor :date_time_picker
@@ -2142,34 +2321,57 @@ module Google
2142
2321
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1DecoratedText]
2143
2322
  attr_accessor :decorated_text
2144
2323
 
2145
- # A divider that appears in between widgets.
2324
+ # Displays a divider between widgets, a horizontal line. For example, the
2325
+ # following JSON creates a divider: ``` "divider": ` ` ```
2146
2326
  # Corresponds to the JSON property `divider`
2147
2327
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Divider]
2148
2328
  attr_accessor :divider
2149
2329
 
2150
- # Represents a Grid widget that displays items in a configurable grid layout.
2330
+ # Displays a grid with a collection of items. A grid supports any number of
2331
+ # columns and items. The number of rows is determined by items divided by
2332
+ # columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items
2333
+ # and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.
2334
+ # google.com/chat/how-tos/dialogs). Support for [card messages](https://
2335
+ # developers.google.com/chat/api/guides/message-formats/cards) is coming soon.
2336
+ # For example, the following JSON creates a 2 column grid with a single item: ```
2337
+ # "grid": ` "title": "A fine collection of items", "numColumns": 2, "
2338
+ # borderStyle": ` "type": "STROKE", "cornerRadius": 4.0 `, "items": [ "image": `
2339
+ # "imageUri": "https://www.example.com/image.png", "cropStyle": ` "type": "
2340
+ # SQUARE" `, "borderStyle": ` "type": "STROKE" ` `, "title": "An item", "
2341
+ # textAlignment": "CENTER" ], "onClick": ` "openLink": ` "url":"https://www.
2342
+ # example.com" ` ` ` ```
2151
2343
  # Corresponds to the JSON property `grid`
2152
2344
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Grid]
2153
2345
  attr_accessor :grid
2154
2346
 
2155
- # The horizontal alignment of this widget.
2156
- # Corresponds to the JSON property `horizontalAlignment`
2157
- # @return [String]
2158
- attr_accessor :horizontal_alignment
2159
-
2160
2347
  # An image that is specified by a URL and can have an `onClick` action.
2161
2348
  # Corresponds to the JSON property `image`
2162
2349
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1Image]
2163
2350
  attr_accessor :image
2164
2351
 
2165
2352
  # A widget that creates a UI item with options for users to select. For example,
2166
- # a dropdown menu.
2353
+ # a dropdown menu or check list. Chat apps receive and can process the value of
2354
+ # entered text during form input events. For details about working with form
2355
+ # inputs, see [Receive form data](https://developers.google.com/chat/how-tos/
2356
+ # dialogs#receive_form_data_from_dialogs). When you need to collect data from
2357
+ # users that matches options you set, use a selection input. To collect abstract
2358
+ # data from users, use the text input widget instead. Only supported in [dialogs]
2359
+ # (https://developers.google.com/chat/how-tos/dialogs). Support for [card
2360
+ # messages](https://developers.google.com/chat/api/guides/message-formats/cards)
2361
+ # coming soon.
2167
2362
  # Corresponds to the JSON property `selectionInput`
2168
2363
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput]
2169
2364
  attr_accessor :selection_input
2170
2365
 
2171
- # A text input is a UI item where users can input text. A text input can also
2172
- # have an onChange action and suggestions.
2366
+ # A field in which users can enter text. Supports suggestions and on-change
2367
+ # actions. Chat apps receive and can process the value of entered text during
2368
+ # form input events. For details about working with form inputs, see [Receive
2369
+ # form data](https://developers.google.com/chat/how-tos/dialogs#
2370
+ # receive_form_data_from_dialogs). When you need to collect abstract data from
2371
+ # users, use a text input. To collect defined data from users, use the selection
2372
+ # input widget instead. Only supported in [dialogs](https://developers.google.
2373
+ # com/chat/how-tos/dialogs). Support for [card messages](https://developers.
2374
+ # google.com/chat/api/guides/message-formats/cards) coming soon.
2173
2375
  # Corresponds to the JSON property `textInput`
2174
2376
  # @return [Google::Apis::ChatV1::GoogleAppsCardV1TextInput]
2175
2377
  attr_accessor :text_input
@@ -2192,7 +2394,6 @@ module Google
2192
2394
  @decorated_text = args[:decorated_text] if args.key?(:decorated_text)
2193
2395
  @divider = args[:divider] if args.key?(:divider)
2194
2396
  @grid = args[:grid] if args.key?(:grid)
2195
- @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment)
2196
2397
  @image = args[:image] if args.key?(:image)
2197
2398
  @selection_input = args[:selection_input] if args.key?(:selection_input)
2198
2399
  @text_input = args[:text_input] if args.key?(:text_input)
@@ -2384,8 +2585,8 @@ module Google
2384
2585
  # @return [Array<Google::Apis::ChatV1::Membership>]
2385
2586
  attr_accessor :memberships
2386
2587
 
2387
- # Continuation token to retrieve the next page of results. It will be empty for
2388
- # the last page of results.
2588
+ # A token that can be sent as `pageToken` to retrieve the next page of results.
2589
+ # If empty, there are no subsequent pages.
2389
2590
  # Corresponds to the JSON property `nextPageToken`
2390
2591
  # @return [String]
2391
2592
  attr_accessor :next_page_token
@@ -2405,9 +2606,8 @@ module Google
2405
2606
  class ListSpacesResponse
2406
2607
  include Google::Apis::Core::Hashable
2407
2608
 
2408
- # Continuation token to retrieve the next page of results. It will be empty for
2409
- # the last page of results. Tokens expire in an hour. An error is thrown if an
2410
- # expired token is passed.
2609
+ # A token that can be sent as `pageToken` to retrieve the next page of results.
2610
+ # If empty, there are no subsequent pages.
2411
2611
  # Corresponds to the JSON property `nextPageToken`
2412
2612
  # @return [String]
2413
2613
  attr_accessor :next_page_token
@@ -2625,6 +2825,15 @@ module Google
2625
2825
  # @return [Google::Apis::ChatV1::Thread]
2626
2826
  attr_accessor :thread
2627
2827
 
2828
+ # Output only. When `true`, the message is a response in a reply thread. When `
2829
+ # false`, the message is visible in the space's top-level conversation as either
2830
+ # the first message of a thread or a message with no threaded replies. If the
2831
+ # space doesn't support reply in threads, this field is always `false`.
2832
+ # Corresponds to the JSON property `threadReply`
2833
+ # @return [Boolean]
2834
+ attr_accessor :thread_reply
2835
+ alias_method :thread_reply?, :thread_reply
2836
+
2628
2837
  def initialize(**args)
2629
2838
  update!(**args)
2630
2839
  end
@@ -2648,6 +2857,7 @@ module Google
2648
2857
  @space = args[:space] if args.key?(:space)
2649
2858
  @text = args[:text] if args.key?(:text)
2650
2859
  @thread = args[:thread] if args.key?(:thread)
2860
+ @thread_reply = args[:thread_reply] if args.key?(:thread_reply)
2651
2861
  end
2652
2862
  end
2653
2863
 
@@ -2792,8 +3002,9 @@ module Google
2792
3002
  class Space
2793
3003
  include Google::Apis::Core::Hashable
2794
3004
 
2795
- # The space's display name. For direct messages between humans, this field might
2796
- # be empty.
3005
+ # The space's display name. Required when [creating a space](https://developers.
3006
+ # google.com/chat/api/reference/rest/v1/spaces/create). For direct messages,
3007
+ # this field may be empty.
2797
3008
  # Corresponds to the JSON property `displayName`
2798
3009
  # @return [String]
2799
3010
  attr_accessor :display_name
@@ -2814,7 +3025,13 @@ module Google
2814
3025
  # @return [Google::Apis::ChatV1::SpaceDetails]
2815
3026
  attr_accessor :space_details
2816
3027
 
2817
- # Output only. Whether messages are threaded in this space.
3028
+ # Output only. The threading state in the Chat space.
3029
+ # Corresponds to the JSON property `spaceThreadingState`
3030
+ # @return [String]
3031
+ attr_accessor :space_threading_state
3032
+
3033
+ # Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages
3034
+ # are threaded in this space.
2818
3035
  # Corresponds to the JSON property `threaded`
2819
3036
  # @return [Boolean]
2820
3037
  attr_accessor :threaded
@@ -2836,6 +3053,7 @@ module Google
2836
3053
  @name = args[:name] if args.key?(:name)
2837
3054
  @single_user_bot_dm = args[:single_user_bot_dm] if args.key?(:single_user_bot_dm)
2838
3055
  @space_details = args[:space_details] if args.key?(:space_details)
3056
+ @space_threading_state = args[:space_threading_state] if args.key?(:space_threading_state)
2839
3057
  @threaded = args[:threaded] if args.key?(:threaded)
2840
3058
  @type = args[:type] if args.key?(:type)
2841
3059
  end
@@ -2975,12 +3193,20 @@ module Google
2975
3193
  class Thread
2976
3194
  include Google::Apis::Core::Hashable
2977
3195
 
2978
- # Resource name, in the form "spaces/*/threads/*". Example: spaces/AAAAAAAAAAA/
2979
- # threads/TTTTTTTTTTT
3196
+ # Resource name of the thread. Example: spaces/`space`/threads/`thread`
2980
3197
  # Corresponds to the JSON property `name`
2981
3198
  # @return [String]
2982
3199
  attr_accessor :name
2983
3200
 
3201
+ # Optional. Opaque thread identifier. To start or add to a thread, create a
3202
+ # message and specify a `threadKey` or the thread.name. For example usage, see [
3203
+ # Start or reply to a message thread](/chat/api/guides/crudl/messages#
3204
+ # start_or_reply_to_a_message_thread). For other requests, this is an output
3205
+ # only field.
3206
+ # Corresponds to the JSON property `threadKey`
3207
+ # @return [String]
3208
+ attr_accessor :thread_key
3209
+
2984
3210
  def initialize(**args)
2985
3211
  update!(**args)
2986
3212
  end
@@ -2988,6 +3214,7 @@ module Google
2988
3214
  # Update properties of this object
2989
3215
  def update!(**args)
2990
3216
  @name = args[:name] if args.key?(:name)
3217
+ @thread_key = args[:thread_key] if args.key?(:thread_key)
2991
3218
  end
2992
3219
  end
2993
3220