-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Automated regeneration of Chat client (#12697)
Auto-created at 2024-12-12 13:21:05 +0000 using the toys pull request generator.
- Loading branch information
1 parent
bbd9111
commit 7f1b2ad
Showing
11 changed files
with
162 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card do | ||
@moduledoc """ | ||
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" } ] } } } ] } } ] } ] } } ] } ``` | ||
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" } ] } } } ] } } ] } ] } } ] } ``` | ||
## Attributes | ||
|
46 changes: 46 additions & 0 deletions
46
clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# NOTE: This file is auto generated by the elixir code generator program. | ||
# Do not edit this file manually. | ||
|
||
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do | ||
@moduledoc """ | ||
[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): | ||
## Attributes | ||
* `carouselCards` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.t)`, *default:* `nil`) - A list of cards included in the carousel. | ||
""" | ||
|
||
use GoogleApi.Gax.ModelBase | ||
|
||
@type t :: %__MODULE__{ | ||
:carouselCards => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.t()) | nil | ||
} | ||
|
||
field(:carouselCards, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard, type: :list) | ||
end | ||
|
||
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do | ||
def decode(value, options) do | ||
GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.decode(value, options) | ||
end | ||
end | ||
|
||
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel do | ||
def encode(value, options) do | ||
GoogleApi.Gax.ModelBase.encode(value, options) | ||
end | ||
end |
49 changes: 49 additions & 0 deletions
49
clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_carousel_card.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# NOTE: This file is auto generated by the elixir code generator program. | ||
# Do not edit this file manually. | ||
|
||
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do | ||
@moduledoc """ | ||
[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): | ||
## Attributes | ||
* `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. | ||
* `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. | ||
""" | ||
|
||
use GoogleApi.Gax.ModelBase | ||
|
||
@type t :: %__MODULE__{ | ||
:footerWidgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t()) | nil, | ||
:widgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.t()) | nil | ||
} | ||
|
||
field(:footerWidgets, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget, type: :list) | ||
field(:widgets, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget, type: :list) | ||
end | ||
|
||
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do | ||
def decode(value, options) do | ||
GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard.decode(value, options) | ||
end | ||
end | ||
|
||
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CarouselCard do | ||
def encode(value, options) do | ||
GoogleApi.Gax.ModelBase.encode(value, options) | ||
end | ||
end |
52 changes: 52 additions & 0 deletions
52
clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_nested_widget.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# NOTE: This file is auto generated by the elixir code generator program. | ||
# Do not edit this file manually. | ||
|
||
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do | ||
@moduledoc """ | ||
[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): | ||
## Attributes | ||
* `buttonList` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t`, *default:* `nil`) - A button list widget. | ||
* `image` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t`, *default:* `nil`) - An image widget. | ||
* `textParagraph` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t`, *default:* `nil`) - A text paragraph widget. | ||
""" | ||
|
||
use GoogleApi.Gax.ModelBase | ||
|
||
@type t :: %__MODULE__{ | ||
:buttonList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t() | nil, | ||
:image => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image.t() | nil, | ||
:textParagraph => GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph.t() | nil | ||
} | ||
|
||
field(:buttonList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList) | ||
field(:image, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Image) | ||
field(:textParagraph, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph) | ||
end | ||
|
||
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do | ||
def decode(value, options) do | ||
GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget.decode(value, options) | ||
end | ||
end | ||
|
||
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1NestedWidget do | ||
def encode(value, options) do | ||
GoogleApi.Gax.ModelBase.encode(value, options) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.