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

from . import records_pb2 as protocol_dot_records__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetCategoryList = channel.unary_unary(
                '/records.Records/GetCategoryList',
                request_serializer=protocol_dot_records__pb2.Empty.SerializeToString,
                response_deserializer=protocol_dot_records__pb2.CategoryList.FromString,
                )
        self.GetCategoryListForUser = channel.unary_unary(
                '/records.Records/GetCategoryListForUser',
                request_serializer=protocol_dot_records__pb2.User.SerializeToString,
                response_deserializer=protocol_dot_records__pb2.CategoryList.FromString,
                )
        self.GetRecordById = channel.unary_unary(
                '/records.Records/GetRecordById',
                request_serializer=protocol_dot_records__pb2.RecordRequest.SerializeToString,
                response_deserializer=protocol_dot_records__pb2.Record.FromString,
                )
        self.GetLastGroupForUser = channel.unary_unary(
                '/records.Records/GetLastGroupForUser',
                request_serializer=protocol_dot_records__pb2.User.SerializeToString,
                response_deserializer=protocol_dot_records__pb2.RecordList.FromString,
                )
        self.GetRecords = channel.unary_unary(
                '/records.Records/GetRecords',
                request_serializer=protocol_dot_records__pb2.RecordQuery.SerializeToString,
                response_deserializer=protocol_dot_records__pb2.RecordList.FromString,
                )
        self.CountRecords = channel.unary_unary(
                '/records.Records/CountRecords',
                request_serializer=protocol_dot_records__pb2.RecordQuery.SerializeToString,
                response_deserializer=protocol_dot_records__pb2.RecordList.FromString,
                )


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

    def GetCategoryList(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 GetCategoryListForUser(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 GetRecordById(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 GetLastGroupForUser(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 GetRecords(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 CountRecords(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 add_RecordsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetCategoryList': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCategoryList,
                    request_deserializer=protocol_dot_records__pb2.Empty.FromString,
                    response_serializer=protocol_dot_records__pb2.CategoryList.SerializeToString,
            ),
            'GetCategoryListForUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCategoryListForUser,
                    request_deserializer=protocol_dot_records__pb2.User.FromString,
                    response_serializer=protocol_dot_records__pb2.CategoryList.SerializeToString,
            ),
            'GetRecordById': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRecordById,
                    request_deserializer=protocol_dot_records__pb2.RecordRequest.FromString,
                    response_serializer=protocol_dot_records__pb2.Record.SerializeToString,
            ),
            'GetLastGroupForUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLastGroupForUser,
                    request_deserializer=protocol_dot_records__pb2.User.FromString,
                    response_serializer=protocol_dot_records__pb2.RecordList.SerializeToString,
            ),
            'GetRecords': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRecords,
                    request_deserializer=protocol_dot_records__pb2.RecordQuery.FromString,
                    response_serializer=protocol_dot_records__pb2.RecordList.SerializeToString,
            ),
            'CountRecords': grpc.unary_unary_rpc_method_handler(
                    servicer.CountRecords,
                    request_deserializer=protocol_dot_records__pb2.RecordQuery.FromString,
                    response_serializer=protocol_dot_records__pb2.RecordList.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'records.Records', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetCategoryList(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, '/records.Records/GetCategoryList',
            protocol_dot_records__pb2.Empty.SerializeToString,
            protocol_dot_records__pb2.CategoryList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCategoryListForUser(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, '/records.Records/GetCategoryListForUser',
            protocol_dot_records__pb2.User.SerializeToString,
            protocol_dot_records__pb2.CategoryList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRecordById(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, '/records.Records/GetRecordById',
            protocol_dot_records__pb2.RecordRequest.SerializeToString,
            protocol_dot_records__pb2.Record.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLastGroupForUser(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, '/records.Records/GetLastGroupForUser',
            protocol_dot_records__pb2.User.SerializeToString,
            protocol_dot_records__pb2.RecordList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRecords(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, '/records.Records/GetRecords',
            protocol_dot_records__pb2.RecordQuery.SerializeToString,
            protocol_dot_records__pb2.RecordList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CountRecords(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, '/records.Records/CountRecords',
            protocol_dot_records__pb2.RecordQuery.SerializeToString,
            protocol_dot_records__pb2.RecordList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
