google-cloud-pubsub 2.28.0__tar.gz → 2.29.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. {google_cloud_pubsub-2.28.0/google_cloud_pubsub.egg-info → google_cloud_pubsub-2.29.0}/PKG-INFO +9 -9
  2. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub/__init__.py +1 -1
  3. {google_cloud_pubsub-2.28.0/google/pubsub_v1 → google_cloud_pubsub-2.29.0/google/pubsub}/gapic_version.py +1 -1
  4. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/__init__.py +1 -1
  5. {google_cloud_pubsub-2.28.0/google/pubsub → google_cloud_pubsub-2.29.0/google/pubsub_v1}/gapic_version.py +1 -1
  6. {google_cloud_pubsub-2.28.0/tests → google_cloud_pubsub-2.29.0/google/pubsub_v1/services}/__init__.py +1 -1
  7. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/__init__.py +1 -1
  8. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/async_client.py +137 -56
  9. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/client.py +201 -87
  10. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/pagers.py +31 -19
  11. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/transports/__init__.py +1 -1
  12. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/transports/base.py +1 -1
  13. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/transports/grpc.py +103 -17
  14. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/transports/grpc_asyncio.py +177 -92
  15. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/transports/rest.py +931 -80
  16. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/publisher/transports/rest_base.py +1 -3
  17. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/__init__.py +1 -1
  18. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/async_client.py +146 -60
  19. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/client.py +210 -91
  20. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/pagers.py +21 -13
  21. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/transports/__init__.py +1 -1
  22. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/transports/base.py +1 -1
  23. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/transports/grpc.py +104 -18
  24. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/transports/grpc_asyncio.py +178 -93
  25. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/transports/rest.py +1011 -87
  26. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/schema_service/transports/rest_base.py +1 -3
  27. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/__init__.py +1 -1
  28. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/async_client.py +196 -83
  29. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/client.py +260 -114
  30. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/pagers.py +21 -13
  31. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/transports/__init__.py +1 -1
  32. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/transports/base.py +1 -1
  33. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/transports/grpc.py +110 -24
  34. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py +184 -99
  35. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/transports/rest.py +1248 -115
  36. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/services/subscriber/transports/rest_base.py +1 -3
  37. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/types/__init__.py +1 -1
  38. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/types/pubsub.py +35 -31
  39. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/types/schema.py +1 -1
  40. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0/google_cloud_pubsub.egg-info}/PKG-INFO +9 -9
  41. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google_cloud_pubsub.egg-info/requires.txt +8 -8
  42. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/scripts/fixup_pubsub_v1_keywords.py +1 -4
  43. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/setup.py +8 -8
  44. {google_cloud_pubsub-2.28.0/tests/unit → google_cloud_pubsub-2.29.0/tests}/__init__.py +1 -1
  45. {google_cloud_pubsub-2.28.0/tests/unit/gapic → google_cloud_pubsub-2.29.0/tests/unit}/__init__.py +1 -1
  46. {google_cloud_pubsub-2.28.0/google/pubsub_v1/services → google_cloud_pubsub-2.29.0/tests/unit/gapic}/__init__.py +1 -1
  47. google_cloud_pubsub-2.29.0/tests/unit/gapic/pubsub_v1/__init__.py +15 -0
  48. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/gapic/pubsub_v1/test_publisher.py +146 -1
  49. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/gapic/pubsub_v1/test_schema_service.py +154 -1
  50. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/gapic/pubsub_v1/test_subscriber.py +182 -1
  51. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/conftest.py +17 -0
  52. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/test_publisher_client.py +13 -19
  53. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_heartbeater.py +8 -3
  54. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_leaser.py +5 -5
  55. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_messages_on_hold.py +3 -3
  56. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_streaming_pull_manager.py +34 -15
  57. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_subscriber_client.py +13 -19
  58. google_cloud_pubsub-2.28.0/tests/unit/gapic/pubsub_v1/__init__.py +0 -15
  59. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/LICENSE +0 -0
  60. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/MANIFEST.in +0 -0
  61. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/README.rst +0 -0
  62. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub/__init__.py +0 -0
  63. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/__init__.py +0 -0
  64. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/exceptions.py +0 -0
  65. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/futures.py +0 -0
  66. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/open_telemetry/__init__.py +0 -0
  67. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/open_telemetry/context_propagation.py +0 -0
  68. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/open_telemetry/publish_message_wrapper.py +0 -0
  69. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/open_telemetry/subscribe_opentelemetry.py +0 -0
  70. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/proto/pubsub.proto +0 -0
  71. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/proto/schema.proto +0 -0
  72. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/__init__.py +0 -0
  73. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/_batch/__init__.py +0 -0
  74. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/_batch/base.py +0 -0
  75. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/_batch/thread.py +0 -0
  76. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/_sequencer/__init__.py +0 -0
  77. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/_sequencer/base.py +0 -0
  78. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/_sequencer/ordered_sequencer.py +0 -0
  79. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/_sequencer/unordered_sequencer.py +0 -0
  80. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/client.py +0 -0
  81. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/exceptions.py +0 -0
  82. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/flow_controller.py +0 -0
  83. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/publisher/futures.py +0 -0
  84. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/__init__.py +0 -0
  85. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/__init__.py +0 -0
  86. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/dispatcher.py +0 -0
  87. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/heartbeater.py +0 -0
  88. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/helper_threads.py +0 -0
  89. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/histogram.py +0 -0
  90. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/leaser.py +0 -0
  91. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/messages_on_hold.py +0 -0
  92. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/requests.py +0 -0
  93. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py +0 -0
  94. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/client.py +0 -0
  95. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/exceptions.py +0 -0
  96. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/futures.py +0 -0
  97. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/message.py +0 -0
  98. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/subscriber/scheduler.py +0 -0
  99. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/cloud/pubsub_v1/types.py +0 -0
  100. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub/py.typed +0 -0
  101. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/gapic_metadata.json +0 -0
  102. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google/pubsub_v1/py.typed +0 -0
  103. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google_cloud_pubsub.egg-info/SOURCES.txt +0 -0
  104. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google_cloud_pubsub.egg-info/dependency_links.txt +0 -0
  105. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google_cloud_pubsub.egg-info/not-zip-safe +0 -0
  106. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/google_cloud_pubsub.egg-info/top_level.txt +0 -0
  107. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/setup.cfg +0 -0
  108. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/system.py +0 -0
  109. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/batch/test_base.py +0 -0
  110. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/batch/test_thread.py +0 -0
  111. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/sequencer/test_ordered_sequencer.py +0 -0
  112. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/sequencer/test_unordered_sequencer.py +0 -0
  113. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/test_flow_controller.py +0 -0
  114. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/test_futures_publisher.py +0 -0
  115. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/publisher/test_publish_message_wrapper.py +0 -0
  116. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_dispatcher.py +0 -0
  117. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_futures_subscriber.py +0 -0
  118. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_helper_threads.py +0 -0
  119. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_histogram.py +0 -0
  120. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_message.py +0 -0
  121. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_scheduler.py +0 -0
  122. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/subscriber/test_subscribe_opentelemetry.py +0 -0
  123. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/pubsub_v1/test_futures.py +0 -0
  124. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/test_packaging.py +0 -0
  125. {google_cloud_pubsub-2.28.0 → google_cloud_pubsub-2.29.0}/tests/unit/test_pubsub.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-cloud-pubsub
