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

import hello_pb2 as hello__pb2


class ProductServiceStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListProduct = channel.unary_stream(
        '/hello.ProductService/ListProduct',
        request_serializer=hello__pb2.RequestType.SerializeToString,
        response_deserializer=hello__pb2.Product.FromString,
        )
    self.AddProduct = channel.unary_stream(
        '/hello.ProductService/AddProduct',
        request_serializer=hello__pb2.Product.SerializeToString,
        response_deserializer=hello__pb2.Product.FromString,
        )


class ProductServiceServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def ListProduct(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 AddProduct(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_ProductServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListProduct': grpc.unary_stream_rpc_method_handler(
          servicer.ListProduct,
          request_deserializer=hello__pb2.RequestType.FromString,
          response_serializer=hello__pb2.Product.SerializeToString,
      ),
      'AddProduct': grpc.unary_stream_rpc_method_handler(
          servicer.AddProduct,
          request_deserializer=hello__pb2.Product.FromString,
          response_serializer=hello__pb2.Product.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'hello.ProductService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
