# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from tast.cros.services.cros.ui import check_virtual_keyboard_service_pb2 as tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2

GRPC_GENERATED_VERSION = '1.71.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in tast/cros/services/cros/ui/check_virtual_keyboard_service_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class CheckVirtualKeyboardServiceStub(object):
    """CheckVirtualKeyboardService checks whether the virtual keyboard is present.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.NewChromeLoggedIn = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/NewChromeLoggedIn',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.NewBrowserRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.CloseChrome = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/CloseChrome',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.OpenChromePage = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/OpenChromePage',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.ClickChromeAddressBar = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/ClickChromeAddressBar',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.TouchChromeAddressBar = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/TouchChromeAddressBar',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.CheckVirtualKeyboardIsPresent = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/CheckVirtualKeyboardIsPresent',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardRequest.SerializeToString,
                response_deserializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardResponse.FromString,
                _registered_method=True)
        self.ClickSearchBar = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/ClickSearchBar',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.EnableOnscreenKeyboard = channel.unary_unary(
                '/tast.cros.ui.CheckVirtualKeyboardService/EnableOnscreenKeyboard',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)


class CheckVirtualKeyboardServiceServicer(object):
    """CheckVirtualKeyboardService checks whether the virtual keyboard is present.
    """

    def NewChromeLoggedIn(self, request, context):
        """NewChromeLoggedIn Logs into a user session.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CloseChrome(self, request, context):
        """CloseChrome releases the resources obtained by NewChrome.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def OpenChromePage(self, request, context):
        """OpenChromePage opens a chrome page.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ClickChromeAddressBar(self, request, context):
        """ClickChromeAddressBar clicks on the address bar.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TouchChromeAddressBar(self, request, context):
        """TouchChromeAddressBar sends a tap on the touch screen to touch on the address bar.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CheckVirtualKeyboardIsPresent(self, request, context):
        """CheckVirtualKeyboardIsPresent checks whether the virtual keyboard is present.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ClickSearchBar(self, request, context):
        """ClickSearchBar clicks the search bar.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EnableOnscreenKeyboard(self, request, context):
        """EnableOnscreenKeyboard enables the on-screen keyboard.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CheckVirtualKeyboardServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'NewChromeLoggedIn': grpc.unary_unary_rpc_method_handler(
                    servicer.NewChromeLoggedIn,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.NewBrowserRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'CloseChrome': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseChrome,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'OpenChromePage': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenChromePage,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ClickChromeAddressBar': grpc.unary_unary_rpc_method_handler(
                    servicer.ClickChromeAddressBar,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'TouchChromeAddressBar': grpc.unary_unary_rpc_method_handler(
                    servicer.TouchChromeAddressBar,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'CheckVirtualKeyboardIsPresent': grpc.unary_unary_rpc_method_handler(
                    servicer.CheckVirtualKeyboardIsPresent,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardRequest.FromString,
                    response_serializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardResponse.SerializeToString,
            ),
            'ClickSearchBar': grpc.unary_unary_rpc_method_handler(
                    servicer.ClickSearchBar,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'EnableOnscreenKeyboard': grpc.unary_unary_rpc_method_handler(
                    servicer.EnableOnscreenKeyboard,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'tast.cros.ui.CheckVirtualKeyboardService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('tast.cros.ui.CheckVirtualKeyboardService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class CheckVirtualKeyboardService(object):
    """CheckVirtualKeyboardService checks whether the virtual keyboard is present.
    """

    @staticmethod
    def NewChromeLoggedIn(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/NewChromeLoggedIn',
            tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.NewBrowserRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CloseChrome(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/CloseChrome',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OpenChromePage(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/OpenChromePage',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClickChromeAddressBar(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/ClickChromeAddressBar',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TouchChromeAddressBar(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/TouchChromeAddressBar',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CheckVirtualKeyboardIsPresent(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/CheckVirtualKeyboardIsPresent',
            tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardRequest.SerializeToString,
            tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClickSearchBar(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/ClickSearchBar',
            tast_dot_cros_dot_services_dot_cros_dot_ui_dot_check__virtual__keyboard__service__pb2.CheckVirtualKeyboardRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def EnableOnscreenKeyboard(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/tast.cros.ui.CheckVirtualKeyboardService/EnableOnscreenKeyboard',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