3
- Version: 2.28.0
3
+ Version: 2.29.0
4
4
  Summary: Google Cloud Pub/Sub API client library
5
5
  Home-page: https://github.com/googleapis/python-pubsub
6
6
  Author: Google LLC
@@ -23,14 +23,14 @@ Classifier: Operating System :: OS Independent
23
23
  Classifier: Topic :: Internet
24
24
  Requires-Python: >=3.7
25
25
  License-File: LICENSE
26
- Requires-Dist: grpcio<2.0dev,>=1.51.3
27
- Requires-Dist: google-auth<3.0.0dev,>=2.14.1
28
- Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0
29
- Requires-Dist: proto-plus<2.0.0dev,>=1.22.0
30
- Requires-Dist: proto-plus<2.0.0dev,>=1.22.2; python_version >= "3.11"
31
- Requires-Dist: proto-plus<2.0.0dev,>=1.25.0; python_version >= "3.13"
32
- Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
33
- Requires-Dist: grpc-google-iam-v1<1.0.0dev,>=0.12.4
26
+ Requires-Dist: grpcio<2.0.0,>=1.51.3
27
+ Requires-Dist: google-auth<3.0.0,>=2.14.1
28
+ Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0,>=1.34.0
29
+ Requires-Dist: proto-plus<2.0.0,>=1.22.0
30
+ Requires-Dist: proto-plus<2.0.0,>=1.22.2; python_version >= "3.11"
31
+ Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
32
+ Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<7.0.0,>=3.20.2
33
+ Requires-Dist: grpc-google-iam-v1<1.0.0,>=0.12.4
34
34
  Requires-Dist: grpcio-status>=1.33.2
