pyservernodeclient_grpc/lib/proto/users_pb2_grpc.py

199 lines
7.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 users_pb2 as users__pb2
class UserServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetAll = channel.unary_unary(
'/UserService/GetAll',
request_serializer=users__pb2.Empty.SerializeToString,
response_deserializer=users__pb2.UserList.FromString,
)
self.Get = channel.unary_unary(
'/UserService/Get',
request_serializer=users__pb2.UserRequestId.SerializeToString,
response_deserializer=users__pb2.User.FromString,
)
self.Insert = channel.unary_unary(
'/UserService/Insert',
request_serializer=users__pb2.User.SerializeToString,
response_deserializer=users__pb2.User.FromString,
)
self.Update = channel.unary_unary(
'/UserService/Update',
request_serializer=users__pb2.User.SerializeToString,
response_deserializer=users__pb2.User.FromString,
)
self.Remove = channel.unary_unary(
'/UserService/Remove',
request_serializer=users__pb2.UserRequestId.SerializeToString,
response_deserializer=users__pb2.Empty.FromString,
)
class UserServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetAll(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 Insert(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 Remove(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_UserServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetAll': grpc.unary_unary_rpc_method_handler(
servicer.GetAll,
request_deserializer=users__pb2.Empty.FromString,
response_serializer=users__pb2.UserList.SerializeToString,
),
'Get': grpc.unary_unary_rpc_method_handler(
servicer.Get,
request_deserializer=users__pb2.UserRequestId.FromString,
response_serializer=users__pb2.User.SerializeToString,
),
'Insert': grpc.unary_unary_rpc_method_handler(
servicer.Insert,
request_deserializer=users__pb2.User.FromString,
response_serializer=users__pb2.User.SerializeToString,
),
'Update': grpc.unary_unary_rpc_method_handler(
servicer.Update,
request_deserializer=users__pb2.User.FromString,
response_serializer=users__pb2.User.SerializeToString,
),
'Remove': grpc.unary_unary_rpc_method_handler(
servicer.Remove,
request_deserializer=users__pb2.UserRequestId.FromString,
response_serializer=users__pb2.Empty.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'UserService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class UserService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetAll(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, '/UserService/GetAll',
users__pb2.Empty.SerializeToString,
users__pb2.UserList.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, '/UserService/Get',
users__pb2.UserRequestId.SerializeToString,
users__pb2.User.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Insert(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, '/UserService/Insert',
users__pb2.User.SerializeToString,
users__pb2.User.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, '/UserService/Update',
users__pb2.User.SerializeToString,
users__pb2.User.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Remove(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, '/UserService/Remove',
users__pb2.UserRequestId.SerializeToString,
users__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)