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

from google.cloud.talent_v4beta1.proto import (
    job_pb2 as google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__pb2,
)
from google.cloud.talent_v4beta1.proto import (
    job_service_pb2 as google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2,
)
from google.longrunning import (
    operations_pb2 as google_dot_longrunning_dot_operations__pb2,
)
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class JobServiceStub(object):
    """A service handles job management, including job CRUD, enumeration and search.
  """

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

    Args:
      channel: A grpc.Channel.
    """
        self.CreateJob = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/CreateJob",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.CreateJobRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__pb2.Job.FromString,
        )
        self.GetJob = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/GetJob",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.GetJobRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__pb2.Job.FromString,
        )
        self.UpdateJob = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/UpdateJob",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.UpdateJobRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__pb2.Job.FromString,
        )
        self.DeleteJob = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/DeleteJob",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.DeleteJobRequest.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
        self.ListJobs = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/ListJobs",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.ListJobsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.ListJobsResponse.FromString,
        )
        self.BatchDeleteJobs = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/BatchDeleteJobs",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.BatchDeleteJobsRequest.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
        self.SearchJobs = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/SearchJobs",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsResponse.FromString,
        )
        self.SearchJobsForAlert = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/SearchJobsForAlert",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsResponse.FromString,
        )
        self.BatchCreateJobs = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/BatchCreateJobs",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.BatchCreateJobsRequest.SerializeToString,
            response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
        )
        self.BatchUpdateJobs = channel.unary_unary(
            "/google.cloud.talent.v4beta1.JobService/BatchUpdateJobs",
            request_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.BatchUpdateJobsRequest.SerializeToString,
            response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
        )


class JobServiceServicer(object):
    """A service handles job management, including job CRUD, enumeration and search.
  """

    def CreateJob(self, request, context):
        """Creates a new job.

    Typically, the job becomes searchable within 10 seconds, but it may take
    up to 5 minutes.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetJob(self, request, context):
        """Retrieves the specified job, whose status is OPEN or recently EXPIRED
    within the last 90 days.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateJob(self, request, context):
        """Updates specified job.

    Typically, updated contents become visible in search results within 10
    seconds, but it may take up to 5 minutes.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeleteJob(self, request, context):
        """Deletes the specified job.

    Typically, the job becomes unsearchable within 10 seconds, but it may take
    up to 5 minutes.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListJobs(self, request, context):
        """Lists jobs by filter.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def BatchDeleteJobs(self, request, context):
        """Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def SearchJobs(self, request, context):
        """Searches for jobs using the provided
    [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].

    This call constrains the
    [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in
    the database, and only returns jobs that the caller has permission to
    search against.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def SearchJobsForAlert(self, request, context):
        """Searches for jobs using the provided
    [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest].

    This API call is intended for the use case of targeting passive job
    seekers (for example, job seekers who have signed up to receive email
    alerts about potential job opportunities), and has different algorithmic
    adjustments that are targeted to passive job seekers.

    This call constrains the
    [visibility][google.cloud.talent.v4beta1.Job.visibility] of jobs present in
    the database, and only returns jobs the caller has permission to search
    against.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def BatchCreateJobs(self, request, context):
        """Begins executing a batch create jobs operation.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def BatchUpdateJobs(self, request, context):
        """Begins executing a batch update jobs operation.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_JobServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateJob": grpc.unary_unary_rpc_method_handler(
            servicer.CreateJob,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.CreateJobRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__pb2.Job.SerializeToString,
        ),
        "GetJob": grpc.unary_unary_rpc_method_handler(
            servicer.GetJob,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.GetJobRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__pb2.Job.SerializeToString,
        ),
        "UpdateJob": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateJob,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.UpdateJobRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__pb2.Job.SerializeToString,
        ),
        "DeleteJob": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteJob,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.DeleteJobRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "ListJobs": grpc.unary_unary_rpc_method_handler(
            servicer.ListJobs,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.ListJobsRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.ListJobsResponse.SerializeToString,
        ),
        "BatchDeleteJobs": grpc.unary_unary_rpc_method_handler(
            servicer.BatchDeleteJobs,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.BatchDeleteJobsRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "SearchJobs": grpc.unary_unary_rpc_method_handler(
            servicer.SearchJobs,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsResponse.SerializeToString,
        ),
        "SearchJobsForAlert": grpc.unary_unary_rpc_method_handler(
            servicer.SearchJobsForAlert,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.SearchJobsResponse.SerializeToString,
        ),
        "BatchCreateJobs": grpc.unary_unary_rpc_method_handler(
            servicer.BatchCreateJobs,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.BatchCreateJobsRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
        ),
        "BatchUpdateJobs": grpc.unary_unary_rpc_method_handler(
            servicer.BatchUpdateJobs,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_job__service__pb2.BatchUpdateJobsRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.talent.v4beta1.JobService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
