Skip to content

Commit e39c8f2

Browse files
feat: Automated regeneration of Chat client (googleapis#12251)
Auto-created at 2024-10-02 13:10:58 +0000 using the toys pull request generator.
1 parent 6d169d4 commit e39c8f2

File tree

7 files changed

+126
-4
lines changed

7 files changed

+126
-4
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.39"}]
14+
[{:google_api_chat, "~> 0.40"}]
1515
end
1616
```
1717

clients/chat/lib/google_api/chat/v1/api/spaces.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ defmodule GoogleApi.Chat.V1.Api.Spaces do
413413
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
414414
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
415415
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
416-
* `:updateMask` (*type:* `String.t`) - Required. The updated field paths, comma separated if there are multiple. You can update the following fields for a space: - `space_details` - `display_name`: Only supports updating the display name for spaces where `spaceType` field is `SPACE`. If you receive the error message `ALREADY_EXISTS`, try a different value. An existing space within the Google Workspace organization might already use this display name. - `space_type`: Only supports changing a `GROUP_CHAT` space type to `SPACE`. Include `display_name` together with `space_type` in the update mask and ensure that the specified space has a non-empty display name and the `SPACE` space type. Including the `space_type` mask and the `SPACE` type in the specified space when updating the display name is optional if the existing space already has the `SPACE` type. Trying to update the space type in other ways results in an invalid argument error. `space_type` is not supported with admin access. - `space_history_state`: Updates [space history settings](https://support.google.com/chat/answer/7664687) by turning history on or off for the space. Only supported if history settings are enabled for the Google Workspace organization. To update the space history state, you must omit all other field masks in your request. `space_history_state` is not supported with admin access. - `access_settings.audience`: Updates the [access setting](https://support.google.com/chat/answer/11971020) of who can discover the space, join the space, and preview the messages in named space where `spaceType` field is `SPACE`. If the existing space has a target audience, you can remove the audience and restrict space access by omitting a value for this field mask. To update access settings for a space, the authenticating user must be a space manager and omit all other field masks in your request. You can't update this field if the space is in [import mode](https://developers.google.com/workspace/chat/import-data-overview). To learn more, see [Make a space discoverable to specific users](https://developers.google.com/workspace/chat/space-target-audience). `access_settings.audience` is not supported with admin access. - Developer Preview: Supports changing the [permission settings](https://support.google.com/chat/answer/13340792) of a space, supported field paths include: `permission_settings.manage_members_and_groups`, `permission_settings.modify_space_details`, `permission_settings.toggle_history`, `permission_settings.use_at_mention_all`, `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, `permission_settings.reply_messages` (Warning: mutually exclusive with all other non-permission settings field paths). `permission_settings` is not supported with admin access.
416+
* `:updateMask` (*type:* `String.t`) - - Supports changing the [permission settings](https://support.google.com/chat/answer/13340792) of a space, supported field paths include: `permission_settings.manage_members_and_groups`, `permission_settings.modify_space_details`, `permission_settings.toggle_history`, `permission_settings.use_at_mention_all`, `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, `permission_settings.reply_messages` (Warning: mutually exclusive with all other non-permission settings field paths). `permission_settings` is not supported with admin access.
417417
* `:useAdminAccess` (*type:* `boolean()`) - When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Some `FieldMask` values are not supported using admin access. For details, see the description of `update_mask`.
418418
* `:body` (*type:* `GoogleApi.Chat.V1.Model.Space.t`) -
419419
* `opts` (*type:* `keyword()`) - Call options

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 "20240919"
23+
@discovery_revision "20240926"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
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.PermissionSetting do
19+
@moduledoc """
20+
Represents a space permission setting.
21+
22+
## Attributes
23+
24+
* `managersAllowed` (*type:* `boolean()`, *default:* `nil`) - Whether spaces managers have this permission.
25+
* `membersAllowed` (*type:* `boolean()`, *default:* `nil`) - Whether non-manager members have this permission.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:managersAllowed => boolean() | nil,
32+
:membersAllowed => boolean() | nil
33+
}
34+
35+
field(:managersAllowed)
36+
field(:membersAllowed)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.PermissionSetting do
40+
def decode(value, options) do
41+
GoogleApi.Chat.V1.Model.PermissionSetting.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.PermissionSetting do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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.PermissionSettings do
19+
@moduledoc """
20+
[Permission settings](https://support.google.com/chat/answer/13340792) for a named space. To set permission settings when creating a space, specify the `PredefinedPermissionSettings` field in your request.
21+
22+
## Attributes
23+
24+
* `manageApps` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Setting for managing apps in a space.
25+
* `manageMembersAndGroups` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Setting for managing members and groups in a space.
26+
* `manageWebhooks` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Setting for managing webhooks in a space.
27+
* `modifySpaceDetails` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Setting for updating space name, avatar, description and guidelines.
28+
* `postMessages` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Output only. Setting for posting messages in a space.
29+
* `replyMessages` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Setting for replying to messages in a space.
30+
* `toggleHistory` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Setting for toggling space history on and off.
31+
* `useAtMentionAll` (*type:* `GoogleApi.Chat.V1.Model.PermissionSetting.t`, *default:* `nil`) - Setting for using @all in a space.
32+
"""
33+
34+
use GoogleApi.Gax.ModelBase
35+
36+
@type t :: %__MODULE__{
37+
:manageApps => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
38+
:manageMembersAndGroups => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
39+
:manageWebhooks => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
40+
:modifySpaceDetails => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
41+
:postMessages => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
42+
:replyMessages => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
43+
:toggleHistory => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil,
44+
:useAtMentionAll => GoogleApi.Chat.V1.Model.PermissionSetting.t() | nil
45+
}
46+
47+
field(:manageApps, as: GoogleApi.Chat.V1.Model.PermissionSetting)
48+
field(:manageMembersAndGroups, as: GoogleApi.Chat.V1.Model.PermissionSetting)
49+
field(:manageWebhooks, as: GoogleApi.Chat.V1.Model.PermissionSetting)
50+
field(:modifySpaceDetails, as: GoogleApi.Chat.V1.Model.PermissionSetting)
51+
field(:postMessages, as: GoogleApi.Chat.V1.Model.PermissionSetting)
52+
field(:replyMessages, as: GoogleApi.Chat.V1.Model.PermissionSetting)
53+
field(:toggleHistory, as: GoogleApi.Chat.V1.Model.PermissionSetting)
54+
field(:useAtMentionAll, as: GoogleApi.Chat.V1.Model.PermissionSetting)
55+
end
56+
57+
defimpl Poison.Decoder, for: GoogleApi.Chat.V1.Model.PermissionSettings do
58+
def decode(value, options) do
59+
GoogleApi.Chat.V1.Model.PermissionSettings.decode(value, options)
60+
end
61+
end
62+
63+
defimpl Poison.Encoder, for: GoogleApi.Chat.V1.Model.PermissionSettings do
64+
def encode(value, options) do
65+
GoogleApi.Gax.ModelBase.encode(value, options)
66+
end
67+
end

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ defmodule GoogleApi.Chat.V1.Model.Space do
3030
* `lastActiveTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the last message in the space.
3131
* `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`.
3232
* `name` (*type:* `String.t`, *default:* `nil`) - 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`.
33+
* `permissionSettings` (*type:* `GoogleApi.Chat.V1.Model.PermissionSettings.t`, *default:* `nil`) - Optional. Exact permission settings which can be set to update the space. Input for updating a space. Otherwise, output only. For space creation, use `predefined_permission_settings` instead.
34+
* `predefinedPermissionSettings` (*type:* `String.t`, *default:* `nil`) - Optional. Input only. Space permission settings. Input for creating a space, a collaboration space is created if this field is not set. After you create the space, settings are populated in the `PermissionSettings` field.
3335
* `singleUserBotDm` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the space is a DM between a Chat app and a single human.
3436
* `spaceDetails` (*type:* `GoogleApi.Chat.V1.Model.SpaceDetails.t`, *default:* `nil`) - Details about the space including description and rules.
3537
* `spaceHistoryState` (*type:* `String.t`, *default:* `nil`) - The message history state for messages and threads in this space.
@@ -52,6 +54,8 @@ defmodule GoogleApi.Chat.V1.Model.Space do
5254
:lastActiveTime => DateTime.t() | nil,
5355
:membershipCount => GoogleApi.Chat.V1.Model.MembershipCount.t() | nil,
5456
:name => String.t() | nil,
57+
:permissionSettings => GoogleApi.Chat.V1.Model.PermissionSettings.t() | nil,
58+
:predefinedPermissionSettings => String.t() | nil,
5559
:singleUserBotDm => boolean() | nil,
5660
:spaceDetails => GoogleApi.Chat.V1.Model.SpaceDetails.t() | nil,
5761
:spaceHistoryState => String.t() | nil,
@@ -71,6 +75,8 @@ defmodule GoogleApi.Chat.V1.Model.Space do
7175
field(:lastActiveTime, as: DateTime)
7276
field(:membershipCount, as: GoogleApi.Chat.V1.Model.MembershipCount)
7377
field(:name)
78+
field(:permissionSettings, as: GoogleApi.Chat.V1.Model.PermissionSettings)
79+
field(:predefinedPermissionSettings)
7480
field(:singleUserBotDm)
7581
field(:spaceDetails, as: GoogleApi.Chat.V1.Model.SpaceDetails)
7682
field(:spaceHistoryState)

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.39.2"
21+
@version "0.40.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)