# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

import Definitions_pb2 as Definitions__pb2
import PdmObject_pb2 as PdmObject__pb2


class PdmObjectServiceStub(object):
    """Missing associated documentation comment in .proto file."""

    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,
                )
        self.CallPdmObjectGetter = channel.unary_stream(
                '/rips.PdmObjectService/CallPdmObjectGetter',
                request_serializer=PdmObject__pb2.PdmObjectGetterRequest.SerializeToString,
                response_deserializer=PdmObject__pb2.PdmObjectGetterReply.FromString,
                )
        self.CallPdmObjectSetter = channel.stream_unary(
                '/rips.PdmObjectService/CallPdmObjectSetter',
                request_serializer=PdmObject__pb2.PdmObjectSetterChunk.SerializeToString,
                response_deserializer=Definitions__pb2.ClientToServerStreamReply.FromString,
                )
        self.CallPdmObjectMethod = channel.unary_unary(
                '/rips.PdmObjectService/CallPdmObjectMethod',
                request_serializer=PdmObject__pb2.PdmObjectMethodRequest.SerializeToString,
                response_deserializer=PdmObject__pb2.PdmObject.FromString,
                )


class PdmObjectServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def GetDescendantPdmObjects(self, request, context):
        """Missing associated documentation comment in .proto file."""
        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."""
        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."""
        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."""
        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."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CallPdmObjectGetter(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CallPdmObjectSetter(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CallPdmObjectMethod(self, request, context):
        """Missing associated documentation comment in .proto file."""
        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,
            ),
            'CallPdmObjectGetter': grpc.unary_stream_rpc_method_handler(
                    servicer.CallPdmObjectGetter,
                    request_deserializer=PdmObject__pb2.PdmObjectGetterRequest.FromString,
                    response_serializer=PdmObject__pb2.PdmObjectGetterReply.SerializeToString,
            ),
            'CallPdmObjectSetter': grpc.stream_unary_rpc_method_handler(
                    servicer.CallPdmObjectSetter,
                    request_deserializer=PdmObject__pb2.PdmObjectSetterChunk.FromString,
                    response_serializer=Definitions__pb2.ClientToServerStreamReply.SerializeToString,
            ),
            'CallPdmObjectMethod': grpc.unary_unary_rpc_method_handler(
                    servicer.CallPdmObjectMethod,
                    request_deserializer=PdmObject__pb2.PdmObjectMethodRequest.FromString,
                    response_serializer=PdmObject__pb2.PdmObject.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'rips.PdmObjectService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class PdmObjectService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def GetDescendantPdmObjects(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/rips.PdmObjectService/GetDescendantPdmObjects',
            PdmObject__pb2.PdmDescendantObjectRequest.SerializeToString,
            PdmObject__pb2.PdmObjectArray.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetChildPdmObjects(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/rips.PdmObjectService/GetChildPdmObjects',
            PdmObject__pb2.PdmChildObjectRequest.SerializeToString,
            PdmObject__pb2.PdmObjectArray.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAncestorPdmObject(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/rips.PdmObjectService/GetAncestorPdmObject',
            PdmObject__pb2.PdmParentObjectRequest.SerializeToString,
            PdmObject__pb2.PdmObject.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateChildPdmObject(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/rips.PdmObjectService/CreateChildPdmObject',
            PdmObject__pb2.CreatePdmChildObjectRequest.SerializeToString,
            PdmObject__pb2.PdmObject.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateExistingPdmObject(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/rips.PdmObjectService/UpdateExistingPdmObject',
            PdmObject__pb2.PdmObject.SerializeToString,
            Definitions__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CallPdmObjectGetter(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/rips.PdmObjectService/CallPdmObjectGetter',
            PdmObject__pb2.PdmObjectGetterRequest.SerializeToString,
            PdmObject__pb2.PdmObjectGetterReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CallPdmObjectSetter(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/rips.PdmObjectService/CallPdmObjectSetter',
            PdmObject__pb2.PdmObjectSetterChunk.SerializeToString,
            Definitions__pb2.ClientToServerStreamReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CallPdmObjectMethod(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/rips.PdmObjectService/CallPdmObjectMethod',
            PdmObject__pb2.PdmObjectMethodRequest.SerializeToString,
            PdmObject__pb2.PdmObject.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
