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 | |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 16 | from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 17 | |
| 18 | |
| 19 | DESCRIPTOR = _descriptor.FileDescriptor( |
| 20 | name='schema.proto', |
| 21 | package='schema', |
| 22 | syntax='proto3', |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame^] | 23 | serialized_pb=_b('\n\x0cschema.proto\x12\x06schema\x1a\x1bgoogle/protobuf/empty.proto\"A\n\tProtoFile\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12\r\n\x05proto\x18\x02 \x01(\t\x12\x12\n\ndescriptor\x18\x03 \x01(\x0c\"B\n\x07Schemas\x12!\n\x06protos\x18\x01 \x03(\x0b\x32\x11.schema.ProtoFile\x12\x14\n\x0cswagger_from\x18\x02 \x01(\t2G\n\rSchemaService\x12\x36\n\tGetSchema\x12\x16.google.protobuf.Empty\x1a\x0f.schema.Schemas\"\x00\x62\x06proto3') |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 24 | , |
| 25 | dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,]) |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 26 | _sym_db.RegisterFileDescriptor(DESCRIPTOR) |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 31 | _PROTOFILE = _descriptor.Descriptor( |
| 32 | name='ProtoFile', |
| 33 | full_name='schema.ProtoFile', |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 34 | filename=None, |
| 35 | file=DESCRIPTOR, |
| 36 | containing_type=None, |
| 37 | fields=[ |
| 38 | _descriptor.FieldDescriptor( |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 39 | name='file_name', full_name='schema.ProtoFile.file_name', index=0, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 40 | number=1, type=9, cpp_type=9, label=1, |
| 41 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 42 | message_type=None, enum_type=None, containing_type=None, |
| 43 | is_extension=False, extension_scope=None, |
| 44 | options=None), |
| 45 | _descriptor.FieldDescriptor( |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 46 | name='proto', full_name='schema.ProtoFile.proto', index=1, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 47 | number=2, type=9, cpp_type=9, label=1, |
| 48 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 49 | message_type=None, enum_type=None, containing_type=None, |
| 50 | is_extension=False, extension_scope=None, |
| 51 | options=None), |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 52 | _descriptor.FieldDescriptor( |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 53 | name='descriptor', full_name='schema.ProtoFile.descriptor', index=2, |
| 54 | number=3, type=12, cpp_type=9, label=1, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 55 | has_default_value=False, default_value=_b(""), |
| 56 | message_type=None, enum_type=None, containing_type=None, |
| 57 | is_extension=False, extension_scope=None, |
| 58 | options=None), |
| 59 | ], |
| 60 | extensions=[ |
| 61 | ], |
| 62 | nested_types=[], |
| 63 | enum_types=[ |
| 64 | ], |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 65 | options=None, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 66 | is_extendable=False, |
| 67 | syntax='proto3', |
| 68 | extension_ranges=[], |
| 69 | oneofs=[ |
| 70 | ], |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 71 | serialized_start=53, |
| 72 | serialized_end=118, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 73 | ) |
| 74 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 75 | |
| 76 | _SCHEMAS = _descriptor.Descriptor( |
| 77 | name='Schemas', |
| 78 | full_name='schema.Schemas', |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 79 | filename=None, |
| 80 | file=DESCRIPTOR, |
| 81 | containing_type=None, |
| 82 | fields=[ |
| 83 | _descriptor.FieldDescriptor( |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 84 | name='protos', full_name='schema.Schemas.protos', index=0, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 85 | number=1, type=11, cpp_type=10, label=3, |
| 86 | has_default_value=False, default_value=[], |
| 87 | message_type=None, enum_type=None, containing_type=None, |
| 88 | is_extension=False, extension_scope=None, |
| 89 | options=None), |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame^] | 90 | _descriptor.FieldDescriptor( |
| 91 | name='swagger_from', full_name='schema.Schemas.swagger_from', index=1, |
| 92 | number=2, type=9, cpp_type=9, label=1, |
| 93 | has_default_value=False, default_value=_b("").decode('utf-8'), |
| 94 | message_type=None, enum_type=None, containing_type=None, |
| 95 | is_extension=False, extension_scope=None, |
| 96 | options=None), |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 97 | ], |
| 98 | extensions=[ |
| 99 | ], |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 100 | nested_types=[], |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 101 | enum_types=[ |
| 102 | ], |
| 103 | options=None, |
| 104 | is_extendable=False, |
| 105 | syntax='proto3', |
| 106 | extension_ranges=[], |
| 107 | oneofs=[ |
| 108 | ], |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 109 | serialized_start=120, |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame^] | 110 | serialized_end=186, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 111 | ) |
| 112 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 113 | _SCHEMAS.fields_by_name['protos'].message_type = _PROTOFILE |
| 114 | DESCRIPTOR.message_types_by_name['ProtoFile'] = _PROTOFILE |
| 115 | DESCRIPTOR.message_types_by_name['Schemas'] = _SCHEMAS |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 116 | |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 117 | ProtoFile = _reflection.GeneratedProtocolMessageType('ProtoFile', (_message.Message,), dict( |
| 118 | DESCRIPTOR = _PROTOFILE, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 119 | __module__ = 'schema_pb2' |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 120 | # @@protoc_insertion_point(class_scope:schema.ProtoFile) |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 121 | )) |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 122 | _sym_db.RegisterMessage(ProtoFile) |
| 123 | |
| 124 | Schemas = _reflection.GeneratedProtocolMessageType('Schemas', (_message.Message,), dict( |
| 125 | DESCRIPTOR = _SCHEMAS, |
| 126 | __module__ = 'schema_pb2' |
| 127 | # @@protoc_insertion_point(class_scope:schema.Schemas) |
| 128 | )) |
| 129 | _sym_db.RegisterMessage(Schemas) |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 130 | |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 131 | |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 132 | import grpc |
| 133 | from grpc.beta import implementations as beta_implementations |
| 134 | from grpc.beta import interfaces as beta_interfaces |
| 135 | from grpc.framework.common import cardinality |
| 136 | from grpc.framework.interfaces.face import utilities as face_utilities |
| 137 | |
| 138 | |
| 139 | class SchemaServiceStub(object): |
| 140 | """Schema services |
| 141 | """ |
| 142 | |
| 143 | def __init__(self, channel): |
| 144 | """Constructor. |
| 145 | |
| 146 | Args: |
| 147 | channel: A grpc.Channel. |
| 148 | """ |
| 149 | self.GetSchema = channel.unary_unary( |
| 150 | '/schema.SchemaService/GetSchema', |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 151 | request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 152 | response_deserializer=Schemas.FromString, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 153 | ) |
| 154 | |
| 155 | |
| 156 | class SchemaServiceServicer(object): |
| 157 | """Schema services |
| 158 | """ |
| 159 | |
| 160 | def GetSchema(self, request, context): |
| 161 | """Return active grpc schemas |
| 162 | """ |
| 163 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 164 | context.set_details('Method not implemented!') |
| 165 | raise NotImplementedError('Method not implemented!') |
| 166 | |
| 167 | |
| 168 | def add_SchemaServiceServicer_to_server(servicer, server): |
| 169 | rpc_method_handlers = { |
| 170 | 'GetSchema': grpc.unary_unary_rpc_method_handler( |
| 171 | servicer.GetSchema, |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 172 | request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 173 | response_serializer=Schemas.SerializeToString, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 174 | ), |
| 175 | } |
| 176 | generic_handler = grpc.method_handlers_generic_handler( |
| 177 | 'schema.SchemaService', rpc_method_handlers) |
| 178 | server.add_generic_rpc_handlers((generic_handler,)) |
| 179 | |
| 180 | |
| 181 | class BetaSchemaServiceServicer(object): |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame^] | 182 | """The Beta API is deprecated for 0.15.0 and later. |
| 183 | |
| 184 | It is recommended to use the GA API (classes and functions in this |
| 185 | file not marked beta) for all further purposes. This class was generated |
| 186 | only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 187 | """Schema services |
| 188 | """ |
| 189 | def GetSchema(self, request, context): |
| 190 | """Return active grpc schemas |
| 191 | """ |
| 192 | context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) |
| 193 | |
| 194 | |
| 195 | class BetaSchemaServiceStub(object): |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame^] | 196 | """The Beta API is deprecated for 0.15.0 and later. |
| 197 | |
| 198 | It is recommended to use the GA API (classes and functions in this |
| 199 | file not marked beta) for all further purposes. This class was generated |
| 200 | only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 201 | """Schema services |
| 202 | """ |
| 203 | def GetSchema(self, request, timeout, metadata=None, with_call=False, protocol_options=None): |
| 204 | """Return active grpc schemas |
| 205 | """ |
| 206 | raise NotImplementedError() |
| 207 | GetSchema.future = None |
| 208 | |
| 209 | |
| 210 | def beta_create_SchemaService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame^] | 211 | """The Beta API is deprecated for 0.15.0 and later. |
| 212 | |
| 213 | It is recommended to use the GA API (classes and functions in this |
| 214 | file not marked beta) for all further purposes. This function was |
| 215 | generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 216 | request_deserializers = { |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 217 | ('schema.SchemaService', 'GetSchema'): google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 218 | } |
| 219 | response_serializers = { |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 220 | ('schema.SchemaService', 'GetSchema'): Schemas.SerializeToString, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 221 | } |
| 222 | method_implementations = { |
| 223 | ('schema.SchemaService', 'GetSchema'): face_utilities.unary_unary_inline(servicer.GetSchema), |
| 224 | } |
| 225 | 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) |
| 226 | return beta_implementations.server(method_implementations, options=server_options) |
| 227 | |
| 228 | |
| 229 | def beta_create_SchemaService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): |
Zsolt Haraszti | 2198076 | 2016-11-08 10:57:19 -0800 | [diff] [blame^] | 230 | """The Beta API is deprecated for 0.15.0 and later. |
| 231 | |
| 232 | It is recommended to use the GA API (classes and functions in this |
| 233 | file not marked beta) for all further purposes. This function was |
| 234 | generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 235 | request_serializers = { |
Zsolt Haraszti | cba96de | 2016-11-06 14:04:55 -0800 | [diff] [blame] | 236 | ('schema.SchemaService', 'GetSchema'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 237 | } |
| 238 | response_deserializers = { |
Zsolt Haraszti | dca6fa1 | 2016-11-03 16:56:17 -0700 | [diff] [blame] | 239 | ('schema.SchemaService', 'GetSchema'): Schemas.FromString, |
Zsolt Haraszti | 3d55ffc | 2016-10-03 22:26:41 -0700 | [diff] [blame] | 240 | } |
| 241 | cardinalities = { |
| 242 | 'GetSchema': cardinality.Cardinality.UNARY_UNARY, |
| 243 | } |
| 244 | 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) |
| 245 | return beta_implementations.dynamic_stub(channel, 'schema.SchemaService', cardinalities, options=stub_options) |
| 246 | # @@protoc_insertion_point(module_scope) |