Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ 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
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading
Loading