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

from . import rpc_data_pb2 as rpc__data__pb2


class GreeterStub(object):
  """The greeting service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.User = channel.unary_unary(
        '/rpc_data.Greeter/User',
        request_serializer=rpc__data__pb2.UserRequest.SerializeToString,
        response_deserializer=rpc__data__pb2.UserReply.FromString,
        )
    self.Group = channel.unary_unary(
        '/rpc_data.Greeter/Group',
        request_serializer=rpc__data__pb2.GroupRequest.SerializeToString,
        response_deserializer=rpc__data__pb2.GroupReply.FromString,
        )
    self.Authorization = channel.unary_unary(
        '/rpc_data.Greeter/Authorization',
        request_serializer=rpc__data__pb2.AuthorizationRequest.SerializeToString,
        response_deserializer=rpc__data__pb2.AuthorizationReply.FromString,
        )
    self.Permission = channel.unary_unary(
        '/rpc_data.Greeter/Permission',
        request_serializer=rpc__data__pb2.PermissionRequest.SerializeToString,
        response_deserializer=rpc__data__pb2.PermissionReply.FromString,
        )


class GreeterServicer(object):
  """The greeting service definition.
  """

  def User(self, request, context):
    """Sends a greeting
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Group(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Authorization(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Permission(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_GreeterServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'User': grpc.unary_unary_rpc_method_handler(
          servicer.User,
          request_deserializer=rpc__data__pb2.UserRequest.FromString,
          response_serializer=rpc__data__pb2.UserReply.SerializeToString,
      ),
      'Group': grpc.unary_unary_rpc_method_handler(
          servicer.Group,
          request_deserializer=rpc__data__pb2.GroupRequest.FromString,
          response_serializer=rpc__data__pb2.GroupReply.SerializeToString,
      ),
      'Authorization': grpc.unary_unary_rpc_method_handler(
          servicer.Authorization,
          request_deserializer=rpc__data__pb2.AuthorizationRequest.FromString,
          response_serializer=rpc__data__pb2.AuthorizationReply.SerializeToString,
      ),
      'Permission': grpc.unary_unary_rpc_method_handler(
          servicer.Permission,
          request_deserializer=rpc__data__pb2.PermissionRequest.FromString,
          response_serializer=rpc__data__pb2.PermissionReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'rpc_data.Greeter', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
