Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | # source: schema.proto |
| 3 | |
| 4 | import sys |
| 5 | _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
| 6 | from google.protobuf import descriptor as _descriptor |
| 7 | from google.protobuf import message as _message |
| 8 | from google.protobuf import reflection as _reflection |
| 9 | from google.protobuf import symbol_database as _symbol_database |
| 10 | from google.protobuf import descriptor_pb2 |
| 11 | # @@protoc_insertion_point(imports) |
| 12 | |
| 13 | _sym_db = _symbol_database.Default() |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | DESCRIPTOR = _descriptor.FileDescriptor( |
| 19 | name='schema.proto', |
| 20 | package='schema', |
| 21 | syntax='proto3', |
| 22 | serialized_pb=_b('\n\x0cschema.proto\x12\x06schema\"\xcd\x01\n\x06Schema\x12*\n\x06protos\x18\x01 \x03(\x0b\x32\x1a.schema.Schema.ProtosEntry\x12\x34\n\x0b\x64\x65scriptors\x18\x02 \x03(\x0b\x32\x1f.schema.Schema.DescriptorsEntry\x1a-\n\x0bProtosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x44\x65scriptorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\r\n\x0bNullMessage2C\n\rSchemaService\x12\x32\n\tGetSchema\x12\x13.schema.NullMessage\x1a\x0e.schema.Schema\"\x00\x62\x06proto3') |
| 23 | ) |
| 24 | _sym_db.RegisterFileDescriptor(DESCRIPTOR) |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | _SCHEMA_PROTOSENTRY = _descriptor.Descriptor( |
| 30 | name='ProtosEntry', |
| 31 | full_name='schema.Schema.ProtosEntry', |
| 32 | filename=None, |
| 33 | file=DESCRIPTOR, |
| 34 | containing_type=None, |
| 35 | fields=[ |
| 36 | _descriptor.FieldDescriptor( |
| 37 | name='key', full_name='schema.Schema.ProtosEntry.key', index=0, |
| 38 | number=1, type=9, cpp_type=9, label=1, |
| 39 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 40 | message_type=None, enum_type=None, containing_type=None, |
| 41 | is_extension=False, extension_scope=None, |
| 42 | options=None), |
| 43 | _descriptor.FieldDescriptor( |
| 44 | name='value', full_name='schema.Schema.ProtosEntry.value', index=1, |
| 45 | number=2, type=9, cpp_type=9, label=1, |
| 46 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 47 | message_type=None, enum_type=None, containing_type=None, |
| 48 | is_extension=False, extension_scope=None, |
| 49 | options=None), |
| 50 | ], |
| 51 | extensions=[ |
| 52 | ], |
| 53 | nested_types=[], |
| 54 | enum_types=[ |
| 55 | ], |
| 56 | options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), |
| 57 | is_extendable=False, |
| 58 | syntax='proto3', |
| 59 | extension_ranges=[], |
| 60 | oneofs=[ |
| 61 | ], |
| 62 | serialized_start=133, |
| 63 | serialized_end=178, |
| 64 | ) |
| 65 | |
| 66 | _SCHEMA_DESCRIPTORSENTRY = _descriptor.Descriptor( |
| 67 | name='DescriptorsEntry', |
| 68 | full_name='schema.Schema.DescriptorsEntry', |
| 69 | filename=None, |
| 70 | file=DESCRIPTOR, |
| 71 | containing_type=None, |
| 72 | fields=[ |
| 73 | _descriptor.FieldDescriptor( |
| 74 | name='key', full_name='schema.Schema.DescriptorsEntry.key', index=0, |
| 75 | number=1, type=9, cpp_type=9, label=1, |
| 76 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 77 | message_type=None, enum_type=None, containing_type=None, |
| 78 | is_extension=False, extension_scope=None, |
| 79 | options=None), |
| 80 | _descriptor.FieldDescriptor( |
| 81 | name='value', full_name='schema.Schema.DescriptorsEntry.value', index=1, |
| 82 | number=2, type=12, cpp_type=9, label=1, |
| 83 | has_default_value=False, default_value=_b(""), |
| 84 | message_type=None, enum_type=None, containing_type=None, |
| 85 | is_extension=False, extension_scope=None, |
| 86 | options=None), |
| 87 | ], |
| 88 | extensions=[ |
| 89 | ], |
| 90 | nested_types=[], |
| 91 | enum_types=[ |
| 92 | ], |
| 93 | options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), |
| 94 | is_extendable=False, |
| 95 | syntax='proto3', |
| 96 | extension_ranges=[], |
| 97 | oneofs=[ |
| 98 | ], |
| 99 | serialized_start=180, |
| 100 | serialized_end=230, |
| 101 | ) |
| 102 | |
| 103 | _SCHEMA = _descriptor.Descriptor( |
| 104 | name='Schema', |
| 105 | full_name='schema.Schema', |
| 106 | filename=None, |
| 107 | file=DESCRIPTOR, |
| 108 | containing_type=None, |
| 109 | fields=[ |
| 110 | _descriptor.FieldDescriptor( |
| 111 | name='protos', full_name='schema.Schema.protos', index=0, |
| 112 | number=1, type=11, cpp_type=10, label=3, |
| 113 | has_default_value=False, default_value=[], |
| 114 | message_type=None, enum_type=None, containing_type=None, |
| 115 | is_extension=False, extension_scope=None, |
| 116 | options=None), |
| 117 | _descriptor.FieldDescriptor( |
| 118 | name='descriptors', full_name='schema.Schema.descriptors', index=1, |
| 119 | number=2, type=11, cpp_type=10, label=3, |
| 120 | has_default_value=False, default_value=[], |
| 121 | message_type=None, enum_type=None, containing_type=None, |
| 122 | is_extension=False, extension_scope=None, |
| 123 | options=None), |
| 124 | ], |
| 125 | extensions=[ |
| 126 | ], |
| 127 | nested_types=[_SCHEMA_PROTOSENTRY, _SCHEMA_DESCRIPTORSENTRY, ], |
| 128 | enum_types=[ |
| 129 | ], |
| 130 | options=None, |
| 131 | is_extendable=False, |
| 132 | syntax='proto3', |
| 133 | extension_ranges=[], |
| 134 | oneofs=[ |
| 135 | ], |
| 136 | serialized_start=25, |
| 137 | serialized_end=230, |
| 138 | ) |
| 139 | |
| 140 | |
| 141 | _NULLMESSAGE = _descriptor.Descriptor( |
| 142 | name='NullMessage', |
| 143 | full_name='schema.NullMessage', |
| 144 | filename=None, |
| 145 | file=DESCRIPTOR, |
| 146 | containing_type=None, |
| 147 | fields=[ |
| 148 | ], |
| 149 | extensions=[ |
| 150 | ], |
| 151 | nested_types=[], |
| 152 | enum_types=[ |
| 153 | ], |
| 154 | options=None, |
| 155 | is_extendable=False, |
| 156 | syntax='proto3', |
| 157 | extension_ranges=[], |
| 158 | oneofs=[ |
| 159 | ], |
| 160 | serialized_start=232, |
| 161 | serialized_end=245, |
| 162 | ) |
| 163 | |
| 164 | _SCHEMA_PROTOSENTRY.containing_type = _SCHEMA |
| 165 | _SCHEMA_DESCRIPTORSENTRY.containing_type = _SCHEMA |
| 166 | _SCHEMA.fields_by_name['protos'].message_type = _SCHEMA_PROTOSENTRY |
| 167 | _SCHEMA.fields_by_name['descriptors'].message_type = _SCHEMA_DESCRIPTORSENTRY |
| 168 | DESCRIPTOR.message_types_by_name['Schema'] = _SCHEMA |
| 169 | DESCRIPTOR.message_types_by_name['NullMessage'] = _NULLMESSAGE |
| 170 | |
| 171 | Schema = _reflection.GeneratedProtocolMessageType('Schema', (_message.Message,), dict( |
| 172 | |
| 173 | ProtosEntry = _reflection.GeneratedProtocolMessageType('ProtosEntry', (_message.Message,), dict( |
| 174 | DESCRIPTOR = _SCHEMA_PROTOSENTRY, |
| 175 | __module__ = 'schema_pb2' |
| 176 | # @@protoc_insertion_point(class_scope:schema.Schema.ProtosEntry) |
| 177 | )) |
| 178 | , |
| 179 | |
| 180 | DescriptorsEntry = _reflection.GeneratedProtocolMessageType('DescriptorsEntry', (_message.Message,), dict( |
| 181 | DESCRIPTOR = _SCHEMA_DESCRIPTORSENTRY, |
| 182 | __module__ = 'schema_pb2' |
| 183 | # @@protoc_insertion_point(class_scope:schema.Schema.DescriptorsEntry) |
| 184 | )) |
| 185 | , |
| 186 | DESCRIPTOR = _SCHEMA, |
| 187 | __module__ = 'schema_pb2' |
| 188 | # @@protoc_insertion_point(class_scope:schema.Schema) |
| 189 | )) |
| 190 | _sym_db.RegisterMessage(Schema) |
| 191 | _sym_db.RegisterMessage(Schema.ProtosEntry) |
| 192 | _sym_db.RegisterMessage(Schema.DescriptorsEntry) |
| 193 | |
| 194 | NullMessage = _reflection.GeneratedProtocolMessageType('NullMessage', (_message.Message,), dict( |
| 195 | DESCRIPTOR = _NULLMESSAGE, |
| 196 | __module__ = 'schema_pb2' |
| 197 | # @@protoc_insertion_point(class_scope:schema.NullMessage) |
| 198 | )) |
| 199 | _sym_db.RegisterMessage(NullMessage) |
| 200 | |
| 201 | |
| 202 | _SCHEMA_PROTOSENTRY.has_options = True |
| 203 | _SCHEMA_PROTOSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) |
| 204 | _SCHEMA_DESCRIPTORSENTRY.has_options = True |
| 205 | _SCHEMA_DESCRIPTORSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) |
| 206 | import grpc |
| 207 | from grpc.beta import implementations as beta_implementations |
| 208 | from grpc.beta import interfaces as beta_interfaces |
| 209 | from grpc.framework.common import cardinality |
| 210 | from grpc.framework.interfaces.face import utilities as face_utilities |
| 211 | |
| 212 | |
| 213 | class SchemaServiceStub(object): |
| 214 | """Schema services |
| 215 | """ |
| 216 | |
| 217 | def __init__(self, channel): |
| 218 | """Constructor. |
| 219 | |
| 220 | Args: |
| 221 | channel: A grpc.Channel. |
| 222 | """ |
| 223 | self.GetSchema = channel.unary_unary( |
| 224 | '/schema.SchemaService/GetSchema', |
| 225 | request_serializer=NullMessage.SerializeToString, |
| 226 | response_deserializer=Schema.FromString, |
| 227 | ) |
| 228 | |
| 229 | |
| 230 | class SchemaServiceServicer(object): |
| 231 | """Schema services |
| 232 | """ |
| 233 | |
| 234 | def GetSchema(self, request, context): |
| 235 | """Return active grpc schemas |
| 236 | """ |
| 237 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 238 | context.set_details('Method not implemented!') |
| 239 | raise NotImplementedError('Method not implemented!') |
| 240 | |
| 241 | |
| 242 | def add_SchemaServiceServicer_to_server(servicer, server): |
| 243 | rpc_method_handlers = { |
| 244 | 'GetSchema': grpc.unary_unary_rpc_method_handler( |
| 245 | servicer.GetSchema, |
| 246 | request_deserializer=NullMessage.FromString, |
| 247 | response_serializer=Schema.SerializeToString, |
| 248 | ), |
| 249 | } |
| 250 | generic_handler = grpc.method_handlers_generic_handler( |
| 251 | 'schema.SchemaService', rpc_method_handlers) |
| 252 | server.add_generic_rpc_handlers((generic_handler,)) |
| 253 | |
| 254 | |
| 255 | class BetaSchemaServiceServicer(object): |
| 256 | """Schema services |
| 257 | """ |
| 258 | def GetSchema(self, request, context): |
| 259 | """Return active grpc schemas |
| 260 | """ |
| 261 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 262 | |
| 263 | |
| 264 | class BetaSchemaServiceStub(object): |
| 265 | """Schema services |
| 266 | """ |
| 267 | def GetSchema(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 268 | """Return active grpc schemas |
| 269 | """ |
| 270 | raise NotImplementedError() |
| 271 | GetSchema.future = None |
| 272 | |
| 273 | |
| 274 | def beta_create_SchemaService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): |
| 275 | request_deserializers = { |
| 276 | ('schema.SchemaService', 'GetSchema'): NullMessage.FromString, |
| 277 | } |
| 278 | response_serializers = { |
| 279 | ('schema.SchemaService', 'GetSchema'): Schema.SerializeToString, |
| 280 | } |
| 281 | method_implementations = { |
| 282 | ('schema.SchemaService', 'GetSchema'): face_utilities.unary_unary_inline(servicer.GetSchema), |
| 283 | } |
| 284 | server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) |
| 285 | return beta_implementations.server(method_implementations, options=server_options) |
| 286 | |
| 287 | |
| 288 | def beta_create_SchemaService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): |
| 289 | request_serializers = { |
| 290 | ('schema.SchemaService', 'GetSchema'): NullMessage.SerializeToString, |
| 291 | } |
| 292 | response_deserializers = { |
| 293 | ('schema.SchemaService', 'GetSchema'): Schema.FromString, |
| 294 | } |
| 295 | cardinalities = { |
| 296 | 'GetSchema': cardinality.Cardinality.UNARY_UNARY, |
| 297 | } |
| 298 | stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) |
| 299 | return beta_implementations.dynamic_stub(channel, 'schema.SchemaService', cardinalities, options=stub_options) |
| 300 | # @@protoc_insertion_point(module_scope) |