Skip to content

Commit fe73db3

Browse files
committed
for testing purposes
1 parent b7e0f7f commit fe73db3

File tree

45 files changed

+168
-3
lines changed

Some content is hidden

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

45 files changed

+168
-3
lines changed

gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ from google.api_core import gapic_v1
2424
from google.api_core import retry_async as retries
2525
from google.auth import credentials as ga_credentials # type: ignore
2626
from google.oauth2 import service_account # type: ignore
27+
import google.protobuf
2728

2829
{{ shared_macros.add_google_api_core_version_header_import(service.version) }}
2930
try:
@@ -726,6 +727,9 @@ class {{ service.async_client_name }}:
726727

727728
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
728729

730+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
731+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
732+
729733

730734
__all__ = (
731735
"{{ service.async_client_name }}",

gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ from google.auth.transport import mtls # type: ignore
3636
from google.auth.transport.grpc import SslCredentials # type: ignore
3737
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3838
from google.oauth2 import service_account # type: ignore
39+
import google.protobuf
3940
{{ shared_macros.add_google_api_core_version_header_import(service.version) }}
4041
try:
4142
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
@@ -991,6 +992,8 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta):
991992

992993
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
993994

995+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
996+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
994997

995998
__all__ = (
996999
"{{ service.client_name }}",

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ from google.api_core import operations_v1
1818
{% endif %}
1919
from google.auth import credentials as ga_credentials # type: ignore
2020
from google.oauth2 import service_account # type: ignore
21+
import google.protobuf
2122

2223
{% filter sort_lines %}
2324
{% set import_ns = namespace(has_operations_mixin=false) %}
@@ -51,6 +52,9 @@ from {{ (api.naming.module_namespace + (api.naming.versioned_module_name,) + ser
5152

5253
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
5354

55+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
56+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
57+
5458

5559
class {{ service.name }}Transport(abc.ABC):
5660
"""Abstract transport class for {{ service.name }}."""

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ from google.api_core import retry as retries
1313
from google.api_core import rest_helpers
1414
from google.api_core import rest_streaming
1515
from google.api_core import gapic_v1
16+
import google.protobuf
1617

1718
from google.protobuf import json_format
1819
{% if service.has_lro %}
@@ -55,6 +56,9 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
5556
rest_version=f"requests@{requests_version}",
5657
)
5758

59+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
60+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
61+
5862

5963
{{ shared_macros.create_interceptor_class(api, service, method, is_async=False) }}
6064

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest_asyncio.py.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ from google.cloud.location import locations_pb2 # type: ignore
3434
from google.api_core import retry_async as retries
3535
from google.api_core import rest_helpers
3636
from google.api_core import rest_streaming_async # type: ignore
37-
37+
import google.protobuf
3838

3939
from google.protobuf import json_format
4040
{% if service.has_lro %}
@@ -80,6 +80,9 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
8080
rest_version=f"google-auth@{google.auth.__version__}",
8181
)
8282

83+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
84+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
85+
8386
{{ shared_macros.create_interceptor_class(api, service, method, is_async=True) }}
8487

8588
@dataclasses.dataclass

tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from google.api_core import retry_async as retries
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031

3132
try:
@@ -3213,6 +3214,9 @@ async def __aexit__(self, exc_type, exc, tb):
32133214

32143215
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
32153216

3217+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
3218+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
3219+
32163220

32173221
__all__ = (
32183222
"AssetServiceAsyncClient",

tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from google.auth.transport.grpc import SslCredentials # type: ignore
3434
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3535
from google.oauth2 import service_account # type: ignore
36+
import google.protobuf
3637

3738
try:
3839
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
@@ -3619,6 +3620,8 @@ def get_operation(
36193620

36203621
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
36213622

3623+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
3624+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
36223625

36233626
__all__ = (
36243627
"AssetServiceClient",

tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@
2626
from google.api_core import operations_v1
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031
from google.cloud.asset_v1.types import asset_service
3132
from google.longrunning import operations_pb2 # type: ignore
3233
from google.protobuf import empty_pb2 # type: ignore
3334

3435
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
3536

37+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
38+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
39+
3640

3741
class AssetServiceTransport(abc.ABC):
3842
"""Abstract transport class for AssetService."""

tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from google.api_core import rest_helpers
2424
from google.api_core import rest_streaming
2525
from google.api_core import gapic_v1
26+
import google.protobuf
2627

2728
from google.protobuf import json_format
2829
from google.api_core import operations_v1
@@ -60,6 +61,9 @@
6061
rest_version=f"requests@{requests_version}",
6162
)
6263

64+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
65+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
66+
6367

6468
class AssetServiceRestInterceptor:
6569
"""Interceptor for AssetService.

tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from google.api_core import retry_async as retries
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031

3132
try:
@@ -857,6 +858,9 @@ async def __aexit__(self, exc_type, exc, tb):
857858

858859
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
859860

861+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
862+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
863+
860864

861865
__all__ = (
862866
"IAMCredentialsAsyncClient",

tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from google.auth.transport.grpc import SslCredentials # type: ignore
3434
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3535
from google.oauth2 import service_account # type: ignore
36+
import google.protobuf
3637

3738
try:
3839
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
@@ -1215,6 +1216,8 @@ def __exit__(self, type, value, traceback):
12151216

12161217
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
12171218

1219+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
1220+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
12181221

12191222
__all__ = (
12201223
"IAMCredentialsClient",

tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@
2525
from google.api_core import retry as retries
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
28+
import google.protobuf
2829

2930
from google.iam.credentials_v1.types import common
3031

3132
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
3233

34+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
35+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
36+
3337

3438
class IAMCredentialsTransport(abc.ABC):
3539
"""Abstract transport class for IAMCredentials."""

tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from google.api_core import rest_helpers
2424
from google.api_core import rest_streaming
2525
from google.api_core import gapic_v1
26+
import google.protobuf
2627

2728
from google.protobuf import json_format
2829

@@ -57,6 +58,9 @@
5758
rest_version=f"requests@{requests_version}",
5859
)
5960

61+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
62+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
63+
6064

6165
class IAMCredentialsRestInterceptor:
6266
"""Interceptor for IAMCredentials.

tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from google.api_core import retry_async as retries
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031

3132
try:
@@ -3160,6 +3161,9 @@ async def __aexit__(self, exc_type, exc, tb):
31603161

31613162
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
31623163

3164+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
3165+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
3166+
31633167

31643168
__all__ = (
31653169
"EventarcAsyncClient",

tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from google.auth.transport.grpc import SslCredentials # type: ignore
3434
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3535
from google.oauth2 import service_account # type: ignore
36+
import google.protobuf
3637

3738
try:
3839
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
@@ -3608,6 +3609,8 @@ def list_locations(
36083609

36093610
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
36103611

3612+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
3613+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
36113614

36123615
__all__ = (
36133616
"EventarcClient",

tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from google.api_core import operations_v1
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031
from google.cloud.eventarc_v1.types import channel
3132
from google.cloud.eventarc_v1.types import channel_connection
@@ -41,6 +42,9 @@
4142

4243
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
4344

45+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
46+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
47+
4448

4549
class EventarcTransport(abc.ABC):
4650
"""Abstract transport class for Eventarc."""

tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from google.api_core import rest_helpers
2424
from google.api_core import rest_streaming
2525
from google.api_core import gapic_v1
26+
import google.protobuf
2627

2728
from google.protobuf import json_format
2829
from google.api_core import operations_v1
@@ -68,6 +69,9 @@
6869
rest_version=f"requests@{requests_version}",
6970
)
7071

72+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
73+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
74+
7175

7276
class EventarcRestInterceptor:
7377
"""Interceptor for Eventarc.

tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from google.api_core import retry_async as retries
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031

3132
try:
@@ -4058,6 +4059,9 @@ async def __aexit__(self, exc_type, exc, tb):
40584059

40594060
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
40604061

4062+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
4063+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
4064+
40614065

40624066
__all__ = (
40634067
"ConfigServiceV2AsyncClient",

tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from google.auth.transport.grpc import SslCredentials # type: ignore
3434
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3535
from google.oauth2 import service_account # type: ignore
36+
import google.protobuf
3637

3738
try:
3839
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
@@ -4462,6 +4463,8 @@ def cancel_operation(
44624463

44634464
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
44644465

4466+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
4467+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
44654468

44664469
__all__ = (
44674470
"ConfigServiceV2Client",

tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@
2626
from google.api_core import operations_v1
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031
from google.cloud.logging_v2.types import logging_config
3132
from google.longrunning import operations_pb2 # type: ignore
3233
from google.protobuf import empty_pb2 # type: ignore
3334

3435
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
3536

37+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
38+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
39+
3640

3741
class ConfigServiceV2Transport(abc.ABC):
3842
"""Abstract transport class for ConfigServiceV2."""

tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from google.api_core import retry_async as retries
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
29+
import google.protobuf
2930

3031

3132
try:
@@ -1173,6 +1174,9 @@ async def __aexit__(self, exc_type, exc, tb):
11731174

11741175
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
11751176

1177+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
1178+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
1179+
11761180

11771181
__all__ = (
11781182
"LoggingServiceV2AsyncClient",

tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from google.auth.transport.grpc import SslCredentials # type: ignore
3434
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3535
from google.oauth2 import service_account # type: ignore
36+
import google.protobuf
3637

3738
try:
3839
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
@@ -1536,6 +1537,8 @@ def cancel_operation(
15361537

15371538
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(gapic_version=package_version.__version__)
15381539

1540+
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
1541+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
15391542

15401543
__all__ = (
15411544
"LoggingServiceV2Client",

0 commit comments

Comments
 (0)