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

from agntcy.dir.search.v1 import search_service_pb2 as agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SearchCIDs = channel.unary_stream(
                '/agntcy.dir.search.v1.SearchService/SearchCIDs',
                request_serializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchCIDsRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchCIDsResponse.FromString,
                _registered_method=True)
        self.SearchRecords = channel.unary_stream(
                '/agntcy.dir.search.v1.SearchService/SearchRecords',
                request_serializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchRecordsRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchRecordsResponse.FromString,
                _registered_method=True)


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

    def SearchCIDs(self, request, context):
        """Search for record CIDs that match the given parameters.
        Returns only CIDs for efficient lookups and piping to other commands.
        This operation does not interact with the network.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SearchRecords(self, request, context):
        """Search for full records that match the given parameters.
        Returns complete record data including all metadata, skills, domains, etc.
        This operation does not interact with the network.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SearchServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SearchCIDs': grpc.unary_stream_rpc_method_handler(
                    servicer.SearchCIDs,
                    request_deserializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchCIDsRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchCIDsResponse.SerializeToString,
            ),
            'SearchRecords': grpc.unary_stream_rpc_method_handler(
                    servicer.SearchRecords,
                    request_deserializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchRecordsRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchRecordsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'agntcy.dir.search.v1.SearchService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('agntcy.dir.search.v1.SearchService', rpc_method_handlers)


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

    @staticmethod
    def SearchCIDs(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_stream(
            request,
            target,
            '/agntcy.dir.search.v1.SearchService/SearchCIDs',
            agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchCIDsRequest.SerializeToString,
            agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchCIDsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SearchRecords(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_stream(
            request,
            target,
            '/agntcy.dir.search.v1.SearchService/SearchRecords',
            agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchRecordsRequest.SerializeToString,
            agntcy_dot_dir_dot_search_dot_v1_dot_search__service__pb2.SearchRecordsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
