# 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.audit.v1 import audit_v1_pb2 as strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAuditTrail = channel.unary_unary(
                '/strmprivacy.api.audit.v1.AuditService/GetAuditTrail',
                request_serializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.GetAuditTrailRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.GetAuditTrailResponse.FromString,
                )
        self.CreateAuditTrailEntry = channel.unary_unary(
                '/strmprivacy.api.audit.v1.AuditService/CreateAuditTrailEntry',
                request_serializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.CreateAuditTrailEntryRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.CreateAuditTrailEntryResponse.FromString,
                )


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

    def GetAuditTrail(self, request, context):
        """GetAuditTrail returns a list of audit trail entries for a given entity to be shown to an
        end user, e.g. in the Console.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateAuditTrailEntry(self, request, context):
        """CreateAuditTrailEntry creates a new audit trail entry for a given entity,
        and is called by source system owning the entity whenever a relevant change is made.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AuditServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAuditTrail': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAuditTrail,
                    request_deserializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.GetAuditTrailRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.GetAuditTrailResponse.SerializeToString,
            ),
            'CreateAuditTrailEntry': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateAuditTrailEntry,
                    request_deserializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.CreateAuditTrailEntryRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.CreateAuditTrailEntryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'strmprivacy.api.audit.v1.AuditService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetAuditTrail(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.audit.v1.AuditService/GetAuditTrail',
            strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.GetAuditTrailRequest.SerializeToString,
            strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.GetAuditTrailResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateAuditTrailEntry(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.audit.v1.AuditService/CreateAuditTrailEntry',
            strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.CreateAuditTrailEntryRequest.SerializeToString,
            strmprivacy_dot_api_dot_audit_dot_v1_dot_audit__v1__pb2.CreateAuditTrailEntryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
