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

from flwr.proto import control_pb2 as flwr_dot_proto_dot_control__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.StartRun = channel.unary_unary(
                '/flwr.proto.Control/StartRun',
                request_serializer=flwr_dot_proto_dot_control__pb2.StartRunRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_control__pb2.StartRunResponse.FromString,
                )
        self.StopRun = channel.unary_unary(
                '/flwr.proto.Control/StopRun',
                request_serializer=flwr_dot_proto_dot_control__pb2.StopRunRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_control__pb2.StopRunResponse.FromString,
                )
        self.StreamLogs = channel.unary_stream(
                '/flwr.proto.Control/StreamLogs',
                request_serializer=flwr_dot_proto_dot_control__pb2.StreamLogsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_control__pb2.StreamLogsResponse.FromString,
                )
        self.ListRuns = channel.unary_unary(
                '/flwr.proto.Control/ListRuns',
                request_serializer=flwr_dot_proto_dot_control__pb2.ListRunsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_control__pb2.ListRunsResponse.FromString,
                )
        self.GetLoginDetails = channel.unary_unary(
                '/flwr.proto.Control/GetLoginDetails',
                request_serializer=flwr_dot_proto_dot_control__pb2.GetLoginDetailsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_control__pb2.GetLoginDetailsResponse.FromString,
                )
        self.GetAuthTokens = channel.unary_unary(
                '/flwr.proto.Control/GetAuthTokens',
                request_serializer=flwr_dot_proto_dot_control__pb2.GetAuthTokensRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_control__pb2.GetAuthTokensResponse.FromString,
                )


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

    def StartRun(self, request, context):
        """Start run upon request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StopRun(self, request, context):
        """Stop run upon request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamLogs(self, request, context):
        """Start log stream upon request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListRuns(self, request, context):
        """flwr ls command
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLoginDetails(self, request, context):
        """Get login details upon request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAuthTokens(self, request, context):
        """Get auth tokens upon request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ControlServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StartRun': grpc.unary_unary_rpc_method_handler(
                    servicer.StartRun,
                    request_deserializer=flwr_dot_proto_dot_control__pb2.StartRunRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_control__pb2.StartRunResponse.SerializeToString,
            ),
            'StopRun': grpc.unary_unary_rpc_method_handler(
                    servicer.StopRun,
                    request_deserializer=flwr_dot_proto_dot_control__pb2.StopRunRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_control__pb2.StopRunResponse.SerializeToString,
            ),
            'StreamLogs': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamLogs,
                    request_deserializer=flwr_dot_proto_dot_control__pb2.StreamLogsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_control__pb2.StreamLogsResponse.SerializeToString,
            ),
            'ListRuns': grpc.unary_unary_rpc_method_handler(
                    servicer.ListRuns,
                    request_deserializer=flwr_dot_proto_dot_control__pb2.ListRunsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_control__pb2.ListRunsResponse.SerializeToString,
            ),
            'GetLoginDetails': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLoginDetails,
                    request_deserializer=flwr_dot_proto_dot_control__pb2.GetLoginDetailsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_control__pb2.GetLoginDetailsResponse.SerializeToString,
            ),
            'GetAuthTokens': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAuthTokens,
                    request_deserializer=flwr_dot_proto_dot_control__pb2.GetAuthTokensRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_control__pb2.GetAuthTokensResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'flwr.proto.Control', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def StartRun(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, '/flwr.proto.Control/StartRun',
            flwr_dot_proto_dot_control__pb2.StartRunRequest.SerializeToString,
            flwr_dot_proto_dot_control__pb2.StartRunResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StopRun(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, '/flwr.proto.Control/StopRun',
            flwr_dot_proto_dot_control__pb2.StopRunRequest.SerializeToString,
            flwr_dot_proto_dot_control__pb2.StopRunResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamLogs(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, '/flwr.proto.Control/StreamLogs',
            flwr_dot_proto_dot_control__pb2.StreamLogsRequest.SerializeToString,
            flwr_dot_proto_dot_control__pb2.StreamLogsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListRuns(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, '/flwr.proto.Control/ListRuns',
            flwr_dot_proto_dot_control__pb2.ListRunsRequest.SerializeToString,
            flwr_dot_proto_dot_control__pb2.ListRunsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLoginDetails(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, '/flwr.proto.Control/GetLoginDetails',
            flwr_dot_proto_dot_control__pb2.GetLoginDetailsRequest.SerializeToString,
            flwr_dot_proto_dot_control__pb2.GetLoginDetailsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAuthTokens(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, '/flwr.proto.Control/GetAuthTokens',
            flwr_dot_proto_dot_control__pb2.GetAuthTokensRequest.SerializeToString,
            flwr_dot_proto_dot_control__pb2.GetAuthTokensResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
