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

import grpc

from chalk._gen.chalk.server.v1 import status_pb2 as chalk_dot_server_dot_v1_dot_status__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CheckHealth = channel.unary_unary(
            "/chalk.server.v1.HealthService/CheckHealth",
            request_serializer=chalk_dot_server_dot_v1_dot_status__pb2.CheckHealthRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_status__pb2.CheckHealthResponse.FromString,
        )
        self.GetHealth = channel.unary_unary(
            "/chalk.server.v1.HealthService/GetHealth",
            request_serializer=chalk_dot_server_dot_v1_dot_status__pb2.GetHealthRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_status__pb2.GetHealthResponse.FromString,
        )
        self.GetClusterMetrics = channel.unary_unary(
            "/chalk.server.v1.HealthService/GetClusterMetrics",
            request_serializer=chalk_dot_server_dot_v1_dot_status__pb2.GetClusterMetricsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_status__pb2.GetClusterMetricsResponse.FromString,
        )


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

    def CheckHealth(self, request, context):
        """If any checks fail, this request fails."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetHealth(self, request, context):
        """Return the actual health check values."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetClusterMetrics(self, request, context):
        """Return collected cluster prometheus metrics"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_HealthServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CheckHealth": grpc.unary_unary_rpc_method_handler(
            servicer.CheckHealth,
            request_deserializer=chalk_dot_server_dot_v1_dot_status__pb2.CheckHealthRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_status__pb2.CheckHealthResponse.SerializeToString,
        ),
        "GetHealth": grpc.unary_unary_rpc_method_handler(
            servicer.GetHealth,
            request_deserializer=chalk_dot_server_dot_v1_dot_status__pb2.GetHealthRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_status__pb2.GetHealthResponse.SerializeToString,
        ),
        "GetClusterMetrics": grpc.unary_unary_rpc_method_handler(
            servicer.GetClusterMetrics,
            request_deserializer=chalk_dot_server_dot_v1_dot_status__pb2.GetClusterMetricsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_status__pb2.GetClusterMetricsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("chalk.server.v1.HealthService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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,
            "/chalk.server.v1.HealthService/CheckHealth",
            chalk_dot_server_dot_v1_dot_status__pb2.CheckHealthRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_status__pb2.CheckHealthResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetHealth(
        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,
            "/chalk.server.v1.HealthService/GetHealth",
            chalk_dot_server_dot_v1_dot_status__pb2.GetHealthRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_status__pb2.GetHealthResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetClusterMetrics(
        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,
            "/chalk.server.v1.HealthService/GetClusterMetrics",
            chalk_dot_server_dot_v1_dot_status__pb2.GetClusterMetricsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_status__pb2.GetClusterMetricsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
