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

from _qwak_proto.qwak.traffic.v1 import traffic_api_pb2 as qwak_dot_traffic_dot_v1_dot_traffic__api__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ResetAndSetTrafficState = channel.unary_unary(
                '/qwak.traffic.v1.TrafficAPI/ResetAndSetTrafficState',
                request_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ResetAndSetTrafficStateRequest.SerializeToString,
                response_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ResetAndSetTrafficStateResponse.FromString,
                )
        self.ApplyGroupedTraffic = channel.unary_unary(
                '/qwak.traffic.v1.TrafficAPI/ApplyGroupedTraffic',
                request_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ApplyGroupedTrafficRequest.SerializeToString,
                response_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ApplyGroupedTrafficResponse.FromString,
                )
        self.CreateEndpoint = channel.unary_unary(
                '/qwak.traffic.v1.TrafficAPI/CreateEndpoint',
                request_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.CreateEndpointRequest.SerializeToString,
                response_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.CreateEndpointResponse.FromString,
                )
        self.DeleteEndpoint = channel.unary_unary(
                '/qwak.traffic.v1.TrafficAPI/DeleteEndpoint',
                request_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.DeleteEndpointRequest.SerializeToString,
                response_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.DeleteEndpointResponse.FromString,
                )


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

    def ResetAndSetTrafficState(self, request, context):
        """Reset all the traffic config.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ApplyGroupedTraffic(self, request, context):
        """Update multiple Group traffic configuration (Edit)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateEndpoint(self, request, context):
        """FirstDeploy
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteEndpoint(self, request, context):
        """LastUndeploy
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TrafficAPIServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ResetAndSetTrafficState': grpc.unary_unary_rpc_method_handler(
                    servicer.ResetAndSetTrafficState,
                    request_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ResetAndSetTrafficStateRequest.FromString,
                    response_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ResetAndSetTrafficStateResponse.SerializeToString,
            ),
            'ApplyGroupedTraffic': grpc.unary_unary_rpc_method_handler(
                    servicer.ApplyGroupedTraffic,
                    request_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ApplyGroupedTrafficRequest.FromString,
                    response_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ApplyGroupedTrafficResponse.SerializeToString,
            ),
            'CreateEndpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateEndpoint,
                    request_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.CreateEndpointRequest.FromString,
                    response_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.CreateEndpointResponse.SerializeToString,
            ),
            'DeleteEndpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteEndpoint,
                    request_deserializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.DeleteEndpointRequest.FromString,
                    response_serializer=qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.DeleteEndpointResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'qwak.traffic.v1.TrafficAPI', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ResetAndSetTrafficState(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, '/qwak.traffic.v1.TrafficAPI/ResetAndSetTrafficState',
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ResetAndSetTrafficStateRequest.SerializeToString,
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ResetAndSetTrafficStateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ApplyGroupedTraffic(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, '/qwak.traffic.v1.TrafficAPI/ApplyGroupedTraffic',
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ApplyGroupedTrafficRequest.SerializeToString,
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.ApplyGroupedTrafficResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateEndpoint(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, '/qwak.traffic.v1.TrafficAPI/CreateEndpoint',
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.CreateEndpointRequest.SerializeToString,
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.CreateEndpointResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteEndpoint(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, '/qwak.traffic.v1.TrafficAPI/DeleteEndpoint',
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.DeleteEndpointRequest.SerializeToString,
            qwak_dot_traffic_dot_v1_dot_traffic__api__pb2.DeleteEndpointResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
