@staticmethod
def _get_default_mtls_endpoint(api_endpoint):
    'Converts api endpoint to mTLS endpoint.\n\n        Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to\n        "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.\n        Args:\n            api_endpoint (Optional[str]): the api endpoint to convert.\n        Returns:\n            str: converted mTLS api endpoint.\n        '
    if (not api_endpoint):
        return api_endpoint
    mtls_endpoint_re = re.compile('(?P<name>[^.]+)(?P<mtls>\\.mtls)?(?P<sandbox>\\.sandbox)?(?P<googledomain>\\.googleapis\\.com)?')
    m = mtls_endpoint_re.match(api_endpoint)
    (name, mtls, sandbox, googledomain) = m.groups()
    if (mtls or (not googledomain)):
        return api_endpoint
    if sandbox:
        return api_endpoint.replace('sandbox.googleapis.com', 'mtls.sandbox.googleapis.com')
    return api_endpoint.replace('.googleapis.com', '.mtls.googleapis.com')
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.
@staticmethod
def _get_default_mtls_endpoint(api_endpoint):
    'Converts api endpoint to mTLS endpoint.\n\n        Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to\n        "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.\n        Args:\n            api_endpoint (Optional[str]): the api endpoint to convert.\n        Returns:\n            str: converted mTLS api endpoint.\n        '
    if (not api_endpoint):
        return api_endpoint
    mtls_endpoint_re = re.compile('(?P<name>[^.]+)(?P<mtls>\\.mtls)?(?P<sandbox>\\.sandbox)?(?P<googledomain>\\.googleapis\\.com)?')
    m = mtls_endpoint_re.match(api_endpoint)
    (name, mtls, sandbox, googledomain) = m.groups()
    if (mtls or (not googledomain)):
        return api_endpoint
    if sandbox:
        return api_endpoint.replace('sandbox.googleapis.com', 'mtls.sandbox.googleapis.com')
    return api_endpoint.replace('.googleapis.com', '.mtls.googleapis.com')