Skip to content

Commit 7f1b2ad

Browse files
feat: Automated regeneration of Chat client (#12697)
Auto-created at 2024-12-12 13:21:05 +0000 using the toys pull request generator.
1 parent bbd9111 commit 7f1b2ad

11 files changed

+162
-9
lines changed

clients/chat/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_chat, "~> 0.41"}]
14+
[{:google_api_chat, "~> 0.42"}]
1515
end
1616
```
1717

clients/chat/lib/google_api/chat/v1/connection.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,22 @@ defmodule GoogleApi.Chat.V1.Connection do
6969
# View members in Google Chat conversations.
7070
"https://www.googleapis.com/auth/chat.memberships.readonly",
7171

72-
# See, compose, send, update, and delete messages and their associated attachments, and add, see, and delete reactions to messages.
72+
# See, compose, send, update, and delete messages as well as their message content; add, see, and delete reactions to messages.
7373
"https://www.googleapis.com/auth/chat.messages",
7474

7575
# Compose and send messages in Google Chat
7676
"https://www.googleapis.com/auth/chat.messages.create",
7777

78-
# See, add, and delete reactions to messages in Google Chat
78+
# See, add, and delete reactions as well as their reaction content to messages in Google Chat
7979
"https://www.googleapis.com/auth/chat.messages.reactions",
8080

8181
# Add reactions to messages in Google Chat
8282
"https://www.googleapis.com/auth/chat.messages.reactions.create",
8383

84-
# View reactions to messages in Google Chat
84+
# View reactions as well as their reaction content to messages in Google Chat
8585
"https://www.googleapis.com/auth/chat.messages.reactions.readonly",
8686

87-
# See messages and their associated reactions and attachments in Google Chat
87+
# See messages as well as their reactions and message content in Google Chat
8888
"https://www.googleapis.com/auth/chat.messages.readonly",
8989

9090
# Create conversations and spaces and see or update metadata (including history settings and access settings) in Google Chat

clients/chat/lib/google_api/chat/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Chat.V1 do
2020
API client metadata for GoogleApi.Chat.V1.
2121
"""
2222

23-
@discovery_revision "20241203"
23+
@discovery_revision "20241208"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_card.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card do
1919
@moduledoc """
20-
A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. [Card builder](https://addons.gsuite.google.com/uikit/builder) To learn how to build cards, see the following documentation: * For Google Chat apps, see [Design the components of a card or dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). * For Google Workspace Add-ons, see [Card-based interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). **Example: Card message for a Google Chat app** ![Example contact card](https://developers.google.com/workspace/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": { "title": "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha" }, "sections": [ { "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ { "decoratedText": { "startIcon": { "knownIcon": "EMAIL" }, "text": "[email protected]" } }, { "decoratedText": { "startIcon": { "knownIcon": "PERSON" }, "text": "Online" } }, { "decoratedText": { "startIcon": { "knownIcon": "PHONE" }, "text": "+1 (555) 555-1234" } }, { "buttonList": { "buttons": [ { "text": "Share", "onClick": { "openLink": { "url": "https://example.com/share" } } }, { "text": "Edit", "onClick": { "action": { "function": "goToView", "parameters": [ { "key": "viewType", "value": "EDIT" } ] } } } ] } } ] } ] } } ] } ```
20+
A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. [Card builder](https://addons.gsuite.google.com/uikit/builder) To learn how to build cards, see the following documentation: * For Google Chat apps, see [Design the components of a card or dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). * For Google Workspace Add-ons, see [Card-based interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). Note: You can add up to 100 widgets per card. Any widgets beyond this limit are ignored. This limit applies to both card messages and dialogs in Google Chat apps, and to cards in Google Workspace Add-ons. **Example: Card message for a Google Chat app** ![Example contact card](https://developers.google.com/workspace/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": { "title": "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha" }, "sections": [ { "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ { "decoratedText": { "startIcon": { "knownIcon": "EMAIL" }, "text": "[email protected]" } }, { "decoratedText": { "startIcon": { "knownIcon": "PERSON" }, "text": "Online" } }, { "decoratedText": { "startIcon": { "knownIcon": "PHONE" }, "text": "+1 (555) 555-1234" } }, { "buttonList": { "buttons": [ { "text": "Share", "onClick": { "openLink": { "url": "https://example.com/share" } } }, { "text": "Edit", "onClick": { "action": { "function": "goToView", "parameters": [ { "key": "viewType", "value": "EDIT" } ] } } } ] } } ] } ] } } ] } ```
2121
2222
## Attributes
2323
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do
19+
@moduledoc """
20+
[Developer Preview](https://developers.google.com/workspace/preview): A carousel, also known as a slider, rotates and displays a list of widgets in a slideshow format, with buttons navigating to the previous or next widget. For example, this is a JSON representation of a carousel that contains three text paragraph widgets. ``` { "carouselCards": [ { "widgets": [ { "textParagraph": { "text": "First text paragraph in carousel", } } ] }, { "widgets": [ { "textParagraph": { "text": "Second text paragraph in carousel", } } ] }, { "widgets": [ { "textParagraph": { "text": "Third text paragraph in carousel", } } ] } ] } ``` [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `carouselCards` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.t)`, *default:* `nil`) - A list of cards included in the carousel.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:carouselCards => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.t()) | nil
31+
}
32+
33+
field(:carouselCards, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard, type: :list)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do
37+
def decode(value, options) do
38+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do
19+
@moduledoc """
20+
[Developer Preview](https://developers.google.com/workspace/preview): A card that can be displayed as a carousel item. [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `footerWidgets` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t)`, *default:* `nil`) - A list of widgets displayed at the bottom of the carousel card. The widgets are displayed in the order that they are specified.
25+
* `widgets` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t)`, *default:* `nil`) - A list of widgets displayed in the carousel card. The widgets are displayed in the order that they are specified.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:footerWidgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t()) | nil,
32+
:widgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t()) | nil
33+
}
34+
35+
field(:footerWidgets, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget, type: :list)
36+
field(:widgets, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget, type: :list)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do
40+
def decode(value, options) do
41+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do
19+
@moduledoc """
20+
[Developer Preview](https://developers.google.com/workspace/preview): A list of widgets that can be displayed in a containing layout, such as a `CarouselCard`. [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `buttonList` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t`, *default:* `nil`) - A button list widget.
25+
* `image` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t`, *default:* `nil`) - An image widget.
26+
* `textParagraph` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t`, *default:* `nil`) - A text paragraph widget.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:buttonList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t() | nil,
33+
:image => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t() | nil,
34+
:textParagraph => GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t() | nil
35+
}
36+
37+
field(:buttonList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList)
38+
field(:image, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image)
39+
field(:textParagraph, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do
43+
def decode(value, options) do
44+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
end

clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_widget.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do
2222
## Attributes
2323
2424
* `buttonList` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t`, *default:* `nil`) - A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` "buttonList": { "buttons": [ { "text": "Edit", "color": { "red": 0, "green": 0, "blue": 1, }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
25+
* `carousel` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.t`, *default:* `nil`) - A carousel contains a collection of nested widgets. For example, this is a JSON representation of a carousel that contains two text paragraphs. ``` { "widgets": [ { "textParagraph": { "text": "First text paragraph in the carousel." } }, { "textParagraph": { "text": "Second text paragraph in the carousel." } } ] } ```
2526
* `chipList` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList.t`, *default:* `nil`) - A list of chips. For example, the following JSON creates two chips. The first is a text chip and the second is an icon chip that opens a link: ``` "chipList": { "chips": [ { "text": "Edit", "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ``` [Google Chat apps](https://developers.google.com/workspace/chat):
2627
* `columns` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns.t`, *default:* `nil`) - Displays up to 2 columns. To include more than 2 columns, or to use rows, use the `Grid` widget. For example, the following JSON creates 2 columns that each contain text paragraphs: ``` "columns": { "columnItems": [ { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text": "First column text paragraph" } } ] }, { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text": "Second column text paragraph" } } ] } ] } ```
2728
* `dateTimePicker` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker.t`, *default:* `nil`) - Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": "796435200000" } ```
@@ -39,6 +40,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do
3940

4041
@type t :: %__MODULE__{
4142
:buttonList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t() | nil,
43+
:carousel => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.t() | nil,
4244
:chipList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList.t() | nil,
4345
:columns => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns.t() | nil,
4446
:dateTimePicker => GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker.t() | nil,
@@ -53,6 +55,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do
5355
}
5456

5557
field(:buttonList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList)
58+
field(:carousel, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel)
5659
field(:chipList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList)
5760
field(:columns, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns)
5861
field(:dateTimePicker, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker)

0 commit comments

Comments
 (0)