1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2"""Client and server classes corresponding to protobuf-defined services."""
3import grpc
4
5from app.marznode import marznode_pb2 as app_dot_marznode_dot_marznode__pb2
6
7
8class MarzServiceStub(object):
9 """Missing associated documentation comment in .proto file."""
10
11 def __init__(self, channel):
12 """Constructor.
13
14 Args:
15 channel: A grpc.Channel.
16 """
17 self.SyncUsers = channel.stream_unary(
18 '/marznode.MarzService/SyncUsers',
19 request_serializer=app_dot_marznode_dot_marznode__pb2.UserData.SerializeToString,
20 response_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
21 )
22 self.RepopulateUsers = channel.unary_unary(
23 '/marznode.MarzService/RepopulateUsers',
24 request_serializer=app_dot_marznode_dot_marznode__pb2.UsersData.SerializeToString,
25 response_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
26 )
27 self.FetchInbounds = channel.unary_unary(
28 '/marznode.MarzService/FetchInbounds',
29 request_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
30 response_deserializer=app_dot_marznode_dot_marznode__pb2.InboundsResponse.FromString,
31 )
32 self.FetchUsersStats = channel.unary_unary(
33 '/marznode.MarzService/FetchUsersStats',
34 request_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
35 response_deserializer=app_dot_marznode_dot_marznode__pb2.UsersStats.FromString,
36 )
37 self.FetchXrayConfig = channel.unary_unary(
38 '/marznode.MarzService/FetchXrayConfig',
39 request_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
40 response_deserializer=app_dot_marznode_dot_marznode__pb2.XrayConfig.FromString,
41 )
42 self.RestartXray = channel.unary_unary(
43 '/marznode.MarzService/RestartXray',
44 request_serializer=app_dot_marznode_dot_marznode__pb2.XrayConfig.SerializeToString,
45 response_deserializer=app_dot_marznode_dot_marznode__pb2.InboundsResponse.FromString,
46 )
47 self.StreamXrayLogs = channel.unary_stream(
48 '/marznode.MarzService/StreamXrayLogs',
49 request_serializer=app_dot_marznode_dot_marznode__pb2.XrayLogsRequest.SerializeToString,
50 response_deserializer=app_dot_marznode_dot_marznode__pb2.LogLine.FromString,
51 )
52
53
54class MarzServiceServicer(object):
55 """Missing associated documentation comment in .proto file."""
56
57 def SyncUsers(self, request_iterator, context):
58 """Missing associated documentation comment in .proto file."""
59 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60 context.set_details('Method not implemented!')
61 raise NotImplementedError('Method not implemented!')
62
63 def RepopulateUsers(self, request, context):
64 """Missing associated documentation comment in .proto file."""
65 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
66 context.set_details('Method not implemented!')
67 raise NotImplementedError('Method not implemented!')
68
69 def FetchInbounds(self, request, context):
70 """Missing associated documentation comment in .proto file."""
71 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
72 context.set_details('Method not implemented!')
73 raise NotImplementedError('Method not implemented!')
74
75 def FetchUsersStats(self, request, context):
76 """Missing associated documentation comment in .proto file."""
77 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
78 context.set_details('Method not implemented!')
79 raise NotImplementedError('Method not implemented!')
80
81 def FetchXrayConfig(self, request, context):
82 """Missing associated documentation comment in .proto file."""
83 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
84 context.set_details('Method not implemented!')
85 raise NotImplementedError('Method not implemented!')
86
87 def RestartXray(self, request, context):
88 """Missing associated documentation comment in .proto file."""
89 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
90 context.set_details('Method not implemented!')
91 raise NotImplementedError('Method not implemented!')
92
93 def StreamXrayLogs(self, request, context):
94 """Missing associated documentation comment in .proto file."""
95 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
96 context.set_details('Method not implemented!')
97 raise NotImplementedError('Method not implemented!')
98
99
100def add_MarzServiceServicer_to_server(servicer, server):
101 rpc_method_handlers = {
102 'SyncUsers': grpc.stream_unary_rpc_method_handler(
103 servicer.SyncUsers,
104 request_deserializer=app_dot_marznode_dot_marznode__pb2.UserData.FromString,
105 response_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
106 ),
107 'RepopulateUsers': grpc.unary_unary_rpc_method_handler(
108 servicer.RepopulateUsers,
109 request_deserializer=app_dot_marznode_dot_marznode__pb2.UsersData.FromString,
110 response_serializer=app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
111 ),
112 'FetchInbounds': grpc.unary_unary_rpc_method_handler(
113 servicer.FetchInbounds,
114 request_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
115 response_serializer=app_dot_marznode_dot_marznode__pb2.InboundsResponse.SerializeToString,
116 ),
117 'FetchUsersStats': grpc.unary_unary_rpc_method_handler(
118 servicer.FetchUsersStats,
119 request_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
120 response_serializer=app_dot_marznode_dot_marznode__pb2.UsersStats.SerializeToString,
121 ),
122 'FetchXrayConfig': grpc.unary_unary_rpc_method_handler(
123 servicer.FetchXrayConfig,
124 request_deserializer=app_dot_marznode_dot_marznode__pb2.Empty.FromString,
125 response_serializer=app_dot_marznode_dot_marznode__pb2.XrayConfig.SerializeToString,
126 ),
127 'RestartXray': grpc.unary_unary_rpc_method_handler(
128 servicer.RestartXray,
129 request_deserializer=app_dot_marznode_dot_marznode__pb2.XrayConfig.FromString,
130 response_serializer=app_dot_marznode_dot_marznode__pb2.InboundsResponse.SerializeToString,
131 ),
132 'StreamXrayLogs': grpc.unary_stream_rpc_method_handler(
133 servicer.StreamXrayLogs,
134 request_deserializer=app_dot_marznode_dot_marznode__pb2.XrayLogsRequest.FromString,
135 response_serializer=app_dot_marznode_dot_marznode__pb2.LogLine.SerializeToString,
136 ),
137 }
138 generic_handler = grpc.method_handlers_generic_handler(
139 'marznode.MarzService', rpc_method_handlers)
140 server.add_generic_rpc_handlers((generic_handler,))
141
142
143 # This class is part of an EXPERIMENTAL API.
144class MarzService(object):
145 """Missing associated documentation comment in .proto file."""
146
147 @staticmethod
148 def SyncUsers(request_iterator,
149 target,
150 options=(),
151 channel_credentials=None,
152 call_credentials=None,
153 insecure=False,
154 compression=None,
155 wait_for_ready=None,
156 timeout=None,
157 metadata=None):
158 return grpc.experimental.stream_unary(request_iterator, target, '/marznode.MarzService/SyncUsers',
159 app_dot_marznode_dot_marznode__pb2.UserData.SerializeToString,
160 app_dot_marznode_dot_marznode__pb2.Empty.FromString,
161 options, channel_credentials,
162 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
163
164 @staticmethod
165 def RepopulateUsers(request,
166 target,
167 options=(),
168 channel_credentials=None,
169 call_credentials=None,
170 insecure=False,
171 compression=None,
172 wait_for_ready=None,
173 timeout=None,
174 metadata=None):
175 return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/RepopulateUsers',
176 app_dot_marznode_dot_marznode__pb2.UsersData.SerializeToString,
177 app_dot_marznode_dot_marznode__pb2.Empty.FromString,
178 options, channel_credentials,
179 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
180
181 @staticmethod
182 def FetchInbounds(request,
183 target,
184 options=(),
185 channel_credentials=None,
186 call_credentials=None,
187 insecure=False,
188 compression=None,
189 wait_for_ready=None,
190 timeout=None,
191 metadata=None):
192 return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/FetchInbounds',
193 app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
194 app_dot_marznode_dot_marznode__pb2.InboundsResponse.FromString,
195 options, channel_credentials,
196 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
197
198 @staticmethod
199 def FetchUsersStats(request,
200 target,
201 options=(),
202 channel_credentials=None,
203 call_credentials=None,
204 insecure=False,
205 compression=None,
206 wait_for_ready=None,
207 timeout=None,
208 metadata=None):
209 return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/FetchUsersStats',
210 app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
211 app_dot_marznode_dot_marznode__pb2.UsersStats.FromString,
212 options, channel_credentials,
213 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
214
215 @staticmethod
216 def FetchXrayConfig(request,
217 target,
218 options=(),
219 channel_credentials=None,
220 call_credentials=None,
221 insecure=False,
222 compression=None,
223 wait_for_ready=None,
224 timeout=None,
225 metadata=None):
226 return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/FetchXrayConfig',
227 app_dot_marznode_dot_marznode__pb2.Empty.SerializeToString,
228 app_dot_marznode_dot_marznode__pb2.XrayConfig.FromString,
229 options, channel_credentials,
230 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
231
232 @staticmethod
233 def RestartXray(request,
234 target,
235 options=(),
236 channel_credentials=None,
237 call_credentials=None,
238 insecure=False,
239 compression=None,
240 wait_for_ready=None,
241 timeout=None,
242 metadata=None):
243 return grpc.experimental.unary_unary(request, target, '/marznode.MarzService/RestartXray',
244 app_dot_marznode_dot_marznode__pb2.XrayConfig.SerializeToString,
245 app_dot_marznode_dot_marznode__pb2.InboundsResponse.FromString,
246 options, channel_credentials,
247 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
248
249 @staticmethod
250 def StreamXrayLogs(request,
251 target,
252 options=(),
253 channel_credentials=None,
254 call_credentials=None,
255 insecure=False,
256 compression=None,
257 wait_for_ready=None,
258 timeout=None,
259 metadata=None):
260 return grpc.experimental.unary_stream(request, target, '/marznode.MarzService/StreamXrayLogs',
261 app_dot_marznode_dot_marznode__pb2.XrayLogsRequest.SerializeToString,
262 app_dot_marznode_dot_marznode__pb2.LogLine.FromString,
263 options, channel_credentials,
264 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)