# 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.ropa.v1alpha import ropa_v1alpha_pb2 as strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetRopa = channel.unary_unary(
                '/strmprivacy.api.ropa.v1alpha.RopaService/GetRopa',
                request_serializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRopaRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRopaResponse.FromString,
                )
        self.CreateRecord = channel.unary_unary(
                '/strmprivacy.api.ropa.v1alpha.RopaService/CreateRecord',
                request_serializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.CreateRecordRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.CreateRecordResponse.FromString,
                )
        self.GetRecord = channel.unary_unary(
                '/strmprivacy.api.ropa.v1alpha.RopaService/GetRecord',
                request_serializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRecordRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRecordResponse.FromString,
                )


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

    def GetRopa(self, request, context):
        """This will return all (latest versions of) the records.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateRecord(self, request, context):
        """Create a new record (leave its id empty) or a new version of an existing record (provide its id and current version).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRecord(self, request, context):
        """Get a record by its id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RopaServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetRopa': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRopa,
                    request_deserializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRopaRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRopaResponse.SerializeToString,
            ),
            'CreateRecord': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateRecord,
                    request_deserializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.CreateRecordRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.CreateRecordResponse.SerializeToString,
            ),
            'GetRecord': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRecord,
                    request_deserializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRecordRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRecordResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'strmprivacy.api.ropa.v1alpha.RopaService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetRopa(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.ropa.v1alpha.RopaService/GetRopa',
            strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRopaRequest.SerializeToString,
            strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRopaResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateRecord(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.ropa.v1alpha.RopaService/CreateRecord',
            strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.CreateRecordRequest.SerializeToString,
            strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.CreateRecordResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRecord(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.ropa.v1alpha.RopaService/GetRecord',
            strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRecordRequest.SerializeToString,
            strmprivacy_dot_api_dot_ropa_dot_v1alpha_dot_ropa__v1alpha__pb2.GetRecordResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
