github.com/leonlxy/hyperledger@v1.0.0-alpha.0.20170427033203-34922035d248/bddtests/peer/peer_pb2.py (about) 1 # Generated by the protocol buffer compiler. DO NOT EDIT! 2 # source: peer/peer.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 proposal_pb2 as peer_dot_proposal__pb2 17 from peer import proposal_response_pb2 as peer_dot_proposal__response__pb2 18 19 20 DESCRIPTOR = _descriptor.FileDescriptor( 21 name='peer/peer.proto', 22 package='protos', 23 syntax='proto3', 24 serialized_pb=_b('\n\x0fpeer/peer.proto\x12\x06protos\x1a\x13peer/proposal.proto\x1a\x1cpeer/proposal_response.proto\"\x16\n\x06PeerID\x12\x0c\n\x04name\x18\x01 \x01(\t\";\n\x0cPeerEndpoint\x12\x1a\n\x02id\x18\x01 \x01(\x0b\x32\x0e.protos.PeerID\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t2Q\n\x08\x45ndorser\x12\x45\n\x0fProcessProposal\x12\x16.protos.SignedProposal\x1a\x18.protos.ProposalResponse\"\x00\x42O\n\"org.hyperledger.fabric.protos.peerZ)github.com/hyperledger/fabric/protos/peerb\x06proto3') 25 , 26 dependencies=[peer_dot_proposal__pb2.DESCRIPTOR,peer_dot_proposal__response__pb2.DESCRIPTOR,]) 27 _sym_db.RegisterFileDescriptor(DESCRIPTOR) 28 29 30 31 32 _PEERID = _descriptor.Descriptor( 33 name='PeerID', 34 full_name='protos.PeerID', 35 filename=None, 36 file=DESCRIPTOR, 37 containing_type=None, 38 fields=[ 39 _descriptor.FieldDescriptor( 40 name='name', full_name='protos.PeerID.name', index=0, 41 number=1, type=9, cpp_type=9, label=1, 42 has_default_value=False, default_value=_b("").decode('utf-8'), 43 message_type=None, enum_type=None, containing_type=None, 44 is_extension=False, extension_scope=None, 45 options=None), 46 ], 47 extensions=[ 48 ], 49 nested_types=[], 50 enum_types=[ 51 ], 52 options=None, 53 is_extendable=False, 54 syntax='proto3', 55 extension_ranges=[], 56 oneofs=[ 57 ], 58 serialized_start=78, 59 serialized_end=100, 60 ) 61 62 63 _PEERENDPOINT = _descriptor.Descriptor( 64 name='PeerEndpoint', 65 full_name='protos.PeerEndpoint', 66 filename=None, 67 file=DESCRIPTOR, 68 containing_type=None, 69 fields=[ 70 _descriptor.FieldDescriptor( 71 name='id', full_name='protos.PeerEndpoint.id', index=0, 72 number=1, type=11, cpp_type=10, label=1, 73 has_default_value=False, default_value=None, 74 message_type=None, enum_type=None, containing_type=None, 75 is_extension=False, extension_scope=None, 76 options=None), 77 _descriptor.FieldDescriptor( 78 name='address', full_name='protos.PeerEndpoint.address', index=1, 79 number=2, type=9, cpp_type=9, label=1, 80 has_default_value=False, default_value=_b("").decode('utf-8'), 81 message_type=None, enum_type=None, containing_type=None, 82 is_extension=False, extension_scope=None, 83 options=None), 84 ], 85 extensions=[ 86 ], 87 nested_types=[], 88 enum_types=[ 89 ], 90 options=None, 91 is_extendable=False, 92 syntax='proto3', 93 extension_ranges=[], 94 oneofs=[ 95 ], 96 serialized_start=102, 97 serialized_end=161, 98 ) 99 100 _PEERENDPOINT.fields_by_name['id'].message_type = _PEERID 101 DESCRIPTOR.message_types_by_name['PeerID'] = _PEERID 102 DESCRIPTOR.message_types_by_name['PeerEndpoint'] = _PEERENDPOINT 103 104 PeerID = _reflection.GeneratedProtocolMessageType('PeerID', (_message.Message,), dict( 105 DESCRIPTOR = _PEERID, 106 __module__ = 'peer.peer_pb2' 107 # @@protoc_insertion_point(class_scope:protos.PeerID) 108 )) 109 _sym_db.RegisterMessage(PeerID) 110 111 PeerEndpoint = _reflection.GeneratedProtocolMessageType('PeerEndpoint', (_message.Message,), dict( 112 DESCRIPTOR = _PEERENDPOINT, 113 __module__ = 'peer.peer_pb2' 114 # @@protoc_insertion_point(class_scope:protos.PeerEndpoint) 115 )) 116 _sym_db.RegisterMessage(PeerEndpoint) 117 118 119 DESCRIPTOR.has_options = True 120 DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\"org.hyperledger.fabric.protos.peerZ)github.com/hyperledger/fabric/protos/peer')) 121 try: 122 # THESE ELEMENTS WILL BE DEPRECATED. 123 # Please use the generated *_pb2_grpc.py files instead. 124 import grpc 125 from grpc.framework.common import cardinality 126 from grpc.framework.interfaces.face import utilities as face_utilities 127 from grpc.beta import implementations as beta_implementations 128 from grpc.beta import interfaces as beta_interfaces 129 130 131 class EndorserStub(object): 132 133 def __init__(self, channel): 134 """Constructor. 135 136 Args: 137 channel: A grpc.Channel. 138 """ 139 self.ProcessProposal = channel.unary_unary( 140 '/protos.Endorser/ProcessProposal', 141 request_serializer=peer_dot_proposal__pb2.SignedProposal.SerializeToString, 142 response_deserializer=peer_dot_proposal__response__pb2.ProposalResponse.FromString, 143 ) 144 145 146 class EndorserServicer(object): 147 148 def ProcessProposal(self, request, context): 149 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 150 context.set_details('Method not implemented!') 151 raise NotImplementedError('Method not implemented!') 152 153 154 def add_EndorserServicer_to_server(servicer, server): 155 rpc_method_handlers = { 156 'ProcessProposal': grpc.unary_unary_rpc_method_handler( 157 servicer.ProcessProposal, 158 request_deserializer=peer_dot_proposal__pb2.SignedProposal.FromString, 159 response_serializer=peer_dot_proposal__response__pb2.ProposalResponse.SerializeToString, 160 ), 161 } 162 generic_handler = grpc.method_handlers_generic_handler( 163 'protos.Endorser', rpc_method_handlers) 164 server.add_generic_rpc_handlers((generic_handler,)) 165 166 167 class BetaEndorserServicer(object): 168 """The Beta API is deprecated for 0.15.0 and later. 169 170 It is recommended to use the GA API (classes and functions in this 171 file not marked beta) for all further purposes. This class was generated 172 only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" 173 def ProcessProposal(self, request, context): 174 context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) 175 176 177 class BetaEndorserStub(object): 178 """The Beta API is deprecated for 0.15.0 and later. 179 180 It is recommended to use the GA API (classes and functions in this 181 file not marked beta) for all further purposes. This class was generated 182 only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" 183 def ProcessProposal(self, request, timeout, metadata=None, with_call=False, protocol_options=None): 184 raise NotImplementedError() 185 ProcessProposal.future = None 186 187 188 def beta_create_Endorser_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): 189 """The Beta API is deprecated for 0.15.0 and later. 190 191 It is recommended to use the GA API (classes and functions in this 192 file not marked beta) for all further purposes. This function was 193 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" 194 request_deserializers = { 195 ('protos.Endorser', 'ProcessProposal'): peer_dot_proposal__pb2.SignedProposal.FromString, 196 } 197 response_serializers = { 198 ('protos.Endorser', 'ProcessProposal'): peer_dot_proposal__response__pb2.ProposalResponse.SerializeToString, 199 } 200 method_implementations = { 201 ('protos.Endorser', 'ProcessProposal'): face_utilities.unary_unary_inline(servicer.ProcessProposal), 202 } 203 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) 204 return beta_implementations.server(method_implementations, options=server_options) 205 206 207 def beta_create_Endorser_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): 208 """The Beta API is deprecated for 0.15.0 and later. 209 210 It is recommended to use the GA API (classes and functions in this 211 file not marked beta) for all further purposes. This function was 212 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" 213 request_serializers = { 214 ('protos.Endorser', 'ProcessProposal'): peer_dot_proposal__pb2.SignedProposal.SerializeToString, 215 } 216 response_deserializers = { 217 ('protos.Endorser', 'ProcessProposal'): peer_dot_proposal__response__pb2.ProposalResponse.FromString, 218 } 219 cardinalities = { 220 'ProcessProposal': cardinality.Cardinality.UNARY_UNARY, 221 } 222 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) 223 return beta_implementations.dynamic_stub(channel, 'protos.Endorser', cardinalities, options=stub_options) 224 except ImportError: 225 pass 226 # @@protoc_insertion_point(module_scope)