# 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 redistribution_order_pb2 as v1_dot_rules_dot_redistribution__order__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.RedistributionOrderAction = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.redistribution_order.RedistributionOrderService/RedistributionOrderAction",
            request_serializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderCreateRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderCreateResponse.FromString,
        )
        self.RedistributionOrderRead = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.redistribution_order.RedistributionOrderService/RedistributionOrderRead",
            request_serializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderReadRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderReadResponse.FromString,
        )
        self.RedistributionOrderDelete = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.redistribution_order.RedistributionOrderService/RedistributionOrderDelete",
            request_serializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderDeleteRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderDeleteResponse.FromString,
        )


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

    def RedistributionOrderAction(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 RedistributionOrderRead(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 RedistributionOrderDelete(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_RedistributionOrderServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "RedistributionOrderAction": grpc.unary_unary_rpc_method_handler(
            servicer.RedistributionOrderAction,
            request_deserializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderCreateRequest.FromString,
            response_serializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderCreateResponse.SerializeToString,
        ),
        "RedistributionOrderRead": grpc.unary_unary_rpc_method_handler(
            servicer.RedistributionOrderRead,
            request_deserializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderReadRequest.FromString,
            response_serializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderReadResponse.SerializeToString,
        ),
        "RedistributionOrderDelete": grpc.unary_unary_rpc_method_handler(
            servicer.RedistributionOrderDelete,
            request_deserializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderDeleteRequest.FromString,
            response_serializer=v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderDeleteResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "pro.omni.oms.api.v1.rules.redistribution_order.RedistributionOrderService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def RedistributionOrderAction(
        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.redistribution_order.RedistributionOrderService/RedistributionOrderAction",
            v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderCreateRequest.SerializeToString,
            v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderCreateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RedistributionOrderRead(
        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.redistribution_order.RedistributionOrderService/RedistributionOrderRead",
            v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderReadRequest.SerializeToString,
            v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderReadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RedistributionOrderDelete(
        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.redistribution_order.RedistributionOrderService/RedistributionOrderDelete",
            v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderDeleteRequest.SerializeToString,
            v1_dot_rules_dot_redistribution__order__pb2.RedistributionOrderDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
