Skip to content

Commit c1e6e0b

Browse files
feat: Automated regeneration of Chat client (googleapis#12412)
Auto-created at 2024-10-26 13:12:17 +0000 using the toys pull request generator.
1 parent 1b228a0 commit c1e6e0b

14 files changed

+286
-5
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.40"}]
14+
[{:google_api_chat, "~> 0.41"}]
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 "20241008"
23+
@discovery_revision "20241020"
2424

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

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
2727
* `icon` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t`, *default:* `nil`) - An icon displayed inside the button. If both `icon` and `text` are set, then the icon appears before the text.
2828
* `onClick` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t`, *default:* `nil`) - Required. The action to perform when a user clicks the button, such as opening a hyperlink or running a custom function.
2929
* `text` (*type:* `String.t`, *default:* `nil`) - The text displayed inside the button.
30+
* `type` (*type:* `String.t`, *default:* `nil`) - Optional. The type of a button. If unset, button type defaults to `OUTLINED`. If the `color` field is set, the button type is forced to `FILLED` and any value set for this field is ignored. [Google Chat apps](https://developers.google.com/workspace/chat):
3031
"""
3132

3233
use GoogleApi.Gax.ModelBase
@@ -37,7 +38,8 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
3738
:disabled => boolean() | nil,
3839
:icon => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t() | nil,
3940
:onClick => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t() | nil,
40-
:text => String.t() | nil
41+
:text => String.t() | nil,
42+
:type => String.t() | nil
4143
}
4244

4345
field(:altText)
@@ -46,6 +48,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
4648
field(:icon, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon)
4749
field(:onClick, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick)
4850
field(:text)
51+
field(:type)
4952
end
5053

5154
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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.GoogleAppsCardV1Chip do
19+
@moduledoc """
20+
A text, icon, or text and icon chip that users can click. [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `altText` (*type:* `String.t`, *default:* `nil`) - The alternative text that's used for accessibility. Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".
25+
* `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the chip is in an inactive state and ignores user actions. Defaults to `false`.
26+
* `enabled` (*type:* `boolean()`, *default:* `nil`) - Whether the chip is in an active state and responds to user actions. Defaults to `true`. Deprecated. Use `disabled` instead.
27+
* `icon` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t`, *default:* `nil`) - The icon image. If both `icon` and `text` are set, then the icon appears before the text.
28+
* `label` (*type:* `String.t`, *default:* `nil`) - The text displayed inside the chip.
29+
* `onClick` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t`, *default:* `nil`) - Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.
30+
"""
31+
32+
use GoogleApi.Gax.ModelBase
33+
34+
@type t :: %__MODULE__{
35+
:altText => String.t() | nil,
36+
:disabled => boolean() | nil,
37+
:enabled => boolean() | nil,
38+
:icon => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t() | nil,
39+
:label => String.t() | nil,
40+
:onClick => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t() | nil
41+
}
42+
43+
field(:altText)
44+
field(:disabled)
45+
field(:enabled)
46+
field(:icon, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon)
47+
field(:label)
48+
field(:onClick, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick)
49+
end
50+
51+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip do
52+
def decode(value, options) do
53+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip.decode(value, options)
54+
end
55+
end
56+
57+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip do
58+
def encode(value, options) do
59+
GoogleApi.Gax.ModelBase.encode(value, options)
60+
end
61+
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.GoogleAppsCardV1ChipList do
19+
@moduledoc """
20+
A list of chips layed out horizontally, which can either scroll horizontally or wrap to the next line. [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `chips` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip.t)`, *default:* `nil`) - An array of chips.
25+
* `layout` (*type:* `String.t`, *default:* `nil`) - Specified chip list layout.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:chips => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip.t()) | nil,
32+
:layout => String.t() | nil
33+
}
34+
35+
field(:chips, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip, type: :list)
36+
field(:layout)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList do
40+
def decode(value, options) do
41+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList 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.GoogleAppsCardV1CollapseControl do
19+
@moduledoc """
20+
Represent an expand and collapse control. [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `collapseButton` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button.t`, *default:* `nil`) - Optional. Define a customizable button to collapse the section. Both expand_button and collapse_button field must be set. Only one field set will not take into effect. If this field isn't set, the default button is used.
25+
* `expandButton` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button.t`, *default:* `nil`) - Optional. Define a customizable button to expand the section. Both expand_button and collapse_button field must be set. Only one field set will not take into effect. If this field isn't set, the default button is used.
26+
* `horizontalAlignment` (*type:* `String.t`, *default:* `nil`) - The horizontal alignment of the expand and collapse button.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:collapseButton => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button.t() | nil,
33+
:expandButton => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button.t() | nil,
34+
:horizontalAlignment => String.t() | nil
35+
}
36+
37+
field(:collapseButton, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button)
38+
field(:expandButton, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button)
39+
field(:horizontalAlignment)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl do
43+
def decode(value, options) do
44+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl 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_on_click.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick do
2525
* `card` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card.t`, *default:* `nil`) - A new card is pushed to the card stack after clicking if specified. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):
2626
* `openDynamicLinkAction` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t`, *default:* `nil`) - An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):
2727
* `openLink` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink.t`, *default:* `nil`) - If specified, this `onClick` triggers an open link action.
28+
* `overflowMenu` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu.t`, *default:* `nil`) - If specified, this `onClick` opens an overflow menu. [Google Chat apps](https://developers.google.com/workspace/chat):
2829
"""
2930

