# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from omni.pro.protos.v1.rules import python_code_pb2 as v1_dot_rules_dot_python__code__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.PythonCodeCreate = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeCreate",
            request_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeResponse.FromString,
        )
        self.PythonCodeRead = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeRead",
            request_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeReadRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeReadResponse.FromString,
        )
        self.PythonCodeUpdate = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeUpdate",
            request_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeUpdateRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeUpdateResponse.FromString,
        )
        self.PythonCodeDelete = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeDelete",
            request_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeDeleteRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeDeleteResponse.FromString,
        )


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

    def PythonCodeCreate(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 PythonCodeRead(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 PythonCodeUpdate(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 PythonCodeDelete(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_PythonCodeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "PythonCodeCreate": grpc.unary_unary_rpc_method_handler(
            servicer.PythonCodeCreate,
            request_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeRequest.FromString,
            response_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeResponse.SerializeToString,
        ),
        "PythonCodeRead": grpc.unary_unary_rpc_method_handler(
            servicer.PythonCodeRead,
            request_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeReadRequest.FromString,
            response_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeReadResponse.SerializeToString,
        ),
        "PythonCodeUpdate": grpc.unary_unary_rpc_method_handler(
            servicer.PythonCodeUpdate,
            request_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeUpdateRequest.FromString,
            response_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeUpdateResponse.SerializeToString,
        ),
        "PythonCodeDelete": grpc.unary_unary_rpc_method_handler(
            servicer.PythonCodeDelete,
            request_deserializer=v1_dot_rules_dot_python__code__pb2.PythonCodeDeleteRequest.FromString,
            response_serializer=v1_dot_rules_dot_python__code__pb2.PythonCodeDeleteResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "pro.omni.oms.api.v1.rules.python_code.PythonCodeService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def PythonCodeCreate(
        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,
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeCreate",
            v1_dot_rules_dot_python__code__pb2.PythonCodeRequest.SerializeToString,
            v1_dot_rules_dot_python__code__pb2.PythonCodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def PythonCodeRead(
        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,
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeRead",
            v1_dot_rules_dot_python__code__pb2.PythonCodeReadRequest.SerializeToString,
            v1_dot_rules_dot_python__code__pb2.PythonCodeReadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def PythonCodeUpdate(
        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,
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeUpdate",
            v1_dot_rules_dot_python__code__pb2.PythonCodeUpdateRequest.SerializeToString,
            v1_dot_rules_dot_python__code__pb2.PythonCodeUpdateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def PythonCodeDelete(
        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,
            "/pro.omni.oms.api.v1.rules.python_code.PythonCodeService/PythonCodeDelete",
            v1_dot_rules_dot_python__code__pb2.PythonCodeDeleteRequest.SerializeToString,
            v1_dot_rules_dot_python__code__pb2.PythonCodeDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
