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

from . import search_pb2 as search__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Search = channel.unary_unary(
                '/org.couchers.api.search.Search/Search',
                request_serializer=search__pb2.SearchReq.SerializeToString,
                response_deserializer=search__pb2.SearchRes.FromString,
                )
        self.UserSearch = channel.unary_unary(
                '/org.couchers.api.search.Search/UserSearch',
                request_serializer=search__pb2.UserSearchReq.SerializeToString,
                response_deserializer=search__pb2.UserSearchRes.FromString,
                )
        self.UserSearchV2 = channel.unary_unary(
                '/org.couchers.api.search.Search/UserSearchV2',
                request_serializer=search__pb2.UserSearchReq.SerializeToString,
                response_deserializer=search__pb2.UserSearchV2Res.FromString,
                )
        self.EventSearch = channel.unary_unary(
                '/org.couchers.api.search.Search/EventSearch',
                request_serializer=search__pb2.EventSearchReq.SerializeToString,
                response_deserializer=search__pb2.EventSearchRes.FromString,
                )


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

    def Search(self, request, context):
        """Search all content
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UserSearch(self, request, context):
        """Search for users in particular with extra filters, e.g. hosts
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UserSearchV2(self, request, context):
        """Search for users in particular with extra filters, e.g. hosts
        only returns used fields
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EventSearch(self, request, context):
        """Search for events in particular with extra filters
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SearchServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Search': grpc.unary_unary_rpc_method_handler(
                    servicer.Search,
                    request_deserializer=search__pb2.SearchReq.FromString,
                    response_serializer=search__pb2.SearchRes.SerializeToString,
            ),
            'UserSearch': grpc.unary_unary_rpc_method_handler(
                    servicer.UserSearch,
                    request_deserializer=search__pb2.UserSearchReq.FromString,
                    response_serializer=search__pb2.UserSearchRes.SerializeToString,
            ),
            'UserSearchV2': grpc.unary_unary_rpc_method_handler(
                    servicer.UserSearchV2,
                    request_deserializer=search__pb2.UserSearchReq.FromString,
                    response_serializer=search__pb2.UserSearchV2Res.SerializeToString,
            ),
            'EventSearch': grpc.unary_unary_rpc_method_handler(
                    servicer.EventSearch,
                    request_deserializer=search__pb2.EventSearchReq.FromString,
                    response_serializer=search__pb2.EventSearchRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.search.Search', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Search(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, '/org.couchers.api.search.Search/Search',
            search__pb2.SearchReq.SerializeToString,
            search__pb2.SearchRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UserSearch(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, '/org.couchers.api.search.Search/UserSearch',
            search__pb2.UserSearchReq.SerializeToString,
            search__pb2.UserSearchRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UserSearchV2(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, '/org.couchers.api.search.Search/UserSearchV2',
            search__pb2.UserSearchReq.SerializeToString,
            search__pb2.UserSearchV2Res.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EventSearch(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, '/org.couchers.api.search.Search/EventSearch',
            search__pb2.EventSearchReq.SerializeToString,
            search__pb2.EventSearchRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
