Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of Chat client #12697

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_chat, "~> 0.41"}]
[{:google_api_chat, "~> 0.42"}]
end
```

Expand Down
8 changes: 4 additions & 4 deletions clients/chat/lib/google_api/chat/v1/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,22 @@ defmodule GoogleApi.Chat.V1.Connection do
# View members in Google Chat conversations.
"https://www.googleapis.com/auth/chat.memberships.readonly",

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

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

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

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

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

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

# Create conversations and spaces and see or update metadata (including history settings and access settings) in Google Chat
Expand Down
2 changes: 1 addition & 1 deletion clients/chat/lib/google_api/chat/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Chat.V1 do
API client metadata for GoogleApi.Chat.V1.
"""

@discovery_revision "20241203"
@discovery_revision "20241208"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
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
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do
## Attributes

* `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" } } } ] } ```
* `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." } } ] } ```
* `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):
* `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" } } ] } ] } ```
* `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" } ```
Expand All @@ -39,6 +40,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do

@type t :: %__MODULE__{
:buttonList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList.t() | nil,
:carousel => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel.t() | nil,
:chipList => GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList.t() | nil,
:columns => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns.t() | nil,
:dateTimePicker => GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker.t() | nil,
Expand All @@ -53,6 +55,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget do
}

field(:buttonList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ButtonList)
field(:carousel, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Carousel)
field(:chipList, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList)
field(:columns, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Columns)
field(:dateTimePicker, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1DateTimePicker)
Expand Down
Loading
Loading