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

import networkinterfaces_pb2 as networkinterfaces__pb2


class NetInterfaceServiceStub(object):
    """Service functions for Network Interface exported by the server
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetNetInterface = channel.unary_unary(
                '/opi_api.network.opinetcommon.v1alpha1.NetInterfaceService/GetNetInterface',
                request_serializer=networkinterfaces__pb2.GetNetInterfaceRequest.SerializeToString,
                response_deserializer=networkinterfaces__pb2.NetInterface.FromString,
                )
        self.ListNetInterfaces = channel.unary_unary(
                '/opi_api.network.opinetcommon.v1alpha1.NetInterfaceService/ListNetInterfaces',
                request_serializer=networkinterfaces__pb2.ListNetInterfacesRequest.SerializeToString,
                response_deserializer=networkinterfaces__pb2.ListNetInterfacesResponse.FromString,
                )
        self.UpdateNetInterface = channel.unary_unary(
                '/opi_api.network.opinetcommon.v1alpha1.NetInterfaceService/UpdateNetInterface',
                request_serializer=networkinterfaces__pb2.UpdateNetInterfaceRequest.SerializeToString,
                response_deserializer=networkinterfaces__pb2.NetInterface.FromString,
                )


class NetInterfaceServiceServicer(object):
    """Service functions for Network Interface exported by the server
    """

    def GetNetInterface(self, request, context):
        """Retrieves the interface information for a given interface
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListNetInterfaces(self, request, context):
        """Retrieves the set of interfaces on the device
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateNetInterface(self, request, context):
        """A method for setting or changing configuration of an interface
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_NetInterfaceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetNetInterface': grpc.unary_unary_rpc_method_handler(
                    servicer.GetNetInterface,
                    request_deserializer=networkinterfaces__pb2.GetNetInterfaceRequest.FromString,
                    response_serializer=networkinterfaces__pb2.NetInterface.SerializeToString,
            ),
            'ListNetInterfaces': grpc.unary_unary_rpc_method_handler(
                    servicer.ListNetInterfaces,
                    request_deserializer=networkinterfaces__pb2.ListNetInterfacesRequest.FromString,
                    response_serializer=networkinterfaces__pb2.ListNetInterfacesResponse.SerializeToString,
            ),
            'UpdateNetInterface': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateNetInterface,
                    request_deserializer=networkinterfaces__pb2.UpdateNetInterfaceRequest.FromString,
                    response_serializer=networkinterfaces__pb2.NetInterface.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'opi_api.network.opinetcommon.v1alpha1.NetInterfaceService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class NetInterfaceService(object):
    """Service functions for Network Interface exported by the server
    """

    @staticmethod
    def GetNetInterface(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, '/opi_api.network.opinetcommon.v1alpha1.NetInterfaceService/GetNetInterface',
            networkinterfaces__pb2.GetNetInterfaceRequest.SerializeToString,
            networkinterfaces__pb2.NetInterface.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListNetInterfaces(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, '/opi_api.network.opinetcommon.v1alpha1.NetInterfaceService/ListNetInterfaces',
            networkinterfaces__pb2.ListNetInterfacesRequest.SerializeToString,
            networkinterfaces__pb2.ListNetInterfacesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateNetInterface(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, '/opi_api.network.opinetcommon.v1alpha1.NetInterfaceService/UpdateNetInterface',
            networkinterfaces__pb2.UpdateNetInterfaceRequest.SerializeToString,
            networkinterfaces__pb2.NetInterface.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
