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

from proto.collector import collector_pb2 as proto_dot_collector_dot_collector__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Reconnect = channel.unary_unary(
                '/gnmi.Collector/Reconnect',
                request_serializer=proto_dot_collector_dot_collector__pb2.ReconnectRequest.SerializeToString,
                response_deserializer=proto_dot_collector_dot_collector__pb2.Nil.FromString,
                )


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

    def Reconnect(self, request, context):
        """Reconnect requests that the existing connections for one or more specified
        targets will be stopped and new connections established.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CollectorServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Reconnect': grpc.unary_unary_rpc_method_handler(
                    servicer.Reconnect,
                    request_deserializer=proto_dot_collector_dot_collector__pb2.ReconnectRequest.FromString,
                    response_serializer=proto_dot_collector_dot_collector__pb2.Nil.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'gnmi.Collector', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Reconnect(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, '/gnmi.Collector/Reconnect',
            proto_dot_collector_dot_collector__pb2.ReconnectRequest.SerializeToString,
            proto_dot_collector_dot_collector__pb2.Nil.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
