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

from brymck.risk.v1 import risk_api_pb2 as brymck_dot_risk_dot_v1_dot_risk__api__pb2


class RiskAPIStub(object):
  """The RiskAPI retrieves calculations derived from an ex ante risk model.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetRisk = channel.unary_unary(
        '/brymck.risk.v1.RiskAPI/GetRisk',
        request_serializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetRiskRequest.SerializeToString,
        response_deserializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetRiskResponse.FromString,
        )
    self.GetCovariances = channel.unary_unary(
        '/brymck.risk.v1.RiskAPI/GetCovariances',
        request_serializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetCovariancesRequest.SerializeToString,
        response_deserializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetCovariancesResponse.FromString,
        )
    self.GetReturnTimeSeries = channel.unary_unary(
        '/brymck.risk.v1.RiskAPI/GetReturnTimeSeries',
        request_serializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetReturnTimeSeriesRequest.SerializeToString,
        response_deserializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetReturnTimeSeriesResponse.FromString,
        )


class RiskAPIServicer(object):
  """The RiskAPI retrieves calculations derived from an ex ante risk model.
  """

  def GetRisk(self, request, context):
    """GetRisk gets ex ante risk for a security.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetCovariances(self, request, context):
    """GetCovariances retrieves covariances for a list of securities.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetReturnTimeSeries(self, request, context):
    """GetReturnTimeSeries retrieves the return time series for a security.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_RiskAPIServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetRisk': grpc.unary_unary_rpc_method_handler(
          servicer.GetRisk,
          request_deserializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetRiskRequest.FromString,
          response_serializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetRiskResponse.SerializeToString,
      ),
      'GetCovariances': grpc.unary_unary_rpc_method_handler(
          servicer.GetCovariances,
          request_deserializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetCovariancesRequest.FromString,
          response_serializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetCovariancesResponse.SerializeToString,
      ),
      'GetReturnTimeSeries': grpc.unary_unary_rpc_method_handler(
          servicer.GetReturnTimeSeries,
          request_deserializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetReturnTimeSeriesRequest.FromString,
          response_serializer=brymck_dot_risk_dot_v1_dot_risk__api__pb2.GetReturnTimeSeriesResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'brymck.risk.v1.RiskAPI', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