3031
use GoogleApi.Gax.ModelBase
@@ -33,13 +34,15 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick do
3334
:action => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t() | nil,
3435
:card => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card.t() | nil,
3536
:openDynamicLinkAction => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t() | nil,
36-
:openLink => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink.t() | nil
37+
:openLink => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink.t() | nil,
38+
:overflowMenu => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu.t() | nil
3739
}
3840

3941
field(:action, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action)
4042
field(:card, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card)
4143
field(:openDynamicLinkAction, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action)
4244
field(:openLink, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink)
45+
field(:overflowMenu, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu)
4346
end
4447

4548
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick do
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.GoogleAppsCardV1OverflowMenu do
19+
@moduledoc """
20+
A widget that presents a pop-up menu with one or more actions that users can invoke. For example, showing non-primary actions in a card. You can use this widget when actions don't fit in the available space. To use, specify this widget in the `OnClick` action of widgets that support it. For example, in a `Button`. [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `items` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem.t)`, *default:* `nil`) - Required. The list of menu options.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:items => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem.t()) | nil
31+
}
32+
33+
field(:items, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem, type: :list)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu do
37+
def decode(value, options) do
38+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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.GoogleAppsCardV1OverflowMenuItem do
19+
@moduledoc """
20+
An option that users can invoke in an overflow menu. [Google Chat apps](https://developers.google.com/workspace/chat):
21+
22+
## Attributes
23+
24+
* `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the menu option is disabled. Defaults to false.
25+
* `onClick` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t`, *default:* `nil`) - Required. The action invoked when a menu option is selected. This `OnClick` cannot contain an `OverflowMenu`, any specified `OverflowMenu` is dropped and the menu item disabled.
26+
* `startIcon` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t`, *default:* `nil`) - The icon displayed in front of the text.
27+
* `text` (*type:* `String.t`, *default:* `nil`) - Required. The text that identifies or describes the item to users.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:disabled => boolean() | nil,
34+
:onClick => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t() | nil,
35+
:startIcon => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t() | nil,
36+
:text => String.t() | nil
37+
}
38+
39+
field(:disabled)
40+
field(:onClick, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick)
41+
field(:startIcon, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon)
42+
field(:text)
43+
end
44+
45+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem do
46+
def decode(value, options) do
47+
GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem.decode(value, options)
48+
end
49+
end
50+
51+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem do
52+
def encode(value, options) do
53+
GoogleApi.Gax.ModelBase.encode(value, options)
54+
end
55+
end

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Section do
2121
2222
## Attributes
2323
24+
* `collapseControl` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl.t`, *default:* `nil`) - Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used. [Google Chat apps](https://developers.google.com/workspace/chat):
2425
* `collapsible` (*type:* `boolean()`, *default:* `nil`) - Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
2526
* `header` (*type:* `String.t`, *default:* `nil`) - Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
2627
* `uncollapsibleWidgetsCount` (*type:* `integer()`, *default:* `nil`) - The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
@@ -30,12 +31,14 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Section do
3031
use GoogleApi.Gax.ModelBase
3132

3233
@type t :: %__MODULE__{
34+
:collapseControl => GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl.t() | nil,
3335
:collapsible => boolean() | nil,
3436
:header => String.t() | nil,
3537
:uncollapsibleWidgetsCount => integer() | nil,
3638
:widgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget.t()) | nil
3739
}
3840

41+
field(:collapseControl, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl)
3942
field(:collapsible)
4043
field(:header)
4144
field(:uncollapsibleWidgetsCount)

0 commit comments

Comments
 (0)