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

from sensory_cloud.generated.v1.management import enrollment_pb2 as v1_dot_management_dot_enrollment__pb2


class EnrollmentServiceStub(object):
    """Service to manage Enrollments in the database
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetEnrollments = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/GetEnrollments',
                request_serializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentsRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentsResponse.FromString,
                )
        self.GetEnrollmentGroups = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/GetEnrollmentGroups',
                request_serializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentsRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentGroupsResponse.FromString,
                )
        self.CreateEnrollmentGroup = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/CreateEnrollmentGroup',
                request_serializer=v1_dot_management_dot_enrollment__pb2.CreateEnrollmentGroupRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
                )
        self.AppendEnrollmentGroup = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/AppendEnrollmentGroup',
                request_serializer=v1_dot_management_dot_enrollment__pb2.AppendEnrollmentGroupRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
                )
        self.DeleteEnrollment = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/DeleteEnrollment',
                request_serializer=v1_dot_management_dot_enrollment__pb2.DeleteEnrollmentRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.EnrollmentResponse.FromString,
                )
        self.DeleteEnrollmentGroup = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/DeleteEnrollmentGroup',
                request_serializer=v1_dot_management_dot_enrollment__pb2.DeleteEnrollmentGroupRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
                )
        self.UpdateEnrollment = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/UpdateEnrollment',
                request_serializer=v1_dot_management_dot_enrollment__pb2.UpdateEnrollmentRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.EnrollmentResponse.FromString,
                )
        self.UpdateEnrollmentGroup = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/UpdateEnrollmentGroup',
                request_serializer=v1_dot_management_dot_enrollment__pb2.UpdateEnrollmentGroupRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
                )
        self.RemoveEnrollmentsFromGroup = channel.unary_unary(
                '/sensory.api.v1.management.EnrollmentService/RemoveEnrollmentsFromGroup',
                request_serializer=v1_dot_management_dot_enrollment__pb2.RemoveEnrollmentsRequest.SerializeToString,
                response_deserializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
                )


class EnrollmentServiceServicer(object):
    """Service to manage Enrollments in the database
    """

    def GetEnrollments(self, request, context):
        """Get enrollments from the database that match the specified criteria
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetEnrollmentGroups(self, request, context):
        """Get all enrollment groups that match the specified criteria
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateEnrollmentGroup(self, request, context):
        """Creates a new enrollment group without any associated enrollments
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AppendEnrollmentGroup(self, request, context):
        """Appends an enrollment to an enrollment group
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteEnrollment(self, request, context):
        """Deletes an enrollment from the database
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        A user may not delete their last enrollment, as this would lead to a situation where a user could
        lock themselves out of the system forever.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteEnrollmentGroup(self, request, context):
        """Deletes an enrollment group from the database
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateEnrollment(self, request, context):
        """Updates the name of an enrollment
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateEnrollmentGroup(self, request, context):
        """Updates the name of an enrollment group
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveEnrollmentsFromGroup(self, request, context):
        """Removes a list of enrollments from an enrollment group
        Authorization metadata is required {"authorization": "Bearer <TOKEN>"}
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EnrollmentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetEnrollments': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEnrollments,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentsRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentsResponse.SerializeToString,
            ),
            'GetEnrollmentGroups': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEnrollmentGroups,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentsRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.GetEnrollmentGroupsResponse.SerializeToString,
            ),
            'CreateEnrollmentGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateEnrollmentGroup,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.CreateEnrollmentGroupRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.SerializeToString,
            ),
            'AppendEnrollmentGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.AppendEnrollmentGroup,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.AppendEnrollmentGroupRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.SerializeToString,
            ),
            'DeleteEnrollment': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteEnrollment,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.DeleteEnrollmentRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.EnrollmentResponse.SerializeToString,
            ),
            'DeleteEnrollmentGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteEnrollmentGroup,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.DeleteEnrollmentGroupRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.SerializeToString,
            ),
            'UpdateEnrollment': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateEnrollment,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.UpdateEnrollmentRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.EnrollmentResponse.SerializeToString,
            ),
            'UpdateEnrollmentGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateEnrollmentGroup,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.UpdateEnrollmentGroupRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.SerializeToString,
            ),
            'RemoveEnrollmentsFromGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveEnrollmentsFromGroup,
                    request_deserializer=v1_dot_management_dot_enrollment__pb2.RemoveEnrollmentsRequest.FromString,
                    response_serializer=v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'sensory.api.v1.management.EnrollmentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class EnrollmentService(object):
    """Service to manage Enrollments in the database
    """

    @staticmethod
    def GetEnrollments(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, '/sensory.api.v1.management.EnrollmentService/GetEnrollments',
            v1_dot_management_dot_enrollment__pb2.GetEnrollmentsRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.GetEnrollmentsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEnrollmentGroups(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, '/sensory.api.v1.management.EnrollmentService/GetEnrollmentGroups',
            v1_dot_management_dot_enrollment__pb2.GetEnrollmentsRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.GetEnrollmentGroupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateEnrollmentGroup(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, '/sensory.api.v1.management.EnrollmentService/CreateEnrollmentGroup',
            v1_dot_management_dot_enrollment__pb2.CreateEnrollmentGroupRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AppendEnrollmentGroup(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, '/sensory.api.v1.management.EnrollmentService/AppendEnrollmentGroup',
            v1_dot_management_dot_enrollment__pb2.AppendEnrollmentGroupRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteEnrollment(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, '/sensory.api.v1.management.EnrollmentService/DeleteEnrollment',
            v1_dot_management_dot_enrollment__pb2.DeleteEnrollmentRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.EnrollmentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteEnrollmentGroup(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, '/sensory.api.v1.management.EnrollmentService/DeleteEnrollmentGroup',
            v1_dot_management_dot_enrollment__pb2.DeleteEnrollmentGroupRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateEnrollment(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, '/sensory.api.v1.management.EnrollmentService/UpdateEnrollment',
            v1_dot_management_dot_enrollment__pb2.UpdateEnrollmentRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.EnrollmentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateEnrollmentGroup(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, '/sensory.api.v1.management.EnrollmentService/UpdateEnrollmentGroup',
            v1_dot_management_dot_enrollment__pb2.UpdateEnrollmentGroupRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveEnrollmentsFromGroup(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, '/sensory.api.v1.management.EnrollmentService/RemoveEnrollmentsFromGroup',
            v1_dot_management_dot_enrollment__pb2.RemoveEnrollmentsRequest.SerializeToString,
            v1_dot_management_dot_enrollment__pb2.EnrollmentGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
