224 lines
7.1 KiB
Python
224 lines
7.1 KiB
Python
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
|
from google.protobuf import descriptor
|
|
from google.protobuf import message
|
|
from google.protobuf import reflection
|
|
from google.protobuf import descriptor_pb2
|
|
# @@protoc_insertion_point(imports)
|
|
|
|
|
|
|
|
DESCRIPTOR = descriptor.FileDescriptor(
|
|
name='addressbook.proto',
|
|
package='tutorial',
|
|
serialized_pb='\n\x11\x61\x64\x64ressbook.proto\x12\x08tutorial\"\x80\x02\n\x06Person\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\n\n\x02id\x18\x02 \x02(\x05\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12$\n\x04type\x18\x04 \x01(\x0e\x32\x10.tutorial.Gender:\x04NONE\x12+\n\x05phone\x18\x05 \x03(\x0b\x32\x1c.tutorial.Person.PhoneNumber\x1aM\n\x0bPhoneNumber\x12\x0e\n\x06number\x18\x01 \x02(\t\x12.\n\x04type\x18\x02 \x01(\x0e\x32\x1a.tutorial.Person.PhoneType:\x04HOME\"+\n\tPhoneType\x12\n\n\x06MOBILE\x10\x00\x12\x08\n\x04HOME\x10\x01\x12\x08\n\x04WORK\x10\x02\"/\n\x0b\x41\x64\x64ressBook\x12 \n\x06person\x18\x01 \x03(\x0b\x32\x10.tutorial.Person*3\n\x06Gender\x12\x08\n\x04NONE\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\t\n\x05OTHER\x10\x03')
|
|
|
|
_GENDER = descriptor.EnumDescriptor(
|
|
name='Gender',
|
|
full_name='tutorial.Gender',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
descriptor.EnumValueDescriptor(
|
|
name='NONE', index=0, number=0,
|
|
options=None,
|
|
type=None),
|
|
descriptor.EnumValueDescriptor(
|
|
name='MALE', index=1, number=1,
|
|
options=None,
|
|
type=None),
|
|
descriptor.EnumValueDescriptor(
|
|
name='FEMALE', index=2, number=2,
|
|
options=None,
|
|
type=None),
|
|
descriptor.EnumValueDescriptor(
|
|
name='OTHER', index=3, number=3,
|
|
options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
options=None,
|
|
serialized_start=339,
|
|
serialized_end=390,
|
|
)
|
|
|
|
|
|
NONE = 0
|
|
MALE = 1
|
|
FEMALE = 2
|
|
OTHER = 3
|
|
|
|
|
|
_PERSON_PHONETYPE = descriptor.EnumDescriptor(
|
|
name='PhoneType',
|
|
full_name='tutorial.Person.PhoneType',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
values=[
|
|
descriptor.EnumValueDescriptor(
|
|
name='MOBILE', index=0, number=0,
|
|
options=None,
|
|
type=None),
|
|
descriptor.EnumValueDescriptor(
|
|
name='HOME', index=1, number=1,
|
|
options=None,
|
|
type=None),
|
|
descriptor.EnumValueDescriptor(
|
|
name='WORK', index=2, number=2,
|
|
options=None,
|
|
type=None),
|
|
],
|
|
containing_type=None,
|
|
options=None,
|
|
serialized_start=245,
|
|
serialized_end=288,
|
|
)
|
|
|
|
|
|
_PERSON_PHONENUMBER = descriptor.Descriptor(
|
|
name='PhoneNumber',
|
|
full_name='tutorial.Person.PhoneNumber',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
descriptor.FieldDescriptor(
|
|
name='number', full_name='tutorial.Person.PhoneNumber.number', index=0,
|
|
number=1, type=9, cpp_type=9, label=2,
|
|
has_default_value=False, default_value=unicode("", "utf-8"),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
descriptor.FieldDescriptor(
|
|
name='type', full_name='tutorial.Person.PhoneNumber.type', index=1,
|
|
number=2, type=14, cpp_type=8, label=1,
|
|
has_default_value=True, default_value=1,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
options=None,
|
|
is_extendable=False,
|
|
extension_ranges=[],
|
|
serialized_start=166,
|
|
serialized_end=243,
|
|
)
|
|
|
|
_PERSON = descriptor.Descriptor(
|
|
name='Person',
|
|
full_name='tutorial.Person',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
descriptor.FieldDescriptor(
|
|
name='name', full_name='tutorial.Person.name', index=0,
|
|
number=1, type=9, cpp_type=9, label=2,
|
|
has_default_value=False, default_value=unicode("", "utf-8"),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
descriptor.FieldDescriptor(
|
|
name='id', full_name='tutorial.Person.id', index=1,
|
|
number=2, type=5, cpp_type=1, label=2,
|
|
has_default_value=False, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
descriptor.FieldDescriptor(
|
|
name='email', full_name='tutorial.Person.email', index=2,
|
|
number=3, type=9, cpp_type=9, label=1,
|
|
has_default_value=False, default_value=unicode("", "utf-8"),
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
descriptor.FieldDescriptor(
|
|
name='type', full_name='tutorial.Person.type', index=3,
|
|
number=4, type=14, cpp_type=8, label=1,
|
|
has_default_value=True, default_value=0,
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
descriptor.FieldDescriptor(
|
|
name='phone', full_name='tutorial.Person.phone', index=4,
|
|
number=5, type=11, cpp_type=10, label=3,
|
|
has_default_value=False, default_value=[],
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[_PERSON_PHONENUMBER, ],
|
|
enum_types=[
|
|
_PERSON_PHONETYPE,
|
|
],
|
|
options=None,
|
|
is_extendable=False,
|
|
extension_ranges=[],
|
|
serialized_start=32,
|
|
serialized_end=288,
|
|
)
|
|
|
|
|
|
_ADDRESSBOOK = descriptor.Descriptor(
|
|
name='AddressBook',
|
|
full_name='tutorial.AddressBook',
|
|
filename=None,
|
|
file=DESCRIPTOR,
|
|
containing_type=None,
|
|
fields=[
|
|
descriptor.FieldDescriptor(
|
|
name='person', full_name='tutorial.AddressBook.person', index=0,
|
|
number=1, type=11, cpp_type=10, label=3,
|
|
has_default_value=False, default_value=[],
|
|
message_type=None, enum_type=None, containing_type=None,
|
|
is_extension=False, extension_scope=None,
|
|
options=None),
|
|
],
|
|
extensions=[
|
|
],
|
|
nested_types=[],
|
|
enum_types=[
|
|
],
|
|
options=None,
|
|
is_extendable=False,
|
|
extension_ranges=[],
|
|
serialized_start=290,
|
|
serialized_end=337,
|
|
)
|
|
|
|
_PERSON_PHONENUMBER.fields_by_name['type'].enum_type = _PERSON_PHONETYPE
|
|
_PERSON_PHONENUMBER.containing_type = _PERSON;
|
|
_PERSON.fields_by_name['type'].enum_type = _GENDER
|
|
_PERSON.fields_by_name['phone'].message_type = _PERSON_PHONENUMBER
|
|
_PERSON_PHONETYPE.containing_type = _PERSON;
|
|
_ADDRESSBOOK.fields_by_name['person'].message_type = _PERSON
|
|
DESCRIPTOR.message_types_by_name['Person'] = _PERSON
|
|
DESCRIPTOR.message_types_by_name['AddressBook'] = _ADDRESSBOOK
|
|
|
|
class Person(message.Message):
|
|
__metaclass__ = reflection.GeneratedProtocolMessageType
|
|
|
|
class PhoneNumber(message.Message):
|
|
__metaclass__ = reflection.GeneratedProtocolMessageType
|
|
DESCRIPTOR = _PERSON_PHONENUMBER
|
|
|
|
# @@protoc_insertion_point(class_scope:tutorial.Person.PhoneNumber)
|
|
DESCRIPTOR = _PERSON
|
|
|
|
# @@protoc_insertion_point(class_scope:tutorial.Person)
|
|
|
|
class AddressBook(message.Message):
|
|
__metaclass__ = reflection.GeneratedProtocolMessageType
|
|
DESCRIPTOR = _ADDRESSBOOK
|
|
|
|
# @@protoc_insertion_point(class_scope:tutorial.AddressBook)
|
|
|
|
# @@protoc_insertion_point(module_scope)
|