100 lines
3.7 KiB
Python
100 lines
3.7 KiB
Python
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
import grpc
|
|
|
|
import predict_pb2 as predict__pb2
|
|
|
|
|
|
class PredictStub(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.PayDay = channel.unary_unary(
|
|
'/databoard.Predict/PayDay',
|
|
request_serializer=predict__pb2.RequestPay.SerializeToString,
|
|
response_deserializer=predict__pb2.ReplyPay.FromString,
|
|
)
|
|
self.GiftDay = channel.unary_unary(
|
|
'/databoard.Predict/GiftDay',
|
|
request_serializer=predict__pb2.RequestGift.SerializeToString,
|
|
response_deserializer=predict__pb2.ReplyGift.FromString,
|
|
)
|
|
|
|
|
|
class PredictServicer(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
def PayDay(self, request, context):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def GiftDay(self, request, context):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_PredictServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'PayDay': grpc.unary_unary_rpc_method_handler(
|
|
servicer.PayDay,
|
|
request_deserializer=predict__pb2.RequestPay.FromString,
|
|
response_serializer=predict__pb2.ReplyPay.SerializeToString,
|
|
),
|
|
'GiftDay': grpc.unary_unary_rpc_method_handler(
|
|
servicer.GiftDay,
|
|
request_deserializer=predict__pb2.RequestGift.FromString,
|
|
response_serializer=predict__pb2.ReplyGift.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'databoard.Predict', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
# This class is part of an EXPERIMENTAL API.
|
|
class Predict(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
@staticmethod
|
|
def PayDay(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, '/databoard.Predict/PayDay',
|
|
predict__pb2.RequestPay.SerializeToString,
|
|
predict__pb2.ReplyPay.FromString,
|
|
options, channel_credentials,
|
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
|
|
@staticmethod
|
|
def GiftDay(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, '/databoard.Predict/GiftDay',
|
|
predict__pb2.RequestGift.SerializeToString,
|
|
predict__pb2.ReplyGift.FromString,
|
|
options, channel_credentials,
|
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|