From 39b72ec22952b58b660279e18f6e4e6484a96800 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Mon, 1 Dec 2025 16:45:11 -0800 Subject: [PATCH 1/3] feat: add return type to api_endpoint --- .../%name_%version/%sub/services/%service/async_client.py.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 index 689d3e0620..ba3e7c4da6 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 @@ -162,7 +162,7 @@ class {{ service.async_client_name }}: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: From 5ff2bf2862124b4eb0105b1931c276c7ff938e87 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Mon, 1 Dec 2025 16:49:19 -0800 Subject: [PATCH 2/3] update type hinting in client.py.j2 --- .../%name_%version/%sub/services/%service/client.py.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 index 0d60f47bb6..34bbe2f4eb 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 @@ -143,7 +143,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): This class implements API version {{ service.version }}.{% endif %}""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -151,7 +151,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -387,7 +387,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -473,7 +473,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: From 19bba784f39fded9a9fc6bbb863f898ce92d5c47 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 2 Dec 2025 10:20:57 -0800 Subject: [PATCH 3/3] update goldens --- .../cloud/asset_v1/services/asset_service/async_client.py | 2 +- .../cloud/asset_v1/services/asset_service/client.py | 8 ++++---- .../services/iam_credentials/async_client.py | 2 +- .../iam/credentials_v1/services/iam_credentials/client.py | 8 ++++---- .../cloud/eventarc_v1/services/eventarc/async_client.py | 2 +- .../google/cloud/eventarc_v1/services/eventarc/client.py | 8 ++++---- .../logging_v2/services/config_service_v2/async_client.py | 2 +- .../cloud/logging_v2/services/config_service_v2/client.py | 8 ++++---- .../services/logging_service_v2/async_client.py | 2 +- .../logging_v2/services/logging_service_v2/client.py | 8 ++++---- .../services/metrics_service_v2/async_client.py | 2 +- .../logging_v2/services/metrics_service_v2/client.py | 8 ++++---- .../logging_v2/services/config_service_v2/async_client.py | 2 +- .../cloud/logging_v2/services/config_service_v2/client.py | 8 ++++---- .../services/logging_service_v2/async_client.py | 2 +- .../logging_v2/services/logging_service_v2/client.py | 8 ++++---- .../services/metrics_service_v2/async_client.py | 2 +- .../logging_v2/services/metrics_service_v2/client.py | 8 ++++---- .../cloud/redis_v1/services/cloud_redis/async_client.py | 2 +- .../google/cloud/redis_v1/services/cloud_redis/client.py | 8 ++++---- .../cloud/redis_v1/services/cloud_redis/async_client.py | 2 +- .../google/cloud/redis_v1/services/cloud_redis/client.py | 8 ++++---- 22 files changed, 55 insertions(+), 55 deletions(-) diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py index 38379ce9d7..8a8489a026 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py @@ -170,7 +170,7 @@ def transport(self) -> AssetServiceTransport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py index 843790205a..7723267b10 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py @@ -101,7 +101,7 @@ class AssetServiceClient(metaclass=AssetServiceClientMeta): """Asset service definition.""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -109,7 +109,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -446,7 +446,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -532,7 +532,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py index eac708473c..529bffc55a 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py @@ -161,7 +161,7 @@ def transport(self) -> IAMCredentialsTransport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py index 4f2406bad6..2fe842a7f0 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py @@ -104,7 +104,7 @@ class IAMCredentialsClient(metaclass=IAMCredentialsClientMeta): """ @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -112,7 +112,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -383,7 +383,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -469,7 +469,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py index 09b53be781..3accdecb92 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py @@ -188,7 +188,7 @@ def transport(self) -> EventarcTransport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py index 3accde24c6..b3915cbae7 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py @@ -113,7 +113,7 @@ class EventarcClient(metaclass=EventarcClientMeta): """ @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -121,7 +121,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -491,7 +491,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -577,7 +577,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py index b5d7d26514..bf9f891d18 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -168,7 +168,7 @@ def transport(self) -> ConfigServiceV2Transport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py index b2e701b095..23c268dd4f 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py @@ -97,7 +97,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta): """Service for configuring sinks used to route log entries.""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -105,7 +105,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -442,7 +442,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -528,7 +528,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py index f84e9f6ec5..0a9692684c 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -153,7 +153,7 @@ def transport(self) -> LoggingServiceV2Transport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py index 8c37951cb5..51e81c1ce6 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -94,7 +94,7 @@ class LoggingServiceV2Client(metaclass=LoggingServiceV2ClientMeta): """Service for ingesting and querying logs.""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -102,7 +102,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -373,7 +373,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -459,7 +459,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index ad659243d7..c0ffc67929 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -154,7 +154,7 @@ def transport(self) -> MetricsServiceV2Transport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py index 6ff3b7ac02..13c7408caf 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -95,7 +95,7 @@ class MetricsServiceV2Client(metaclass=MetricsServiceV2ClientMeta): """Service for configuring logs-based metrics.""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -103,7 +103,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -374,7 +374,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -460,7 +460,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py index ef5a9151a1..8de2213add 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -168,7 +168,7 @@ def transport(self) -> ConfigServiceV2Transport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py index 7889ba044b..5e90dba923 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py @@ -97,7 +97,7 @@ class BaseConfigServiceV2Client(metaclass=BaseConfigServiceV2ClientMeta): """Service for configuring sinks used to route log entries.""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -105,7 +105,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -442,7 +442,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -528,7 +528,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py index f84e9f6ec5..0a9692684c 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -153,7 +153,7 @@ def transport(self) -> LoggingServiceV2Transport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py index 8c37951cb5..51e81c1ce6 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -94,7 +94,7 @@ class LoggingServiceV2Client(metaclass=LoggingServiceV2ClientMeta): """Service for ingesting and querying logs.""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -102,7 +102,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -373,7 +373,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -459,7 +459,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index 5f0bf0c782..5abdbe8e37 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -154,7 +154,7 @@ def transport(self) -> MetricsServiceV2Transport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py index 479ae7c032..e463143df0 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -95,7 +95,7 @@ class BaseMetricsServiceV2Client(metaclass=BaseMetricsServiceV2ClientMeta): """Service for configuring logs-based metrics.""" @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -103,7 +103,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -374,7 +374,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -460,7 +460,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py index ea3e960a8e..8a7a177cc3 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -178,7 +178,7 @@ def transport(self) -> CloudRedisTransport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py index f3da10c2fc..8ac4fee1f4 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py @@ -131,7 +131,7 @@ class CloudRedisClient(metaclass=CloudRedisClientMeta): """ @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -139,7 +139,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -410,7 +410,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -496,7 +496,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py index 6e826449ce..df7782441d 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -178,7 +178,7 @@ def transport(self) -> CloudRedisTransport: return self._client.transport @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py index 32c43e15f1..16a318a0a4 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py @@ -131,7 +131,7 @@ class CloudRedisClient(metaclass=CloudRedisClientMeta): """ @staticmethod - def _get_default_mtls_endpoint(api_endpoint): + def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]: """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to @@ -139,7 +139,7 @@ def _get_default_mtls_endpoint(api_endpoint): Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: - str: converted mTLS api endpoint. + Optional[str]: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint @@ -410,7 +410,7 @@ def _get_client_cert_source(provided_cert_source, use_cert_flag): return client_cert_source @staticmethod - def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint): + def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str: """Return the API endpoint used by the client. Args: @@ -496,7 +496,7 @@ def _add_cred_info_for_auth_errors( error._details.append(json.dumps(cred_info)) @property - def api_endpoint(self): + def api_endpoint(self) -> str: """Return the API endpoint used by the client instance. Returns: