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

from grid.protos.grid.v1 import experiment_details_pb2 as grid_dot_v1_dot_experiment__details__pb2


class ExperimentDetailsServiceStub(object):
  """This is experiment details service which should be implemented in the gridlet
  with control plane optionally proxying it/redirecting to it
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetLogs = channel.unary_unary(
        '/grid.v1.ExperimentDetailsService/GetLogs',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.GetLogsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetLogsResponse.FromString,
        )
    self.WatchLogs = channel.unary_stream(
        '/grid.v1.ExperimentDetailsService/WatchLogs',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.WatchLogsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.WatchLogsResponse.FromString,
        )
    self.ListArtifacts = channel.unary_unary(
        '/grid.v1.ExperimentDetailsService/ListArtifacts',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.ListArtifactsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.ListArtifactsResponse.FromString,
        )
    self.WatchArtifacts = channel.unary_stream(
        '/grid.v1.ExperimentDetailsService/WatchArtifacts',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.WatchArtifactsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.WatchArtifactsResponse.FromString,
        )
    self.GetExperimentMetrics = channel.unary_unary(
        '/grid.v1.ExperimentDetailsService/GetExperimentMetrics',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentMetricsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentMetricsResponse.FromString,
        )
    self.ListAvailableMetrics = channel.unary_unary(
        '/grid.v1.ExperimentDetailsService/ListAvailableMetrics',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.ListAvailableMetricsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.ListAvailableMetricsResponse.FromString,
        )
    self.WatchExperimentMetrics = channel.unary_stream(
        '/grid.v1.ExperimentDetailsService/WatchExperimentMetrics',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.WatchExperimentMetricsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.WatchExperimentMetricsResponse.FromString,
        )
    self.GetExperimentCost = channel.unary_unary(
        '/grid.v1.ExperimentDetailsService/GetExperimentCost',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentCostRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentCostResponse.FromString,
        )
    self.GetSessionCost = channel.unary_unary(
        '/grid.v1.ExperimentDetailsService/GetSessionCost',
        request_serializer=grid_dot_v1_dot_experiment__details__pb2.GetSessionCostRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetSessionCostResponse.FromString,
        )


class ExperimentDetailsServiceServicer(object):
  """This is experiment details service which should be implemented in the gridlet
  with control plane optionally proxying it/redirecting to it
  """

  def GetLogs(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def WatchLogs(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

  def WatchArtifacts(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

  def ListAvailableMetrics(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def WatchExperimentMetrics(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

  def GetSessionCost(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ExperimentDetailsServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetLogs': grpc.unary_unary_rpc_method_handler(
          servicer.GetLogs,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetLogsRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.GetLogsResponse.SerializeToString,
      ),
      'WatchLogs': grpc.unary_stream_rpc_method_handler(
          servicer.WatchLogs,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.WatchLogsRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.WatchLogsResponse.SerializeToString,
      ),
      'ListArtifacts': grpc.unary_unary_rpc_method_handler(
          servicer.ListArtifacts,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.ListArtifactsRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.ListArtifactsResponse.SerializeToString,
      ),
      'WatchArtifacts': grpc.unary_stream_rpc_method_handler(
          servicer.WatchArtifacts,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.WatchArtifactsRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.WatchArtifactsResponse.SerializeToString,
      ),
      'GetExperimentMetrics': grpc.unary_unary_rpc_method_handler(
          servicer.GetExperimentMetrics,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentMetricsRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentMetricsResponse.SerializeToString,
      ),
      'ListAvailableMetrics': grpc.unary_unary_rpc_method_handler(
          servicer.ListAvailableMetrics,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.ListAvailableMetricsRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.ListAvailableMetricsResponse.SerializeToString,
      ),
      'WatchExperimentMetrics': grpc.unary_stream_rpc_method_handler(
          servicer.WatchExperimentMetrics,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.WatchExperimentMetricsRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.WatchExperimentMetricsResponse.SerializeToString,
      ),
      'GetExperimentCost': grpc.unary_unary_rpc_method_handler(
          servicer.GetExperimentCost,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentCostRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.GetExperimentCostResponse.SerializeToString,
      ),
      'GetSessionCost': grpc.unary_unary_rpc_method_handler(
          servicer.GetSessionCost,
          request_deserializer=grid_dot_v1_dot_experiment__details__pb2.GetSessionCostRequest.FromString,
          response_serializer=grid_dot_v1_dot_experiment__details__pb2.GetSessionCostResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grid.v1.ExperimentDetailsService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
