Skip to content

Commit 728b307

Browse files
fix: Allow Protobuf 5.x (#12864)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 649277844 Source-Link: googleapis/googleapis@fd7efa2 Source-Link: googleapis/googleapis-gen@50be251 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWF1dG9tbC8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLy5Pd2xCb3QueWFtbCIsImgiOiI1MGJlMjUxMzI5ZDhkYjViNTU1NjI2ZWJkNDg4NjcyMWY1NDdkM2NjIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhcmUtbWV0YWwtc29sdXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjUwYmUyNTEzMjlkOGRiNWI1NTU2MjZlYmQ0ODg2NzIxZjU0N2QzY2MifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI1MGJlMjUxMzI5ZDhkYjViNTU1NjI2ZWJkNDg4NjcyMWY1NDdkM2NjIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJleW9uZGNvcnAtYXBwY29ubmVjdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjUwYmUyNTEzMjlkOGRiNWI1NTU2MjZlYmQ0ODg2NzIxZjU0N2QzY2MifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJleW9uZGNvcnAtYXBwY29ubmVjdG9ycy8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 Copy-Tag: eyJwIjoicGFja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ja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbmFyeS1hdXRob3JpemF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI1MGJlMjUxMzI5ZDhkYjViNTU1NjI2ZWJkNDg4NjcyMWY1NDdkM2NjIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent eb36e8a commit 728b307

File tree

249 files changed

+1656
-2305
lines changed

Some content is hidden

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

249 files changed

+1656
-2305
lines changed

packages/google-cloud-automl/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Python Client for Cloud AutoML
1515
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-automl.svg
1616
:target: https://pypi.org/project/google-cloud-automl/
1717
.. _Cloud AutoML: https://cloud.google.com/automl/docs/
18-
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/automl/latest
18+
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/automl/latest/summary_overview
1919
.. _Product Documentation: https://cloud.google.com/automl/docs/
2020

2121
Quick Start

packages/google-cloud-automl/docs/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ For a list of all ``google-cloud-automl`` releases:
3232
:maxdepth: 2
3333

3434
CHANGELOG
35+
36+
.. toctree::
37+
:hidden:
38+
39+
summary_overview.md
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
This is a templated file. Adding content to this file may result in it being
3+
reverted. Instead, if you want to place additional content, create an
4+
"overview_content.md" file in `docs/` directory. The Sphinx tool will
5+
pick up on the content and merge the content.
6+
]: #
7+
8+
# Cloud AutoML API
9+
10+
Overview of the APIs available for Cloud AutoML API.
11+
12+
## All entries
13+
14+
Classes, methods and properties & attributes for
15+
Cloud AutoML API.
16+
17+
[classes](https://cloud.google.com/python/docs/reference/automl/latest/summary_class.html)
18+
19+
[methods](https://cloud.google.com/python/docs/reference/automl/latest/summary_method.html)
20+
21+
[properties and
22+
attributes](https://cloud.google.com/python/docs/reference/automl/latest/summary_property.html)

packages/google-cloud-automl/google/cloud/automl_v1/services/auto_ml/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def __init__(
8787

8888
# Save the scopes.
8989
self._scopes = scopes
90+
if not hasattr(self, "_ignore_credentials"):
91+
self._ignore_credentials: bool = False
9092

9193
# If no credentials are provided, then determine the appropriate
9294
# defaults.
@@ -99,7 +101,7 @@ def __init__(
99101
credentials, _ = google.auth.load_credentials_from_file(
100102
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
101103
)
102-
elif credentials is None:
104+
elif credentials is None and not self._ignore_credentials:
103105
credentials, _ = google.auth.default(
104106
**scopes_kwargs, quota_project_id=quota_project_id
105107
)

packages/google-cloud-automl/google/cloud/automl_v1/services/auto_ml/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def __init__(
142142

143143
if isinstance(channel, grpc.Channel):
144144
# Ignore credentials if a channel was passed.
145-
credentials = False
145+
credentials = None
146+
self._ignore_credentials = True
146147
# If a channel was explicitly provided, set it.
147148
self._grpc_channel = channel
148149
self._ssl_channel_credentials = None

packages/google-cloud-automl/google/cloud/automl_v1/services/auto_ml/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ def __init__(
189189

190190
if isinstance(channel, aio.Channel):
191191
# Ignore credentials if a channel was passed.
192-
credentials = False
192+
credentials = None
193+
self._ignore_credentials = True
193194
# If a channel was explicitly provided, set it.
194195
self._grpc_channel = channel
195196
self._ssl_channel_credentials = None

packages/google-cloud-automl/google/cloud/automl_v1/services/prediction_service/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def __init__(
8282

8383
# Save the scopes.
8484
self._scopes = scopes
85+
if not hasattr(self, "_ignore_credentials"):
86+
self._ignore_credentials: bool = False
8587

8688
# If no credentials are provided, then determine the appropriate
8789
# defaults.
@@ -94,7 +96,7 @@ def __init__(
9496
credentials, _ = google.auth.load_credentials_from_file(
9597
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
9698
)
97-
elif credentials is None:
99+
elif credentials is None and not self._ignore_credentials:
98100
credentials, _ = google.auth.default(
99101
**scopes_kwargs, quota_project_id=quota_project_id
100102
)

packages/google-cloud-automl/google/cloud/automl_v1/services/prediction_service/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ def __init__(
126126

127127
if isinstance(channel, grpc.Channel):
128128
# Ignore credentials if a channel was passed.
129-
credentials = False
129+
credentials = None
130+
self._ignore_credentials = True
130131
# If a channel was explicitly provided, set it.
131132
self._grpc_channel = channel
132133
self._ssl_channel_credentials = None

packages/google-cloud-automl/google/cloud/automl_v1/services/prediction_service/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ def __init__(
173173

174174
if isinstance(channel, aio.Channel):
175175
# Ignore credentials if a channel was passed.
176-
credentials = False
176+
credentials = None
177+
self._ignore_credentials = True
177178
# If a channel was explicitly provided, set it.
178179
self._grpc_channel = channel
179180
self._ssl_channel_credentials = None

packages/google-cloud-automl/google/cloud/automl_v1beta1/services/auto_ml/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ def __init__(
8989

9090
# Save the scopes.
9191
self._scopes = scopes
92+
if not hasattr(self, "_ignore_credentials"):
93+
self._ignore_credentials: bool = False
9294

9395
# If no credentials are provided, then determine the appropriate
9496
# defaults.
@@ -101,7 +103,7 @@ def __init__(
101103
credentials, _ = google.auth.load_credentials_from_file(
102104
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
103105
)
104-
elif credentials is None:
106+
elif credentials is None and not self._ignore_credentials:
105107
credentials, _ = google.auth.default(
106108
**scopes_kwargs, quota_project_id=quota_project_id
107109
)

0 commit comments

Comments
 (0)