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

import grpc

from . import search_pb2 as search_dot_grpc_dot_search__pb2


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

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

        Args:
            self.channel: A grpc.Channel.
        """
        self.channel = channel
        self.ready()

    def ready(self):
        if self.channel is not None:
            self.Create = self.channel.unary_unary(
                "/config.search.CreateIndexedContentController/Create",
                request_serializer=search_dot_grpc_dot_search__pb2.CreateIndexedContentRequest.SerializeToString,
                response_deserializer=search_dot_grpc_dot_search__pb2.CreateIndexedContentResponse.FromString,
            )


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

    def Create(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_CreateIndexedContentControllerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Create": grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=search_dot_grpc_dot_search__pb2.CreateIndexedContentRequest.FromString,
            response_serializer=search_dot_grpc_dot_search__pb2.CreateIndexedContentResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "config.search.CreateIndexedContentController", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Create(
        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,
            "/config.search.CreateIndexedContentController/Create",
            search_dot_grpc_dot_search__pb2.CreateIndexedContentRequest.SerializeToString,
            search_dot_grpc_dot_search__pb2.CreateIndexedContentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )


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

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

        Args:
            self.channel: A grpc.Channel.
        """
        self.channel = channel
        self.ready()

    def ready(self):
        if self.channel is not None:
            self.Search = self.channel.unary_unary(
                "/config.search.SearchIndexedContentController/Search",
                request_serializer=search_dot_grpc_dot_search__pb2.SearchIndexedContentRequest.SerializeToString,
                response_deserializer=search_dot_grpc_dot_search__pb2.SearchIndexedContentResponse.FromString,
            )


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

    def Search(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_SearchIndexedContentControllerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Search": grpc.unary_unary_rpc_method_handler(
            servicer.Search,
            request_deserializer=search_dot_grpc_dot_search__pb2.SearchIndexedContentRequest.FromString,
            response_serializer=search_dot_grpc_dot_search__pb2.SearchIndexedContentResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "config.search.SearchIndexedContentController", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Search(
        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,
            "/config.search.SearchIndexedContentController/Search",
            search_dot_grpc_dot_search__pb2.SearchIndexedContentRequest.SerializeToString,
            search_dot_grpc_dot_search__pb2.SearchIndexedContentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
