# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from strmprivacy.api.categories.v1alpha import categories_v1alpha_pb2 as strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListCategories = channel.unary_unary(
                '/strmprivacy.api.categories.v1alpha.CategoriesService/ListCategories',
                request_serializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.ListCategoriesRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.ListCategoriesResponse.FromString,
                )
        self.GetCategory = channel.unary_unary(
                '/strmprivacy.api.categories.v1alpha.CategoriesService/GetCategory',
                request_serializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.GetCategoryRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.GetCategoryResponse.FromString,
                )
        self.UpsertCategory = channel.unary_unary(
                '/strmprivacy.api.categories.v1alpha.CategoriesService/UpsertCategory',
                request_serializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.UpsertCategoryRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.UpsertCategoryResponse.FromString,
                )


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

    def ListCategories(self, request, context):
        """List all categories, optionally filtered for a given type. The organization is derived from the calling user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCategory(self, request, context):
        """Get a category by id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpsertCategory(self, request, context):
        """Create or update a category. To create a category, leave its id empty. To update a category, set its id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CategoriesServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListCategories': grpc.unary_unary_rpc_method_handler(
                    servicer.ListCategories,
                    request_deserializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.ListCategoriesRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.ListCategoriesResponse.SerializeToString,
            ),
            'GetCategory': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCategory,
                    request_deserializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.GetCategoryRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.GetCategoryResponse.SerializeToString,
            ),
            'UpsertCategory': grpc.unary_unary_rpc_method_handler(
                    servicer.UpsertCategory,
                    request_deserializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.UpsertCategoryRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.UpsertCategoryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'strmprivacy.api.categories.v1alpha.CategoriesService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListCategories(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, '/strmprivacy.api.categories.v1alpha.CategoriesService/ListCategories',
            strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.ListCategoriesRequest.SerializeToString,
            strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.ListCategoriesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCategory(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, '/strmprivacy.api.categories.v1alpha.CategoriesService/GetCategory',
            strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.GetCategoryRequest.SerializeToString,
            strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.GetCategoryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpsertCategory(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, '/strmprivacy.api.categories.v1alpha.CategoriesService/UpsertCategory',
            strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.UpsertCategoryRequest.SerializeToString,
            strmprivacy_dot_api_dot_categories_dot_v1alpha_dot_categories__v1alpha__pb2.UpsertCategoryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
