Skip to content

Commit f03776f

Browse files
feat: Automated regeneration of Chat client (googleapis#12762)
Auto-created at 2025-01-03 13:17:04 +0000 using the toys pull request generator.
1 parent 681a045 commit f03776f

File tree

9 files changed

+67
-9
lines changed

9 files changed

+67
-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.42"}]
14+
[{:google_api_chat, "~> 0.43"}]
1515
end
1616
```
1717

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 "20241217"
23+
@discovery_revision "20241229"
2424

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

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,34 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action do
2121
2222
## Attributes
2323
24+
* `allWidgetsAreRequired` (*type:* `boolean()`, *default:* `nil`) - Optional. If this is true, then all widgets are considered required by this action. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
2425
* `function` (*type:* `String.t`, *default:* `nil`) - A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
2526
* `interaction` (*type:* `String.t`, *default:* `nil`) - Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). What to do in response to an interaction with a user, such as a user clicking a button in a card message. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/workspace/chat/dialogs). When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/workspace/chat):
2627
* `loadIndicator` (*type:* `String.t`, *default:* `nil`) - Specifies the loading indicator that the action displays while making the call to the action.
2728
* `parameters` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1ActionParameter.t)`, *default:* `nil`) - List of action parameters.
2829
* `persistValues` (*type:* `boolean()`, *default:* `nil`) - Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the user make changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) from the card that contained the action. If `false`, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
30+
* `requiredWidgets` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
2931
"""
3032

3133
use GoogleApi.Gax.ModelBase
3234

3335
@type t :: %__MODULE__{
36+
:allWidgetsAreRequired => boolean() | nil,
3437
:function => String.t() | nil,
3538
:interaction => String.t() | nil,
3639
:loadIndicator => String.t() | nil,
3740
:parameters => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1ActionParameter.t()) | nil,
38-
:persistValues => boolean() | nil
41+
:persistValues => boolean() | nil,
42+
:requiredWidgets => list(String.t()) | nil
3943
}
4044

45+
field(:allWidgetsAreRequired)
4146
field(:function)
4247
field(:interaction)
4348
field(:loadIndicator)
4449
field(:parameters, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ActionParameter, type: :list)
4550
field(:persistValues)
51+
field(:requiredWidgets, type: :list)
4652
end
4753

4854
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action do

clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_date_time_picker.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.GoogleAppsCardV1DateTimePicker do
1919
@moduledoc """
20-
Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see [Let a user pick a date and time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
20+
Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in Google Chat apps, see [Let a user pick a date and time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
2121
2222
## Attributes
2323

clients/chat/lib/google_api/chat/v1/model/google_apps_card_v1_selection_input.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.GoogleAppsCardV1SelectionInput do
1919
@moduledoc """
20-
A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see [Add selectable UI elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements). Chat apps can process the value of items that users select or input. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
20+
A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see [Add selectable UI elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements). Chat apps can process the value of items that users select or input. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
2121
2222
## Attributes
2323

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

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

1818
defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextInput do
1919
@moduledoc """
20-
A field in which users can enter text. Supports suggestions and on-change actions. For an example in Google Chat apps, see [Add a field in which a user can enter text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text). Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
20+
A field in which users can enter text. Supports suggestions and on-change actions. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is entered. For an example in Google Chat apps, see [Add a field in which a user can enter text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text). Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
2121
2222
## Attributes
2323
@@ -29,6 +29,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextInput do
2929
* `onChangeAction` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t`, *default:* `nil`) - What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/workspace/chat/dialogs) in Google Chat.
3030
* `placeholderText` (*type:* `String.t`, *default:* `nil`) - Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, `Enter a number from 0 to 100`. [Google Chat apps](https://developers.google.com/workspace/chat):
3131
* `type` (*type:* `String.t`, *default:* `nil`) - How a text input field appears in the user interface. For example, whether the field is single or multi-line.
32+
* `validation` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Validation.t`, *default:* `nil`) - Specify the input format validation necessary for this text field. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
3233
* `value` (*type:* `String.t`, *default:* `nil`) - The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).
3334
"""
3435

@@ -43,6 +44,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextInput do
4344
:onChangeAction => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t() | nil,
4445
:placeholderText => String.t() | nil,
4546
:type => String.t() | nil,
47+
:validation => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Validation.t() | nil,
4648
:value => String.t() | nil
4749
}
4850

@@ -54,6 +56,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextInput do
5456
field(:onChangeAction, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action)
5557
field(:placeholderText)
5658
field(:type)
59+
field(:validation, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Validation)
5760
field(:value)
5861
end
5962

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.GoogleAppsCardV1Validation do
19+
@moduledoc """
20+
Represents the necessary data for validating the widget it's attached to. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
21+
22+
## Attributes
23+
24+
* `characterLimit` (*type:* `integer()`, *default:* `nil`) - Specify the character limit for text input widgets. Note that this is only used for text input and is ignored for other widgets. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
25+
* `inputType` (*type:* `String.t`, *default:* `nil`) - Specify the type of the input widgets. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:characterLimit => integer() | nil,
32+
:inputType => String.t() | nil
33+
}
34+
35+
field(:characterLimit)
36+
field(:inputType)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Validation do
40+
def decode(value, options) do
41+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1Validation.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Validation do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ defmodule GoogleApi.Chat.V1.Model.Space do
3131
* `lastActiveTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the last message in the space.
3232
* `membershipCount` (*type:* `GoogleApi.Chat.V1.Model.MembershipCount.t`, *default:* `nil`) - Output only. The count of joined memberships grouped by member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`.
3333
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Resource name of the space. Format: `spaces/{space}` Where `{space}` represents the system-assigned ID for the space. You can obtain the space ID by calling the [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) method or from the space URL. For example, if the space URL is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID is `AAAAAAAAA`.
34-
* `permissionSettings` (*type:* `GoogleApi.Chat.V1.Model.PermissionSettings.t`, *default:* `nil`) - Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings.
35-
* `predefinedPermissionSettings` (*type:* `String.t`, *default:* `nil`) - Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the `PermissionSettings` field.
34+
* `permissionSettings` (*type:* `GoogleApi.Chat.V1.Model.PermissionSettings.t`, *default:* `nil`) - Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings. Reading and updating permission settings supports: - In [Developer Preview](https://developers.google.com/workspace/preview), [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. Only populated and settable when the Chat app created the space. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
35+
* `predefinedPermissionSettings` (*type:* `String.t`, *default:* `nil`) - Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the `PermissionSettings` field. Setting predefined permission settings supports: - In [Developer Preview](https://developers.google.com/workspace/preview), [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` or `chat.app.spaces.create` scopes. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3636
* `singleUserBotDm` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the space is a DM between a Chat app and a single human.
3737
* `spaceDetails` (*type:* `GoogleApi.Chat.V1.Model.SpaceDetails.t`, *default:* `nil`) - Optional. Details about the space including description and rules.
3838
* `spaceHistoryState` (*type:* `String.t`, *default:* `nil`) - Optional. The message history state for messages and threads in this space.

clients/chat/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.Chat.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.42.1"
21+
@version "0.43.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)