35
35
  Requires-Dist: opentelemetry-api<=1.22.0; python_version <= "3.7"
36
36
  Requires-Dist: opentelemetry-api>=1.27.0; python_version >= "3.8"
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2024 Google LLC
2
+ # Copyright 2025 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "2.28.0" # {x-release-please-version}
16
+ __version__ = "2.29.0" # {x-release-please-version}
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2024 Google LLC
2
+ # Copyright 2025 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "2.28.0" # {x-release-please-version}
16
+ __version__ = "2.29.0" # {x-release-please-version}
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2024 Google LLC
2
+ # Copyright 2025 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2024 Google LLC
2
+ # Copyright 2025 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2024 Google LLC
2
+ # Copyright 2025 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
+ import logging as std_logging
16
17
  from collections import OrderedDict
17
18
  import re
18
19
  from typing import (
@@ -54,6 +55,15 @@ from .transports.base import PublisherTransport, DEFAULT_CLIENT_INFO
54
55
  from .transports.grpc_asyncio import PublisherGrpcAsyncIOTransport
55
56
  from .client import PublisherClient
56
57
 
58
+ try:
59
+ from google.api_core import client_logging # type: ignore
60
+
61
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
62
+ except ImportError: # pragma: NO COVER
63
+ CLIENT_LOGGING_SUPPORTED = False
64
+
65
+ _LOGGER = std_logging.getLogger(__name__)
66
+
57
67
 
58
68
  class PublisherAsyncClient:
59
69
  """The service that an application uses to manipulate topics,
@@ -259,6 +269,28 @@ class PublisherAsyncClient:
259
269
  client_info=client_info,
260
270
  )
261
271
 
272
+ if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
273
+ std_logging.DEBUG
274
+ ): # pragma: NO COVER
275
+ _LOGGER.debug(
276
+ "Created client `google.pubsub_v1.PublisherAsyncClient`.",
277
+ extra={
278
+ "serviceName": "google.pubsub.v1.Publisher",
279
+ "universeDomain": getattr(
280
+ self._client._transport._credentials, "universe_domain", ""
281
+ ),
282
+ "credentialsType": f"{type(self._client._transport._credentials).__module__}.{type(self._client._transport._credentials).__qualname__}",
283
+ "credentialsInfo": getattr(
284
+ self.transport._credentials, "get_cred_info", lambda: None
285
+ )(),
286
+ }
287
+ if hasattr(self._client._transport, "_credentials")
288
+ else {
289
+ "serviceName": "google.pubsub.v1.Publisher",
290
+ "credentialsType": None,
291
+ },
292
+ )
293
+
262
294
  async def create_topic(
263
295
  self,
264
296
  request: Optional[Union[pubsub.Topic, dict]] = None,
@@ -266,7 +298,7 @@ class PublisherAsyncClient:
266
298
  name: Optional[str] = None,
267
299
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
268
300
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
269
- metadata: Sequence[Tuple[str, str]] = (),
301
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
270
302
  ) -> pubsub.Topic:
271
303
  r"""Creates the given topic with the given name. See the [resource
272
304
  name rules]
@@ -318,8 +350,10 @@ class PublisherAsyncClient:
318
350
  should be retried.
319
351
  timeout (TimeoutType):
320
352
  The timeout for this request.
321
- metadata (Sequence[Tuple[str, str]]): Strings which should be
322
- sent along with the request as metadata.
353
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
354
+ sent along with the request as metadata. Normally, each value must be of type `str`,
355
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
356
+ be of type `bytes`.
323
357
 
324
358
  Returns:
325
359
  google.pubsub_v1.types.Topic:
@@ -328,7 +362,10 @@ class PublisherAsyncClient:
328
362
  # Create or coerce a protobuf request object.
329
363
  # - Quick check: If we got a request object, we should *not* have
330
364
  # gotten any keyword arguments that map to the request.
331
- has_flattened_params = any([name])
365
+ flattened_params = [name]
366
+ has_flattened_params = (
367
+ len([param for param in flattened_params if param is not None]) > 0
368
+ )
332
369
  if request is not None and has_flattened_params:
333
370
  raise ValueError(
334
371
  "If the `request` argument is set, then none of "
@@ -379,7 +416,7 @@ class PublisherAsyncClient:
379
416
  update_mask: Optional[field_mask_pb2.FieldMask] = None,
380
417
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
381
418
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
382
- metadata: Sequence[Tuple[str, str]] = (),
419
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
383
420
  ) -> pubsub.Topic:
384
421
  r"""Updates an existing topic by updating the fields
385
422
  specified in the update mask. Note that certain
@@ -438,8 +475,10 @@ class PublisherAsyncClient:
438
475
  should be retried.
439
476
  timeout (TimeoutType):
440
477
  The timeout for this request.
441
- metadata (Sequence[Tuple[str, str]]): Strings which should be
442
- sent along with the request as metadata.
478
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
479
+ sent along with the request as metadata. Normally, each value must be of type `str`,
480
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
481
+ be of type `bytes`.
443
482
 
444
483
  Returns:
445
484
  google.pubsub_v1.types.Topic:
@@ -448,7 +487,10 @@ class PublisherAsyncClient:
448
487
  # Create or coerce a protobuf request object.
449
488
  # - Quick check: If we got a request object, we should *not* have
450
489
  # gotten any keyword arguments that map to the request.
451
- has_flattened_params = any([topic, update_mask])
490
+ flattened_params = [topic, update_mask]
491
+ has_flattened_params = (
492
+ len([param for param in flattened_params if param is not None]) > 0
493
+ )
452
494
  if request is not None and has_flattened_params:
453
495
  raise ValueError(
454
496
  "If the `request` argument is set, then none of "
@@ -503,7 +545,7 @@ class PublisherAsyncClient:
503
545
  messages: Optional[MutableSequence[pubsub.PubsubMessage]] = None,
504
546
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
505
547
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
506
- metadata: Sequence[Tuple[str, str]] = (),
548
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
507
549
  ) -> pubsub.PublishResponse:
508
550
  r"""Adds one or more messages to the topic. Returns ``NOT_FOUND`` if
509
551
  the topic does not exist.
@@ -554,8 +596,10 @@ class PublisherAsyncClient:
554
596
  should be retried.
555
597
  timeout (TimeoutType):
556
598
  The timeout for this request.
557
- metadata (Sequence[Tuple[str, str]]): Strings which should be
558
- sent along with the request as metadata.
599
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
600
+ sent along with the request as metadata. Normally, each value must be of type `str`,
601
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
602
+ be of type `bytes`.
559
603
 
560
604
  Returns:
561
605
  google.pubsub_v1.types.PublishResponse:
@@ -564,7 +608,10 @@ class PublisherAsyncClient:
564
608
  # Create or coerce a protobuf request object.
565
609
  # - Quick check: If we got a request object, we should *not* have
566
610
  # gotten any keyword arguments that map to the request.
567
- has_flattened_params = any([topic, messages])
611
+ flattened_params = [topic, messages]
612
+ has_flattened_params = (
613
+ len([param for param in flattened_params if param is not None]) > 0
614
+ )
568
615
  if request is not None and has_flattened_params:
569
616
  raise ValueError(
570
617
  "If the `request` argument is set, then none of "
@@ -614,7 +661,7 @@ class PublisherAsyncClient:
614
661
  topic: Optional[str] = None,
615
662
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
616
663
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
617
- metadata: Sequence[Tuple[str, str]] = (),
664
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
618
665
  ) -> pubsub.Topic:
619
666
  r"""Gets the configuration of a topic.
620
667
 
@@ -658,8 +705,10 @@ class PublisherAsyncClient:
658
705
  should be retried.
659
706
  timeout (TimeoutType):
660
707
  The timeout for this request.
661
- metadata (Sequence[Tuple[str, str]]): Strings which should be
662
- sent along with the request as metadata.
708
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
709
+ sent along with the request as metadata. Normally, each value must be of type `str`,
710
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
711
+ be of type `bytes`.
663
712
 
664
713
  Returns:
665
714
  google.pubsub_v1.types.Topic:
@@ -668,7 +717,10 @@ class PublisherAsyncClient:
668
717
  # Create or coerce a protobuf request object.
669
718
  # - Quick check: If we got a request object, we should *not* have
670
719
  # gotten any keyword arguments that map to the request.
671
- has_flattened_params = any([topic])
720
+ flattened_params = [topic]
721
+ has_flattened_params = (
722
+ len([param for param in flattened_params if param is not None]) > 0
723
+ )
672
724
  if request is not None and has_flattened_params:
673
725
  raise ValueError(
674
726
  "If the `request` argument is set, then none of "
@@ -718,7 +770,7 @@ class PublisherAsyncClient:
718
770
  project: Optional[str] = None,
719
771
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
720
772
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
721
- metadata: Sequence[Tuple[str, str]] = (),
773
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
722
774
  ) -> pagers.ListTopicsAsyncPager:
723
775
  r"""Lists matching topics.
724
776
 
@@ -763,8 +815,10 @@ class PublisherAsyncClient:
763
815
  should be retried.
764
816
  timeout (TimeoutType):
765
817
  The timeout for this request.
766
- metadata (Sequence[Tuple[str, str]]): Strings which should be
767
- sent along with the request as metadata.
818
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
819
+ sent along with the request as metadata. Normally, each value must be of type `str`,
820
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
821
+ be of type `bytes`.
768
822
 
769
823
  Returns:
770
824
  google.pubsub_v1.services.publisher.pagers.ListTopicsAsyncPager:
@@ -777,7 +831,10 @@ class PublisherAsyncClient:
777
831
  # Create or coerce a protobuf request object.
778
832
  # - Quick check: If we got a request object, we should *not* have
779
833
  # gotten any keyword arguments that map to the request.
780
- has_flattened_params = any([project])
834
+ flattened_params = [project]
835
+ has_flattened_params = (
836
+ len([param for param in flattened_params if param is not None]) > 0
837
+ )
781
838
  if request is not None and has_flattened_params:
782
839
  raise ValueError(
783
840
  "If the `request` argument is set, then none of "
@@ -838,7 +895,7 @@ class PublisherAsyncClient:
838
895
  topic: Optional[str] = None,
839
896
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
840
897
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
841
- metadata: Sequence[Tuple[str, str]] = (),
898
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
842
899
  ) -> pagers.ListTopicSubscriptionsAsyncPager:
843
900
  r"""Lists the names of the attached subscriptions on this
844
901
  topic.
@@ -885,8 +942,10 @@ class PublisherAsyncClient:
885
942
  should be retried.
886
943
  timeout (TimeoutType):
887
944
  The timeout for this request.
888
- metadata (Sequence[Tuple[str, str]]): Strings which should be
889
- sent along with the request as metadata.
945
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
946
+ sent along with the request as metadata. Normally, each value must be of type `str`,
947
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
948
+ be of type `bytes`.
890
949
 
891
950
  Returns:
892
951
  google.pubsub_v1.services.publisher.pagers.ListTopicSubscriptionsAsyncPager:
@@ -899,7 +958,10 @@ class PublisherAsyncClient:
899
958
  # Create or coerce a protobuf request object.
900
959
  # - Quick check: If we got a request object, we should *not* have
901
960
  # gotten any keyword arguments that map to the request.
902
- has_flattened_params = any([topic])
961
+ flattened_params = [topic]
962
+ has_flattened_params = (
963
+ len([param for param in flattened_params if param is not None]) > 0
964
+ )
903
965
  if request is not None and has_flattened_params:
904
966
  raise ValueError(
905
967
  "If the `request` argument is set, then none of "
@@ -960,7 +1022,7 @@ class PublisherAsyncClient:
960
1022
  topic: Optional[str] = None,
961
1023
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
962
1024
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
963
- metadata: Sequence[Tuple[str, str]] = (),
1025
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
964
1026
  ) -> pagers.ListTopicSnapshotsAsyncPager:
965
1027
  r"""Lists the names of the snapshots on this topic. Snapshots are
966
1028
  used in
@@ -1011,8 +1073,10 @@ class PublisherAsyncClient:
1011
1073
  should be retried.
1012
1074
  timeout (TimeoutType):
1013
1075
  The timeout for this request.
1014
- metadata (Sequence[Tuple[str, str]]): Strings which should be
1015
- sent along with the request as metadata.
1076
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1077
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1078
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1079
+ be of type `bytes`.
1016
1080
 
1017
1081
  Returns:
1018
1082
  google.pubsub_v1.services.publisher.pagers.ListTopicSnapshotsAsyncPager:
@@ -1025,7 +1089,10 @@ class PublisherAsyncClient:
1025
1089
  # Create or coerce a protobuf request object.
1026
1090
  # - Quick check: If we got a request object, we should *not* have
1027
1091
  # gotten any keyword arguments that map to the request.
1028
- has_flattened_params = any([topic])
1092
+ flattened_params = [topic]
1093
+ has_flattened_params = (
1094
+ len([param for param in flattened_params if param is not None]) > 0
1095
+ )
1029
1096
  if request is not None and has_flattened_params:
1030
1097
  raise ValueError(
1031
1098
  "If the `request` argument is set, then none of "
@@ -1086,7 +1153,7 @@ class PublisherAsyncClient:
1086
1153
  topic: Optional[str] = None,
1087
1154
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
1088
1155
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
1089
- metadata: Sequence[Tuple[str, str]] = (),
1156
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1090
1157
  ) -> None:
1091
1158
  r"""Deletes the topic with the given name. Returns ``NOT_FOUND`` if
1092
1159
  the topic does not exist. After a topic is deleted, a new topic
@@ -1132,13 +1199,18 @@ class PublisherAsyncClient:
1132
1199
  should be retried.
1133
1200
  timeout (TimeoutType):
1134
1201
  The timeout for this request.
1135
- metadata (Sequence[Tuple[str, str]]): Strings which should be
1136
- sent along with the request as metadata.
1202
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1203
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1204
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1205
+ be of type `bytes`.
1137
1206
  """
1138
1207
  # Create or coerce a protobuf request object.
1139
1208
  # - Quick check: If we got a request object, we should *not* have
1140
1209
  # gotten any keyword arguments that map to the request.
1141
- has_flattened_params = any([topic])
1210
+ flattened_params = [topic]
1211
+ has_flattened_params = (
1212
+ len([param for param in flattened_params if param is not None]) > 0
1213
+ )
1142
1214
  if request is not None and has_flattened_params:
1143
1215
  raise ValueError(
1144
1216
  "If the `request` argument is set, then none of "
@@ -1184,7 +1256,7 @@ class PublisherAsyncClient:
1184
1256
  *,
1185
1257
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
1186
1258
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
1187
- metadata: Sequence[Tuple[str, str]] = (),
1259
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1188
1260
  ) -> pubsub.DetachSubscriptionResponse:
1189
1261
  r"""Detaches a subscription from this topic. All messages retained
1190
1262
  in the subscription are dropped. Subsequent ``Pull`` and
@@ -1226,8 +1298,10 @@ class PublisherAsyncClient:
1226
1298
  should be retried.
1227
1299
  timeout (TimeoutType):
1228
1300
  The timeout for this request.
1229
- metadata (Sequence[Tuple[str, str]]): Strings which should be
1230
- sent along with the request as metadata.
1301
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1302
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1303
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1304
+ be of type `bytes`.
1231
1305
 
1232
1306
  Returns:
1233
1307
  google.pubsub_v1.types.DetachSubscriptionResponse:
@@ -1275,22 +1349,24 @@ class PublisherAsyncClient:
1275
1349
  *,
1276
1350
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
1277
1351
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
1278
- metadata: Sequence[Tuple[str, str]] = (),
1352
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1279
1353
  ) -> policy_pb2.Policy:
1280
1354
  r"""Sets the IAM access control policy on the specified function.
1281
1355
 
1282
1356
  Replaces any existing policy.
1283
1357
 
1284
1358
  Args:
1285
- request (:class:`~.policy_pb2.SetIamPolicyRequest`):
1359
+ request (:class:`~.iam_policy_pb2.SetIamPolicyRequest`):
1286
1360
  The request object. Request message for `SetIamPolicy`
1287
1361
  method.
1288
1362
  retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
1289
1363
  should be retried.
1290
1364
  timeout (TimeoutType):
1291
1365
  The timeout for this request.
1292
- metadata (Sequence[Tuple[str, str]]): Strings which should be
1293
- sent along with the request as metadata.
1366
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1367
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1368
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1369
+ be of type `bytes`.
1294
1370
  Returns:
1295
1371
  ~.policy_pb2.Policy:
1296
1372
  Defines an Identity and Access Management (IAM) policy.
@@ -1310,6 +1386,7 @@ class PublisherAsyncClient:
1310
1386
  **JSON Example**
1311
1387
 
1312
1388
  ::
1389
+
1313
1390
  {
1314
1391
  "bindings": [
1315
1392
  {
@@ -1394,23 +1471,25 @@ class PublisherAsyncClient:
1394
1471
  *,
1395
1472
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
1396
1473
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
1397
- metadata: Sequence[Tuple[str, str]] = (),
1474
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1398
1475
  ) -> policy_pb2.Policy:
1399
1476
  r"""Gets the IAM access control policy for a function.
1400
1477
 
1401
- Returns an empty policy if the function exists and does
1402
- not have a policy set.
1478
+ Returns an empty policy if the function exists and does not have a
1479
+ policy set.
1403
1480
 
1404
1481
  Args:
1405
1482
  request (:class:`~.iam_policy_pb2.GetIamPolicyRequest`):
1406
1483
  The request object. Request message for `GetIamPolicy`
1407
1484
  method.
1408
- retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
1409
- should be retried.
1485
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if
1486
+ any, should be retried.
1410
1487
  timeout (TimeoutType):
1411
1488
  The timeout for this request.
1412
- metadata (Sequence[Tuple[str, str]]): Strings which should be
1413
- sent along with the request as metadata.
1489
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1490
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1491
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1492
+ be of type `bytes`.
1414
1493
  Returns:
1415
1494
  ~.policy_pb2.Policy:
1416
1495
  Defines an Identity and Access Management (IAM) policy.
@@ -1515,26 +1594,28 @@ class PublisherAsyncClient:
1515
1594
  *,
1516
1595
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
1517
1596
  timeout: TimeoutType = gapic_v1.method.DEFAULT,
1518
- metadata: Sequence[Tuple[str, str]] = (),
1597
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1519
1598
  ) -> iam_policy_pb2.TestIamPermissionsResponse:
1520
- r"""Tests the specified permissions against the IAM access control
1599
+ r"""Tests the specified IAM permissions against the IAM access control
1521
1600
  policy for a function.
1522
1601
 
1523
- If the function does not exist, this will
1524
- return an empty set of permissions, not a NOT_FOUND error.
1602
+ If the function does not exist, this will return an empty set
1603
+ of permissions, not a NOT_FOUND error.
1525
1604
 
1526
1605
  Args:
1527
1606
  request (:class:`~.iam_policy_pb2.TestIamPermissionsRequest`):
1528
1607
  The request object. Request message for
1529
1608
  `TestIamPermissions` method.
1530
- retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
1531
- should be retried.
1609
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
1610
+ if any, should be retried.
1532
1611
  timeout (TimeoutType):
1533
1612
  The timeout for this request.
1534
- metadata (Sequence[Tuple[str, str]]): Strings which should be
1535
- sent along with the request as metadata.
1613
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1614
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1615
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1616
+ be of type `bytes`.
1536
1617
  Returns:
1537
- ~iam_policy_pb2.PolicyTestIamPermissionsResponse:
1618
+ ~.iam_policy_pb2.TestIamPermissionsResponse:
1538
1619
  Response message for ``TestIamPermissions`` method.
1539
1620
  """
1540
1621
  # Create or coerce a protobuf request object.