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

import Definitions_pb2 as Definitions__pb2
import PdmObject_pb2 as PdmObject__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetDescendantPdmObjects = channel.unary_unary(
        '/rips.PdmObjectService/GetDescendantPdmObjects',
        request_serializer=PdmObject__pb2.PdmDescendantObjectRequest.SerializeToString,
        response_deserializer=PdmObject__pb2.PdmObjectArray.FromString,
        )
    self.GetChildPdmObjects = channel.unary_unary(
        '/rips.PdmObjectService/GetChildPdmObjects',
        request_serializer=PdmObject__pb2.PdmChildObjectRequest.SerializeToString,
        response_deserializer=PdmObject__pb2.PdmObjectArray.FromString,
        )
    self.GetAncestorPdmObject = channel.unary_unary(
        '/rips.PdmObjectService/GetAncestorPdmObject',
        request_serializer=PdmObject__pb2.PdmParentObjectRequest.SerializeToString,
        response_deserializer=PdmObject__pb2.PdmObject.FromString,
        )
    self.CreateChildPdmObject = channel.unary_unary(
        '/rips.PdmObjectService/CreateChildPdmObject',
        request_serializer=PdmObject__pb2.CreatePdmChildObjectRequest.SerializeToString,
        response_deserializer=PdmObject__pb2.PdmObject.FromString,
        )
    self.UpdateExistingPdmObject = channel.unary_unary(
        '/rips.PdmObjectService/UpdateExistingPdmObject',
        request_serializer=PdmObject__pb2.PdmObject.SerializeToString,
        response_deserializer=Definitions__pb2.Empty.FromString,
        )


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

  def GetDescendantPdmObjects(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 GetChildPdmObjects(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 GetAncestorPdmObject(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 CreateChildPdmObject(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 UpdateExistingPdmObject(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_PdmObjectServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetDescendantPdmObjects': grpc.unary_unary_rpc_method_handler(
          servicer.GetDescendantPdmObjects,
          request_deserializer=PdmObject__pb2.PdmDescendantObjectRequest.FromString,
          response_serializer=PdmObject__pb2.PdmObjectArray.SerializeToString,
      ),
      'GetChildPdmObjects': grpc.unary_unary_rpc_method_handler(
          servicer.GetChildPdmObjects,
          request_deserializer=PdmObject__pb2.PdmChildObjectRequest.FromString,
          response_serializer=PdmObject__pb2.PdmObjectArray.SerializeToString,
      ),
      'GetAncestorPdmObject': grpc.unary_unary_rpc_method_handler(
          servicer.GetAncestorPdmObject,
          request_deserializer=PdmObject__pb2.PdmParentObjectRequest.FromString,
          response_serializer=PdmObject__pb2.PdmObject.SerializeToString,
      ),
      'CreateChildPdmObject': grpc.unary_unary_rpc_method_handler(
          servicer.CreateChildPdmObject,
          request_deserializer=PdmObject__pb2.CreatePdmChildObjectRequest.FromString,
          response_serializer=PdmObject__pb2.PdmObject.SerializeToString,
      ),
      'UpdateExistingPdmObject': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateExistingPdmObject,
          request_deserializer=PdmObject__pb2.PdmObject.FromString,
          response_serializer=Definitions__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'rips.PdmObjectService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
