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

import student_pb2 as student__pb2


class StudentRegistryStub(object):
    """Generate Stub:
    python -m grpc_tools.protoc --proto_path=. ./student.proto --python_out=. --grpc_python_out=.

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.addStudent = channel.unary_unary(
                '/StudentRegistry/addStudent',
                request_serializer=student__pb2.student.SerializeToString,
                response_deserializer=student__pb2.studentId.FromString,
                )
        self.getStudent = channel.unary_unary(
                '/StudentRegistry/getStudent',
                request_serializer=student__pb2.studentId.SerializeToString,
                response_deserializer=student__pb2.student.FromString,
                )
        self.removeStudent = channel.unary_unary(
                '/StudentRegistry/removeStudent',
                request_serializer=student__pb2.studentId.SerializeToString,
                response_deserializer=student__pb2.student.FromString,
                )


class StudentRegistryServicer(object):
    """Generate Stub:
    python -m grpc_tools.protoc --proto_path=. ./student.proto --python_out=. --grpc_python_out=.

    """

    def addStudent(self, request, context):
        """string inside brackets are message-types
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getStudent(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 removeStudent(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_StudentRegistryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'addStudent': grpc.unary_unary_rpc_method_handler(
                    servicer.addStudent,
                    request_deserializer=student__pb2.student.FromString,
                    response_serializer=student__pb2.studentId.SerializeToString,
            ),
            'getStudent': grpc.unary_unary_rpc_method_handler(
                    servicer.getStudent,
                    request_deserializer=student__pb2.studentId.FromString,
                    response_serializer=student__pb2.student.SerializeToString,
            ),
            'removeStudent': grpc.unary_unary_rpc_method_handler(
                    servicer.removeStudent,
                    request_deserializer=student__pb2.studentId.FromString,
                    response_serializer=student__pb2.student.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'StudentRegistry', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class StudentRegistry(object):
    """Generate Stub:
    python -m grpc_tools.protoc --proto_path=. ./student.proto --python_out=. --grpc_python_out=.

    """

    @staticmethod
    def addStudent(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, '/StudentRegistry/addStudent',
            student__pb2.student.SerializeToString,
            student__pb2.studentId.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getStudent(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, '/StudentRegistry/getStudent',
            student__pb2.studentId.SerializeToString,
            student__pb2.student.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def removeStudent(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, '/StudentRegistry/removeStudent',
            student__pb2.studentId.SerializeToString,
            student__pb2.student.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
