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

from controlplane.v1 import control_plane_pb2 as controlplane_dot_v1_dot_control__plane__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Reconcile = channel.unary_unary(
                '/servicebridge.controlplane.v1.ControlPlane/Reconcile',
                request_serializer=controlplane_dot_v1_dot_control__plane__pb2.ReconcileRequest.SerializeToString,
                response_deserializer=controlplane_dot_v1_dot_control__plane__pb2.ReconcileResponse.FromString,
                _registered_method=True)
        self.IssueCertificate = channel.unary_unary(
                '/servicebridge.controlplane.v1.ControlPlane/IssueCertificate',
                request_serializer=controlplane_dot_v1_dot_control__plane__pb2.IssueCertificateRequest.SerializeToString,
                response_deserializer=controlplane_dot_v1_dot_control__plane__pb2.IssueCertificateResponse.FromString,
                _registered_method=True)
        self.Publish = channel.unary_unary(
                '/servicebridge.controlplane.v1.ControlPlane/Publish',
                request_serializer=controlplane_dot_v1_dot_control__plane__pb2.PublishRequest.SerializeToString,
                response_deserializer=controlplane_dot_v1_dot_control__plane__pb2.PublishResponse.FromString,
                _registered_method=True)
        self.ExecuteWorkflow = channel.unary_unary(
                '/servicebridge.controlplane.v1.ControlPlane/ExecuteWorkflow',
                request_serializer=controlplane_dot_v1_dot_control__plane__pb2.ExecuteWorkflowRequest.SerializeToString,
                response_deserializer=controlplane_dot_v1_dot_control__plane__pb2.ExecuteWorkflowResponse.FromString,
                _registered_method=True)
        self.CancelWorkflow = channel.unary_unary(
                '/servicebridge.controlplane.v1.ControlPlane/CancelWorkflow',
                request_serializer=controlplane_dot_v1_dot_control__plane__pb2.CancelWorkflowRequest.SerializeToString,
                response_deserializer=controlplane_dot_v1_dot_control__plane__pb2.CancelWorkflowResponse.FromString,
                _registered_method=True)
        self.ProxyCall = channel.unary_unary(
                '/servicebridge.controlplane.v1.ControlPlane/ProxyCall',
                request_serializer=controlplane_dot_v1_dot_control__plane__pb2.ProxyCallRequest.SerializeToString,
                response_deserializer=controlplane_dot_v1_dot_control__plane__pb2.ProxyCallResponse.FromString,
                _registered_method=True)
        self.WatchTrace = channel.unary_stream(
                '/servicebridge.controlplane.v1.ControlPlane/WatchTrace',
                request_serializer=controlplane_dot_v1_dot_control__plane__pb2.WatchTraceRequest.SerializeToString,
                response_deserializer=controlplane_dot_v1_dot_control__plane__pb2.TraceStreamChunk.FromString,
                _registered_method=True)


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

    def Reconcile(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 IssueCertificate(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 Publish(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 ExecuteWorkflow(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 CancelWorkflow(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 ProxyCall(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 WatchTrace(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_ControlPlaneServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Reconcile': grpc.unary_unary_rpc_method_handler(
                    servicer.Reconcile,
                    request_deserializer=controlplane_dot_v1_dot_control__plane__pb2.ReconcileRequest.FromString,
                    response_serializer=controlplane_dot_v1_dot_control__plane__pb2.ReconcileResponse.SerializeToString,
            ),
            'IssueCertificate': grpc.unary_unary_rpc_method_handler(
                    servicer.IssueCertificate,
                    request_deserializer=controlplane_dot_v1_dot_control__plane__pb2.IssueCertificateRequest.FromString,
                    response_serializer=controlplane_dot_v1_dot_control__plane__pb2.IssueCertificateResponse.SerializeToString,
            ),
            'Publish': grpc.unary_unary_rpc_method_handler(
                    servicer.Publish,
                    request_deserializer=controlplane_dot_v1_dot_control__plane__pb2.PublishRequest.FromString,
                    response_serializer=controlplane_dot_v1_dot_control__plane__pb2.PublishResponse.SerializeToString,
            ),
            'ExecuteWorkflow': grpc.unary_unary_rpc_method_handler(
                    servicer.ExecuteWorkflow,
                    request_deserializer=controlplane_dot_v1_dot_control__plane__pb2.ExecuteWorkflowRequest.FromString,
                    response_serializer=controlplane_dot_v1_dot_control__plane__pb2.ExecuteWorkflowResponse.SerializeToString,
            ),
            'CancelWorkflow': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelWorkflow,
                    request_deserializer=controlplane_dot_v1_dot_control__plane__pb2.CancelWorkflowRequest.FromString,
                    response_serializer=controlplane_dot_v1_dot_control__plane__pb2.CancelWorkflowResponse.SerializeToString,
            ),
            'ProxyCall': grpc.unary_unary_rpc_method_handler(
                    servicer.ProxyCall,
                    request_deserializer=controlplane_dot_v1_dot_control__plane__pb2.ProxyCallRequest.FromString,
                    response_serializer=controlplane_dot_v1_dot_control__plane__pb2.ProxyCallResponse.SerializeToString,
            ),
            'WatchTrace': grpc.unary_stream_rpc_method_handler(
                    servicer.WatchTrace,
                    request_deserializer=controlplane_dot_v1_dot_control__plane__pb2.WatchTraceRequest.FromString,
                    response_serializer=controlplane_dot_v1_dot_control__plane__pb2.TraceStreamChunk.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'servicebridge.controlplane.v1.ControlPlane', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('servicebridge.controlplane.v1.ControlPlane', rpc_method_handlers)


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

    @staticmethod
    def Reconcile(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,
            '/servicebridge.controlplane.v1.ControlPlane/Reconcile',
            controlplane_dot_v1_dot_control__plane__pb2.ReconcileRequest.SerializeToString,
            controlplane_dot_v1_dot_control__plane__pb2.ReconcileResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IssueCertificate(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,
            '/servicebridge.controlplane.v1.ControlPlane/IssueCertificate',
            controlplane_dot_v1_dot_control__plane__pb2.IssueCertificateRequest.SerializeToString,
            controlplane_dot_v1_dot_control__plane__pb2.IssueCertificateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Publish(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,
            '/servicebridge.controlplane.v1.ControlPlane/Publish',
            controlplane_dot_v1_dot_control__plane__pb2.PublishRequest.SerializeToString,
            controlplane_dot_v1_dot_control__plane__pb2.PublishResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExecuteWorkflow(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,
            '/servicebridge.controlplane.v1.ControlPlane/ExecuteWorkflow',
            controlplane_dot_v1_dot_control__plane__pb2.ExecuteWorkflowRequest.SerializeToString,
            controlplane_dot_v1_dot_control__plane__pb2.ExecuteWorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelWorkflow(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,
            '/servicebridge.controlplane.v1.ControlPlane/CancelWorkflow',
            controlplane_dot_v1_dot_control__plane__pb2.CancelWorkflowRequest.SerializeToString,
            controlplane_dot_v1_dot_control__plane__pb2.CancelWorkflowResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ProxyCall(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,
            '/servicebridge.controlplane.v1.ControlPlane/ProxyCall',
            controlplane_dot_v1_dot_control__plane__pb2.ProxyCallRequest.SerializeToString,
            controlplane_dot_v1_dot_control__plane__pb2.ProxyCallResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WatchTrace(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_stream(
            request,
            target,
            '/servicebridge.controlplane.v1.ControlPlane/WatchTrace',
            controlplane_dot_v1_dot_control__plane__pb2.WatchTraceRequest.SerializeToString,
            controlplane_dot_v1_dot_control__plane__pb2.TraceStreamChunk.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
