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

from log_service_proto.services import log_service_pb2 as services_dot_log__service__pb2


class LogServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.LogMessageStream = channel.stream_unary(
                '/services.LogService/LogMessageStream',
                request_serializer=services_dot_log__service__pb2.LogMessageRequest.SerializeToString,
                response_deserializer=services_dot_log__service__pb2.LogMessageResponse.FromString,
                )
        self.LogMessage = channel.stream_unary(
                '/services.LogService/LogMessage',
                request_serializer=services_dot_log__service__pb2.LogMessageRequest.SerializeToString,
                response_deserializer=services_dot_log__service__pb2.LogMessageResponse.FromString,
                )


class LogServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def LogMessageStream(self, request_iterator, context):
        """Logs a stream of messages from the client
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LogMessage(self, request_iterator, context):
        """Logs a message (unary)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_LogServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'LogMessageStream': grpc.stream_unary_rpc_method_handler(
                    servicer.LogMessageStream,
                    request_deserializer=services_dot_log__service__pb2.LogMessageRequest.FromString,
                    response_serializer=services_dot_log__service__pb2.LogMessageResponse.SerializeToString,
            ),
            'LogMessage': grpc.stream_unary_rpc_method_handler(
                    servicer.LogMessage,
                    request_deserializer=services_dot_log__service__pb2.LogMessageRequest.FromString,
                    response_serializer=services_dot_log__service__pb2.LogMessageResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'services.LogService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class LogService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def LogMessageStream(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/services.LogService/LogMessageStream',
            services_dot_log__service__pb2.LogMessageRequest.SerializeToString,
            services_dot_log__service__pb2.LogMessageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LogMessage(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/services.LogService/LogMessage',
            services_dot_log__service__pb2.LogMessageRequest.SerializeToString,
            services_dot_log__service__pb2.LogMessageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
