# 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 health_checks_common_pb2 as health__checks__common__pb2


class HealthChecksServiceStub(object):
    """*
    The HealthChecksService provides methods to verify the health of the cluster.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CheckHealth = channel.unary_unary(
                '/armonik.api.grpc.v1.health_checks.HealthChecksService/CheckHealth',
                request_serializer=health__checks__common__pb2.CheckHealthRequest.SerializeToString,
                response_deserializer=health__checks__common__pb2.CheckHealthResponse.FromString,
                )


class HealthChecksServiceServicer(object):
    """*
    The HealthChecksService provides methods to verify the health of the cluster.
    """

    def CheckHealth(self, request, context):
        """*
        Checks the health of the cluster. This can be used to verify that the cluster is up and running.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_HealthChecksServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CheckHealth': grpc.unary_unary_rpc_method_handler(
                    servicer.CheckHealth,
                    request_deserializer=health__checks__common__pb2.CheckHealthRequest.FromString,
                    response_serializer=health__checks__common__pb2.CheckHealthResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'armonik.api.grpc.v1.health_checks.HealthChecksService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class HealthChecksService(object):
    """*
    The HealthChecksService provides methods to verify the health of the cluster.
    """

    @staticmethod
    def CheckHealth(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.health_checks.HealthChecksService/CheckHealth',
            health__checks__common__pb2.CheckHealthRequest.SerializeToString,
            health__checks__common__pb2.CheckHealthResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
