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

from ..common import applications_common_pb2 as applications__common__pb2


class ApplicationsStub(object):
    """*
    Service for handling applications.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListApplications = channel.unary_unary(
                '/armonik.api.grpc.v1.applications.Applications/ListApplications',
                request_serializer=applications__common__pb2.ListApplicationsRequest.SerializeToString,
                response_deserializer=applications__common__pb2.ListApplicationsResponse.FromString,
                )


class ApplicationsServicer(object):
    """*
    Service for handling applications.
    """

    def ListApplications(self, request, context):
        """*
        Get a applications list using pagination, filters and sorting;
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ApplicationsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListApplications': grpc.unary_unary_rpc_method_handler(
                    servicer.ListApplications,
                    request_deserializer=applications__common__pb2.ListApplicationsRequest.FromString,
                    response_serializer=applications__common__pb2.ListApplicationsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'armonik.api.grpc.v1.applications.Applications', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Applications(object):
    """*
    Service for handling applications.
    """

    @staticmethod
    def ListApplications(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, '/armonik.api.grpc.v1.applications.Applications/ListApplications',
            applications__common__pb2.ListApplicationsRequest.SerializeToString,
            applications__common__pb2.ListApplicationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
