Skip to content

Commit 35e16da

Browse files
authored
feat: update googleapis and regenerate (#17725)
1 parent 8ed6b71 commit 35e16da

313 files changed

Lines changed: 116354 additions & 14651 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

librarian.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ version: v0.26.0
1616
repo: googleapis/google-cloud-python
1717
sources:
1818
googleapis:
19-
commit: 99f54e6513f09d8df1707a6c553b0a3c6ef9b5fb
20-
sha256: 7cee15fe1ae76a16aaf70425c4380a3a0fcbfeb4ea8e30c934c43f5cd54b9657
19+
commit: fe04226e3d76435acbfd3ffb51f6771740e1fb5b
20+
sha256: e99c641a9c5525394de43c762b9db50c3ada1f219d6dbdba594ae992fbe1d838
2121
default:
2222
output: packages
2323
tag_format: '{name}-v{version}'

packages/google-apps-chat/google/apps/chat/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
UploadAttachmentRequest,
4444
UploadAttachmentResponse,
4545
)
46+
from google.apps.chat_v1.types.audience import Audience
4647
from google.apps.chat_v1.types.availability import (
4748
Availability,
4849
CustomStatus,
@@ -199,6 +200,7 @@
199200
"GetAttachmentRequest",
200201
"UploadAttachmentRequest",
201202
"UploadAttachmentResponse",
203+
"Audience",
202204
"Availability",
203205
"CustomStatus",
204206
"DoNotDisturbMetadata",

packages/google-apps-chat/google/apps/chat_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
UploadAttachmentRequest,
4646
UploadAttachmentResponse,
4747
)
48+
from .types.audience import Audience
4849
from .types.availability import (
4950
Availability,
5051
CustomStatus,
@@ -271,6 +272,7 @@ def _get_version(dependency_name):
271272
"AttachedGif",
272273
"Attachment",
273274
"AttachmentDataRef",
275+
"Audience",
274276
"Availability",
275277
"CalendarEventLinkData",
276278
"CardWithId",

packages/google-apps-chat/google/apps/chat_v1/services/chat_service/async_client.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,6 +2535,27 @@ async def sample_update_space():
25352535
``access_settings.audience`` is not supported with
25362536
``useAdminAccess``.
25372537
2538+
``access_settings.access_permission_settings``: Updates
2539+
the `access permission
2540+
settings <https://support.google.com/chat/answer/11971020>`__
2541+
of who can discover and join the space where
2542+
``spaceType`` field is ``SPACE``. Principals allowed to
2543+
join the space must also be allowed to discover it. To
2544+
update access permission settings for a space, the
2545+
authenticating user must be a space manager or assistant
2546+
manager and omit all other field masks in the request.
2547+
You can't update this field if the space is in `import
2548+
mode <https://developers.google.com/workspace/chat/import-data-overview>`__.
2549+
To learn more, see `Make a space discoverable to
2550+
specific
2551+
users <https://developers.google.com/workspace/chat/space-target-audience>`__.
2552+
``access_settings.access_permission_settings`` is not
2553+
supported with ``useAdminAccess``. The supported field
2554+
masks include:
2555+
2556+
- ``access_settings.access_permission_settings.discoverSpaceSetting``
2557+
- ``access_settings.access_permission_settings.joinSpaceSetting``
2558+
25382559
``permission_settings``: Supports changing the
25392560
`permission
25402561
settings <https://support.google.com/chat/answer/13340792>`__

packages/google-apps-chat/google/apps/chat_v1/services/chat_service/client.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3161,6 +3161,27 @@ def sample_update_space():
31613161
``access_settings.audience`` is not supported with
31623162
``useAdminAccess``.
31633163
3164+
``access_settings.access_permission_settings``: Updates
3165+
the `access permission
3166+
settings <https://support.google.com/chat/answer/11971020>`__
3167+
of who can discover and join the space where
3168+
``spaceType`` field is ``SPACE``. Principals allowed to
3169+
join the space must also be allowed to discover it. To
3170+
update access permission settings for a space, the
3171+
authenticating user must be a space manager or assistant
3172+
manager and omit all other field masks in the request.
3173+
You can't update this field if the space is in `import
3174+
mode <https://developers.google.com/workspace/chat/import-data-overview>`__.
3175+
To learn more, see `Make a space discoverable to
3176+
specific
3177+
users <https://developers.google.com/workspace/chat/space-target-audience>`__.
3178+
``access_settings.access_permission_settings`` is not
3179+
supported with ``useAdminAccess``. The supported field
3180+
masks include:
3181+
3182+
- ``access_settings.access_permission_settings.discoverSpaceSetting``
3183+
- ``access_settings.access_permission_settings.joinSpaceSetting``
3184+
31643185
``permission_settings``: Supports changing the
31653186
`permission
31663187
settings <https://support.google.com/chat/answer/13340792>`__

packages/google-apps-chat/google/apps/chat_v1/types/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
UploadAttachmentRequest,
3737
UploadAttachmentResponse,
3838
)
39+
from .audience import (
40+
Audience,
41+
)
3942
from .availability import (
4043
Availability,
4144
CustomStatus,
@@ -208,6 +211,7 @@
208211
"GetAttachmentRequest",
209212
"UploadAttachmentRequest",
210213
"UploadAttachmentResponse",
214+
"Audience",
211215
"Availability",
212216
"CustomStatus",
213217
"DoNotDisturbMetadata",
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from __future__ import annotations
17+
18+
from typing import MutableMapping, MutableSequence
19+
20+
import proto # type: ignore
21+
22+
__protobuf__ = proto.module(
23+
package="google.chat.v1",
24+
manifest={
25+
"Audience",
26+
},
27+
)
28+
29+
30+
class Audience(proto.Message):
31+
r"""A target audience in Google Chat. A target audience represents a
32+
group of users within a Google Workspace organization, defined by an
33+
administrator. Target audiences are used to configure access and
34+
visibility settings for resources, such as making a space
35+
discoverable to a specific group of users.
36+
37+
For more details, see `Target
38+
audiences <https://support.google.com/a/answer/9934697>`__ and `Make
39+
a space discoverable to a target
40+
audience <https://developers.google.com/workspace/chat/space-target-audience>`__.
41+
42+
Attributes:
43+
name (str):
44+
The resource name of the `target
45+
audience <https://support.google.com/a/answer/9934697>`__
46+
who can discover or join the space. For details, see `Make a
47+
space discoverable to a target
48+
audience <https://developers.google.com/workspace/chat/space-target-audience>`__.
49+
Format: ``audiences/{audience}``
50+
51+
To use the default target audience for the Google Workspace
52+
organization, set to ``audiences/default``.
53+
"""
54+
55+
name: str = proto.Field(
56+
proto.STRING,
57+
number=1,
58+
)
59+
60+
61+
__all__ = tuple(sorted(__protobuf__.manifest))

packages/google-apps-chat/google/apps/chat_v1/types/space.py

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
2222
import proto # type: ignore
2323

24+
from google.apps.chat_v1.types import audience as gc_audience
2425
from google.apps.chat_v1.types import history_state
2526

2627
__protobuf__ = proto.module(
@@ -428,6 +429,11 @@ class AccessSettings(proto.Message):
428429
429430
Setting the target audience requires `user
430431
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__.
432+
access_permission_settings (google.apps.chat_v1.types.Space.AccessPermissionSettings):
433+
Optional. Access permission settings for the space.
434+
435+
To set the target audience when creating a space, specify
436+
the ``accessSettings.audience`` field in your request.
431437
"""
432438

433439
class AccessState(proto.Enum):
@@ -467,6 +473,68 @@ class AccessState(proto.Enum):
467473
proto.STRING,
468474
number=3,
469475
)
476+
access_permission_settings: "Space.AccessPermissionSettings" = proto.Field(
477+
proto.MESSAGE,
478+
number=5,
479+
message="Space.AccessPermissionSettings",
480+
)
481+
482+
class AccessPermissionSettings(proto.Message):
483+
r"""Access permission settings for a space.
484+
485+
Attributes:
486+
discover_space_setting (google.apps.chat_v1.types.Space.AccessPermissionSetting):
487+
Optional. Access permission setting for
488+
discovering the space.
489+
join_space_setting (google.apps.chat_v1.types.Space.AccessPermissionSetting):
490+
Optional. Access permission setting for
491+
joining the space.
492+
"""
493+
494+
discover_space_setting: "Space.AccessPermissionSetting" = proto.Field(
495+
proto.MESSAGE,
496+
number=1,
497+
message="Space.AccessPermissionSetting",
498+
)
499+
join_space_setting: "Space.AccessPermissionSetting" = proto.Field(
500+
proto.MESSAGE,
501+
number=2,
502+
message="Space.AccessPermissionSetting",
503+
)
504+
505+
class AccessPermissionSetting(proto.Message):
506+
r"""An access permission setting.
507+
508+
Attributes:
509+
principals (MutableSequence[google.apps.chat_v1.types.Space.Principal]):
510+
Optional. Unordered list. Allowed principals
511+
for this permission.
512+
"""
513+
514+
principals: MutableSequence["Space.Principal"] = proto.RepeatedField(
515+
proto.MESSAGE,
516+
number=1,
517+
message="Space.Principal",
518+
)
519+
520+
class Principal(proto.Message):
521+
r"""A principal representing an entity granted access.
522+
523+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
524+
525+
Attributes:
526+
audience (google.apps.chat_v1.types.Audience):
527+
An audience.
528+
529+
This field is a member of `oneof`_ ``principal_type``.
530+
"""
531+
532+
audience: gc_audience.Audience = proto.Field(
533+
proto.MESSAGE,
534+
number=1,
535+
oneof="principal_type",
536+
message=gc_audience.Audience,
537+
)
470538

471539
class PermissionSettings(proto.Message):
472540
r"""`Permission
@@ -1059,6 +1127,26 @@ class UpdateSpaceRequest(proto.Message):
10591127
``access_settings.audience`` is not supported with
10601128
``useAdminAccess``.
10611129
1130+
``access_settings.access_permission_settings``: Updates the
1131+
`access permission
1132+
settings <https://support.google.com/chat/answer/11971020>`__
1133+
of who can discover and join the space where ``spaceType``
1134+
field is ``SPACE``. Principals allowed to join the space
1135+
must also be allowed to discover it. To update access
1136+
permission settings for a space, the authenticating user
1137+
must be a space manager or assistant manager and omit all
1138+
other field masks in the request. You can't update this
1139+
field if the space is in `import
1140+
mode <https://developers.google.com/workspace/chat/import-data-overview>`__.
1141+
To learn more, see `Make a space discoverable to specific
1142+
users <https://developers.google.com/workspace/chat/space-target-audience>`__.
1143+
``access_settings.access_permission_settings`` is not
1144+
supported with ``useAdminAccess``. The supported field masks
1145+
include:
1146+
1147+
- ``access_settings.access_permission_settings.discoverSpaceSetting``
1148+
- ``access_settings.access_permission_settings.joinSpaceSetting``
1149+
10621150
``permission_settings``: Supports changing the `permission
10631151
settings <https://support.google.com/chat/answer/13340792>`__
10641152
of a space. When updating permission settings, you can only

packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
action_status,
7070
annotation,
7171
attachment,
72+
audience,
7273
availability,
7374
contextual_addon,
7475
deletion_metadata,
@@ -29848,7 +29849,16 @@ def test_create_message_rest_call_success(request_type):
2984829849
"joined_direct_human_user_count": 3185,
2984929850
"joined_group_count": 1933,
2985029851
},
29851-
"access_settings": {"access_state": 1, "audience": "audience_value"},
29852+
"access_settings": {
29853+
"access_state": 1,
29854+
"audience": "audience_value",
29855+
"access_permission_settings": {
29856+
"discover_space_setting": {
29857+
"principals": [{"audience": {"name": "name_value"}}]
29858+
},
29859+
"join_space_setting": {},
29860+
},
29861+
},
2985229862
"customer": "customer_value",
2985329863
"space_uri": "space_uri_value",
2985429864
"predefined_permission_settings": 1,
@@ -31071,7 +31081,16 @@ def test_update_message_rest_call_success(request_type):
3107131081
"joined_direct_human_user_count": 3185,
3107231082
"joined_group_count": 1933,
3107331083
},
31074-
"access_settings": {"access_state": 1, "audience": "audience_value"},
31084+
"access_settings": {
31085+
"access_state": 1,
31086+
"audience": "audience_value",
31087+
"access_permission_settings": {
31088+
"discover_space_setting": {
31089+
"principals": [{"audience": {"name": "name_value"}}]
31090+
},
31091+
"join_space_setting": {},
31092+
},
31093+
},
3107531094
"customer": "customer_value",
3107631095
"space_uri": "space_uri_value",
3107731096
"predefined_permission_settings": 1,
@@ -32168,7 +32187,16 @@ def test_create_space_rest_call_success(request_type):
3216832187
"joined_direct_human_user_count": 3185,
3216932188
"joined_group_count": 1933,
3217032189
},
32171-
"access_settings": {"access_state": 1, "audience": "audience_value"},
32190+
"access_settings": {
32191+
"access_state": 1,
32192+
"audience": "audience_value",
32193+
"access_permission_settings": {
32194+
"discover_space_setting": {
32195+
"principals": [{"audience": {"name": "name_value"}}]
32196+
},
32197+
"join_space_setting": {},
32198+
},
32199+
},
3217232200
"customer": "customer_value",
3217332201
"space_uri": "space_uri_value",
3217432202
"predefined_permission_settings": 1,
@@ -32585,7 +32613,16 @@ def test_update_space_rest_call_success(request_type):
3258532613
"joined_direct_human_user_count": 3185,
3258632614
"joined_group_count": 1933,
3258732615
},
32588-
"access_settings": {"access_state": 1, "audience": "audience_value"},
32616+
"access_settings": {
32617+
"access_state": 1,
32618+
"audience": "audience_value",
32619+
"access_permission_settings": {
32620+
"discover_space_setting": {
32621+
"principals": [{"audience": {"name": "name_value"}}]
32622+
},
32623+
"join_space_setting": {},
32624+
},
32625+
},
3258932626
"customer": "customer_value",
3259032627
"space_uri": "space_uri_value",
3259132628
"predefined_permission_settings": 1,

0 commit comments

Comments
 (0)