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

import csle_collector.traffic_manager.traffic_manager_pb2 as traffic__manager__pb2


class TrafficManagerStub(object):
    """Interface exported by the server
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.getTrafficStatus = channel.unary_unary(
                '/TrafficManager/getTrafficStatus',
                request_serializer=traffic__manager__pb2.GetTrafficStatusMsg.SerializeToString,
                response_deserializer=traffic__manager__pb2.TrafficDTO.FromString,
                )
        self.stopTraffic = channel.unary_unary(
                '/TrafficManager/stopTraffic',
                request_serializer=traffic__manager__pb2.StopTrafficMsg.SerializeToString,
                response_deserializer=traffic__manager__pb2.TrafficDTO.FromString,
                )
        self.startTraffic = channel.unary_unary(
                '/TrafficManager/startTraffic',
                request_serializer=traffic__manager__pb2.StartTrafficMsg.SerializeToString,
                response_deserializer=traffic__manager__pb2.TrafficDTO.FromString,
                )


class TrafficManagerServicer(object):
    """Interface exported by the server
    """

    def getTrafficStatus(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 stopTraffic(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 startTraffic(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_TrafficManagerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'getTrafficStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.getTrafficStatus,
                    request_deserializer=traffic__manager__pb2.GetTrafficStatusMsg.FromString,
                    response_serializer=traffic__manager__pb2.TrafficDTO.SerializeToString,
            ),
            'stopTraffic': grpc.unary_unary_rpc_method_handler(
                    servicer.stopTraffic,
                    request_deserializer=traffic__manager__pb2.StopTrafficMsg.FromString,
                    response_serializer=traffic__manager__pb2.TrafficDTO.SerializeToString,
            ),
            'startTraffic': grpc.unary_unary_rpc_method_handler(
                    servicer.startTraffic,
                    request_deserializer=traffic__manager__pb2.StartTrafficMsg.FromString,
                    response_serializer=traffic__manager__pb2.TrafficDTO.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'TrafficManager', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TrafficManager(object):
    """Interface exported by the server
    """

    @staticmethod
    def getTrafficStatus(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, '/TrafficManager/getTrafficStatus',
            traffic__manager__pb2.GetTrafficStatusMsg.SerializeToString,
            traffic__manager__pb2.TrafficDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stopTraffic(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, '/TrafficManager/stopTraffic',
            traffic__manager__pb2.StopTrafficMsg.SerializeToString,
            traffic__manager__pb2.TrafficDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def startTraffic(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, '/TrafficManager/startTraffic',
            traffic__manager__pb2.StartTrafficMsg.SerializeToString,
            traffic__manager__pb2.TrafficDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
