Skip to content

Commit 2cc9ac9

Browse files
committed
feat: update API sources and regenerate
1 parent b6bb63e commit 2cc9ac9

94 files changed

Lines changed: 12565 additions & 827 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.13.0
1616
repo: googleapis/google-cloud-python
1717
sources:
1818
googleapis:
19-
commit: 392c8aa259daf4570073220faa9e842cf1e2e173
20-
sha256: 2b3be6d9749cdf2a337f2c76aa08857096671ebd4b17007d09ee3752b7b10fe9
19+
commit: 84009fb6ad8975910a5cb62d32e7f35e48c9da02
20+
sha256: b82e61ef9bc042fe02c9c9113a53d207331dc7cd8c10cc0d4f4cbeb7e65f1577
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
@@ -82,6 +82,7 @@
8282
ActionResponse,
8383
AttachedGif,
8484
CardWithId,
85+
CreateMessageNotificationOptions,
8586
CreateMessageRequest,
8687
DeleteMessageRequest,
8788
Dialog,
@@ -222,6 +223,7 @@
222223
"ActionResponse",
223224
"AttachedGif",
224225
"CardWithId",
226+
"CreateMessageNotificationOptions",
225227
"CreateMessageRequest",
226228
"DeleteMessageRequest",
227229
"Dialog",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
ActionResponse,
8585
AttachedGif,
8686
CardWithId,
87+
CreateMessageNotificationOptions,
8788
CreateMessageRequest,
8889
DeleteMessageRequest,
8990
Dialog,
@@ -269,6 +270,7 @@ def _get_version(dependency_name):
269270
"ContextualAddOnMarkup",
270271
"CreateCustomEmojiRequest",
271272
"CreateMembershipRequest",
273+
"CreateMessageNotificationOptions",
272274
"CreateMessageRequest",
273275
"CreateReactionRequest",
274276
"CreateSectionRequest",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
ActionResponse,
8686
AttachedGif,
8787
CardWithId,
88+
CreateMessageNotificationOptions,
8889
CreateMessageRequest,
8990
DeleteMessageRequest,
9091
Dialog,
@@ -231,6 +232,7 @@
231232
"ActionResponse",
232233
"AttachedGif",
233234
"CardWithId",
235+
"CreateMessageNotificationOptions",
234236
"CreateMessageRequest",
235237
"DeleteMessageRequest",
236238
"Dialog",

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

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"DeleteMessageRequest",
4646
"UpdateMessageRequest",
4747
"CreateMessageRequest",
48+
"CreateMessageNotificationOptions",
4849
"ListMessagesRequest",
4950
"ListMessagesResponse",
5051
"DialogAction",
@@ -205,6 +206,10 @@ class Message(proto.Message):
205206
206207
If the space doesn't support reply in threads, this field is
207208
always ``false``.
209+
silent (bool):
210+
Output only. Whether this is a silent
211+
message. Silent messages are messages where Chat
212+
suppresses push notifications for recipients.
208213
client_assigned_message_id (str):
209214
Optional. A custom ID for the message. You can use field to
210215
identify a message, or to get, delete, or update a message.
@@ -352,6 +357,10 @@ class Message(proto.Message):
352357
proto.BOOL,
353358
number=25,
354359
)
360+
silent: bool = proto.Field(
361+
proto.BOOL,
362+
number=46,
363+
)
355364
client_assigned_message_id: str = proto.Field(
356365
proto.STRING,
357366
number=32,
@@ -911,6 +920,11 @@ class CreateMessageRequest(proto.Message):
911920
912921
For details, see `Name a
913922
message <https://developers.google.com/workspace/chat/create-messages#name_a_created_message>`__.
923+
create_message_notification_options (google.apps.chat_v1.types.CreateMessageNotificationOptions):
924+
Optional. Controls the notification behavior when the
925+
message is posted. To learn more, see `Force notifications
926+
or send silent
927+
messages <https://developer.google.com/workspace/chat/create-messages#force-notify-silent>`__.
914928
"""
915929

916930
class MessageReplyOption(proto.Enum):
@@ -967,6 +981,61 @@ class MessageReplyOption(proto.Enum):
967981
proto.STRING,
968982
number=9,
969983
)
984+
create_message_notification_options: "CreateMessageNotificationOptions" = (
985+
proto.Field(
986+
proto.MESSAGE,
987+
number=10,
988+
message="CreateMessageNotificationOptions",
989+
)
990+
)
991+
992+
993+
class CreateMessageNotificationOptions(proto.Message):
994+
r"""Options for the notification behavior when the message is
995+
posted.
996+
997+
Attributes:
998+
notification_type (google.apps.chat_v1.types.CreateMessageNotificationOptions.NotificationType):
999+
The notification type for the message.
1000+
"""
1001+
1002+
class NotificationType(proto.Enum):
1003+
r"""The notification types options for the message.
1004+
1005+
Values:
1006+
NOTIFICATION_TYPE_NONE (0):
1007+
Default behavior. Notification behavior is
1008+
similar to when the human user sends the message
1009+
using the Chat UI: no notification is sent to
1010+
the human sender.
1011+
NOTIFICATION_TYPE_FORCE_NOTIFY (2):
1012+
Force notify recipients. This bypasses users' space
1013+
notification settings and `Chat Do Not Disturb
1014+
settings <https://support.google.com/chat/answer/9093489>`__.
1015+
This option does not bypass device-level Do Not Disturb
1016+
settings.
1017+
1018+
Requires [app authentication]
1019+
(https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
1020+
NOTIFICATION_TYPE_SILENT (3):
1021+
Silence the notification as if the recipients have `Chat Do
1022+
Not
1023+
Disturb <https://support.google.com/chat/answer/9093489>`__
1024+
enabled or have muted the space.
1025+
1026+
Requires [app authentication]
1027+
(https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
1028+
"""
1029+
1030+
NOTIFICATION_TYPE_NONE = 0
1031+
NOTIFICATION_TYPE_FORCE_NOTIFY = 2
1032+
NOTIFICATION_TYPE_SILENT = 3
1033+
1034+
notification_type: NotificationType = proto.Field(
1035+
proto.ENUM,
1036+
number=1,
1037+
enum=NotificationType,
1038+
)
9701039

9711040

9721041
class ListMessagesRequest(proto.Message):

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ def test_create_message(request_type, transport: str = "grpc"):
13691369
fallback_text="fallback_text_value",
13701370
argument_text="argument_text_value",
13711371
thread_reply=True,
1372+
silent=True,
13721373
client_assigned_message_id="client_assigned_message_id_value",
13731374
)
13741375
response = client.create_message(request)
@@ -1387,6 +1388,7 @@ def test_create_message(request_type, transport: str = "grpc"):
13871388
assert response.fallback_text == "fallback_text_value"
13881389
assert response.argument_text == "argument_text_value"
13891390
assert response.thread_reply is True
1391+
assert response.silent is True
13901392
assert response.client_assigned_message_id == "client_assigned_message_id_value"
13911393

13921394

@@ -1525,6 +1527,7 @@ async def test_create_message_async(
15251527
fallback_text="fallback_text_value",
15261528
argument_text="argument_text_value",
15271529
thread_reply=True,
1530+
silent=True,
15281531
client_assigned_message_id="client_assigned_message_id_value",
15291532
)
15301533
)
@@ -1544,6 +1547,7 @@ async def test_create_message_async(
15441547
assert response.fallback_text == "fallback_text_value"
15451548
assert response.argument_text == "argument_text_value"
15461549
assert response.thread_reply is True
1550+
assert response.silent is True
15471551
assert response.client_assigned_message_id == "client_assigned_message_id_value"
15481552

15491553

@@ -3107,6 +3111,7 @@ def test_get_message(request_type, transport: str = "grpc"):
31073111
fallback_text="fallback_text_value",
31083112
argument_text="argument_text_value",
31093113
thread_reply=True,
3114+
silent=True,
31103115
client_assigned_message_id="client_assigned_message_id_value",
31113116
)
31123117
response = client.get_message(request)
@@ -3125,6 +3130,7 @@ def test_get_message(request_type, transport: str = "grpc"):
31253130
assert response.fallback_text == "fallback_text_value"
31263131
assert response.argument_text == "argument_text_value"
31273132
assert response.thread_reply is True
3133+
assert response.silent is True
31283134
assert response.client_assigned_message_id == "client_assigned_message_id_value"
31293135

31303136

@@ -3257,6 +3263,7 @@ async def test_get_message_async(
32573263
fallback_text="fallback_text_value",
32583264
argument_text="argument_text_value",
32593265
thread_reply=True,
3266+
silent=True,
32603267
client_assigned_message_id="client_assigned_message_id_value",
32613268
)
32623269
)
@@ -3276,6 +3283,7 @@ async def test_get_message_async(
32763283
assert response.fallback_text == "fallback_text_value"
32773284
assert response.argument_text == "argument_text_value"
32783285
assert response.thread_reply is True
3286+
assert response.silent is True
32793287
assert response.client_assigned_message_id == "client_assigned_message_id_value"
32803288

32813289

@@ -3450,6 +3458,7 @@ def test_update_message(request_type, transport: str = "grpc"):
34503458
fallback_text="fallback_text_value",
34513459
argument_text="argument_text_value",
34523460
thread_reply=True,
3461+
silent=True,
34533462
client_assigned_message_id="client_assigned_message_id_value",
34543463
)
34553464
response = client.update_message(request)
@@ -3468,6 +3477,7 @@ def test_update_message(request_type, transport: str = "grpc"):
34683477
assert response.fallback_text == "fallback_text_value"
34693478
assert response.argument_text == "argument_text_value"
34703479
assert response.thread_reply is True
3480+
assert response.silent is True
34713481
assert response.client_assigned_message_id == "client_assigned_message_id_value"
34723482

34733483

@@ -3596,6 +3606,7 @@ async def test_update_message_async(
35963606
fallback_text="fallback_text_value",
35973607
argument_text="argument_text_value",
35983608
thread_reply=True,
3609+
silent=True,
35993610
client_assigned_message_id="client_assigned_message_id_value",
36003611
)
36013612
)
@@ -3615,6 +3626,7 @@ async def test_update_message_async(
36153626
assert response.fallback_text == "fallback_text_value"
36163627
assert response.argument_text == "argument_text_value"
36173628
assert response.thread_reply is True
3629+
assert response.silent is True
36183630
assert response.client_assigned_message_id == "client_assigned_message_id_value"
36193631

36203632

@@ -16805,6 +16817,7 @@ def test_create_message_rest_required_fields(
1680516817
# Check that path parameters and body parameters are not mixing in.
1680616818
assert not set(unset_fields) - set(
1680716819
(
16820+
"create_message_notification_options",
1680816821
"message_id",
1680916822
"message_reply_option",
1681016823
"request_id",
@@ -16869,6 +16882,7 @@ def test_create_message_rest_unset_required_fields():
1686916882
assert set(unset_fields) == (
1687016883
set(
1687116884
(
16885+
"createMessageNotificationOptions",
1687216886
"messageId",
1687316887
"messageReplyOption",
1687416888
"requestId",
@@ -25650,6 +25664,7 @@ async def test_create_message_empty_call_grpc_asyncio():
2565025664
fallback_text="fallback_text_value",
2565125665
argument_text="argument_text_value",
2565225666
thread_reply=True,
25667+
silent=True,
2565325668
client_assigned_message_id="client_assigned_message_id_value",
2565425669
)
2565525670
)
@@ -25766,6 +25781,7 @@ async def test_get_message_empty_call_grpc_asyncio():
2576625781
fallback_text="fallback_text_value",
2576725782
argument_text="argument_text_value",
2576825783
thread_reply=True,
25784+
silent=True,
2576925785
client_assigned_message_id="client_assigned_message_id_value",
2577025786
)
2577125787
)
@@ -25799,6 +25815,7 @@ async def test_update_message_empty_call_grpc_asyncio():
2579925815
fallback_text="fallback_text_value",
2580025816
argument_text="argument_text_value",
2580125817
thread_reply=True,
25818+
silent=True,
2580225819
client_assigned_message_id="client_assigned_message_id_value",
2580325820
)
2580425821
)
@@ -27406,6 +27423,7 @@ def test_create_message_rest_call_success(request_type):
2740627423
],
2740727424
"matched_url": {"url": "url_value"},
2740827425
"thread_reply": True,
27426+
"silent": True,
2740927427
"client_assigned_message_id": "client_assigned_message_id_value",
2741027428
"emoji_reaction_summaries": [
2741127429
{
@@ -27513,6 +27531,7 @@ def get_message_fields(field):
2751327531
fallback_text="fallback_text_value",
2751427532
argument_text="argument_text_value",
2751527533
thread_reply=True,
27534+
silent=True,
2751627535
client_assigned_message_id="client_assigned_message_id_value",
2751727536
)
2751827537

@@ -27536,6 +27555,7 @@ def get_message_fields(field):
2753627555
assert response.fallback_text == "fallback_text_value"
2753727556
assert response.argument_text == "argument_text_value"
2753827557
assert response.thread_reply is True
27558+
assert response.silent is True
2753927559
assert response.client_assigned_message_id == "client_assigned_message_id_value"
2754027560

2754127561

@@ -28045,6 +28065,7 @@ def test_get_message_rest_call_success(request_type):
2804528065
fallback_text="fallback_text_value",
2804628066
argument_text="argument_text_value",
2804728067
thread_reply=True,
28068+
silent=True,
2804828069
client_assigned_message_id="client_assigned_message_id_value",
2804928070
)
2805028071

@@ -28068,6 +28089,7 @@ def test_get_message_rest_call_success(request_type):
2806828089
assert response.fallback_text == "fallback_text_value"
2806928090
assert response.argument_text == "argument_text_value"
2807028091
assert response.thread_reply is True
28092+
assert response.silent is True
2807128093
assert response.client_assigned_message_id == "client_assigned_message_id_value"
2807228094

2807328095

@@ -28624,6 +28646,7 @@ def test_update_message_rest_call_success(request_type):
2862428646
],
2862528647
"matched_url": {"url": "url_value"},
2862628648
"thread_reply": True,
28649+
"silent": True,
2862728650
"client_assigned_message_id": "client_assigned_message_id_value",
2862828651
"emoji_reaction_summaries": [
2862928652
{
@@ -28731,6 +28754,7 @@ def get_message_fields(field):
2873128754
fallback_text="fallback_text_value",
2873228755
argument_text="argument_text_value",
2873328756
thread_reply=True,
28757+
silent=True,
2873428758
client_assigned_message_id="client_assigned_message_id_value",
2873528759
)
2873628760

@@ -28754,6 +28778,7 @@ def get_message_fields(field):
2875428778
assert response.fallback_text == "fallback_text_value"
2875528779
assert response.argument_text == "argument_text_value"
2875628780
assert response.thread_reply is True
28781+
assert response.silent is True
2875728782
assert response.client_assigned_message_id == "client_assigned_message_id_value"
2875828783

2875928784

0 commit comments

Comments
 (0)