Skip to content

Commit 53c951e

Browse files
chore: [Many APIs] Update gapic-generator-python to v1.20.2 (#13236)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 691540410 Source-Link: googleapis/googleapis@b43cfb1 Source-Link: googleapis/googleapis-gen@40fd27b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNlcnRpZmljYXRlLW1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjQwZmQyN2IwOGFiYjJlOGI4YTg0YjU3OTQxZTEyMjY5NzFmMzdhOTcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNoYW5uZWwvLk93bEJvdC55YW1sIiwiaCI6IjQwZmQyN2IwOGFiYjJlOGI4YTg0YjU3OTQxZTEyMjY5NzFmMzdhOTcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNsb3VkY29udHJvbHNwYXJ0bmVyLy5Pd2xCb3QueWFtbCIsImgiOiI0MGZkMjdiMDhhYmIyZThiOGE4NGI1Nzk0MWUxMjI2OTcxZjM3YTk3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbW1lcmNlLWNvbnN1bWVyLXByb2N1cmVtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiI0MGZkMjdiMDhhYmIyZThiOGE4NGI1Nzk0MWUxMjI2OTcxZjM3YTk3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbXB1dGUvLk93bEJvdC55YW1sIiwiaCI6IjQwZmQyN2IwOGFiYjJlOGI4YTg0YjU3OTQxZTEyMjY5NzFmMzdhOTcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbmZpZGVudGlhbGNvbXB1dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNDBmZDI3YjA4YWJiMmU4YjhhODRiNTc5NDFlMTIyNjk3MWYzN2E5NyJ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
1 parent 4ed4108 commit 53c951e

File tree

356 files changed

+503
-17424
lines changed

Some content is hidden

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

356 files changed

+503
-17424
lines changed

packages/google-cloud-certificate-manager/google/cloud/certificate_manager/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.8.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-certificate-manager/google/cloud/certificate_manager_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.8.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-certificate-manager/google/cloud/certificate_manager_v1/services/certificate_manager/client.py

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -640,36 +640,6 @@ def _get_universe_domain(
640640
raise ValueError("Universe Domain cannot be an empty string.")
641641
return universe_domain
642642

643-
@staticmethod
644-
def _compare_universes(
645-
client_universe: str, credentials: ga_credentials.Credentials
646-
) -> bool:
647-
"""Returns True iff the universe domains used by the client and credentials match.
648-
649-
Args:
650-
client_universe (str): The universe domain configured via the client options.
651-
credentials (ga_credentials.Credentials): The credentials being used in the client.
652-
653-
Returns:
654-
bool: True iff client_universe matches the universe in credentials.
655-
656-
Raises:
657-
ValueError: when client_universe does not match the universe in credentials.
658-
"""
659-
660-
default_universe = CertificateManagerClient._DEFAULT_UNIVERSE
661-
credentials_universe = getattr(credentials, "universe_domain", default_universe)
662-
663-
if client_universe != credentials_universe:
664-
raise ValueError(
665-
"The configured universe domain "
666-
f"({client_universe}) does not match the universe domain "
667-
f"found in the credentials ({credentials_universe}). "
668-
"If you haven't configured the universe domain explicitly, "
669-
f"`{default_universe}` is the default."
670-
)
671-
return True
672-
673643
def _validate_universe_domain(self):
674644
"""Validates client's and credentials' universe domains are consistent.
675645
@@ -679,13 +649,9 @@ def _validate_universe_domain(self):
679649
Raises:
680650
ValueError: If the configured universe domain is not valid.
681651
"""
682-
self._is_universe_domain_valid = (
683-
self._is_universe_domain_valid
684-
or CertificateManagerClient._compare_universes(
685-
self.universe_domain, self.transport._credentials
686-
)
687-
)
688-
return self._is_universe_domain_valid
652+
653+
# NOTE (b/349488459): universe validation is disabled until further notice.
654+
return True
689655

690656
@property
691657
def api_endpoint(self):

packages/google-cloud-certificate-manager/samples/generated_samples/snippet_metadata_google.cloud.certificatemanager.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-certificate-manager",
11-
"version": "1.8.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-certificate-manager/tests/unit/gapic/certificate_manager_v1/test_certificate_manager.py

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -352,86 +352,6 @@ def test__get_universe_domain():
352352
assert str(excinfo.value) == "Universe Domain cannot be an empty string."
353353

354354

355-
@pytest.mark.parametrize(
356-
"client_class,transport_class,transport_name",
357-
[
358-
(CertificateManagerClient, transports.CertificateManagerGrpcTransport, "grpc"),
359-
(CertificateManagerClient, transports.CertificateManagerRestTransport, "rest"),
360-
],
361-
)
362-
def test__validate_universe_domain(client_class, transport_class, transport_name):
363-
client = client_class(
364-
transport=transport_class(credentials=ga_credentials.AnonymousCredentials())
365-
)
366-
assert client._validate_universe_domain() == True
367-
368-
# Test the case when universe is already validated.
369-
assert client._validate_universe_domain() == True
370-
371-
if transport_name == "grpc":
372-
# Test the case where credentials are provided by the
373-
# `local_channel_credentials`. The default universes in both match.
374-
channel = grpc.secure_channel(
375-
"http://localhost/", grpc.local_channel_credentials()
376-
)
377-
client = client_class(transport=transport_class(channel=channel))
378-
assert client._validate_universe_domain() == True
379-
380-
# Test the case where credentials do not exist: e.g. a transport is provided
381-
# with no credentials. Validation should still succeed because there is no
382-
# mismatch with non-existent credentials.
383-
channel = grpc.secure_channel(
384-
"http://localhost/", grpc.local_channel_credentials()
385-
)
386-
transport = transport_class(channel=channel)
387-
transport._credentials = None
388-
client = client_class(transport=transport)
389-
assert client._validate_universe_domain() == True
390-
391-
# TODO: This is needed to cater for older versions of google-auth
392-
# Make this test unconditional once the minimum supported version of
393-
# google-auth becomes 2.23.0 or higher.
394-
google_auth_major, google_auth_minor = [
395-
int(part) for part in google.auth.__version__.split(".")[0:2]
396-
]
397-
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
398-
credentials = ga_credentials.AnonymousCredentials()
399-
credentials._universe_domain = "foo.com"
400-
# Test the case when there is a universe mismatch from the credentials.
401-
client = client_class(transport=transport_class(credentials=credentials))
402-
with pytest.raises(ValueError) as excinfo:
403-
client._validate_universe_domain()
404-
assert (
405-
str(excinfo.value)
406-
== "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default."
407-
)
408-
409-
# Test the case when there is a universe mismatch from the client.
410-
#
411-
# TODO: Make this test unconditional once the minimum supported version of
412-
# google-api-core becomes 2.15.0 or higher.
413-
api_core_major, api_core_minor = [
414-
int(part) for part in api_core_version.__version__.split(".")[0:2]
415-
]
416-
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
417-
client = client_class(
418-
client_options={"universe_domain": "bar.com"},
419-
transport=transport_class(
420-
credentials=ga_credentials.AnonymousCredentials(),
421-
),
422-
)
423-
with pytest.raises(ValueError) as excinfo:
424-
client._validate_universe_domain()
425-
assert (
426-
str(excinfo.value)
427-
== "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default."
428-
)
429-
430-
# Test that ValueError is raised if universe_domain is provided via client options and credentials is None
431-
with pytest.raises(ValueError):
432-
client._compare_universes("foo.bar", None)
433-
434-
435355
@pytest.mark.parametrize(
436356
"client_class,transport_name",
437357
[

packages/google-cloud-channel/google/cloud/channel/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.20.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-channel/google/cloud/channel_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.20.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-channel/google/cloud/channel_v1/services/cloud_channel_reports_service/client.py

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -488,36 +488,6 @@ def _get_universe_domain(
488488
raise ValueError("Universe Domain cannot be an empty string.")
489489
return universe_domain
490490

491-
@staticmethod
492-
def _compare_universes(
493-
client_universe: str, credentials: ga_credentials.Credentials
494-
) -> bool:
495-
"""Returns True iff the universe domains used by the client and credentials match.
496-
497-
Args:
498-
client_universe (str): The universe domain configured via the client options.
499-
credentials (ga_credentials.Credentials): The credentials being used in the client.
500-
501-
Returns:
502-
bool: True iff client_universe matches the universe in credentials.
503-
504-
Raises:
505-
ValueError: when client_universe does not match the universe in credentials.
506-
"""
507-
508-
default_universe = CloudChannelReportsServiceClient._DEFAULT_UNIVERSE
509-
credentials_universe = getattr(credentials, "universe_domain", default_universe)
510-
511-
if client_universe != credentials_universe:
512-
raise ValueError(
513-
"The configured universe domain "
514-
f"({client_universe}) does not match the universe domain "
515-
f"found in the credentials ({credentials_universe}). "
516-
"If you haven't configured the universe domain explicitly, "
517-
f"`{default_universe}` is the default."
518-
)
519-
return True
520-
521491
def _validate_universe_domain(self):
522492
"""Validates client's and credentials' universe domains are consistent.
523493
@@ -527,13 +497,9 @@ def _validate_universe_domain(self):
527497
Raises:
528498
ValueError: If the configured universe domain is not valid.
529499
"""
530-
self._is_universe_domain_valid = (
531-
self._is_universe_domain_valid
532-
or CloudChannelReportsServiceClient._compare_universes(
533-
self.universe_domain, self.transport._credentials
534-
)
535-
)
536-
return self._is_universe_domain_valid
500+
501+
# NOTE (b/349488459): universe validation is disabled until further notice.
502+
return True
537503

538504
@property
539505
def api_endpoint(self):

packages/google-cloud-channel/google/cloud/channel_v1/services/cloud_channel_service/client.py

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -669,36 +669,6 @@ def _get_universe_domain(
669669
raise ValueError("Universe Domain cannot be an empty string.")
670670
return universe_domain
671671

672-
@staticmethod
673-
def _compare_universes(
674-
client_universe: str, credentials: ga_credentials.Credentials
675-
) -> bool:
676-
"""Returns True iff the universe domains used by the client and credentials match.
677-
678-
Args:
679-
client_universe (str): The universe domain configured via the client options.
680-
credentials (ga_credentials.Credentials): The credentials being used in the client.
681-
682-
Returns:
683-
bool: True iff client_universe matches the universe in credentials.
684-
685-
Raises:
686-
ValueError: when client_universe does not match the universe in credentials.
687-
"""
688-
689-
default_universe = CloudChannelServiceClient._DEFAULT_UNIVERSE
690-
credentials_universe = getattr(credentials, "universe_domain", default_universe)
691-
692-
if client_universe != credentials_universe:
693-
raise ValueError(
694-
"The configured universe domain "
695-
f"({client_universe}) does not match the universe domain "
696-
f"found in the credentials ({credentials_universe}). "
697-
"If you haven't configured the universe domain explicitly, "
698-
f"`{default_universe}` is the default."
699-
)
700-
return True
701-
702672
def _validate_universe_domain(self):
703673
"""Validates client's and credentials' universe domains are consistent.
704674
@@ -708,13 +678,9 @@ def _validate_universe_domain(self):
708678
Raises:
709679
ValueError: If the configured universe domain is not valid.
710680
"""
711-
self._is_universe_domain_valid = (
712-
self._is_universe_domain_valid
713-
or CloudChannelServiceClient._compare_universes(
714-
self.universe_domain, self.transport._credentials
715-
)
716-
)
717-
return self._is_universe_domain_valid
681+
682+
# NOTE (b/349488459): universe validation is disabled until further notice.
683+
return True
718684

719685
@property
720686
def api_endpoint(self):

packages/google-cloud-channel/samples/generated_samples/snippet_metadata_google.cloud.channel.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-channel",
11-
"version": "1.20.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)