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

import app_pb2 as app__pb2


class ProductCatalogServiceStub(object):
  """===============
  Product Catalog
  ===============
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListProducts = channel.unary_unary(
        '/demoshop.ProductCatalogService/ListProducts',
        request_serializer=app__pb2.Empty.SerializeToString,
        response_deserializer=app__pb2.ListProductsResponse.FromString,
        )
    self.GetProduct = channel.unary_unary(
        '/demoshop.ProductCatalogService/GetProduct',
        request_serializer=app__pb2.GetProductRequest.SerializeToString,
        response_deserializer=app__pb2.Product.FromString,
        )
    self.SearchProducts = channel.unary_unary(
        '/demoshop.ProductCatalogService/SearchProducts',
        request_serializer=app__pb2.SearchProductsRequest.SerializeToString,
        response_deserializer=app__pb2.SearchProductsResponse.FromString,
        )


class ProductCatalogServiceServicer(object):
  """===============
  Product Catalog
  ===============
  """

  def ListProducts(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 GetProduct(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 SearchProducts(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_ProductCatalogServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListProducts': grpc.unary_unary_rpc_method_handler(
          servicer.ListProducts,
          request_deserializer=app__pb2.Empty.FromString,
          response_serializer=app__pb2.ListProductsResponse.SerializeToString,
      ),
      'GetProduct': grpc.unary_unary_rpc_method_handler(
          servicer.GetProduct,
          request_deserializer=app__pb2.GetProductRequest.FromString,
          response_serializer=app__pb2.Product.SerializeToString,
      ),
      'SearchProducts': grpc.unary_unary_rpc_method_handler(
          servicer.SearchProducts,
          request_deserializer=app__pb2.SearchProductsRequest.FromString,
          response_serializer=app__pb2.SearchProductsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'demoshop.ProductCatalogService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


class RecommendationServiceStub(object):
  """======================
  Recommendation Service
  ======================
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListRecommendations = channel.unary_unary(
        '/demoshop.RecommendationService/ListRecommendations',
        request_serializer=app__pb2.ListRecommendationsRequest.SerializeToString,
        response_deserializer=app__pb2.ListRecommendationsResponse.FromString,
        )


class RecommendationServiceServicer(object):
  """======================
  Recommendation Service
  ======================
  """

  def ListRecommendations(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_RecommendationServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListRecommendations': grpc.unary_unary_rpc_method_handler(
          servicer.ListRecommendations,
          request_deserializer=app__pb2.ListRecommendationsRequest.FromString,
          response_serializer=app__pb2.ListRecommendationsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'demoshop.RecommendationService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
