python-grpc/strafesnet/events_pb2_grpc.py

133 lines
5.2 KiB
Python
Raw Normal View History

2022-07-17 08:24:59 +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 events_pb2 as events__pb2
2022-07-17 08:24:59 +00:00
class EventsServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Latest = channel.unary_unary(
'/events.EventsService/Latest',
request_serializer=events__pb2.LatestRequest.SerializeToString,
response_deserializer=events__pb2.LatestResponse.FromString,
)
self.Create = channel.unary_unary(
'/events.EventsService/Create',
request_serializer=events__pb2.EventCreate.SerializeToString,
response_deserializer=events__pb2.NullResponse.FromString,
)
self.Clean = channel.unary_unary(
'/events.EventsService/Clean',
request_serializer=events__pb2.NullResponse.SerializeToString,
response_deserializer=events__pb2.NullResponse.FromString,
)
class EventsServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def Latest(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 Create(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 Clean(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_EventsServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Latest': grpc.unary_unary_rpc_method_handler(
servicer.Latest,
request_deserializer=events__pb2.LatestRequest.FromString,
response_serializer=events__pb2.LatestResponse.SerializeToString,
),
'Create': grpc.unary_unary_rpc_method_handler(
servicer.Create,
request_deserializer=events__pb2.EventCreate.FromString,
response_serializer=events__pb2.NullResponse.SerializeToString,
),
'Clean': grpc.unary_unary_rpc_method_handler(
servicer.Clean,
request_deserializer=events__pb2.NullResponse.FromString,
response_serializer=events__pb2.NullResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'events.EventsService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class EventsService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def Latest(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, '/events.EventsService/Latest',
events__pb2.LatestRequest.SerializeToString,
events__pb2.LatestResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Create(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, '/events.EventsService/Create',
events__pb2.EventCreate.SerializeToString,
events__pb2.NullResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Clean(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, '/events.EventsService/Clean',
events__pb2.NullResponse.SerializeToString,
events__pb2.NullResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)