# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from google.cloud.talent_v4beta1.proto import (
    completion_service_pb2 as google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_completion__service__pb2,
)


class CompletionStub(object):
    """A service handles auto completion.
  """

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

    Args:
      channel: A grpc.Channel.
    """
        self.CompleteQuery = channel.unary_unary(
            "/google.cloud.talent.v4beta1.Completion/CompleteQuery",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_completion__service__pb2.CompleteQueryRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_completion__service__pb2.CompleteQueryResponse.FromString,
        )


class CompletionServicer(object):
    """A service handles auto completion.
  """

    def CompleteQuery(self, request, context):
        """Completes the specified prefix with keyword suggestions.
    Intended for use by a job search auto-complete search box.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_CompletionServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CompleteQuery": grpc.unary_unary_rpc_method_handler(
            servicer.CompleteQuery,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_completion__service__pb2.CompleteQueryRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_completion__service__pb2.CompleteQueryResponse.SerializeToString,
        )
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.talent.v4beta1.Completion", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
