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

from . import metrics_pb2 as admin_dot_v1_dot_metrics__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetMetrics = channel.unary_unary(
                '/admin.v1.MetricsService/GetMetrics',
                request_serializer=admin_dot_v1_dot_metrics__pb2.GetMetricsRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_metrics__pb2.GetMetricsResponse.FromString,
                _registered_method=True)
        self.CreateCustomMetric = channel.unary_unary(
                '/admin.v1.MetricsService/CreateCustomMetric',
                request_serializer=admin_dot_v1_dot_metrics__pb2.CreateCustomMetricRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_metrics__pb2.CreateCustomMetricResponse.FromString,
                _registered_method=True)
        self.GetCustomMetrics = channel.unary_unary(
                '/admin.v1.MetricsService/GetCustomMetrics',
                request_serializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsResponse.FromString,
                _registered_method=True)
        self.GetCustomMetricsDetails = channel.unary_unary(
                '/admin.v1.MetricsService/GetCustomMetricsDetails',
                request_serializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsDetailsRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsDetailsResponse.FromString,
                _registered_method=True)
        self.DeleteCustomMetric = channel.unary_unary(
                '/admin.v1.MetricsService/DeleteCustomMetric',
                request_serializer=admin_dot_v1_dot_metrics__pb2.DeleteCustomMetricRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_metrics__pb2.DeleteCustomMetricResponse.FromString,
                _registered_method=True)


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

    def GetMetrics(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 CreateCustomMetric(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 GetCustomMetrics(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 GetCustomMetricsDetails(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 DeleteCustomMetric(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 = {
            'GetMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMetrics,
                    request_deserializer=admin_dot_v1_dot_metrics__pb2.GetMetricsRequest.FromString,
                    response_serializer=admin_dot_v1_dot_metrics__pb2.GetMetricsResponse.SerializeToString,
            ),
            'CreateCustomMetric': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateCustomMetric,
                    request_deserializer=admin_dot_v1_dot_metrics__pb2.CreateCustomMetricRequest.FromString,
                    response_serializer=admin_dot_v1_dot_metrics__pb2.CreateCustomMetricResponse.SerializeToString,
            ),
            'GetCustomMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCustomMetrics,
                    request_deserializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsRequest.FromString,
                    response_serializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsResponse.SerializeToString,
            ),
            'GetCustomMetricsDetails': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCustomMetricsDetails,
                    request_deserializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsDetailsRequest.FromString,
                    response_serializer=admin_dot_v1_dot_metrics__pb2.GetCustomMetricsDetailsResponse.SerializeToString,
            ),
            'DeleteCustomMetric': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteCustomMetric,
                    request_deserializer=admin_dot_v1_dot_metrics__pb2.DeleteCustomMetricRequest.FromString,
                    response_serializer=admin_dot_v1_dot_metrics__pb2.DeleteCustomMetricResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'admin.v1.MetricsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('admin.v1.MetricsService', rpc_method_handlers)


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

    @staticmethod
    def GetMetrics(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,
            '/admin.v1.MetricsService/GetMetrics',
            admin_dot_v1_dot_metrics__pb2.GetMetricsRequest.SerializeToString,
            admin_dot_v1_dot_metrics__pb2.GetMetricsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateCustomMetric(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,
            '/admin.v1.MetricsService/CreateCustomMetric',
            admin_dot_v1_dot_metrics__pb2.CreateCustomMetricRequest.SerializeToString,
            admin_dot_v1_dot_metrics__pb2.CreateCustomMetricResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCustomMetrics(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,
            '/admin.v1.MetricsService/GetCustomMetrics',
            admin_dot_v1_dot_metrics__pb2.GetCustomMetricsRequest.SerializeToString,
            admin_dot_v1_dot_metrics__pb2.GetCustomMetricsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCustomMetricsDetails(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,
            '/admin.v1.MetricsService/GetCustomMetricsDetails',
            admin_dot_v1_dot_metrics__pb2.GetCustomMetricsDetailsRequest.SerializeToString,
            admin_dot_v1_dot_metrics__pb2.GetCustomMetricsDetailsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteCustomMetric(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,
            '/admin.v1.MetricsService/DeleteCustomMetric',
            admin_dot_v1_dot_metrics__pb2.DeleteCustomMetricRequest.SerializeToString,
            admin_dot_v1_dot_metrics__pb2.DeleteCustomMetricResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
