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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from t2iapi import basic_requests_pb2 as t2iapi_dot_basic__requests__pb2
from t2iapi import basic_responses_pb2 as t2iapi_dot_basic__responses__pb2
from t2iapi.device import device_requests_pb2 as t2iapi_dot_device_dot_device__requests__pb2
from t2iapi.device import device_responses_pb2 as t2iapi_dot_device_dot_device__responses__pb2


class DeviceServiceStub(object):
    """
    Service to handle device manipulations.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetDeviceOperatingMode = channel.unary_unary(
                '/t2iapi.device.DeviceService/SetDeviceOperatingMode',
                request_serializer=t2iapi_dot_device_dot_device__requests__pb2.SetDeviceOperatingModeRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.ShutDownDevice = channel.unary_unary(
                '/t2iapi.device.DeviceService/ShutDownDevice',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.BootUpDevice = channel.unary_unary(
                '/t2iapi.device.DeviceService/BootUpDevice',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SendHello = channel.unary_unary(
                '/t2iapi.device.DeviceService/SendHello',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SetClockDevice = channel.unary_unary(
                '/t2iapi.device.DeviceService/SetClockDevice',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.SetLanguage = channel.unary_unary(
                '/t2iapi.device.DeviceService/SetLanguage',
                request_serializer=t2iapi_dot_device_dot_device__requests__pb2.SetLanguageRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.GetRemovableDescriptorsOfClass = channel.unary_unary(
                '/t2iapi.device.DeviceService/GetRemovableDescriptorsOfClass',
                request_serializer=t2iapi_dot_device_dot_device__requests__pb2.GetRemovableDescriptorsOfClassRequest.SerializeToString,
                response_deserializer=t2iapi_dot_device_dot_device__responses__pb2.GetRemovableDescriptorsResponse.FromString,
                )
        self.RemoveDescriptor = channel.unary_unary(
                '/t2iapi.device.DeviceService/RemoveDescriptor',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.InsertDescriptor = channel.unary_unary(
                '/t2iapi.device.DeviceService/InsertDescriptor',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.ChangeMdibSequenceID = channel.unary_unary(
                '/t2iapi.device.DeviceService/ChangeMdibSequenceID',
                request_serializer=t2iapi_dot_device_dot_device__requests__pb2.ChangeMdibSequenceIdRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.InsertMdsDescriptor = channel.unary_unary(
                '/t2iapi.device.DeviceService/InsertMdsDescriptor',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=t2iapi_dot_device_dot_device__responses__pb2.InsertMdsDescriptorResponse.FromString,
                )
        self.RemoveMdsDescriptor = channel.unary_unary(
                '/t2iapi.device.DeviceService/RemoveMdsDescriptor',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.TriggerDescriptorUpdate = channel.unary_unary(
                '/t2iapi.device.DeviceService/TriggerDescriptorUpdate',
                request_serializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )
        self.TriggerReport = channel.unary_unary(
                '/t2iapi.device.DeviceService/TriggerReport',
                request_serializer=t2iapi_dot_device_dot_device__requests__pb2.TriggerReportRequest.SerializeToString,
                response_deserializer=t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
                )


class DeviceServiceServicer(object):
    """
    Service to handle device manipulations.
    """

    def SetDeviceOperatingMode(self, request, context):
        """
        Switch the device into a specific operating mode.
        This manipulation shall result in a Mds having a specific MdsOperatingMode.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ShutDownDevice(self, request, context):
        """
        Shutdown the device.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BootUpDevice(self, request, context):
        """
        Boot up the device.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendHello(self, request, context):
        """
        Announce the presence of the device in the network via a WS-Discovery Hello message.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetClockDevice(self, request, context):
        """
        Adjust the clock of the device as if it were set manually by a user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetLanguage(self, request, context):
        """
        Set the device's (displayed) language to the given language.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRemovableDescriptorsOfClass(self, request, context):
        """
        Get all descriptor handles which can be removed and reinserted into the MDIB of the device
        and whose descriptors are of the given class.
        Includes handles which have been removed already and can be reinserted.
        Handles must stay the same once reinserted into the MDIB.

        Calling GetRemovableDescriptorsOfClass with descriptor_class = DESCRIPTOR_CLASS_ABSTRACT
        returns the unfiltered handles while other values for descriptor_class
        return only handles whose descriptors are of the given class.

        The unfiltered handles shall be representative of the devices capabilities
        to remove descriptors (at least one of every possible kind).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveDescriptor(self, request, context):
        """
        Remove a descriptor from the device MDIB.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InsertDescriptor(self, request, context):
        """
        Insert a descriptor into the device MDIB.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangeMdibSequenceID(self, request, context):
        """
        Change of the MDIB SequenceId.
        This manipulation of the device shall trigger a change of the MDIB SequenceId.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InsertMdsDescriptor(self, request, context):
        """
        Insert an mds descriptor into the device MDIB.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveMdsDescriptor(self, request, context):
        """
        Remove an mds descriptor from the device MDIB.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TriggerDescriptorUpdate(self, request, context):
        """
        Trigger a descriptor update for the provided handle.
        This manipulation of the device shall result in a msg:DescriptionModificationReport message with a report part with
        modification type upt.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TriggerReport(self, request, context):
        """
        Trigger a report message of the provided type.
        This manipulation of the device shall result in an msg:AbstractReport message of the provided type.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DeviceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetDeviceOperatingMode': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDeviceOperatingMode,
                    request_deserializer=t2iapi_dot_device_dot_device__requests__pb2.SetDeviceOperatingModeRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'ShutDownDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.ShutDownDevice,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'BootUpDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.BootUpDevice,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SendHello': grpc.unary_unary_rpc_method_handler(
                    servicer.SendHello,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SetClockDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.SetClockDevice,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'SetLanguage': grpc.unary_unary_rpc_method_handler(
                    servicer.SetLanguage,
                    request_deserializer=t2iapi_dot_device_dot_device__requests__pb2.SetLanguageRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'GetRemovableDescriptorsOfClass': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRemovableDescriptorsOfClass,
                    request_deserializer=t2iapi_dot_device_dot_device__requests__pb2.GetRemovableDescriptorsOfClassRequest.FromString,
                    response_serializer=t2iapi_dot_device_dot_device__responses__pb2.GetRemovableDescriptorsResponse.SerializeToString,
            ),
            'RemoveDescriptor': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveDescriptor,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'InsertDescriptor': grpc.unary_unary_rpc_method_handler(
                    servicer.InsertDescriptor,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'ChangeMdibSequenceID': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangeMdibSequenceID,
                    request_deserializer=t2iapi_dot_device_dot_device__requests__pb2.ChangeMdibSequenceIdRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'InsertMdsDescriptor': grpc.unary_unary_rpc_method_handler(
                    servicer.InsertMdsDescriptor,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=t2iapi_dot_device_dot_device__responses__pb2.InsertMdsDescriptorResponse.SerializeToString,
            ),
            'RemoveMdsDescriptor': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveMdsDescriptor,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'TriggerDescriptorUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.TriggerDescriptorUpdate,
                    request_deserializer=t2iapi_dot_basic__requests__pb2.BasicHandleRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
            'TriggerReport': grpc.unary_unary_rpc_method_handler(
                    servicer.TriggerReport,
                    request_deserializer=t2iapi_dot_device_dot_device__requests__pb2.TriggerReportRequest.FromString,
                    response_serializer=t2iapi_dot_basic__responses__pb2.BasicResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            't2iapi.device.DeviceService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class DeviceService(object):
    """
    Service to handle device manipulations.
    """

    @staticmethod
    def SetDeviceOperatingMode(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, '/t2iapi.device.DeviceService/SetDeviceOperatingMode',
            t2iapi_dot_device_dot_device__requests__pb2.SetDeviceOperatingModeRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ShutDownDevice(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, '/t2iapi.device.DeviceService/ShutDownDevice',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BootUpDevice(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, '/t2iapi.device.DeviceService/BootUpDevice',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendHello(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, '/t2iapi.device.DeviceService/SendHello',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetClockDevice(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, '/t2iapi.device.DeviceService/SetClockDevice',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetLanguage(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, '/t2iapi.device.DeviceService/SetLanguage',
            t2iapi_dot_device_dot_device__requests__pb2.SetLanguageRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRemovableDescriptorsOfClass(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, '/t2iapi.device.DeviceService/GetRemovableDescriptorsOfClass',
            t2iapi_dot_device_dot_device__requests__pb2.GetRemovableDescriptorsOfClassRequest.SerializeToString,
            t2iapi_dot_device_dot_device__responses__pb2.GetRemovableDescriptorsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveDescriptor(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, '/t2iapi.device.DeviceService/RemoveDescriptor',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InsertDescriptor(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, '/t2iapi.device.DeviceService/InsertDescriptor',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ChangeMdibSequenceID(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, '/t2iapi.device.DeviceService/ChangeMdibSequenceID',
            t2iapi_dot_device_dot_device__requests__pb2.ChangeMdibSequenceIdRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InsertMdsDescriptor(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, '/t2iapi.device.DeviceService/InsertMdsDescriptor',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            t2iapi_dot_device_dot_device__responses__pb2.InsertMdsDescriptorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveMdsDescriptor(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, '/t2iapi.device.DeviceService/RemoveMdsDescriptor',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TriggerDescriptorUpdate(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, '/t2iapi.device.DeviceService/TriggerDescriptorUpdate',
            t2iapi_dot_basic__requests__pb2.BasicHandleRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TriggerReport(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, '/t2iapi.device.DeviceService/TriggerReport',
            t2iapi_dot_device_dot_device__requests__pb2.TriggerReportRequest.SerializeToString,
            t2iapi_dot_basic__responses__pb2.BasicResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
