# 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
import l2_xpu_infra_mgr_pb2 as l2__xpu__infra__mgr__pb2


class LogicalBridgeServiceStub(object):
    """Management of LogicalBridge Resources
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateLogicalBridge = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService/CreateLogicalBridge',
                request_serializer=l2__xpu__infra__mgr__pb2.CreateLogicalBridgeRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.LogicalBridge.FromString,
                )
        self.ListLogicalBridges = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService/ListLogicalBridges',
                request_serializer=l2__xpu__infra__mgr__pb2.ListLogicalBridgesRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.ListLogicalBridgesResponse.FromString,
                )
        self.GetLogicalBridge = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService/GetLogicalBridge',
                request_serializer=l2__xpu__infra__mgr__pb2.GetLogicalBridgeRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.LogicalBridge.FromString,
                )
        self.DeleteLogicalBridge = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService/DeleteLogicalBridge',
                request_serializer=l2__xpu__infra__mgr__pb2.DeleteLogicalBridgeRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UpdateLogicalBridge = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService/UpdateLogicalBridge',
                request_serializer=l2__xpu__infra__mgr__pb2.UpdateLogicalBridgeRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.LogicalBridge.FromString,
                )


class LogicalBridgeServiceServicer(object):
    """Management of LogicalBridge Resources
    """

    def CreateLogicalBridge(self, request, context):
        """Create a Logical Bridge
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListLogicalBridges(self, request, context):
        """List Logical Bridges
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLogicalBridge(self, request, context):
        """Retrieve a Logical Bridge
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteLogicalBridge(self, request, context):
        """Delete a Logical Bridge
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateLogicalBridge(self, request, context):
        """Update a Logical Bridge
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_LogicalBridgeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateLogicalBridge': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateLogicalBridge,
                    request_deserializer=l2__xpu__infra__mgr__pb2.CreateLogicalBridgeRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.LogicalBridge.SerializeToString,
            ),
            'ListLogicalBridges': grpc.unary_unary_rpc_method_handler(
                    servicer.ListLogicalBridges,
                    request_deserializer=l2__xpu__infra__mgr__pb2.ListLogicalBridgesRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.ListLogicalBridgesResponse.SerializeToString,
            ),
            'GetLogicalBridge': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLogicalBridge,
                    request_deserializer=l2__xpu__infra__mgr__pb2.GetLogicalBridgeRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.LogicalBridge.SerializeToString,
            ),
            'DeleteLogicalBridge': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteLogicalBridge,
                    request_deserializer=l2__xpu__infra__mgr__pb2.DeleteLogicalBridgeRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateLogicalBridge': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateLogicalBridge,
                    request_deserializer=l2__xpu__infra__mgr__pb2.UpdateLogicalBridgeRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.LogicalBridge.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'opi_api.network.evpn_gw.v1alpha1.LogicalBridgeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class LogicalBridgeService(object):
    """Management of LogicalBridge Resources
    """

    @staticmethod
    def CreateLogicalBridge(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.evpn_gw.v1alpha1.LogicalBridgeService/CreateLogicalBridge',
            l2__xpu__infra__mgr__pb2.CreateLogicalBridgeRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.LogicalBridge.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListLogicalBridges(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.evpn_gw.v1alpha1.LogicalBridgeService/ListLogicalBridges',
            l2__xpu__infra__mgr__pb2.ListLogicalBridgesRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.ListLogicalBridgesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLogicalBridge(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.evpn_gw.v1alpha1.LogicalBridgeService/GetLogicalBridge',
            l2__xpu__infra__mgr__pb2.GetLogicalBridgeRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.LogicalBridge.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteLogicalBridge(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.evpn_gw.v1alpha1.LogicalBridgeService/DeleteLogicalBridge',
            l2__xpu__infra__mgr__pb2.DeleteLogicalBridgeRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateLogicalBridge(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.evpn_gw.v1alpha1.LogicalBridgeService/UpdateLogicalBridge',
            l2__xpu__infra__mgr__pb2.UpdateLogicalBridgeRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.LogicalBridge.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


class BridgePortServiceStub(object):
    """Management of BridgePort resources
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateBridgePort = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.BridgePortService/CreateBridgePort',
                request_serializer=l2__xpu__infra__mgr__pb2.CreateBridgePortRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.BridgePort.FromString,
                )
        self.ListBridgePorts = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.BridgePortService/ListBridgePorts',
                request_serializer=l2__xpu__infra__mgr__pb2.ListBridgePortsRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.ListBridgePortsResponse.FromString,
                )
        self.GetBridgePort = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.BridgePortService/GetBridgePort',
                request_serializer=l2__xpu__infra__mgr__pb2.GetBridgePortRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.BridgePort.FromString,
                )
        self.DeleteBridgePort = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.BridgePortService/DeleteBridgePort',
                request_serializer=l2__xpu__infra__mgr__pb2.DeleteBridgePortRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UpdateBridgePort = channel.unary_unary(
                '/opi_api.network.evpn_gw.v1alpha1.BridgePortService/UpdateBridgePort',
                request_serializer=l2__xpu__infra__mgr__pb2.UpdateBridgePortRequest.SerializeToString,
                response_deserializer=l2__xpu__infra__mgr__pb2.BridgePort.FromString,
                )


class BridgePortServiceServicer(object):
    """Management of BridgePort resources
    """

    def CreateBridgePort(self, request, context):
        """Create a Bridge Port
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListBridgePorts(self, request, context):
        """List Bridge Ports
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetBridgePort(self, request, context):
        """Retrieve a Bridge Port
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteBridgePort(self, request, context):
        """Delete a Bridge Port
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateBridgePort(self, request, context):
        """Update a Bridge Port
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BridgePortServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateBridgePort': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateBridgePort,
                    request_deserializer=l2__xpu__infra__mgr__pb2.CreateBridgePortRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.BridgePort.SerializeToString,
            ),
            'ListBridgePorts': grpc.unary_unary_rpc_method_handler(
                    servicer.ListBridgePorts,
                    request_deserializer=l2__xpu__infra__mgr__pb2.ListBridgePortsRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.ListBridgePortsResponse.SerializeToString,
            ),
            'GetBridgePort': grpc.unary_unary_rpc_method_handler(
                    servicer.GetBridgePort,
                    request_deserializer=l2__xpu__infra__mgr__pb2.GetBridgePortRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.BridgePort.SerializeToString,
            ),
            'DeleteBridgePort': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteBridgePort,
                    request_deserializer=l2__xpu__infra__mgr__pb2.DeleteBridgePortRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UpdateBridgePort': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateBridgePort,
                    request_deserializer=l2__xpu__infra__mgr__pb2.UpdateBridgePortRequest.FromString,
                    response_serializer=l2__xpu__infra__mgr__pb2.BridgePort.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'opi_api.network.evpn_gw.v1alpha1.BridgePortService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class BridgePortService(object):
    """Management of BridgePort resources
    """

    @staticmethod
    def CreateBridgePort(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.evpn_gw.v1alpha1.BridgePortService/CreateBridgePort',
            l2__xpu__infra__mgr__pb2.CreateBridgePortRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.BridgePort.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListBridgePorts(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.evpn_gw.v1alpha1.BridgePortService/ListBridgePorts',
            l2__xpu__infra__mgr__pb2.ListBridgePortsRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.ListBridgePortsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetBridgePort(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.evpn_gw.v1alpha1.BridgePortService/GetBridgePort',
            l2__xpu__infra__mgr__pb2.GetBridgePortRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.BridgePort.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteBridgePort(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.evpn_gw.v1alpha1.BridgePortService/DeleteBridgePort',
            l2__xpu__infra__mgr__pb2.DeleteBridgePortRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateBridgePort(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.evpn_gw.v1alpha1.BridgePortService/UpdateBridgePort',
            l2__xpu__infra__mgr__pb2.UpdateBridgePortRequest.SerializeToString,
            l2__xpu__infra__mgr__pb2.BridgePort.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
