# 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.sales import transition_pb2 as v1_dot_sales_dot_transition__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.TransitionCreate = channel.unary_unary(
            "/pro.omni.oms.api.v1.sales.transition.TransitionService/TransitionCreate",
            request_serializer=v1_dot_sales_dot_transition__pb2.TransitionCreateRequest.SerializeToString,
            response_deserializer=v1_dot_sales_dot_transition__pb2.TransitionCreateResponse.FromString,
        )
        self.TransitionRead = channel.unary_unary(
            "/pro.omni.oms.api.v1.sales.transition.TransitionService/TransitionRead",
            request_serializer=v1_dot_sales_dot_transition__pb2.TransitionReadRequest.SerializeToString,
            response_deserializer=v1_dot_sales_dot_transition__pb2.TransitionReadResponse.FromString,
        )
        self.TransitionUpdate = channel.unary_unary(
            "/pro.omni.oms.api.v1.sales.transition.TransitionService/TransitionUpdate",
            request_serializer=v1_dot_sales_dot_transition__pb2.TransitionUpdateRequest.SerializeToString,
            response_deserializer=v1_dot_sales_dot_transition__pb2.TransitionUpdateResponse.FromString,
        )
        self.TransitionDelete = channel.unary_unary(
            "/pro.omni.oms.api.v1.sales.transition.TransitionService/TransitionDelete",
            request_serializer=v1_dot_sales_dot_transition__pb2.TransitionDeleteRequest.SerializeToString,
            response_deserializer=v1_dot_sales_dot_transition__pb2.TransitionDeleteResponse.FromString,
        )


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

    def TransitionCreate(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 TransitionRead(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 TransitionUpdate(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 TransitionDelete(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_TransitionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "TransitionCreate": grpc.unary_unary_rpc_method_handler(
            servicer.TransitionCreate,
            request_deserializer=v1_dot_sales_dot_transition__pb2.TransitionCreateRequest.FromString,
            response_serializer=v1_dot_sales_dot_transition__pb2.TransitionCreateResponse.SerializeToString,
        ),
        "TransitionRead": grpc.unary_unary_rpc_method_handler(
            servicer.TransitionRead,
            request_deserializer=v1_dot_sales_dot_transition__pb2.TransitionReadRequest.FromString,
            response_serializer=v1_dot_sales_dot_transition__pb2.TransitionReadResponse.SerializeToString,
        ),
        "TransitionUpdate": grpc.unary_unary_rpc_method_handler(
            servicer.TransitionUpdate,
            request_deserializer=v1_dot_sales_dot_transition__pb2.TransitionUpdateRequest.FromString,
            response_serializer=v1_dot_sales_dot_transition__pb2.TransitionUpdateResponse.SerializeToString,
        ),
        "TransitionDelete": grpc.unary_unary_rpc_method_handler(
            servicer.TransitionDelete,
            request_deserializer=v1_dot_sales_dot_transition__pb2.TransitionDeleteRequest.FromString,
            response_serializer=v1_dot_sales_dot_transition__pb2.TransitionDeleteResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "pro.omni.oms.api.v1.sales.transition.TransitionService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def TransitionCreate(
        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.sales.transition.TransitionService/TransitionCreate",
            v1_dot_sales_dot_transition__pb2.TransitionCreateRequest.SerializeToString,
            v1_dot_sales_dot_transition__pb2.TransitionCreateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def TransitionRead(
        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.sales.transition.TransitionService/TransitionRead",
            v1_dot_sales_dot_transition__pb2.TransitionReadRequest.SerializeToString,
            v1_dot_sales_dot_transition__pb2.TransitionReadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def TransitionUpdate(
        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.sales.transition.TransitionService/TransitionUpdate",
            v1_dot_sales_dot_transition__pb2.TransitionUpdateRequest.SerializeToString,
            v1_dot_sales_dot_transition__pb2.TransitionUpdateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def TransitionDelete(
        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.sales.transition.TransitionService/TransitionDelete",
            v1_dot_sales_dot_transition__pb2.TransitionDeleteRequest.SerializeToString,
            v1_dot_sales_dot_transition__pb2.TransitionDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
