python-grpc/servers_pb2_grpc.py

199 lines
8.0 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 servers_pb2 as servers__pb2
class ServerServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Create = channel.unary_unary(
'/servers.ServerService/Create',
request_serializer=servers__pb2.ServerCreate.SerializeToString,
response_deserializer=servers__pb2.NullResponse.FromString,
)
self.Update = channel.unary_unary(
'/servers.ServerService/Update',
request_serializer=servers__pb2.ServerUpdate.SerializeToString,
response_deserializer=servers__pb2.NullResponse.FromString,
)
self.Delete = channel.unary_unary(
'/servers.ServerService/Delete',
request_serializer=servers__pb2.IdMessage.SerializeToString,
response_deserializer=servers__pb2.NullResponse.FromString,
)
self.Get = channel.unary_unary(
'/servers.ServerService/Get',
request_serializer=servers__pb2.IdMessage.SerializeToString,
response_deserializer=servers__pb2.ServerItem.FromString,
)
self.List = channel.unary_unary(
'/servers.ServerService/List',
request_serializer=servers__pb2.ServerListRequest.SerializeToString,
response_deserializer=servers__pb2.ServerList.FromString,
)
class ServerServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
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 Update(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 Delete(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 Get(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 List(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_ServerServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Create': grpc.unary_unary_rpc_method_handler(
servicer.Create,
request_deserializer=servers__pb2.ServerCreate.FromString,
response_serializer=servers__pb2.NullResponse.SerializeToString,
),
'Update': grpc.unary_unary_rpc_method_handler(
servicer.Update,
request_deserializer=servers__pb2.ServerUpdate.FromString,
response_serializer=servers__pb2.NullResponse.SerializeToString,
),
'Delete': grpc.unary_unary_rpc_method_handler(
servicer.Delete,
request_deserializer=servers__pb2.IdMessage.FromString,
response_serializer=servers__pb2.NullResponse.SerializeToString,
),
'Get': grpc.unary_unary_rpc_method_handler(
servicer.Get,
request_deserializer=servers__pb2.IdMessage.FromString,
response_serializer=servers__pb2.ServerItem.SerializeToString,
),
'List': grpc.unary_unary_rpc_method_handler(
servicer.List,
request_deserializer=servers__pb2.ServerListRequest.FromString,
response_serializer=servers__pb2.ServerList.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'servers.ServerService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class ServerService(object):
"""Missing associated documentation comment in .proto file."""
@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, '/servers.ServerService/Create',
servers__pb2.ServerCreate.SerializeToString,
servers__pb2.NullResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Update(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, '/servers.ServerService/Update',
servers__pb2.ServerUpdate.SerializeToString,
servers__pb2.NullResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Delete(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, '/servers.ServerService/Delete',
servers__pb2.IdMessage.SerializeToString,
servers__pb2.NullResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Get(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, '/servers.ServerService/Get',
servers__pb2.IdMessage.SerializeToString,
servers__pb2.ServerItem.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def List(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, '/servers.ServerService/List',
servers__pb2.ServerListRequest.SerializeToString,
servers__pb2.ServerList.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)