from collections.abc import Callable
from typing import TypeVar

import grpc

# Autogenerated imports
import google.ads.googleads.v20.services
import google.ads.googleads.v21.services
import google.ads.googleads.v22.services
import google.ads.googleads.v23.services

# End of autogenerated imports
from .interceptor import Interceptor

_Request = TypeVar(
    "_Request",
    # Autogenerated request types
    google.ads.googleads.v20.services.SearchGoogleAdsRequest,
    google.ads.googleads.v20.services.SearchGoogleAdsStreamRequest,
    google.ads.googleads.v21.services.SearchGoogleAdsRequest,
    google.ads.googleads.v21.services.SearchGoogleAdsStreamRequest,
    google.ads.googleads.v22.services.SearchGoogleAdsRequest,
    google.ads.googleads.v22.services.SearchGoogleAdsStreamRequest,
    google.ads.googleads.v23.services.SearchGoogleAdsRequest,
    google.ads.googleads.v23.services.SearchGoogleAdsStreamRequest,
    # End of autogenerated request types
)
_Response = TypeVar("_Response")

class ExceptionInterceptor(
    Interceptor, grpc.UnaryUnaryClientInterceptor, grpc.UnaryStreamClientInterceptor
):
    def __init__(self, api_version: str, use_proto_plus: bool = False) -> None: ...
    def intercept_unary_unary(
        self,
        continuation: Callable[[grpc.ClientCallDetails, _Request], _Response],
        client_call_details: grpc.ClientCallDetails,
        request: _Request,
    ) -> _Response: ...
    def intercept_unary_stream(
        self,
        continuation: Callable[[grpc.ClientCallDetails, _Request], _Response],
        client_call_details: grpc.ClientCallDetails,
        request: _Request,
    ) -> _Response: ...
