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

import common_types_pb2 as common__types__pb2
import crmsfa_pb2 as crmsfa__pb2


class CrmsfaProcsStub(object):
  """The service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Ping = channel.unary_unary(
        '/crmsfa.CrmsfaProcs/Ping',
        request_serializer=common__types__pb2.PingRequest.SerializeToString,
        response_deserializer=common__types__pb2.PingReply.FromString,
        )


class CrmsfaProcsServicer(object):
  """The service definition.
  """

  def Ping(self, request, context):
    """Sends a greeting
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_CrmsfaProcsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Ping': grpc.unary_unary_rpc_method_handler(
          servicer.Ping,
          request_deserializer=common__types__pb2.PingRequest.FromString,
          response_serializer=common__types__pb2.PingReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'crmsfa.CrmsfaProcs', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Login = channel.unary_unary(
        '/crmsfa.OdooProcs/Login',
        request_serializer=crmsfa__pb2.FaOdoo.SerializeToString,
        response_deserializer=crmsfa__pb2.FaSession.FromString,
        )
    self.SwitchLang = channel.unary_unary(
        '/crmsfa.OdooProcs/SwitchLang',
        request_serializer=common__types__pb2.Text.SerializeToString,
        response_deserializer=common__types__pb2.Result.FromString,
        )
    self.FieldsGet = channel.unary_unary(
        '/crmsfa.OdooProcs/FieldsGet',
        request_serializer=crmsfa__pb2.FaModel.SerializeToString,
        response_deserializer=crmsfa__pb2.FaModel.FromString,
        )
    self.BrowseRecord = channel.unary_unary(
        '/crmsfa.OdooProcs/BrowseRecord',
        request_serializer=crmsfa__pb2.FaIds.SerializeToString,
        response_deserializer=crmsfa__pb2.FaRecordset.FromString,
        )
    self.WriteRecord = channel.unary_unary(
        '/crmsfa.OdooProcs/WriteRecord',
        request_serializer=crmsfa__pb2.FaRecordset.SerializeToString,
        response_deserializer=common__types__pb2.Result.FromString,
        )
    self.Ref = channel.unary_unary(
        '/crmsfa.OdooProcs/Ref',
        request_serializer=common__types__pb2.Text.SerializeToString,
        response_deserializer=crmsfa__pb2.FaRecordset.FromString,
        )


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

  def Login(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 SwitchLang(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 FieldsGet(self, request, context):
    """model operations
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def BrowseRecord(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 WriteRecord(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 Ref(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_OdooProcsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Login': grpc.unary_unary_rpc_method_handler(
          servicer.Login,
          request_deserializer=crmsfa__pb2.FaOdoo.FromString,
          response_serializer=crmsfa__pb2.FaSession.SerializeToString,
      ),
      'SwitchLang': grpc.unary_unary_rpc_method_handler(
          servicer.SwitchLang,
          request_deserializer=common__types__pb2.Text.FromString,
          response_serializer=common__types__pb2.Result.SerializeToString,
      ),
      'FieldsGet': grpc.unary_unary_rpc_method_handler(
          servicer.FieldsGet,
          request_deserializer=crmsfa__pb2.FaModel.FromString,
          response_serializer=crmsfa__pb2.FaModel.SerializeToString,
      ),
      'BrowseRecord': grpc.unary_unary_rpc_method_handler(
          servicer.BrowseRecord,
          request_deserializer=crmsfa__pb2.FaIds.FromString,
          response_serializer=crmsfa__pb2.FaRecordset.SerializeToString,
      ),
      'WriteRecord': grpc.unary_unary_rpc_method_handler(
          servicer.WriteRecord,
          request_deserializer=crmsfa__pb2.FaRecordset.FromString,
          response_serializer=common__types__pb2.Result.SerializeToString,
      ),
      'Ref': grpc.unary_unary_rpc_method_handler(
          servicer.Ref,
          request_deserializer=common__types__pb2.Text.FromString,
          response_serializer=crmsfa__pb2.FaRecordset.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'crmsfa.OdooProcs', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
