# Path: google/cloud/asset_v1p1beta1/services/asset_service/pagers.py
# class SearchAllResourcesPager:
# class SearchAllResourcesAsyncPager:
# class SearchAllIamPoliciesPager:
# class SearchAllIamPoliciesAsyncPager:
#     def __init__(
#         self,
#         method: Callable[..., asset_service.SearchAllResourcesResponse],
#         request: asset_service.SearchAllResourcesRequest,
#         response: asset_service.SearchAllResourcesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     def pages(self) -> Iterator[asset_service.SearchAllResourcesResponse]:
#     def __iter__(self) -> Iterator[assets.StandardResourceMetadata]:
#     def __repr__(self) -> str:
#     def __init__(
#         self,
#         method: Callable[..., Awaitable[asset_service.SearchAllResourcesResponse]],
#         request: asset_service.SearchAllResourcesRequest,
#         response: asset_service.SearchAllResourcesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     async def pages(self) -> AsyncIterator[asset_service.SearchAllResourcesResponse]:
#     def __aiter__(self) -> AsyncIterator[assets.StandardResourceMetadata]:
#         async def async_generator():
#     def __repr__(self) -> str:
#     def __init__(
#         self,
#         method: Callable[..., asset_service.SearchAllIamPoliciesResponse],
#         request: asset_service.SearchAllIamPoliciesRequest,
#         response: asset_service.SearchAllIamPoliciesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     def pages(self) -> Iterator[asset_service.SearchAllIamPoliciesResponse]:
#     def __iter__(self) -> Iterator[assets.IamPolicySearchResult]:
#     def __repr__(self) -> str:
#     def __init__(
#         self,
#         method: Callable[..., Awaitable[asset_service.SearchAllIamPoliciesResponse]],
#         request: asset_service.SearchAllIamPoliciesRequest,
#         response: asset_service.SearchAllIamPoliciesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     async def pages(self) -> AsyncIterator[asset_service.SearchAllIamPoliciesResponse]:
#     def __aiter__(self) -> AsyncIterator[assets.IamPolicySearchResult]:
#         async def async_generator():
#     def __repr__(self) -> str:
# 
# Path: google/cloud/asset_v1p1beta1/types/asset_service.py
# class SearchAllResourcesRequest(proto.Message):
# class SearchAllResourcesResponse(proto.Message):
# class SearchAllIamPoliciesRequest(proto.Message):
# class SearchAllIamPoliciesResponse(proto.Message):
#     def raw_page(self):
#     def raw_page(self):
# 
# Path: google/cloud/asset_v1p1beta1/types/assets.py
# class StandardResourceMetadata(proto.Message):
# class IamPolicySearchResult(proto.Message):
#     class Explanation(proto.Message):
# class Permissions(proto.Message):


import os
import mock
import grpc
import math
import pytest
import google.auth
from grpc.experimental import aio
from proto.marshal.rules.dates import DurationRule, TimestampRule
from google.api_core import client_options
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import grpc_helpers
from google.api_core import grpc_helpers_async
from google.api_core import path_template
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
from google.cloud.asset_v1p1beta1.services.asset_service import AssetServiceAsyncClient
from google.cloud.asset_v1p1beta1.services.asset_service import AssetServiceClient
from google.cloud.asset_v1p1beta1.services.asset_service import pagers
from google.cloud.asset_v1p1beta1.services.asset_service import transports
from google.cloud.asset_v1p1beta1.types import asset_service
from google.cloud.asset_v1p1beta1.types import assets
from google.oauth2 import service_account

        create_channel.assert_called_with(
            "cloudasset.googleapis.com:443",
            credentials=creds,
            credentials_file=None,
            quota_project_id="octopus",
            default_scopes=("https://www.googleapis.com/auth/cloud-platform",),
            scopes=["1", "2"],
            default_host="cloudasset.googleapis.com",
            ssl_credentials=None,
            options=[
                ("grpc.max_send_message_length", -1),
                ("grpc.max_receive_message_length", -1),
            ],
        )


