github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/bddtests/peer/chaincode_shim_pb2.py (about) 1 # Generated by the protocol buffer compiler. DO NOT EDIT! 2 # source: peer/chaincode_shim.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 from peer import chaincode_event_pb2 as peer_dot_chaincode__event__pb2 17 from peer import proposal_pb2 as peer_dot_proposal__pb2 18 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 19 20 21 DESCRIPTOR = _descriptor.FileDescriptor( 22 name='peer/chaincode_shim.proto', 23 package='protos', 24 syntax='proto3', 25 serialized_pb=_b('\n\x19peer/chaincode_shim.proto\x12\x06protos\x1a\x1apeer/chaincode_event.proto\x1a\x13peer/proposal.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xac\x04\n\x10\x43haincodeMessage\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.protos.ChaincodeMessage.Type\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0c\n\x04txid\x18\x04 \x01(\t\x12\"\n\x08proposal\x18\x05 \x01(\x0b\x32\x10.protos.Proposal\x12/\n\x0f\x63haincode_event\x18\x06 \x01(\x0b\x32\x16.protos.ChaincodeEvent\"\xc7\x02\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\x0c\n\x08REGISTER\x10\x01\x12\x0e\n\nREGISTERED\x10\x02\x12\x08\n\x04INIT\x10\x03\x12\t\n\x05READY\x10\x04\x12\x0f\n\x0bTRANSACTION\x10\x05\x12\r\n\tCOMPLETED\x10\x06\x12\t\n\x05\x45RROR\x10\x07\x12\r\n\tGET_STATE\x10\x08\x12\r\n\tPUT_STATE\x10\t\x12\r\n\tDEL_STATE\x10\n\x12\x14\n\x10INVOKE_CHAINCODE\x10\x0b\x12\x0c\n\x08RESPONSE\x10\r\x12\x16\n\x12GET_STATE_BY_RANGE\x10\x0e\x12\x14\n\x10GET_QUERY_RESULT\x10\x0f\x12\x14\n\x10QUERY_STATE_NEXT\x10\x10\x12\x15\n\x11QUERY_STATE_CLOSE\x10\x11\x12\r\n\tKEEPALIVE\x10\x12\x12\x17\n\x13GET_HISTORY_FOR_KEY\x10\x13\"*\n\x0cPutStateInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"3\n\x0fGetStateByRange\x12\x10\n\x08startKey\x18\x01 \x01(\t\x12\x0e\n\x06\x65ndKey\x18\x02 \x01(\t\"\x1f\n\x0eGetQueryResult\x12\r\n\x05query\x18\x01 \x01(\t\"\x1f\n\x10GetHistoryForKey\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1c\n\x0eQueryStateNext\x12\n\n\x02id\x18\x01 \x01(\t\"\x1d\n\x0fQueryStateClose\x12\n\n\x02id\x18\x01 \x01(\t\"0\n\x12QueryStateKeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"g\n\x12QueryStateResponse\x12\x33\n\x0fkeys_and_values\x18\x01 \x03(\x0b\x32\x1a.protos.QueryStateKeyValue\x12\x10\n\x08has_more\x18\x02 \x01(\x08\x12\n\n\x02id\x18\x03 \x01(\t2X\n\x10\x43haincodeSupport\x12\x44\n\x08Register\x12\x18.protos.ChaincodeMessage\x1a\x18.protos.ChaincodeMessage\"\x00(\x01\x30\x01\x42O\n\"org.hyperledger.fabric.protos.peerZ)github.com/hyperledger/fabric/protos/peerb\x06proto3') 26 , 27 dependencies=[peer_dot_chaincode__event__pb2.DESCRIPTOR,peer_dot_proposal__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) 28 _sym_db.RegisterFileDescriptor(DESCRIPTOR) 29 30 31 32 _CHAINCODEMESSAGE_TYPE = _descriptor.EnumDescriptor( 33 name='Type', 34 full_name='protos.ChaincodeMessage.Type', 35 filename=None, 36 file=DESCRIPTOR, 37 values=[ 38 _descriptor.EnumValueDescriptor( 39 name='UNDEFINED', index=0, number=0, 40 options=None, 41 type=None), 42 _descriptor.EnumValueDescriptor( 43 name='REGISTER', index=1, number=1, 44 options=None, 45 type=None), 46 _descriptor.EnumValueDescriptor( 47 name='REGISTERED', index=2, number=2, 48 options=None, 49 type=None), 50 _descriptor.EnumValueDescriptor( 51 name='INIT', index=3, number=3, 52 options=None, 53 type=None), 54 _descriptor.EnumValueDescriptor( 55 name='READY', index=4, number=4, 56 options=None, 57 type=None), 58 _descriptor.EnumValueDescriptor( 59 name='TRANSACTION', index=5, number=5, 60 options=None, 61 type=None), 62 _descriptor.EnumValueDescriptor( 63 name='COMPLETED', index=6, number=6, 64 options=None, 65 type=None), 66 _descriptor.EnumValueDescriptor( 67 name='ERROR', index=7, number=7, 68 options=None, 69 type=None), 70 _descriptor.EnumValueDescriptor( 71 name='GET_STATE', index=8, number=8, 72 options=None, 73 type=None), 74 _descriptor.EnumValueDescriptor( 75 name='PUT_STATE', index=9, number=9, 76 options=None, 77 type=None), 78 _descriptor.EnumValueDescriptor( 79 name='DEL_STATE', index=10, number=10, 80 options=None, 81 type=None), 82 _descriptor.EnumValueDescriptor( 83 name='INVOKE_CHAINCODE', index=11, number=11, 84 options=None, 85 type=None), 86 _descriptor.EnumValueDescriptor( 87 name='RESPONSE', index=12, number=13, 88 options=None, 89 type=None), 90 _descriptor.EnumValueDescriptor( 91 name='GET_STATE_BY_RANGE', index=13, number=14, 92 options=None, 93 type=None), 94 _descriptor.EnumValueDescriptor( 95 name='GET_QUERY_RESULT', index=14, number=15, 96 options=None, 97 type=None), 98 _descriptor.EnumValueDescriptor( 99 name='QUERY_STATE_NEXT', index=15, number=16, 100 options=None, 101 type=None), 102 _descriptor.EnumValueDescriptor( 103 name='QUERY_STATE_CLOSE', index=16, number=17, 104 options=None, 105 type=None), 106 _descriptor.EnumValueDescriptor( 107 name='KEEPALIVE', index=17, number=18, 108 options=None, 109 type=None), 110 _descriptor.EnumValueDescriptor( 111 name='GET_HISTORY_FOR_KEY', index=18, number=19, 112 options=None, 113 type=None), 114 ], 115 containing_type=None, 116 options=None, 117 serialized_start=349, 118 serialized_end=676, 119 ) 120 _sym_db.RegisterEnumDescriptor(_CHAINCODEMESSAGE_TYPE) 121 122 123 _CHAINCODEMESSAGE = _descriptor.Descriptor( 124 name='ChaincodeMessage', 125 full_name='protos.ChaincodeMessage', 126 filename=None, 127 file=DESCRIPTOR, 128 containing_type=None, 129 fields=[ 130 _descriptor.FieldDescriptor( 131 name='type', full_name='protos.ChaincodeMessage.type', index=0, 132 number=1, type=14, cpp_type=8, label=1, 133 has_default_value=False, default_value=0, 134 message_type=None, enum_type=None, containing_type=None, 135 is_extension=False, extension_scope=None, 136 options=None), 137 _descriptor.FieldDescriptor( 138 name='timestamp', full_name='protos.ChaincodeMessage.timestamp', index=1, 139 number=2, type=11, cpp_type=10, label=1, 140 has_default_value=False, default_value=None, 141 message_type=None, enum_type=None, containing_type=None, 142 is_extension=False, extension_scope=None, 143 options=None), 144 _descriptor.FieldDescriptor( 145 name='payload', full_name='protos.ChaincodeMessage.payload', index=2, 146 number=3, type=12, cpp_type=9, label=1, 147 has_default_value=False, default_value=_b(""), 148 message_type=None, enum_type=None, containing_type=None, 149 is_extension=False, extension_scope=None, 150 options=None), 151 _descriptor.FieldDescriptor( 152 name='txid', full_name='protos.ChaincodeMessage.txid', index=3, 153 number=4, type=9, cpp_type=9, label=1, 154 has_default_value=False, default_value=_b("").decode('utf-8'), 155 message_type=None, enum_type=None, containing_type=None, 156 is_extension=False, extension_scope=None, 157 options=None), 158 _descriptor.FieldDescriptor( 159 name='proposal', full_name='protos.ChaincodeMessage.proposal', index=4, 160 number=5, type=11, cpp_type=10, label=1, 161 has_default_value=False, default_value=None, 162 message_type=None, enum_type=None, containing_type=None, 163 is_extension=False, extension_scope=None, 164 options=None), 165 _descriptor.FieldDescriptor( 166 name='chaincode_event', full_name='protos.ChaincodeMessage.chaincode_event', index=5, 167 number=6, type=11, cpp_type=10, label=1, 168 has_default_value=False, default_value=None, 169 message_type=None, enum_type=None, containing_type=None, 170 is_extension=False, extension_scope=None, 171 options=None), 172 ], 173 extensions=[ 174 ], 175 nested_types=[], 176 enum_types=[ 177 _CHAINCODEMESSAGE_TYPE, 178 ], 179 options=None, 180 is_extendable=False, 181 syntax='proto3', 182 extension_ranges=[], 183 oneofs=[ 184 ], 185 serialized_start=120, 186 serialized_end=676, 187 ) 188 189 190 _PUTSTATEINFO = _descriptor.Descriptor( 191 name='PutStateInfo', 192 full_name='protos.PutStateInfo', 193 filename=None, 194 file=DESCRIPTOR, 195 containing_type=None, 196 fields=[ 197 _descriptor.FieldDescriptor( 198 name='key', full_name='protos.PutStateInfo.key', index=0, 199 number=1, type=9, cpp_type=9, label=1, 200 has_default_value=False, default_value=_b("").decode('utf-8'), 201 message_type=None, enum_type=None, containing_type=None, 202 is_extension=False, extension_scope=None, 203 options=None), 204 _descriptor.FieldDescriptor( 205 name='value', full_name='protos.PutStateInfo.value', index=1, 206 number=2, type=12, cpp_type=9, label=1, 207 has_default_value=False, default_value=_b(""), 208 message_type=None, enum_type=None, containing_type=None, 209 is_extension=False, extension_scope=None, 210 options=None), 211 ], 212 extensions=[ 213 ], 214 nested_types=[], 215 enum_types=[ 216 ], 217 options=None, 218 is_extendable=False, 219 syntax='proto3', 220 extension_ranges=[], 221 oneofs=[ 222 ], 223 serialized_start=678, 224 serialized_end=720, 225 ) 226 227 228 _GETSTATEBYRANGE = _descriptor.Descriptor( 229 name='GetStateByRange', 230 full_name='protos.GetStateByRange', 231 filename=None, 232 file=DESCRIPTOR, 233 containing_type=None, 234 fields=[ 235 _descriptor.FieldDescriptor( 236 name='startKey', full_name='protos.GetStateByRange.startKey', index=0, 237 number=1, type=9, cpp_type=9, label=1, 238 has_default_value=False, default_value=_b("").decode('utf-8'), 239 message_type=None, enum_type=None, containing_type=None, 240 is_extension=False, extension_scope=None, 241 options=None), 242 _descriptor.FieldDescriptor( 243 name='endKey', full_name='protos.GetStateByRange.endKey', index=1, 244 number=2, type=9, cpp_type=9, label=1, 245 has_default_value=False, default_value=_b("").decode('utf-8'), 246 message_type=None, enum_type=None, containing_type=None, 247 is_extension=False, extension_scope=None, 248 options=None), 249 ], 250 extensions=[ 251 ], 252 nested_types=[], 253 enum_types=[ 254 ], 255 options=None, 256 is_extendable=False, 257 syntax='proto3', 258 extension_ranges=[], 259 oneofs=[ 260 ], 261 serialized_start=722, 262 serialized_end=773, 263 ) 264 265 266 _GETQUERYRESULT = _descriptor.Descriptor( 267 name='GetQueryResult', 268 full_name='protos.GetQueryResult', 269 filename=None, 270 file=DESCRIPTOR, 271 containing_type=None, 272 fields=[ 273 _descriptor.FieldDescriptor( 274 name='query', full_name='protos.GetQueryResult.query', index=0, 275 number=1, type=9, cpp_type=9, label=1, 276 has_default_value=False, default_value=_b("").decode('utf-8'), 277 message_type=None, enum_type=None, containing_type=None, 278 is_extension=False, extension_scope=None, 279 options=None), 280 ], 281 extensions=[ 282 ], 283 nested_types=[], 284 enum_types=[ 285 ], 286 options=None, 287 is_extendable=False, 288 syntax='proto3', 289 extension_ranges=[], 290 oneofs=[ 291 ], 292 serialized_start=775, 293 serialized_end=806, 294 ) 295 296 297 _GETHISTORYFORKEY = _descriptor.Descriptor( 298 name='GetHistoryForKey', 299 full_name='protos.GetHistoryForKey', 300 filename=None, 301 file=DESCRIPTOR, 302 containing_type=None, 303 fields=[ 304 _descriptor.FieldDescriptor( 305 name='key', full_name='protos.GetHistoryForKey.key', index=0, 306 number=1, type=9, cpp_type=9, label=1, 307 has_default_value=False, default_value=_b("").decode('utf-8'), 308 message_type=None, enum_type=None, containing_type=None, 309 is_extension=False, extension_scope=None, 310 options=None), 311 ], 312 extensions=[ 313 ], 314 nested_types=[], 315 enum_types=[ 316 ], 317 options=None, 318 is_extendable=False, 319 syntax='proto3', 320 extension_ranges=[], 321 oneofs=[ 322 ], 323 serialized_start=808, 324 serialized_end=839, 325 ) 326 327 328 _QUERYSTATENEXT = _descriptor.Descriptor( 329 name='QueryStateNext', 330 full_name='protos.QueryStateNext', 331 filename=None, 332 file=DESCRIPTOR, 333 containing_type=None, 334 fields=[ 335 _descriptor.FieldDescriptor( 336 name='id', full_name='protos.QueryStateNext.id', index=0, 337 number=1, type=9, cpp_type=9, label=1, 338 has_default_value=False, default_value=_b("").decode('utf-8'), 339 message_type=None, enum_type=None, containing_type=None, 340 is_extension=False, extension_scope=None, 341 options=None), 342 ], 343 extensions=[ 344 ], 345 nested_types=[], 346 enum_types=[ 347 ], 348 options=None, 349 is_extendable=False, 350 syntax='proto3', 351 extension_ranges=[], 352 oneofs=[ 353 ], 354 serialized_start=841, 355 serialized_end=869, 356 ) 357 358 359 _QUERYSTATECLOSE = _descriptor.Descriptor( 360 name='QueryStateClose', 361 full_name='protos.QueryStateClose', 362 filename=None, 363 file=DESCRIPTOR, 364 containing_type=None, 365 fields=[ 366 _descriptor.FieldDescriptor( 367 name='id', full_name='protos.QueryStateClose.id', index=0, 368 number=1, type=9, cpp_type=9, label=1, 369 has_default_value=False, default_value=_b("").decode('utf-8'), 370 message_type=None, enum_type=None, containing_type=None, 371 is_extension=False, extension_scope=None, 372 options=None), 373 ], 374 extensions=[ 375 ], 376 nested_types=[], 377 enum_types=[ 378 ], 379 options=None, 380 is_extendable=False, 381 syntax='proto3', 382 extension_ranges=[], 383 oneofs=[ 384 ], 385 serialized_start=871, 386 serialized_end=900, 387 ) 388 389 390 _QUERYSTATEKEYVALUE = _descriptor.Descriptor( 391 name='QueryStateKeyValue', 392 full_name='protos.QueryStateKeyValue', 393 filename=None, 394 file=DESCRIPTOR, 395 containing_type=None, 396 fields=[ 397 _descriptor.FieldDescriptor( 398 name='key', full_name='protos.QueryStateKeyValue.key', index=0, 399 number=1, type=9, cpp_type=9, label=1, 400 has_default_value=False, default_value=_b("").decode('utf-8'), 401 message_type=None, enum_type=None, containing_type=None, 402 is_extension=False, extension_scope=None, 403 options=None), 404 _descriptor.FieldDescriptor( 405 name='value', full_name='protos.QueryStateKeyValue.value', index=1, 406 number=2, type=12, cpp_type=9, label=1, 407 has_default_value=False, default_value=_b(""), 408 message_type=None, enum_type=None, containing_type=None, 409 is_extension=False, extension_scope=None, 410 options=None), 411 ], 412 extensions=[ 413 ], 414 nested_types=[], 415 enum_types=[ 416 ], 417 options=None, 418 is_extendable=False, 419 syntax='proto3', 420 extension_ranges=[], 421 oneofs=[ 422 ], 423 serialized_start=902, 424 serialized_end=950, 425 ) 426 427 428 _QUERYSTATERESPONSE = _descriptor.Descriptor( 429 name='QueryStateResponse', 430 full_name='protos.QueryStateResponse', 431 filename=None, 432 file=DESCRIPTOR, 433 containing_type=None, 434 fields=[ 435 _descriptor.FieldDescriptor( 436 name='keys_and_values', full_name='protos.QueryStateResponse.keys_and_values', index=0, 437 number=1, type=11, cpp_type=10, label=3, 438 has_default_value=False, default_value=[], 439 message_type=None, enum_type=None, containing_type=None, 440 is_extension=False, extension_scope=None, 441 options=None), 442 _descriptor.FieldDescriptor( 443 name='has_more', full_name='protos.QueryStateResponse.has_more', index=1, 444 number=2, type=8, cpp_type=7, label=1, 445 has_default_value=False, default_value=False, 446 message_type=None, enum_type=None, containing_type=None, 447 is_extension=False, extension_scope=None, 448 options=None), 449 _descriptor.FieldDescriptor( 450 name='id', full_name='protos.QueryStateResponse.id', index=2, 451 number=3, type=9, cpp_type=9, label=1, 452 has_default_value=False, default_value=_b("").decode('utf-8'), 453 message_type=None, enum_type=None, containing_type=None, 454 is_extension=False, extension_scope=None, 455 options=None), 456 ], 457 extensions=[ 458 ], 459 nested_types=[], 460 enum_types=[ 461 ], 462 options=None, 463 is_extendable=False, 464 syntax='proto3', 465 extension_ranges=[], 466 oneofs=[ 467 ], 468 serialized_start=952, 469 serialized_end=1055, 470 ) 471 472 _CHAINCODEMESSAGE.fields_by_name['type'].enum_type = _CHAINCODEMESSAGE_TYPE 473 _CHAINCODEMESSAGE.fields_by_name['timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP 474 _CHAINCODEMESSAGE.fields_by_name['proposal'].message_type = peer_dot_proposal__pb2._PROPOSAL 475 _CHAINCODEMESSAGE.fields_by_name['chaincode_event'].message_type = peer_dot_chaincode__event__pb2._CHAINCODEEVENT 476 _CHAINCODEMESSAGE_TYPE.containing_type = _CHAINCODEMESSAGE 477 _QUERYSTATERESPONSE.fields_by_name['keys_and_values'].message_type = _QUERYSTATEKEYVALUE 478 DESCRIPTOR.message_types_by_name['ChaincodeMessage'] = _CHAINCODEMESSAGE 479 DESCRIPTOR.message_types_by_name['PutStateInfo'] = _PUTSTATEINFO 480 DESCRIPTOR.message_types_by_name['GetStateByRange'] = _GETSTATEBYRANGE 481 DESCRIPTOR.message_types_by_name['GetQueryResult'] = _GETQUERYRESULT 482 DESCRIPTOR.message_types_by_name['GetHistoryForKey'] = _GETHISTORYFORKEY 483 DESCRIPTOR.message_types_by_name['QueryStateNext'] = _QUERYSTATENEXT 484 DESCRIPTOR.message_types_by_name['QueryStateClose'] = _QUERYSTATECLOSE 485 DESCRIPTOR.message_types_by_name['QueryStateKeyValue'] = _QUERYSTATEKEYVALUE 486 DESCRIPTOR.message_types_by_name['QueryStateResponse'] = _QUERYSTATERESPONSE 487 488 ChaincodeMessage = _reflection.GeneratedProtocolMessageType('ChaincodeMessage', (_message.Message,), dict( 489 DESCRIPTOR = _CHAINCODEMESSAGE, 490 __module__ = 'peer.chaincode_shim_pb2' 491 # @@protoc_insertion_point(class_scope:protos.ChaincodeMessage) 492 )) 493 _sym_db.RegisterMessage(ChaincodeMessage) 494 495 PutStateInfo = _reflection.GeneratedProtocolMessageType('PutStateInfo', (_message.Message,), dict( 496 DESCRIPTOR = _PUTSTATEINFO, 497 __module__ = 'peer.chaincode_shim_pb2' 498 # @@protoc_insertion_point(class_scope:protos.PutStateInfo) 499 )) 500 _sym_db.RegisterMessage(PutStateInfo) 501 502 GetStateByRange = _reflection.GeneratedProtocolMessageType('GetStateByRange', (_message.Message,), dict( 503 DESCRIPTOR = _GETSTATEBYRANGE, 504 __module__ = 'peer.chaincode_shim_pb2' 505 # @@protoc_insertion_point(class_scope:protos.GetStateByRange) 506 )) 507 _sym_db.RegisterMessage(GetStateByRange) 508 509 GetQueryResult = _reflection.GeneratedProtocolMessageType('GetQueryResult', (_message.Message,), dict( 510 DESCRIPTOR = _GETQUERYRESULT, 511 __module__ = 'peer.chaincode_shim_pb2' 512 # @@protoc_insertion_point(class_scope:protos.GetQueryResult) 513 )) 514 _sym_db.RegisterMessage(GetQueryResult) 515 516 GetHistoryForKey = _reflection.GeneratedProtocolMessageType('GetHistoryForKey', (_message.Message,), dict( 517 DESCRIPTOR = _GETHISTORYFORKEY, 518 __module__ = 'peer.chaincode_shim_pb2' 519 # @@protoc_insertion_point(class_scope:protos.GetHistoryForKey) 520 )) 521 _sym_db.RegisterMessage(GetHistoryForKey) 522 523 QueryStateNext = _reflection.GeneratedProtocolMessageType('QueryStateNext', (_message.Message,), dict( 524 DESCRIPTOR = _QUERYSTATENEXT, 525 __module__ = 'peer.chaincode_shim_pb2' 526 # @@protoc_insertion_point(class_scope:protos.QueryStateNext) 527 )) 528 _sym_db.RegisterMessage(QueryStateNext) 529 530 QueryStateClose = _reflection.GeneratedProtocolMessageType('QueryStateClose', (_message.Message,), dict( 531 DESCRIPTOR = _QUERYSTATECLOSE, 532 __module__ = 'peer.chaincode_shim_pb2' 533 # @@protoc_insertion_point(class_scope:protos.QueryStateClose) 534 )) 535 _sym_db.RegisterMessage(QueryStateClose) 536 537 QueryStateKeyValue = _reflection.GeneratedProtocolMessageType('QueryStateKeyValue', (_message.Message,), dict( 538 DESCRIPTOR = _QUERYSTATEKEYVALUE, 539 __module__ = 'peer.chaincode_shim_pb2' 540 # @@protoc_insertion_point(class_scope:protos.QueryStateKeyValue) 541 )) 542 _sym_db.RegisterMessage(QueryStateKeyValue) 543 544 QueryStateResponse = _reflection.GeneratedProtocolMessageType('QueryStateResponse', (_message.Message,), dict( 545 DESCRIPTOR = _QUERYSTATERESPONSE, 546 __module__ = 'peer.chaincode_shim_pb2' 547 # @@protoc_insertion_point(class_scope:protos.QueryStateResponse) 548 )) 549 _sym_db.RegisterMessage(QueryStateResponse) 550 551 552 DESCRIPTOR.has_options = True 553 DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\"org.hyperledger.fabric.protos.peerZ)github.com/hyperledger/fabric/protos/peer')) 554 try: 555 # THESE ELEMENTS WILL BE DEPRECATED. 556 # Please use the generated *_pb2_grpc.py files instead. 557 import grpc 558 from grpc.framework.common import cardinality 559 from grpc.framework.interfaces.face import utilities as face_utilities 560 from grpc.beta import implementations as beta_implementations 561 from grpc.beta import interfaces as beta_interfaces 562 563 564 class ChaincodeSupportStub(object): 565 """Interface that provides support to chaincode execution. ChaincodeContext 566 provides the context necessary for the server to respond appropriately. 567 """ 568 569 def __init__(self, channel): 570 """Constructor. 571 572 Args: 573 channel: A grpc.Channel. 574 """ 575 self.Register = channel.stream_stream( 576 '/protos.ChaincodeSupport/Register', 577 request_serializer=ChaincodeMessage.SerializeToString, 578 response_deserializer=ChaincodeMessage.FromString, 579 ) 580 581 582 class ChaincodeSupportServicer(object): 583 """Interface that provides support to chaincode execution. ChaincodeContext 584 provides the context necessary for the server to respond appropriately. 585 """ 586 587 def Register(self, request_iterator, context): 588 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 589 context.set_details('Method not implemented!') 590 raise NotImplementedError('Method not implemented!') 591 592 593 def add_ChaincodeSupportServicer_to_server(servicer, server): 594 rpc_method_handlers = { 595 'Register': grpc.stream_stream_rpc_method_handler( 596 servicer.Register, 597 request_deserializer=ChaincodeMessage.FromString, 598 response_serializer=ChaincodeMessage.SerializeToString, 599 ), 600 } 601 generic_handler = grpc.method_handlers_generic_handler( 602 'protos.ChaincodeSupport', rpc_method_handlers) 603 server.add_generic_rpc_handlers((generic_handler,)) 604 605 606 class BetaChaincodeSupportServicer(object): 607 """The Beta API is deprecated for 0.15.0 and later. 608 609 It is recommended to use the GA API (classes and functions in this 610 file not marked beta) for all further purposes. This class was generated 611 only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" 612 """Interface that provides support to chaincode execution. ChaincodeContext 613 provides the context necessary for the server to respond appropriately. 614 """ 615 def Register(self, request_iterator, context): 616 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) 617 618 619 class BetaChaincodeSupportStub(object): 620 """The Beta API is deprecated for 0.15.0 and later. 621 622 It is recommended to use the GA API (classes and functions in this 623 file not marked beta) for all further purposes. This class was generated 624 only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" 625 """Interface that provides support to chaincode execution. ChaincodeContext 626 provides the context necessary for the server to respond appropriately. 627 """ 628 def Register(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None): 629 raise NotImplementedError() 630 631 632 def beta_create_ChaincodeSupport_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): 633 """The Beta API is deprecated for 0.15.0 and later. 634 635 It is recommended to use the GA API (classes and functions in this 636 file not marked beta) for all further purposes. This function was 637 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" 638 request_deserializers = { 639 ('protos.ChaincodeSupport', 'Register'): ChaincodeMessage.FromString, 640 } 641 response_serializers = { 642 ('protos.ChaincodeSupport', 'Register'): ChaincodeMessage.SerializeToString, 643 } 644 method_implementations = { 645 ('protos.ChaincodeSupport', 'Register'): face_utilities.stream_stream_inline(servicer.Register), 646 } 647 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) 648 return beta_implementations.server(method_implementations, options=server_options) 649 650 651 def beta_create_ChaincodeSupport_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): 652 """The Beta API is deprecated for 0.15.0 and later. 653 654 It is recommended to use the GA API (classes and functions in this 655 file not marked beta) for all further purposes. This function was 656 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" 657 request_serializers = { 658 ('protos.ChaincodeSupport', 'Register'): ChaincodeMessage.SerializeToString, 659 } 660 response_deserializers = { 661 ('protos.ChaincodeSupport', 'Register'): ChaincodeMessage.FromString, 662 } 663 cardinalities = { 664 'Register': cardinality.Cardinality.STREAM_STREAM, 665 } 666 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) 667 return beta_implementations.dynamic_stub(channel, 'protos.ChaincodeSupport', cardinalities, options=stub_options) 668 except ImportError: 669 pass 670 # @@protoc_insertion_point(module_scope)