predict-coin/predict_pb2_grpc.py

100 lines
3.7 KiB
Python
Raw Permalink Normal View History

2021-03-25 09:36:09 +00:00
# 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(
2021-03-26 03:55:17 +00:00
'/databoard.Predict/PayDay',
2021-03-25 09:36:09 +00:00
request_serializer=predict__pb2.RequestPay.SerializeToString,
response_deserializer=predict__pb2.ReplyPay.FromString,
)
self.GiftDay = channel.unary_unary(
2021-03-26 03:55:17 +00:00
'/databoard.Predict/GiftDay',
2021-03-25 09:36:09 +00:00
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(
2021-03-26 03:55:17 +00:00
'databoard.Predict', rpc_method_handlers)
2021-03-25 09:36:09 +00:00
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):
2021-03-26 03:55:17 +00:00
return grpc.experimental.unary_unary(request, target, '/databoard.Predict/PayDay',
2021-03-25 09:36:09 +00:00
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):
2021-03-26 03:55:17 +00:00
return grpc.experimental.unary_unary(request, target, '/databoard.Predict/GiftDay',
2021-03-25 09:36:09 +00:00
predict__pb2.RequestGift.SerializeToString,
predict__pb2.ReplyGift.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)