Skip to content

Commit

Permalink
fix: [Many APIs] fix ValueError in test__validate_universe_domain (
Browse files Browse the repository at this point in the history
…#12280)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 604699565

Source-Link:
googleapis/googleapis@cd3eabf

Source-Link:
googleapis/googleapis-gen@01f69ba
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFpLWdlbmVyYXRpdmVsYW5ndWFnZS8uT3dsQm90LnlhbWwiLCJoIjoiMDFmNjliYTdhMTNkNTllNmY0NWUyNDMzNTliOTFhNmU4OTYyMjFmOCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1hZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiMDFmNjliYTdhMTNkNTllNmY0NWUyNDMzNTliOTFhNmU4OTYyMjFmOCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1kYXRhLy5Pd2xCb3QueWFtbCIsImgiOiIwMWY2OWJhN2ExM2Q1OWU2ZjQ1ZTI0MzM1OWI5MWE2ZTg5NjIyMWY4In0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcHMtbWVldC8uT3dsQm90LnlhbWwiLCJoIjoiMDFmNjliYTdhMTNkNTllNmY0NWUyNDMzNTliOTFhNmU4OTYyMjFmOCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcHMtc2NyaXB0LXR5cGUvLk93bEJvdC55YW1sIiwiaCI6IjAxZjY5YmE3YTEzZDU5ZTZmNDVlMjQzMzU5YjkxYTZlODk2MjIxZjgifQ==
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFyZWExMjAtdGFibGVzLy5Pd2xCb3QueWFtbCIsImgiOiIwMWY2OWJhN2ExM2Q1OWU2ZjQ1ZTI0MzM1OWI5MWE2ZTg5NjIyMWY4In0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2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l-bot[bot]@users.noreply.github.com>
Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
3 people authored Feb 7, 2024
1 parent 62cf934 commit 2d75d0e
Showing 63 changed files with 246 additions and 246 deletions.
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ class Document(proto.Message):
Attributes:
name (str):
Immutable. Identifier. The ``Document`` resource name. The
ID (name excluding the `corpora/*/documents/` prefix) can
ID (name excluding the "corpora/*/documents/" prefix) can
contain up to 40 characters that are lowercase alphanumeric
or dashes (-). The ID cannot start or end with a dash. If
the name is empty on create, a unique name will be derived
@@ -315,7 +315,7 @@ class Chunk(proto.Message):
Attributes:
name (str):
Immutable. Identifier. The ``Chunk`` resource name. The ID
(name excluding the `corpora/*/documents/*/chunks/` prefix)
(name excluding the "corpora/*/documents/*/chunks/" prefix)
can contain up to 40 characters that are lowercase
alphanumeric or dashes (-). The ID cannot start or end with
a dash. If the name is empty on create, a random
Original file line number Diff line number Diff line change
@@ -343,11 +343,11 @@ async def sample_create_permission():
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
@@ -473,11 +473,11 @@ async def sample_get_permission():
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
@@ -729,11 +729,11 @@ async def sample_update_permission():
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
Original file line number Diff line number Diff line change
@@ -764,11 +764,11 @@ def sample_create_permission():
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
@@ -894,11 +894,11 @@ def sample_get_permission():
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
@@ -1150,11 +1150,11 @@ def sample_update_permission():
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
Original file line number Diff line number Diff line change
@@ -395,11 +395,11 @@ def __call__(
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
@@ -592,11 +592,11 @@ def __call__(
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
@@ -891,11 +891,11 @@ def __call__(
role is a superset of the previous
role's permitted operations:
- reader can use the resource (e.g.
- reader can use the resource (e.g.
tuned model) for inference
- writer has reader's permissions and
- writer has reader's permissions and
additionally can edit and share
- owner has writer's permissions and
- owner has writer's permissions and
additionally can delete
"""
Original file line number Diff line number Diff line change
@@ -41,10 +41,10 @@ class Permission(proto.Message):
There are three concentric roles. Each role is a superset of the
previous role's permitted operations:
- reader can use the resource (e.g. tuned model) for inference
- writer has reader's permissions and additionally can edit and
- reader can use the resource (e.g. tuned model) for inference
- writer has reader's permissions and additionally can edit and
share
- owner has writer's permissions and additionally can delete
- owner has writer's permissions and additionally can delete
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Original file line number Diff line number Diff line change
@@ -344,8 +344,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -363,8 +363,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -319,8 +319,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -338,8 +338,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -333,8 +333,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -352,8 +352,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -349,8 +349,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -368,8 +368,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -351,8 +351,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -346,8 +346,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -365,8 +365,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -337,8 +337,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -356,8 +356,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -314,8 +314,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -333,8 +333,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -351,8 +351,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Original file line number Diff line number Diff line change
@@ -318,8 +318,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
@@ -337,8 +337,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Loading

0 comments on commit 2d75d0e

Please sign in to comment.