Skip to content

Commit

Permalink
feat: Automated regeneration of Chat client (#12412)
Browse files Browse the repository at this point in the history
Auto-created at 2024-10-26 13:12:17 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Oct 26, 2024
1 parent 1b228a0 commit c1e6e0b
Show file tree
Hide file tree
Showing 14 changed files with 286 additions and 5 deletions.
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.40"}]
[{:google_api_chat, "~> 0.41"}]
end
```

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 "20241008"
@discovery_revision "20241020"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
* `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.
* `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.
* `text` (*type:* `String.t`, *default:* `nil`) - The text displayed inside the button.
* `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):
"""

use GoogleApi.Gax.ModelBase
Expand All @@ -37,7 +38,8 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
:disabled => boolean() | nil,
:icon => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t() | nil,
:onClick => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t() | nil,
:text => String.t() | nil
:text => String.t() | nil,
:type => String.t() | nil
}

field(:altText)
Expand All @@ -46,6 +48,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
field(:icon, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon)
field(:onClick, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick)
field(:text)
field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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.GoogleAppsCardV1Chip do
@moduledoc """
A text, icon, or text and icon chip that users can click. [Google Chat apps](https://developers.google.com/workspace/chat):
## Attributes
* `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".
* `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the chip is in an inactive state and ignores user actions. Defaults to `false`.
* `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.
* `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.
* `label` (*type:* `String.t`, *default:* `nil`) - The text displayed inside the chip.
* `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.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:altText => String.t() | nil,
:disabled => boolean() | nil,
:enabled => boolean() | nil,
:icon => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t() | nil,
:label => String.t() | nil,
:onClick => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t() | nil
}

field(:altText)
field(:disabled)
field(:enabled)
field(:icon, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon)
field(:label)
field(:onClick, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip do
def decode(value, options) do
GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip 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.GoogleAppsCardV1ChipList do
@moduledoc """
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):
## Attributes
* `chips` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip.t)`, *default:* `nil`) - An array of chips.
* `layout` (*type:* `String.t`, *default:* `nil`) - Specified chip list layout.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:chips => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip.t()) | nil,
:layout => String.t() | nil
}

field(:chips, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Chip, type: :list)
field(:layout)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList do
def decode(value, options) do
GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1ChipList 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.GoogleAppsCardV1CollapseControl do
@moduledoc """
Represent an expand and collapse control. [Google Chat apps](https://developers.google.com/workspace/chat):
## Attributes
* `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.
* `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.
* `horizontalAlignment` (*type:* `String.t`, *default:* `nil`) - The horizontal alignment of the expand and collapse button.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:collapseButton => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button.t() | nil,
:expandButton => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button.t() | nil,
:horizontalAlignment => String.t() | nil
}

field(:collapseButton, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button)
field(:expandButton, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Button)
field(:horizontalAlignment)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl do
def decode(value, options) do
GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl 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 @@ -25,6 +25,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick do
* `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):
* `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):
* `openLink` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink.t`, *default:* `nil`) - If specified, this `onClick` triggers an open link action.
* `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):
"""

use GoogleApi.Gax.ModelBase
Expand All @@ -33,13 +34,15 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick do
:action => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t() | nil,
:card => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card.t() | nil,
:openDynamicLinkAction => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t() | nil,
:openLink => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink.t() | nil
:openLink => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink.t() | nil,
:overflowMenu => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu.t() | nil
}

field(:action, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action)
field(:card, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Card)
field(:openDynamicLinkAction, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action)
field(:openLink, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OpenLink)
field(:overflowMenu, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick do
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.GoogleAppsCardV1OverflowMenu do
@moduledoc """
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):
## Attributes
* `items` (*type:* `list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem.t)`, *default:* `nil`) - Required. The list of menu options.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:items => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem.t()) | nil
}

field(:items, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu do
def decode(value, options) do
GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenu 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,55 @@
# 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.GoogleAppsCardV1OverflowMenuItem do
@moduledoc """
An option that users can invoke in an overflow menu. [Google Chat apps](https://developers.google.com/workspace/chat):
## Attributes
* `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the menu option is disabled. Defaults to false.
* `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.
* `startIcon` (*type:* `GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t`, *default:* `nil`) - The icon displayed in front of the text.
* `text` (*type:* `String.t`, *default:* `nil`) - Required. The text that identifies or describes the item to users.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:disabled => boolean() | nil,
:onClick => GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick.t() | nil,
:startIcon => GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon.t() | nil,
:text => String.t() | nil
}

field(:disabled)
field(:onClick, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OnClick)
field(:startIcon, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Icon)
field(:text)
end

defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem do
def decode(value, options) do
GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.GoogleAppsCardV1OverflowMenuItem 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 @@ -21,6 +21,7 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Section do
## Attributes
* `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):
* `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`.
* `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).
* `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`.
Expand All @@ -30,12 +31,14 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1Section do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:collapseControl => GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl.t() | nil,
:collapsible => boolean() | nil,
:header => String.t() | nil,
:uncollapsibleWidgetsCount => integer() | nil,
:widgets => list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1Widget.t()) | nil
}

field(:collapseControl, as: GoogleApi.Chat.V1.Model.GoogleAppsCardV1CollapseControl)
field(:collapsible)
field(:header)
field(:uncollapsibleWidgetsCount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ defmodule GoogleApi.Chat.V1.Model.GoogleAppsCardV1TextParagraph do
## Attributes
* `maxLines` (*type:* `integer()`, *default:* `nil`) - The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored. [Google Chat apps](https://developers.google.com/workspace/chat):
* `text` (*type:* `String.t`, *default:* `nil`) - The text that's shown in the widget.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:maxLines => integer() | nil,
:text => String.t() | nil
}

field(:maxLines)
field(:text)
end

Expand Down
Loading

0 comments on commit c1e6e0b

Please sign in to comment.