@pytest.mark.parametrize(
    "transport_class",
    [transports.AssetServiceGrpcTransport, transports.AssetServiceGrpcAsyncIOTransport],
)
def test_asset_service_grpc_transport_client_cert_source_for_mtls(transport_class):
    cred = ga_credentials.AnonymousCredentials()

    # Check ssl_channel_credentials is used if provided.
    with mock.patch.object(transport_class, "create_channel") as mock_create_channel:
        mock_ssl_channel_creds = mock.Mock()
        transport_class(
            host="squid.clam.whelk",
            credentials=cred,

# Path: google/cloud/asset_v1p1beta1/services/asset_service/pagers.py
# class SearchAllResourcesPager:
# class SearchAllResourcesAsyncPager:
# class SearchAllIamPoliciesPager:
# class SearchAllIamPoliciesAsyncPager:
#     def __init__(
#         self,
#         method: Callable[..., asset_service.SearchAllResourcesResponse],
#         request: asset_service.SearchAllResourcesRequest,
#         response: asset_service.SearchAllResourcesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     def pages(self) -> Iterator[asset_service.SearchAllResourcesResponse]:
#     def __iter__(self) -> Iterator[assets.StandardResourceMetadata]:
#     def __repr__(self) -> str:
#     def __init__(
#         self,
#         method: Callable[..., Awaitable[asset_service.SearchAllResourcesResponse]],
#         request: asset_service.SearchAllResourcesRequest,
#         response: asset_service.SearchAllResourcesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     async def pages(self) -> AsyncIterator[asset_service.SearchAllResourcesResponse]:
#     def __aiter__(self) -> AsyncIterator[assets.StandardResourceMetadata]:
#         async def async_generator():
#     def __repr__(self) -> str:
#     def __init__(
#         self,
#         method: Callable[..., asset_service.SearchAllIamPoliciesResponse],
#         request: asset_service.SearchAllIamPoliciesRequest,
#         response: asset_service.SearchAllIamPoliciesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     def pages(self) -> Iterator[asset_service.SearchAllIamPoliciesResponse]:
#     def __iter__(self) -> Iterator[assets.IamPolicySearchResult]:
#     def __repr__(self) -> str:
#     def __init__(
#         self,
#         method: Callable[..., Awaitable[asset_service.SearchAllIamPoliciesResponse]],
#         request: asset_service.SearchAllIamPoliciesRequest,
#         response: asset_service.SearchAllIamPoliciesResponse,
#         *,
#         metadata: Sequence[Tuple[str, str]] = ()
#     ):
#     def __getattr__(self, name: str) -> Any:
#     async def pages(self) -> AsyncIterator[asset_service.SearchAllIamPoliciesResponse]:
#     def __aiter__(self) -> AsyncIterator[assets.IamPolicySearchResult]:
#         async def async_generator():
#     def __repr__(self) -> str:
# 
# Path: google/cloud/asset_v1p1beta1/types/asset_service.py
# class SearchAllResourcesRequest(proto.Message):
# class SearchAllResourcesResponse(proto.Message):
# class SearchAllIamPoliciesRequest(proto.Message):
# class SearchAllIamPoliciesResponse(proto.Message):
#     def raw_page(self):
#     def raw_page(self):
# 
# Path: google/cloud/asset_v1p1beta1/types/assets.py
# class StandardResourceMetadata(proto.Message):
# class IamPolicySearchResult(proto.Message):
#     class Explanation(proto.Message):
# class Permissions(proto.Message):


# Path: tests/unit/gapic/asset_v1p1beta1/test_asset_service.py
import os
import mock
import grpc
import math
import pytest
import google.auth
from grpc.experimental import aio
from proto.marshal.rules.dates import DurationRule, TimestampRule
from google.api_core import client_options
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import grpc_helpers
from google.api_core import grpc_helpers_async
from google.api_core import path_template
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
from google.cloud.asset_v1p1beta1.services.asset_service import AssetServiceAsyncClient
from google.cloud.asset_v1p1beta1.services.asset_service import AssetServiceClient
from google.cloud.asset_v1p1beta1.services.asset_service import pagers
from google.cloud.asset_v1p1beta1.services.asset_service import transports
from google.cloud.asset_v1p1beta1.types import asset_service
from google.cloud.asset_v1p1beta1.types import assets
from google.oauth2 import service_account


        create_channel.assert_called_with(
            "cloudasset.googleapis.com:443",
            credentials=creds,
            credentials_file=None,
            quota_project_id="octopus",
            default_scopes=("https://www.googleapis.com/auth/cloud-platform",),
            scopes=["1", "2"],
            default_host="cloudasset.googleapis.com",
            ssl_credentials=None,
            options=[
                ("grpc.max_send_message_length", -1),
                ("grpc.max_receive_message_length", -1),
            ],
        )


@pytest.mark.parametrize(
    "transport_class",
    [transports.AssetServiceGrpcTransport, transports.AssetServiceGrpcAsyncIOTransport],
)
def test_asset_service_grpc_transport_client_cert_source_for_mtls(transport_class):
    cred = ga_credentials.AnonymousCredentials()

    # Check ssl_channel_credentials is used if provided.
    with mock.patch.object(transport_class, "create_channel") as mock_create_channel:
        mock_ssl_channel_creds = mock.Mock()
        transport_class(
            host="squid.clam.whelk",
            credentials=cred,

            ssl_channel_credentials=mock_ssl_channel_creds,