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

from . import analytics_pb2 as proto_dot_analytics__pb2

GRPC_GENERATED_VERSION = '1.74.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in proto/analytics_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class AnalyticsServiceStub(object):
    """Analytics service for MCP metrics collection and querying
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.IngestMetrics = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/IngestMetrics',
                request_serializer=proto_dot_analytics__pb2.IngestRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.IngestResponse.FromString,
                _registered_method=True)
        self.IngestMetricsStream = channel.stream_unary(
                '/mcpulse.v1.AnalyticsService/IngestMetricsStream',
                request_serializer=proto_dot_analytics__pb2.IngestRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.IngestResponse.FromString,
                _registered_method=True)
        self.ListServers = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/ListServers',
                request_serializer=proto_dot_analytics__pb2.ListServersRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.ListServersResponse.FromString,
                _registered_method=True)
        self.GetServer = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/GetServer',
                request_serializer=proto_dot_analytics__pb2.GetServerRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.GetServerResponse.FromString,
                _registered_method=True)
        self.GetServerMetrics = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/GetServerMetrics',
                request_serializer=proto_dot_analytics__pb2.GetServerMetricsRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.GetServerMetricsResponse.FromString,
                _registered_method=True)
        self.GetTools = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/GetTools',
                request_serializer=proto_dot_analytics__pb2.GetToolsRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.GetToolsResponse.FromString,
                _registered_method=True)
        self.GetToolTimeline = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/GetToolTimeline',
                request_serializer=proto_dot_analytics__pb2.GetToolTimelineRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.GetToolTimelineResponse.FromString,
                _registered_method=True)
        self.GetErrors = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/GetErrors',
                request_serializer=proto_dot_analytics__pb2.GetErrorsRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.GetErrorsResponse.FromString,
                _registered_method=True)
        self.GetSessions = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/GetSessions',
                request_serializer=proto_dot_analytics__pb2.GetSessionsRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.GetSessionsResponse.FromString,
                _registered_method=True)
        self.GetAnomalies = channel.unary_unary(
                '/mcpulse.v1.AnalyticsService/GetAnomalies',
                request_serializer=proto_dot_analytics__pb2.GetAnomaliesRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.GetAnomaliesResponse.FromString,
                _registered_method=True)
        self.StreamMetrics = channel.unary_stream(
                '/mcpulse.v1.AnalyticsService/StreamMetrics',
                request_serializer=proto_dot_analytics__pb2.StreamMetricsRequest.SerializeToString,
                response_deserializer=proto_dot_analytics__pb2.MetricUpdate.FromString,
                _registered_method=True)


class AnalyticsServiceServicer(object):
    """Analytics service for MCP metrics collection and querying
    """

    def IngestMetrics(self, request, context):
        """Ingestion
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IngestMetricsStream(self, request_iterator, 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 ListServers(self, request, context):
        """Server management
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetServer(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 GetServerMetrics(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 GetTools(self, request, context):
        """Tool analytics
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetToolTimeline(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 GetErrors(self, request, context):
        """Error tracking
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSessions(self, request, context):
        """Session tracking
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAnomalies(self, request, context):
        """Anomaly detection
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamMetrics(self, request, context):
        """Real-time streaming
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AnalyticsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'IngestMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.IngestMetrics,
                    request_deserializer=proto_dot_analytics__pb2.IngestRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.IngestResponse.SerializeToString,
            ),
            'IngestMetricsStream': grpc.stream_unary_rpc_method_handler(
                    servicer.IngestMetricsStream,
                    request_deserializer=proto_dot_analytics__pb2.IngestRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.IngestResponse.SerializeToString,
            ),
            'ListServers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListServers,
                    request_deserializer=proto_dot_analytics__pb2.ListServersRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.ListServersResponse.SerializeToString,
            ),
            'GetServer': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServer,
                    request_deserializer=proto_dot_analytics__pb2.GetServerRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.GetServerResponse.SerializeToString,
            ),
            'GetServerMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServerMetrics,
                    request_deserializer=proto_dot_analytics__pb2.GetServerMetricsRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.GetServerMetricsResponse.SerializeToString,
            ),
            'GetTools': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTools,
                    request_deserializer=proto_dot_analytics__pb2.GetToolsRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.GetToolsResponse.SerializeToString,
            ),
            'GetToolTimeline': grpc.unary_unary_rpc_method_handler(
                    servicer.GetToolTimeline,
                    request_deserializer=proto_dot_analytics__pb2.GetToolTimelineRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.GetToolTimelineResponse.SerializeToString,
            ),
            'GetErrors': grpc.unary_unary_rpc_method_handler(
                    servicer.GetErrors,
                    request_deserializer=proto_dot_analytics__pb2.GetErrorsRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.GetErrorsResponse.SerializeToString,
            ),
            'GetSessions': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSessions,
                    request_deserializer=proto_dot_analytics__pb2.GetSessionsRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.GetSessionsResponse.SerializeToString,
            ),
            'GetAnomalies': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAnomalies,
                    request_deserializer=proto_dot_analytics__pb2.GetAnomaliesRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.GetAnomaliesResponse.SerializeToString,
            ),
            'StreamMetrics': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamMetrics,
                    request_deserializer=proto_dot_analytics__pb2.StreamMetricsRequest.FromString,
                    response_serializer=proto_dot_analytics__pb2.MetricUpdate.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mcpulse.v1.AnalyticsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('mcpulse.v1.AnalyticsService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AnalyticsService(object):
    """Analytics service for MCP metrics collection and querying
    """

    @staticmethod
    def IngestMetrics(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,
            '/mcpulse.v1.AnalyticsService/IngestMetrics',
            proto_dot_analytics__pb2.IngestRequest.SerializeToString,
            proto_dot_analytics__pb2.IngestResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IngestMetricsStream(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(
            request_iterator,
            target,
            '/mcpulse.v1.AnalyticsService/IngestMetricsStream',
            proto_dot_analytics__pb2.IngestRequest.SerializeToString,
            proto_dot_analytics__pb2.IngestResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListServers(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,
            '/mcpulse.v1.AnalyticsService/ListServers',
            proto_dot_analytics__pb2.ListServersRequest.SerializeToString,
            proto_dot_analytics__pb2.ListServersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetServer(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,
            '/mcpulse.v1.AnalyticsService/GetServer',
            proto_dot_analytics__pb2.GetServerRequest.SerializeToString,
            proto_dot_analytics__pb2.GetServerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetServerMetrics(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,
            '/mcpulse.v1.AnalyticsService/GetServerMetrics',
            proto_dot_analytics__pb2.GetServerMetricsRequest.SerializeToString,
            proto_dot_analytics__pb2.GetServerMetricsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTools(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,
            '/mcpulse.v1.AnalyticsService/GetTools',
            proto_dot_analytics__pb2.GetToolsRequest.SerializeToString,
            proto_dot_analytics__pb2.GetToolsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetToolTimeline(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,
            '/mcpulse.v1.AnalyticsService/GetToolTimeline',
            proto_dot_analytics__pb2.GetToolTimelineRequest.SerializeToString,
            proto_dot_analytics__pb2.GetToolTimelineResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetErrors(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,
            '/mcpulse.v1.AnalyticsService/GetErrors',
            proto_dot_analytics__pb2.GetErrorsRequest.SerializeToString,
            proto_dot_analytics__pb2.GetErrorsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSessions(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,
            '/mcpulse.v1.AnalyticsService/GetSessions',
            proto_dot_analytics__pb2.GetSessionsRequest.SerializeToString,
            proto_dot_analytics__pb2.GetSessionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAnomalies(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,
            '/mcpulse.v1.AnalyticsService/GetAnomalies',
            proto_dot_analytics__pb2.GetAnomaliesRequest.SerializeToString,
            proto_dot_analytics__pb2.GetAnomaliesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamMetrics(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_stream(
            request,
            target,
            '/mcpulse.v1.AnalyticsService/StreamMetrics',
            proto_dot_analytics__pb2.StreamMetricsRequest.SerializeToString,
            proto_dot_analytics__pb2.MetricUpdate.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
