# 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.stock import rule_pb2 as v1_dot_stock_dot_rule__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.RuleCreate = channel.unary_unary(
            "/pro.omni.oms.api.v1.rule.RuleService/RuleCreate",
            request_serializer=v1_dot_stock_dot_rule__pb2.RuleCreateRequest.SerializeToString,
            response_deserializer=v1_dot_stock_dot_rule__pb2.RuleCreateResponse.FromString,
        )
        self.RuleRead = channel.unary_unary(
            "/pro.omni.oms.api.v1.rule.RuleService/RuleRead",
            request_serializer=v1_dot_stock_dot_rule__pb2.RuleReadRequest.SerializeToString,
            response_deserializer=v1_dot_stock_dot_rule__pb2.RuleReadResponse.FromString,
        )
        self.RuleUpdate = channel.unary_unary(
            "/pro.omni.oms.api.v1.rule.RuleService/RuleUpdate",
            request_serializer=v1_dot_stock_dot_rule__pb2.RuleUpdateRequest.SerializeToString,
            response_deserializer=v1_dot_stock_dot_rule__pb2.RuleUpdateResponse.FromString,
        )
        self.RuleDelete = channel.unary_unary(
            "/pro.omni.oms.api.v1.rule.RuleService/RuleDelete",
            request_serializer=v1_dot_stock_dot_rule__pb2.RuleDeleteRequest.SerializeToString,
            response_deserializer=v1_dot_stock_dot_rule__pb2.RuleDeleteResponse.FromString,
        )


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

    def RuleCreate(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 RuleRead(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 RuleUpdate(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 RuleDelete(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_RuleServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "RuleCreate": grpc.unary_unary_rpc_method_handler(
            servicer.RuleCreate,
            request_deserializer=v1_dot_stock_dot_rule__pb2.RuleCreateRequest.FromString,
            response_serializer=v1_dot_stock_dot_rule__pb2.RuleCreateResponse.SerializeToString,
        ),
        "RuleRead": grpc.unary_unary_rpc_method_handler(
            servicer.RuleRead,
            request_deserializer=v1_dot_stock_dot_rule__pb2.RuleReadRequest.FromString,
            response_serializer=v1_dot_stock_dot_rule__pb2.RuleReadResponse.SerializeToString,
        ),
        "RuleUpdate": grpc.unary_unary_rpc_method_handler(
            servicer.RuleUpdate,
            request_deserializer=v1_dot_stock_dot_rule__pb2.RuleUpdateRequest.FromString,
            response_serializer=v1_dot_stock_dot_rule__pb2.RuleUpdateResponse.SerializeToString,
        ),
        "RuleDelete": grpc.unary_unary_rpc_method_handler(
            servicer.RuleDelete,
            request_deserializer=v1_dot_stock_dot_rule__pb2.RuleDeleteRequest.FromString,
            response_serializer=v1_dot_stock_dot_rule__pb2.RuleDeleteResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("pro.omni.oms.api.v1.rule.RuleService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def RuleCreate(
        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.rule.RuleService/RuleCreate",
            v1_dot_stock_dot_rule__pb2.RuleCreateRequest.SerializeToString,
            v1_dot_stock_dot_rule__pb2.RuleCreateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RuleRead(
        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.rule.RuleService/RuleRead",
            v1_dot_stock_dot_rule__pb2.RuleReadRequest.SerializeToString,
            v1_dot_stock_dot_rule__pb2.RuleReadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RuleUpdate(
        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.rule.RuleService/RuleUpdate",
            v1_dot_stock_dot_rule__pb2.RuleUpdateRequest.SerializeToString,
            v1_dot_stock_dot_rule__pb2.RuleUpdateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RuleDelete(
        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.rule.RuleService/RuleDelete",
            v1_dot_stock_dot_rule__pb2.RuleDeleteRequest.SerializeToString,
            v1_dot_stock_dot_rule__pb2.RuleDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
