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

from protogen import company_pb2 as company__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
          channel: A grpc.Channel.
        """
        self.GetAllCompany = channel.unary_unary(
            '/CompanyServer/GetAllCompany',
            request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            response_deserializer=company__pb2.CompanyList.FromString,
        )
        self.ListCompany = channel.unary_unary(
            '/CompanyServer/ListCompany',
            request_serializer=company__pb2.Company.SerializeToString,
            response_deserializer=company__pb2.CompanyList.FromString,
        )
        self.RetrieveCompany = channel.unary_unary(
            '/CompanyServer/RetrieveCompany',
            request_serializer=company__pb2.Company.SerializeToString,
            response_deserializer=company__pb2.Company.FromString,
        )
        self.PostCompany = channel.unary_unary(
            '/CompanyServer/PostCompany',
            request_serializer=company__pb2.Company.SerializeToString,
            response_deserializer=company__pb2.Company.FromString,
        )
        self.PutCompany = channel.unary_unary(
            '/CompanyServer/PutCompany',
            request_serializer=company__pb2.Company.SerializeToString,
            response_deserializer=company__pb2.Company.FromString,
        )
        self.PatchCompany = channel.unary_unary(
            '/CompanyServer/PatchCompany',
            request_serializer=company__pb2.Company.SerializeToString,
            response_deserializer=company__pb2.Company.FromString,
        )
        self.DeleteCompany = channel.unary_unary(
            '/CompanyServer/DeleteCompany',
            request_serializer=company__pb2.Company.SerializeToString,
            response_deserializer=company__pb2.Company.FromString,
        )
        self.RestfulCompany = channel.unary_unary(
            '/CompanyServer/RestfulCompany',
            request_serializer=company__pb2.Company.SerializeToString,
            response_deserializer=company__pb2.CompanyWrapper.FromString,
        )


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

    def GetAllCompany(self, request, context):
        """获取所有公司
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListCompany(self, request, context):
        """获取公司列表
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RetrieveCompany(self, request, context):
        """根据id获取某个公司的详情
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PostCompany(self, request, context):
        """创建一条公司数据
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PutCompany(self, request, context):
        """修改一条公司数据
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PatchCompany(self, request, context):
        """修改公司数据
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteCompany(self, request, context):
        """删除一条公司数据
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RestfulCompany(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_CompanyServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetAllCompany': grpc.unary_unary_rpc_method_handler(
            servicer.GetAllCompany,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            response_serializer=company__pb2.CompanyList.SerializeToString,
        ),
        'ListCompany': grpc.unary_unary_rpc_method_handler(
            servicer.ListCompany,
            request_deserializer=company__pb2.Company.FromString,
            response_serializer=company__pb2.CompanyList.SerializeToString,
        ),
        'RetrieveCompany': grpc.unary_unary_rpc_method_handler(
            servicer.RetrieveCompany,
            request_deserializer=company__pb2.Company.FromString,
            response_serializer=company__pb2.Company.SerializeToString,
        ),
        'PostCompany': grpc.unary_unary_rpc_method_handler(
            servicer.PostCompany,
            request_deserializer=company__pb2.Company.FromString,
            response_serializer=company__pb2.Company.SerializeToString,
        ),
        'PutCompany': grpc.unary_unary_rpc_method_handler(
            servicer.PutCompany,
            request_deserializer=company__pb2.Company.FromString,
            response_serializer=company__pb2.Company.SerializeToString,
        ),
        'PatchCompany': grpc.unary_unary_rpc_method_handler(
            servicer.PatchCompany,
            request_deserializer=company__pb2.Company.FromString,
            response_serializer=company__pb2.Company.SerializeToString,
        ),
        'DeleteCompany': grpc.unary_unary_rpc_method_handler(
            servicer.DeleteCompany,
            request_deserializer=company__pb2.Company.FromString,
            response_serializer=company__pb2.Company.SerializeToString,
        ),
        'RestfulCompany': grpc.unary_unary_rpc_method_handler(
            servicer.RestfulCompany,
            request_deserializer=company__pb2.Company.FromString,
            response_serializer=company__pb2.CompanyWrapper.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'CompanyServer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
