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

import products_pb2 as products__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetVendorProductTypes = channel.unary_unary(
                '/products.v1.ProductService/GetVendorProductTypes',
                request_serializer=products__pb2.ClientRequestType.SerializeToString,
                response_deserializer=products__pb2.ClientResponseType.FromString,
                )
        self.GetVendorProducts = channel.unary_stream(
                '/products.v1.ProductService/GetVendorProducts',
                request_serializer=products__pb2.ClientRequestProducts.SerializeToString,
                response_deserializer=products__pb2.ClientResponseProducts.FromString,
                )
        self.SetVendorProducts = channel.stream_unary(
                '/products.v1.ProductService/SetVendorProducts',
                request_serializer=products__pb2.AdminClientRequestProducts.SerializeToString,
                response_deserializer=products__pb2.ProductCount.FromString,
                )


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

    def GetVendorProductTypes(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetVendorProducts(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetVendorProducts(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        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 = {
            'GetVendorProductTypes': grpc.unary_unary_rpc_method_handler(
                    servicer.GetVendorProductTypes,
                    request_deserializer=products__pb2.ClientRequestType.FromString,
                    response_serializer=products__pb2.ClientResponseType.SerializeToString,
            ),
            'GetVendorProducts': grpc.unary_stream_rpc_method_handler(
                    servicer.GetVendorProducts,
                    request_deserializer=products__pb2.ClientRequestProducts.FromString,
                    response_serializer=products__pb2.ClientResponseProducts.SerializeToString,
            ),
            'SetVendorProducts': grpc.stream_unary_rpc_method_handler(
                    servicer.SetVendorProducts,
                    request_deserializer=products__pb2.AdminClientRequestProducts.FromString,
                    response_serializer=products__pb2.ProductCount.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'products.v1.ProductService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetVendorProductTypes(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/products.v1.ProductService/GetVendorProductTypes',
            products__pb2.ClientRequestType.SerializeToString,
            products__pb2.ClientResponseType.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetVendorProducts(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/products.v1.ProductService/GetVendorProducts',
            products__pb2.ClientRequestProducts.SerializeToString,
            products__pb2.ClientResponseProducts.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetVendorProducts(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, '/products.v1.ProductService/SetVendorProducts',
            products__pb2.AdminClientRequestProducts.SerializeToString,
            products__pb2.ProductCount.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
