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

from strmprivacy.api.data_subjects.v1 import data_subjects_v1_pb2 as strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListDataSubjectKeylinks = channel.unary_unary(
                '/strmprivacy.api.data_subjects.v1.DataSubjectsService/ListDataSubjectKeylinks',
                request_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectKeylinksRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectKeylinksResponse.FromString,
                )
        self.AddDataSubjectsKeyLinks = channel.unary_unary(
                '/strmprivacy.api.data_subjects.v1.DataSubjectsService/AddDataSubjectsKeyLinks',
                request_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.AddDataSubjectsKeyLinksRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.AddDataSubjectsKeyLinksResponse.FromString,
                )
        self.DeleteDataSubjects = channel.unary_unary(
                '/strmprivacy.api.data_subjects.v1.DataSubjectsService/DeleteDataSubjects',
                request_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.DeleteDataSubjectsRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.DeleteDataSubjectsResponse.FromString,
                )
        self.ListDataSubjects = channel.unary_unary(
                '/strmprivacy.api.data_subjects.v1.DataSubjectsService/ListDataSubjects',
                request_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectsRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectsResponse.FromString,
                )


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

    def ListDataSubjectKeylinks(self, request, context):
        """
        Retrieve all key links associated with certain data subject(s)

        returns: a list of data subject with their associated key links and their
        expiry.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddDataSubjectsKeyLinks(self, request, context):
        """called by an entity that can create key link(s) like the event-gateway or a batch-job

        typically (but not necessarily) only one key link is added at the same time.

        The list of DatasubjectKeylinks is combined with a project_id; the DSS uses this to find the linked
        organization_id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteDataSubjects(self, request, context):
        """
        delete data subjects from the DSS database, and returns the deleted key links and timestamps
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListDataSubjects(self, request, context):
        """
        list data subjects from the DSS database
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DataSubjectsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListDataSubjectKeylinks': grpc.unary_unary_rpc_method_handler(
                    servicer.ListDataSubjectKeylinks,
                    request_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectKeylinksRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectKeylinksResponse.SerializeToString,
            ),
            'AddDataSubjectsKeyLinks': grpc.unary_unary_rpc_method_handler(
                    servicer.AddDataSubjectsKeyLinks,
                    request_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.AddDataSubjectsKeyLinksRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.AddDataSubjectsKeyLinksResponse.SerializeToString,
            ),
            'DeleteDataSubjects': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteDataSubjects,
                    request_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.DeleteDataSubjectsRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.DeleteDataSubjectsResponse.SerializeToString,
            ),
            'ListDataSubjects': grpc.unary_unary_rpc_method_handler(
                    servicer.ListDataSubjects,
                    request_deserializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectsRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'strmprivacy.api.data_subjects.v1.DataSubjectsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListDataSubjectKeylinks(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, '/strmprivacy.api.data_subjects.v1.DataSubjectsService/ListDataSubjectKeylinks',
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectKeylinksRequest.SerializeToString,
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectKeylinksResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddDataSubjectsKeyLinks(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, '/strmprivacy.api.data_subjects.v1.DataSubjectsService/AddDataSubjectsKeyLinks',
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.AddDataSubjectsKeyLinksRequest.SerializeToString,
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.AddDataSubjectsKeyLinksResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteDataSubjects(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, '/strmprivacy.api.data_subjects.v1.DataSubjectsService/DeleteDataSubjects',
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.DeleteDataSubjectsRequest.SerializeToString,
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.DeleteDataSubjectsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListDataSubjects(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, '/strmprivacy.api.data_subjects.v1.DataSubjectsService/ListDataSubjects',
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectsRequest.SerializeToString,
            strmprivacy_dot_api_dot_data__subjects_dot_v1_dot_data__subjects__v1__pb2.ListDataSubjectsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
