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

from . import MetricsService_pb2 as MetricsService__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetMetricsStatus = channel.unary_unary(
                '/xgtproto.MetricsService/GetMetricsStatus',
                request_serializer=MetricsService__pb2.MetricsStatusRequest.SerializeToString,
                response_deserializer=MetricsService__pb2.MetricsStatusResponse.FromString,
                _registered_method=True)
        self.ClearMetrics = channel.unary_unary(
                '/xgtproto.MetricsService/ClearMetrics',
                request_serializer=MetricsService__pb2.ClearMetricsRequest.SerializeToString,
                response_deserializer=MetricsService__pb2.ClearMetricsResponse.FromString,
                _registered_method=True)


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

    def GetMetricsStatus(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 ClearMetrics(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_MetricsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetMetricsStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMetricsStatus,
                    request_deserializer=MetricsService__pb2.MetricsStatusRequest.FromString,
                    response_serializer=MetricsService__pb2.MetricsStatusResponse.SerializeToString,
            ),
            'ClearMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearMetrics,
                    request_deserializer=MetricsService__pb2.ClearMetricsRequest.FromString,
                    response_serializer=MetricsService__pb2.ClearMetricsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'xgtproto.MetricsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('xgtproto.MetricsService', rpc_method_handlers)


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

    @staticmethod
    def GetMetricsStatus(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,
            '/xgtproto.MetricsService/GetMetricsStatus',
            MetricsService__pb2.MetricsStatusRequest.SerializeToString,
            MetricsService__pb2.MetricsStatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClearMetrics(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,
            '/xgtproto.MetricsService/ClearMetrics',
            MetricsService__pb2.ClearMetricsRequest.SerializeToString,
            MetricsService__pb2.ClearMetricsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
