# Copyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: nvidia/clara/platform/clara.proto

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from nvidia_clara.grpc import metrics_pb2 as nvidia_dot_clara_dot_platform_dot_node__monitor_dot_metrics__pb2


class MonitorStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.GpuMetrics = channel.unary_stream(
        '/nvidia.clara.platform.node_monitor.Monitor/GpuMetrics',
        request_serializer=nvidia_dot_clara_dot_platform_dot_node__monitor_dot_metrics__pb2.MonitorGpuMetricsRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_node__monitor_dot_metrics__pb2.MonitorGpuMetricsResponse.FromString,
        )


class MonitorServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def GpuMetrics(self, request, context):
    """Request GPU metrics
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_MonitorServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GpuMetrics': grpc.unary_stream_rpc_method_handler(
          servicer.GpuMetrics,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_node__monitor_dot_metrics__pb2.MonitorGpuMetricsRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_node__monitor_dot_metrics__pb2.MonitorGpuMetricsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'nvidia.clara.platform.node_monitor.Monitor', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
