|
1 | 1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! |
| 2 | +"""Client and server classes corresponding to protobuf-defined services.""" |
2 | 3 | import grpc |
3 | 4 |
|
4 | 5 | from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 |
5 | 6 | import indradb.indradb_pb2 as indradb__pb2 |
6 | 7 |
|
7 | 8 |
|
8 | 9 | class IndraDBStub(object): |
9 | | - # missing associated documentation comment in .proto file |
10 | | - pass |
11 | | - |
12 | | - def __init__(self, channel): |
13 | | - """Constructor. |
14 | | -
|
15 | | - Args: |
16 | | - channel: A grpc.Channel. |
17 | | - """ |
18 | | - self.Ping = channel.unary_unary( |
19 | | - '/indradb.IndraDB/Ping', |
20 | | - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
21 | | - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
22 | | - ) |
23 | | - self.BulkInsert = channel.stream_unary( |
24 | | - '/indradb.IndraDB/BulkInsert', |
25 | | - request_serializer=indradb__pb2.BulkInsertItem.SerializeToString, |
26 | | - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
27 | | - ) |
28 | | - self.Transaction = channel.stream_stream( |
29 | | - '/indradb.IndraDB/Transaction', |
30 | | - request_serializer=indradb__pb2.TransactionRequest.SerializeToString, |
31 | | - response_deserializer=indradb__pb2.TransactionResponse.FromString, |
32 | | - ) |
| 10 | + """Missing associated documentation comment in .proto file.""" |
| 11 | + |
| 12 | + def __init__(self, channel): |
| 13 | + """Constructor. |
| 14 | +
|
| 15 | + Args: |
| 16 | + channel: A grpc.Channel. |
| 17 | + """ |
| 18 | + self.Ping = channel.unary_unary( |
| 19 | + '/indradb.IndraDB/Ping', |
| 20 | + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 21 | + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 22 | + ) |
| 23 | + self.Sync = channel.unary_unary( |
| 24 | + '/indradb.IndraDB/Sync', |
| 25 | + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 26 | + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 27 | + ) |
| 28 | + self.BulkInsert = channel.stream_unary( |
| 29 | + '/indradb.IndraDB/BulkInsert', |
| 30 | + request_serializer=indradb__pb2.BulkInsertItem.SerializeToString, |
| 31 | + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 32 | + ) |
| 33 | + self.Transaction = channel.stream_stream( |
| 34 | + '/indradb.IndraDB/Transaction', |
| 35 | + request_serializer=indradb__pb2.TransactionRequest.SerializeToString, |
| 36 | + response_deserializer=indradb__pb2.TransactionResponse.FromString, |
| 37 | + ) |
| 38 | + self.IndexProperty = channel.unary_unary( |
| 39 | + '/indradb.IndraDB/IndexProperty', |
| 40 | + request_serializer=indradb__pb2.IndexPropertyRequest.SerializeToString, |
| 41 | + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 42 | + ) |
33 | 43 |
|
34 | 44 |
|
35 | 45 | class IndraDBServicer(object): |
36 | | - # missing associated documentation comment in .proto file |
37 | | - pass |
38 | | - |
39 | | - def Ping(self, request, context): |
40 | | - # missing associated documentation comment in .proto file |
41 | | - pass |
42 | | - context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
43 | | - context.set_details('Method not implemented!') |
44 | | - raise NotImplementedError('Method not implemented!') |
45 | | - |
46 | | - def BulkInsert(self, request_iterator, context): |
47 | | - # missing associated documentation comment in .proto file |
48 | | - pass |
49 | | - context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
50 | | - context.set_details('Method not implemented!') |
51 | | - raise NotImplementedError('Method not implemented!') |
52 | | - |
53 | | - def Transaction(self, request_iterator, context): |
54 | | - # missing associated documentation comment in .proto file |
55 | | - pass |
56 | | - context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
57 | | - context.set_details('Method not implemented!') |
58 | | - raise NotImplementedError('Method not implemented!') |
| 46 | + """Missing associated documentation comment in .proto file.""" |
| 47 | + |
| 48 | + def Ping(self, request, context): |
| 49 | + """Pings the server. |
| 50 | + """ |
| 51 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 52 | + context.set_details('Method not implemented!') |
| 53 | + raise NotImplementedError('Method not implemented!') |
| 54 | + |
| 55 | + def Sync(self, request, context): |
| 56 | + """Syncs persisted content. Depending on the datastore implementation, |
| 57 | + this has different meanings - including potentially being a no-op. |
| 58 | + """ |
| 59 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 60 | + context.set_details('Method not implemented!') |
| 61 | + raise NotImplementedError('Method not implemented!') |
| 62 | + |
| 63 | + def BulkInsert(self, request_iterator, context): |
| 64 | + """Bulk inserts many vertices, edges, and/or properties. |
| 65 | +
|
| 66 | + Note that datastores have discretion on how to approach safeguard vs |
| 67 | + performance tradeoffs. In particular: |
| 68 | + * If the datastore is disk-backed, it may or may not flush before |
| 69 | + returning. |
| 70 | + * The datastore might not verify for correctness; e.g., it might not |
| 71 | + ensure that the relevant vertices exist before inserting an edge. |
| 72 | + If you want maximum protection, use the equivalent functions in |
| 73 | + transactions, which will provide more safeguards. |
| 74 | + """ |
| 75 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 76 | + context.set_details('Method not implemented!') |
| 77 | + raise NotImplementedError('Method not implemented!') |
| 78 | + |
| 79 | + def Transaction(self, request_iterator, context): |
| 80 | + """Runs a transaction. |
| 81 | + """ |
| 82 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 83 | + context.set_details('Method not implemented!') |
| 84 | + raise NotImplementedError('Method not implemented!') |
| 85 | + |
| 86 | + def IndexProperty(self, request, context): |
| 87 | + """Enables indexing on a specified property. When indexing is enabled on a |
| 88 | + property, it's possible to query on its presence and values. |
| 89 | + """ |
| 90 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 91 | + context.set_details('Method not implemented!') |
| 92 | + raise NotImplementedError('Method not implemented!') |
59 | 93 |
|
60 | 94 |
|
61 | 95 | def add_IndraDBServicer_to_server(servicer, server): |
62 | | - rpc_method_handlers = { |
63 | | - 'Ping': grpc.unary_unary_rpc_method_handler( |
64 | | - servicer.Ping, |
65 | | - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
66 | | - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
67 | | - ), |
68 | | - 'BulkInsert': grpc.stream_unary_rpc_method_handler( |
69 | | - servicer.BulkInsert, |
70 | | - request_deserializer=indradb__pb2.BulkInsertItem.FromString, |
71 | | - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
72 | | - ), |
73 | | - 'Transaction': grpc.stream_stream_rpc_method_handler( |
74 | | - servicer.Transaction, |
75 | | - request_deserializer=indradb__pb2.TransactionRequest.FromString, |
76 | | - response_serializer=indradb__pb2.TransactionResponse.SerializeToString, |
77 | | - ), |
78 | | - } |
79 | | - generic_handler = grpc.method_handlers_generic_handler( |
80 | | - 'indradb.IndraDB', rpc_method_handlers) |
81 | | - server.add_generic_rpc_handlers((generic_handler,)) |
| 96 | + rpc_method_handlers = { |
| 97 | + 'Ping': grpc.unary_unary_rpc_method_handler( |
| 98 | + servicer.Ping, |
| 99 | + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 100 | + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 101 | + ), |
| 102 | + 'Sync': grpc.unary_unary_rpc_method_handler( |
| 103 | + servicer.Sync, |
| 104 | + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 105 | + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 106 | + ), |
| 107 | + 'BulkInsert': grpc.stream_unary_rpc_method_handler( |
| 108 | + servicer.BulkInsert, |
| 109 | + request_deserializer=indradb__pb2.BulkInsertItem.FromString, |
| 110 | + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 111 | + ), |
| 112 | + 'Transaction': grpc.stream_stream_rpc_method_handler( |
| 113 | + servicer.Transaction, |
| 114 | + request_deserializer=indradb__pb2.TransactionRequest.FromString, |
| 115 | + response_serializer=indradb__pb2.TransactionResponse.SerializeToString, |
| 116 | + ), |
| 117 | + 'IndexProperty': grpc.unary_unary_rpc_method_handler( |
| 118 | + servicer.IndexProperty, |
| 119 | + request_deserializer=indradb__pb2.IndexPropertyRequest.FromString, |
| 120 | + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 121 | + ), |
| 122 | + } |
| 123 | + generic_handler = grpc.method_handlers_generic_handler( |
| 124 | + 'indradb.IndraDB', rpc_method_handlers) |
| 125 | + server.add_generic_rpc_handlers((generic_handler,)) |
| 126 | + |
| 127 | + |
| 128 | + # This class is part of an EXPERIMENTAL API. |
| 129 | +class IndraDB(object): |
| 130 | + """Missing associated documentation comment in .proto file.""" |
| 131 | + |
| 132 | + @staticmethod |
| 133 | + def Ping(request, |
| 134 | + target, |
| 135 | + options=(), |
| 136 | + channel_credentials=None, |
| 137 | + call_credentials=None, |
| 138 | + insecure=False, |
| 139 | + compression=None, |
| 140 | + wait_for_ready=None, |
| 141 | + timeout=None, |
| 142 | + metadata=None): |
| 143 | + return grpc.experimental.unary_unary(request, target, '/indradb.IndraDB/Ping', |
| 144 | + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 145 | + google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 146 | + options, channel_credentials, |
| 147 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 148 | + |
| 149 | + @staticmethod |
| 150 | + def Sync(request, |
| 151 | + target, |
| 152 | + options=(), |
| 153 | + channel_credentials=None, |
| 154 | + call_credentials=None, |
| 155 | + insecure=False, |
| 156 | + compression=None, |
| 157 | + wait_for_ready=None, |
| 158 | + timeout=None, |
| 159 | + metadata=None): |
| 160 | + return grpc.experimental.unary_unary(request, target, '/indradb.IndraDB/Sync', |
| 161 | + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 162 | + google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 163 | + options, channel_credentials, |
| 164 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 165 | + |
| 166 | + @staticmethod |
| 167 | + def BulkInsert(request_iterator, |
| 168 | + target, |
| 169 | + options=(), |
| 170 | + channel_credentials=None, |
| 171 | + call_credentials=None, |
| 172 | + insecure=False, |
| 173 | + compression=None, |
| 174 | + wait_for_ready=None, |
| 175 | + timeout=None, |
| 176 | + metadata=None): |
| 177 | + return grpc.experimental.stream_unary(request_iterator, target, '/indradb.IndraDB/BulkInsert', |
| 178 | + indradb__pb2.BulkInsertItem.SerializeToString, |
| 179 | + google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 180 | + options, channel_credentials, |
| 181 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 182 | + |
| 183 | + @staticmethod |
| 184 | + def Transaction(request_iterator, |
| 185 | + target, |
| 186 | + options=(), |
| 187 | + channel_credentials=None, |
| 188 | + call_credentials=None, |
| 189 | + insecure=False, |
| 190 | + compression=None, |
| 191 | + wait_for_ready=None, |
| 192 | + timeout=None, |
| 193 | + metadata=None): |
| 194 | + return grpc.experimental.stream_stream(request_iterator, target, '/indradb.IndraDB/Transaction', |
| 195 | + indradb__pb2.TransactionRequest.SerializeToString, |
| 196 | + indradb__pb2.TransactionResponse.FromString, |
| 197 | + options, channel_credentials, |
| 198 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 199 | + |
| 200 | + @staticmethod |
| 201 | + def IndexProperty(request, |
| 202 | + target, |
| 203 | + options=(), |
| 204 | + channel_credentials=None, |
| 205 | + call_credentials=None, |
| 206 | + insecure=False, |
| 207 | + compression=None, |
| 208 | + wait_for_ready=None, |
| 209 | + timeout=None, |
| 210 | + metadata=None): |
| 211 | + return grpc.experimental.unary_unary(request, target, '/indradb.IndraDB/IndexProperty', |
| 212 | + indradb__pb2.IndexPropertyRequest.SerializeToString, |
| 213 | + google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 214 | + options, channel_credentials, |
| 215 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
0 commit comments