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

from union.internal.app import app_logs_payload_pb2 as app_dot_app__logs__payload__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.TailLogs = channel.unary_stream(
                '/cloudidl.app.AppLogsService/TailLogs',
                request_serializer=app_dot_app__logs__payload__pb2.TailLogsRequest.SerializeToString,
                response_deserializer=app_dot_app__logs__payload__pb2.TailLogsResponse.FromString,
                )


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

    def TailLogs(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_AppLogsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'TailLogs': grpc.unary_stream_rpc_method_handler(
                    servicer.TailLogs,
                    request_deserializer=app_dot_app__logs__payload__pb2.TailLogsRequest.FromString,
                    response_serializer=app_dot_app__logs__payload__pb2.TailLogsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cloudidl.app.AppLogsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def TailLogs(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, '/cloudidl.app.AppLogsService/TailLogs',
            app_dot_app__logs__payload__pb2.TailLogsRequest.SerializeToString,
            app_dot_app__logs__payload__pb2.TailLogsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
