# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import test_pb2 as app_dot_test__pb2


class EncodeServiceStub(object):
  """service, encode a plain text 
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetEncode = channel.unary_unary(
        '/lmjwtest.EncodeService/GetEncode',
        request_serializer=app_dot_test__pb2.plaintext.SerializeToString,
        response_deserializer=app_dot_test__pb2.encodetext.FromString,
        )


class EncodeServiceServicer(object):
  """service, encode a plain text 
  """

  def GetEncode(self, request, context):
    """request a service of encode
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_EncodeServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetEncode': grpc.unary_unary_rpc_method_handler(
          servicer.GetEncode,
          request_deserializer=app_dot_test__pb2.plaintext.FromString,
          response_serializer=app_dot_test__pb2.encodetext.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'lmjwtest.EncodeService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
