|
| 1 | +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! |
| 2 | +"""Client and server classes corresponding to protobuf-defined services.""" |
| 3 | +import grpc |
| 4 | + |
| 5 | +import jobs_pb2 as jobs__pb2 |
| 6 | + |
| 7 | + |
| 8 | +class JobServiceStub(object): |
| 9 | + """Missing associated documentation comment in .proto file.""" |
| 10 | + |
| 11 | + def __init__(self, channel): |
| 12 | + """Constructor. |
| 13 | +
|
| 14 | + Args: |
| 15 | + channel: A grpc.Channel. |
| 16 | + """ |
| 17 | + self.AddJob = channel.unary_unary( |
| 18 | + '/JobService/AddJob', |
| 19 | + request_serializer=jobs__pb2.Job.SerializeToString, |
| 20 | + response_deserializer=jobs__pb2.Job.FromString, |
| 21 | + ) |
| 22 | + |
| 23 | + |
| 24 | +class JobServiceServicer(object): |
| 25 | + """Missing associated documentation comment in .proto file.""" |
| 26 | + |
| 27 | + def AddJob(self, request, context): |
| 28 | + """Missing associated documentation comment in .proto file.""" |
| 29 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 30 | + context.set_details('Method not implemented!') |
| 31 | + raise NotImplementedError('Method not implemented!') |
| 32 | + |
| 33 | + |
| 34 | +def add_JobServiceServicer_to_server(servicer, server): |
| 35 | + rpc_method_handlers = { |
| 36 | + 'AddJob': grpc.unary_unary_rpc_method_handler( |
| 37 | + servicer.AddJob, |
| 38 | + request_deserializer=jobs__pb2.Job.FromString, |
| 39 | + response_serializer=jobs__pb2.Job.SerializeToString, |
| 40 | + ), |
| 41 | + } |
| 42 | + generic_handler = grpc.method_handlers_generic_handler( |
| 43 | + 'JobService', rpc_method_handlers) |
| 44 | + server.add_generic_rpc_handlers((generic_handler,)) |
| 45 | + |
| 46 | + |
| 47 | + # This class is part of an EXPERIMENTAL API. |
| 48 | +class JobService(object): |
| 49 | + """Missing associated documentation comment in .proto file.""" |
| 50 | + |
| 51 | + @staticmethod |
| 52 | + def AddJob(request, |
| 53 | + target, |
| 54 | + options=(), |
| 55 | + channel_credentials=None, |
| 56 | + call_credentials=None, |
| 57 | + insecure=False, |
| 58 | + compression=None, |
| 59 | + wait_for_ready=None, |
| 60 | + timeout=None, |
| 61 | + metadata=None): |
| 62 | + return grpc.experimental.unary_unary(request, target, '/JobService/AddJob', |
| 63 | + jobs__pb2.Job.SerializeToString, |
| 64 | + jobs__pb2.Job.FromString, |
| 65 | + options, channel_credentials, |
| 66 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
0 commit comments