# 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.bluetooth import bluetooth_ui_service_pb2 as tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__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/bluetooth/bluetooth_ui_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 BluetoothUIServiceStub(object):
    """BluetoothUIService allows bluetooth remote tests make calls to local,
    bluetooth-specific functions using UI actions necessary for testing bluetooth
    features.

    For direct management of bluetooth services, use the BluetoothService
    instead.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.PairWithFastPairNotification = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/PairWithFastPairNotification',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.PairWithFastPairNotificationRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.CloseNotifications = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/CloseNotifications',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.ConfirmSavedDevicesState = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/ConfirmSavedDevicesState',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.ConfirmSavedDevicesStateRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.RemoveAllSavedDevices = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/RemoveAllSavedDevices',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.PairDeviceWithQuickSettings = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/PairDeviceWithQuickSettings',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.PairDeviceWithQuickSettingsRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.ForgetBluetoothDevice = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/ForgetBluetoothDevice',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.ForgetBluetoothDeviceRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.CollectDeviceList = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/CollectDeviceList',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.CollectDeviceListResponse.FromString,
                _registered_method=True)
        self.BluetoothDeviceDetail = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/BluetoothDeviceDetail',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.BluetoothDeviceDetailRequest.SerializeToString,
                response_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.BluetoothDeviceDetailResponse.FromString,
                _registered_method=True)
        self.RenameBluetoothDevice = channel.unary_unary(
                '/tast.cros.bluetooth.BluetoothUIService/RenameBluetoothDevice',
                request_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.RenameBluetoothDeviceRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)


class BluetoothUIServiceServicer(object):
    """BluetoothUIService allows bluetooth remote tests make calls to local,
    bluetooth-specific functions using UI actions necessary for testing bluetooth
    features.

    For direct management of bluetooth services, use the BluetoothService
    instead.
    """

    def PairWithFastPairNotification(self, request, context):
        """PairWithFastPairNotification will attempt to pair a fast pair device with
        the fast pair notification.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CloseNotifications(self, request, context):
        """CloseNotifications closes all open notifications.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ConfirmSavedDevicesState(self, request, context):
        """ConfirmSavedDevicesState will attempt to confirm the state of Saved Devices
        on the Saved Devices subpage. The array of devices should be in the
        expected order. Fails if the list of Saved Devices doesn't match the one
        provided.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveAllSavedDevices(self, request, context):
        """RemoveAllSavedDevices will attempt to remove all of the devices from the
        Saved Devices subpage.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PairDeviceWithQuickSettings(self, request, context):
        """PairDeviceWithQuickSettings pairs with the specified device through UI
        interactions with the Quick Settings.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ForgetBluetoothDevice(self, request, context):
        """ForgetBluetoothDevice will attempt to navigate to the Device Detail subpage
        for the device specified in the request, then click "Forget" to forget the
        device.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CollectDeviceList(self, request, context):
        """CollectDeviceList will attempt to collect and list all available Bluetooth
        devices in the Bluetooth page in the OS-Settings.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BluetoothDeviceDetail(self, request, context):
        """BluetoothDeviceDetail will attempt to navigate to the Device Detail subpage
        for the device specified in the request, then retrieves the information of
        this particular device.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RenameBluetoothDevice(self, request, context):
        """RenameBluetoothDevice will attempt to navigate to the Device Detail subpage
        for the device specified in the request, then renames the Bluetooth device.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BluetoothUIServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PairWithFastPairNotification': grpc.unary_unary_rpc_method_handler(
                    servicer.PairWithFastPairNotification,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.PairWithFastPairNotificationRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'CloseNotifications': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseNotifications,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ConfirmSavedDevicesState': grpc.unary_unary_rpc_method_handler(
                    servicer.ConfirmSavedDevicesState,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.ConfirmSavedDevicesStateRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RemoveAllSavedDevices': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveAllSavedDevices,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'PairDeviceWithQuickSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.PairDeviceWithQuickSettings,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.PairDeviceWithQuickSettingsRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ForgetBluetoothDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.ForgetBluetoothDevice,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.ForgetBluetoothDeviceRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'CollectDeviceList': grpc.unary_unary_rpc_method_handler(
                    servicer.CollectDeviceList,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.CollectDeviceListResponse.SerializeToString,
            ),
            'BluetoothDeviceDetail': grpc.unary_unary_rpc_method_handler(
                    servicer.BluetoothDeviceDetail,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.BluetoothDeviceDetailRequest.FromString,
                    response_serializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.BluetoothDeviceDetailResponse.SerializeToString,
            ),
            'RenameBluetoothDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.RenameBluetoothDevice,
                    request_deserializer=tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.RenameBluetoothDeviceRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'tast.cros.bluetooth.BluetoothUIService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('tast.cros.bluetooth.BluetoothUIService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class BluetoothUIService(object):
    """BluetoothUIService allows bluetooth remote tests make calls to local,
    bluetooth-specific functions using UI actions necessary for testing bluetooth
    features.

    For direct management of bluetooth services, use the BluetoothService
    instead.
    """

    @staticmethod
    def PairWithFastPairNotification(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.bluetooth.BluetoothUIService/PairWithFastPairNotification',
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.PairWithFastPairNotificationRequest.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 CloseNotifications(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.bluetooth.BluetoothUIService/CloseNotifications',
            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 ConfirmSavedDevicesState(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.bluetooth.BluetoothUIService/ConfirmSavedDevicesState',
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.ConfirmSavedDevicesStateRequest.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 RemoveAllSavedDevices(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.bluetooth.BluetoothUIService/RemoveAllSavedDevices',
            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 PairDeviceWithQuickSettings(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.bluetooth.BluetoothUIService/PairDeviceWithQuickSettings',
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.PairDeviceWithQuickSettingsRequest.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 ForgetBluetoothDevice(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.bluetooth.BluetoothUIService/ForgetBluetoothDevice',
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.ForgetBluetoothDeviceRequest.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 CollectDeviceList(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.bluetooth.BluetoothUIService/CollectDeviceList',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.CollectDeviceListResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BluetoothDeviceDetail(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.bluetooth.BluetoothUIService/BluetoothDeviceDetail',
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.BluetoothDeviceDetailRequest.SerializeToString,
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.BluetoothDeviceDetailResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RenameBluetoothDevice(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.bluetooth.BluetoothUIService/RenameBluetoothDevice',
            tast_dot_cros_dot_services_dot_cros_dot_bluetooth_dot_bluetooth__ui__service__pb2.RenameBluetoothDeviceRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
