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

from spacex.api.device import wifi_pb2 as spacex_dot_api_dot_device_dot_wifi__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.MeshStream = channel.stream_stream(
                '/SpaceX.API.Device.Mesh/MeshStream',
                request_serializer=spacex_dot_api_dot_device_dot_wifi__pb2.ToController.SerializeToString,
                response_deserializer=spacex_dot_api_dot_device_dot_wifi__pb2.FromController.FromString,
                _registered_method=True)


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

    def MeshStream(self, request_iterator, 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_MeshServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'MeshStream': grpc.stream_stream_rpc_method_handler(
                    servicer.MeshStream,
                    request_deserializer=spacex_dot_api_dot_device_dot_wifi__pb2.ToController.FromString,
                    response_serializer=spacex_dot_api_dot_device_dot_wifi__pb2.FromController.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'SpaceX.API.Device.Mesh', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('SpaceX.API.Device.Mesh', rpc_method_handlers)


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

    @staticmethod
    def MeshStream(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/SpaceX.API.Device.Mesh/MeshStream',
            spacex_dot_api_dot_device_dot_wifi__pb2.ToController.SerializeToString,
            spacex_dot_api_dot_device_dot_wifi__pb2.FromController.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
