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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
from net.happygears.proto import NSG_pb2 as net_dot_happygears_dot_proto_dot_NSG__pb2


class ServiceStub(object):
    """// TODO: NET-6657 this service goes away entirely when we switch to nsg-python-gw
    service PyExec {
    option deprecated = true;
    rpc Ping(google.protobuf.Empty) returns (google.protobuf.Struct) { option deprecated = true; };
    rpc Reload(google.protobuf.Empty) returns (google.protobuf.Struct) { option deprecated = true; };
    rpc BuildVariables(BuildVariablesRequest) returns (PollingVariableMap) { option deprecated = true; };
    rpc AssignTags(AssignTagsRequest) returns (TagUpdate) { option deprecated = true; };
    rpc AssignViews(stream AssignViewsRequest) returns (ViewAssignments)  { option deprecated = true; };
    rpc ExecuteRules(ExecuteRulesRequest) returns (RuleExecutionResult) { option deprecated = true; };
    }

    TODO: NET-6657 this service goes away entirely when we switch to nsg-python-gw
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetDeviceIDs = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/GetDeviceIDs',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.DeviceIDs.FromString,
                )
        self.GetDevices = channel.unary_stream(
                '/net.happygears.proto.nsg.Service/GetDevices',
                request_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.DeviceIDs.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
                )
        self.GetDeviceByID = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/GetDeviceByID',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.Int32Value.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
                )
        self.GetDeviceByAddress = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/GetDeviceByAddress',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
                )
        self.GetDeviceByName = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/GetDeviceByName',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
                )
        self.GetConnectedDevice = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/GetConnectedDevice',
                request_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.GetConnectedDeviceRequest.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.ConnectedDevice.FromString,
                )
        self.Query = channel.unary_stream(
                '/net.happygears.proto.nsg.Service/Query',
                request_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.VariableQuery.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.FromString,
                )
        self.GetEvaluationContext = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/GetEvaluationContext',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.EvaluationContext.FromString,
                )
        self.ExportVariable = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/ExportVariable',
                request_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.ExportVariableRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.NewVariable = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/NewVariable',
                request_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.NewVariableRequest.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.FromString,
                )
        self.FindVariable = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/FindVariable',
                request_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.FindVariableRequest.SerializeToString,
                response_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.FromString,
                )
        self.FireAlert = channel.unary_unary(
                '/net.happygears.proto.nsg.Service/FireAlert',
                request_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.FireAlertRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class ServiceServicer(object):
    """// TODO: NET-6657 this service goes away entirely when we switch to nsg-python-gw
    service PyExec {
    option deprecated = true;
    rpc Ping(google.protobuf.Empty) returns (google.protobuf.Struct) { option deprecated = true; };
    rpc Reload(google.protobuf.Empty) returns (google.protobuf.Struct) { option deprecated = true; };
    rpc BuildVariables(BuildVariablesRequest) returns (PollingVariableMap) { option deprecated = true; };
    rpc AssignTags(AssignTagsRequest) returns (TagUpdate) { option deprecated = true; };
    rpc AssignViews(stream AssignViewsRequest) returns (ViewAssignments)  { option deprecated = true; };
    rpc ExecuteRules(ExecuteRulesRequest) returns (RuleExecutionResult) { option deprecated = true; };
    }

    TODO: NET-6657 this service goes away entirely when we switch to nsg-python-gw
    """

    def GetDeviceIDs(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 GetDevices(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 GetDeviceByID(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 GetDeviceByAddress(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 GetDeviceByName(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 GetConnectedDevice(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 Query(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 GetEvaluationContext(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 ExportVariable(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 NewVariable(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 FindVariable(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 FireAlert(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_ServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetDeviceIDs': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDeviceIDs,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.DeviceIDs.SerializeToString,
            ),
            'GetDevices': grpc.unary_stream_rpc_method_handler(
                    servicer.GetDevices,
                    request_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.DeviceIDs.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.SerializeToString,
            ),
            'GetDeviceByID': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDeviceByID,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.Int32Value.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.SerializeToString,
            ),
            'GetDeviceByAddress': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDeviceByAddress,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.SerializeToString,
            ),
            'GetDeviceByName': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDeviceByName,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Device.SerializeToString,
            ),
            'GetConnectedDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConnectedDevice,
                    request_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.GetConnectedDeviceRequest.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.ConnectedDevice.SerializeToString,
            ),
            'Query': grpc.unary_stream_rpc_method_handler(
                    servicer.Query,
                    request_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.VariableQuery.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.SerializeToString,
            ),
            'GetEvaluationContext': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEvaluationContext,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.EvaluationContext.SerializeToString,
            ),
            'ExportVariable': grpc.unary_unary_rpc_method_handler(
                    servicer.ExportVariable,
                    request_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.ExportVariableRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'NewVariable': grpc.unary_unary_rpc_method_handler(
                    servicer.NewVariable,
                    request_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.NewVariableRequest.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.SerializeToString,
            ),
            'FindVariable': grpc.unary_unary_rpc_method_handler(
                    servicer.FindVariable,
                    request_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.FindVariableRequest.FromString,
                    response_serializer=net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.SerializeToString,
            ),
            'FireAlert': grpc.unary_unary_rpc_method_handler(
                    servicer.FireAlert,
                    request_deserializer=net_dot_happygears_dot_proto_dot_NSG__pb2.FireAlertRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'net.happygears.proto.nsg.Service', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Service(object):
    """// TODO: NET-6657 this service goes away entirely when we switch to nsg-python-gw
    service PyExec {
    option deprecated = true;
    rpc Ping(google.protobuf.Empty) returns (google.protobuf.Struct) { option deprecated = true; };
    rpc Reload(google.protobuf.Empty) returns (google.protobuf.Struct) { option deprecated = true; };
    rpc BuildVariables(BuildVariablesRequest) returns (PollingVariableMap) { option deprecated = true; };
    rpc AssignTags(AssignTagsRequest) returns (TagUpdate) { option deprecated = true; };
    rpc AssignViews(stream AssignViewsRequest) returns (ViewAssignments)  { option deprecated = true; };
    rpc ExecuteRules(ExecuteRulesRequest) returns (RuleExecutionResult) { option deprecated = true; };
    }

    TODO: NET-6657 this service goes away entirely when we switch to nsg-python-gw
    """

    @staticmethod
    def GetDeviceIDs(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, '/net.happygears.proto.nsg.Service/GetDeviceIDs',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.DeviceIDs.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDevices(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, '/net.happygears.proto.nsg.Service/GetDevices',
            net_dot_happygears_dot_proto_dot_NSG__pb2.DeviceIDs.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDeviceByID(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, '/net.happygears.proto.nsg.Service/GetDeviceByID',
            google_dot_protobuf_dot_wrappers__pb2.Int32Value.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDeviceByAddress(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, '/net.happygears.proto.nsg.Service/GetDeviceByAddress',
            google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDeviceByName(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, '/net.happygears.proto.nsg.Service/GetDeviceByName',
            google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.Device.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetConnectedDevice(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, '/net.happygears.proto.nsg.Service/GetConnectedDevice',
            net_dot_happygears_dot_proto_dot_NSG__pb2.GetConnectedDeviceRequest.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.ConnectedDevice.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Query(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, '/net.happygears.proto.nsg.Service/Query',
            net_dot_happygears_dot_proto_dot_NSG__pb2.VariableQuery.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEvaluationContext(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, '/net.happygears.proto.nsg.Service/GetEvaluationContext',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.EvaluationContext.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ExportVariable(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, '/net.happygears.proto.nsg.Service/ExportVariable',
            net_dot_happygears_dot_proto_dot_NSG__pb2.ExportVariableRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def NewVariable(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, '/net.happygears.proto.nsg.Service/NewVariable',
            net_dot_happygears_dot_proto_dot_NSG__pb2.NewVariableRequest.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FindVariable(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, '/net.happygears.proto.nsg.Service/FindVariable',
            net_dot_happygears_dot_proto_dot_NSG__pb2.FindVariableRequest.SerializeToString,
            net_dot_happygears_dot_proto_dot_NSG__pb2.Variable.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FireAlert(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, '/net.happygears.proto.nsg.Service/FireAlert',
            net_dot_happygears_dot_proto_dot_NSG__pb2.FireAlertRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
