# 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 category_pb2 as v1_dot_rules_dot_category__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CategoryCreate = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.category.CategoryService/CategoryCreate",
            request_serializer=v1_dot_rules_dot_category__pb2.CategoryCreateRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_category__pb2.CategoryCreateResponse.FromString,
        )
        self.CategoryRead = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.category.CategoryService/CategoryRead",
            request_serializer=v1_dot_rules_dot_category__pb2.CategoryReadRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_category__pb2.CategoryReadResponse.FromString,
        )
        self.CategoryUpdate = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.category.CategoryService/CategoryUpdate",
            request_serializer=v1_dot_rules_dot_category__pb2.CategoryUpdateRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_category__pb2.CategoryUpdateResponse.FromString,
        )
        self.CategoryDelete = channel.unary_unary(
            "/pro.omni.oms.api.v1.rules.category.CategoryService/CategoryDelete",
            request_serializer=v1_dot_rules_dot_category__pb2.CategoryDeleteRequest.SerializeToString,
            response_deserializer=v1_dot_rules_dot_category__pb2.CategoryDeleteResponse.FromString,
        )


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

    def CategoryCreate(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 CategoryRead(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 CategoryUpdate(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 CategoryDelete(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_CategoryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CategoryCreate": grpc.unary_unary_rpc_method_handler(
            servicer.CategoryCreate,
            request_deserializer=v1_dot_rules_dot_category__pb2.CategoryCreateRequest.FromString,
            response_serializer=v1_dot_rules_dot_category__pb2.CategoryCreateResponse.SerializeToString,
        ),
        "CategoryRead": grpc.unary_unary_rpc_method_handler(
            servicer.CategoryRead,
            request_deserializer=v1_dot_rules_dot_category__pb2.CategoryReadRequest.FromString,
            response_serializer=v1_dot_rules_dot_category__pb2.CategoryReadResponse.SerializeToString,
        ),
        "CategoryUpdate": grpc.unary_unary_rpc_method_handler(
            servicer.CategoryUpdate,
            request_deserializer=v1_dot_rules_dot_category__pb2.CategoryUpdateRequest.FromString,
            response_serializer=v1_dot_rules_dot_category__pb2.CategoryUpdateResponse.SerializeToString,
        ),
        "CategoryDelete": grpc.unary_unary_rpc_method_handler(
            servicer.CategoryDelete,
            request_deserializer=v1_dot_rules_dot_category__pb2.CategoryDeleteRequest.FromString,
            response_serializer=v1_dot_rules_dot_category__pb2.CategoryDeleteResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "pro.omni.oms.api.v1.rules.category.CategoryService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CategoryCreate(
        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.category.CategoryService/CategoryCreate",
            v1_dot_rules_dot_category__pb2.CategoryCreateRequest.SerializeToString,
            v1_dot_rules_dot_category__pb2.CategoryCreateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CategoryRead(
        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.category.CategoryService/CategoryRead",
            v1_dot_rules_dot_category__pb2.CategoryReadRequest.SerializeToString,
            v1_dot_rules_dot_category__pb2.CategoryReadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CategoryUpdate(
        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.category.CategoryService/CategoryUpdate",
            v1_dot_rules_dot_category__pb2.CategoryUpdateRequest.SerializeToString,
            v1_dot_rules_dot_category__pb2.CategoryUpdateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CategoryDelete(
        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.category.CategoryService/CategoryDelete",
            v1_dot_rules_dot_category__pb2.CategoryDeleteRequest.SerializeToString,
            v1_dot_rules_dot_category__pb2.CategoryDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
