diff options
Diffstat (limited to 'generator/proto')
-rw-r--r-- | generator/proto/Makefile | 2 | ||||
-rw-r--r-- | generator/proto/google/protobuf/descriptor.proto | 330 | ||||
-rw-r--r-- | generator/proto/nanopb.proto | 46 | ||||
-rw-r--r-- | generator/proto/nanopb_pb2.py | 226 | ||||
-rw-r--r-- | generator/proto/plugin.proto | 5 | ||||
-rw-r--r-- | generator/proto/plugin_pb2.py | 105 |
6 files changed, 117 insertions, 597 deletions
diff --git a/generator/proto/Makefile b/generator/proto/Makefile index 89bfe52..032392c 100644 --- a/generator/proto/Makefile +++ b/generator/proto/Makefile @@ -1,4 +1,4 @@ all: nanopb_pb2.py plugin_pb2.py %_pb2.py: %.proto - protoc --python_out=. $< + aprotoc --python_out=. $< diff --git a/generator/proto/google/protobuf/descriptor.proto b/generator/proto/google/protobuf/descriptor.proto index 8697a50..a785f79 100644 --- a/generator/proto/google/protobuf/descriptor.proto +++ b/generator/proto/google/protobuf/descriptor.proto @@ -1,6 +1,6 @@ // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ +// http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -37,15 +37,10 @@ // without any other information (e.g. without reading its imports). -syntax = "proto2"; package google.protobuf; -option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor"; option java_package = "com.google.protobuf"; option java_outer_classname = "DescriptorProtos"; -option csharp_namespace = "Google.Protobuf.Reflection"; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; // descriptor.proto must be optimized for speed because reflection-based // algorithms don't work during bootstrapping. @@ -79,14 +74,10 @@ message FileDescriptorProto { optional FileOptions options = 8; // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime + // You may safely remove this entire field whithout harming runtime // functionality of the descriptors -- the information is needed only by // development tools. optional SourceCodeInfo source_code_info = 9; - - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - optional string syntax = 12; } // Describes a message type. @@ -102,34 +93,10 @@ message DescriptorProto { message ExtensionRange { optional int32 start = 1; optional int32 end = 2; - - optional ExtensionRangeOptions options = 3; } repeated ExtensionRange extension_range = 5; - repeated OneofDescriptorProto oneof_decl = 8; - optional MessageOptions options = 7; - - // Range of reserved tag numbers. Reserved tag numbers may not be used by - // fields or extension ranges in the same message. Reserved ranges may - // not overlap. - message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - } - repeated ReservedRange reserved_range = 9; - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - repeated string reserved_name = 10; -} - -message ExtensionRangeOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; } // Describes a field within a message. @@ -150,11 +117,7 @@ message FieldDescriptorProto { TYPE_FIXED32 = 7; TYPE_BOOL = 8; TYPE_STRING = 9; - // Tag-delimited aggregate. - // Group type is deprecated and not supported in proto3. However, Proto3 - // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. - TYPE_GROUP = 10; + TYPE_GROUP = 10; // Tag-delimited aggregate. TYPE_MESSAGE = 11; // Length-delimited aggregate. // New in version 2. @@ -172,6 +135,7 @@ message FieldDescriptorProto { LABEL_OPTIONAL = 1; LABEL_REQUIRED = 2; LABEL_REPEATED = 3; + // TODO(sanjay): Should we add LABEL_MAP? }; optional string name = 1; @@ -179,7 +143,7 @@ message FieldDescriptorProto { optional Label label = 4; // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + // are set, this must be either TYPE_ENUM or TYPE_MESSAGE. optional Type type = 5; // For message and enum types, this is the name of the type. If the name @@ -200,25 +164,9 @@ message FieldDescriptorProto { // TODO(kenton): Base-64 encode? optional string default_value = 7; - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - optional int32 oneof_index = 9; - - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - optional string json_name = 10; - optional FieldOptions options = 8; } -// Describes a oneof. -message OneofDescriptorProto { - optional string name = 1; - optional OneofOptions options = 2; -} - // Describes an enum type. message EnumDescriptorProto { optional string name = 1; @@ -226,26 +174,6 @@ message EnumDescriptorProto { repeated EnumValueDescriptorProto value = 2; optional EnumOptions options = 3; - - // Range of reserved numeric values. Reserved values may not be used by - // entries in the same enum. Reserved ranges may not overlap. - // - // Note that this is distinct from DescriptorProto.ReservedRange in that it - // is inclusive such that it can appropriately represent the entire int32 - // domain. - message EnumReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Inclusive. - } - - // Range of reserved numeric values. Reserved numeric values may not be used - // by enum values in the same enum declaration. Reserved ranges may not - // overlap. - repeated EnumReservedRange reserved_range = 4; - - // Reserved enum value names, which may not be reused. A given name may only - // be reserved once. - repeated string reserved_name = 5; } // Describes a value within an enum. @@ -274,11 +202,6 @@ message MethodDescriptorProto { optional string output_type = 3; optional MethodOptions options = 4; - - // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default=false]; - // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default=false]; } @@ -305,12 +228,12 @@ message MethodDescriptorProto { // * For options which will be published and used publicly by multiple // independent entities, e-mail protobuf-global-extension-registry@google.com // to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options +// Object-C plugin) and your porject website (if available) -- there's no need +// to explain how you intend to use them. Usually you only need one extension +// number. You can declare multiple options with only one extension number by +// putting them in a sub-message. See the Custom Options section of the docs +// for examples: +// http://code.google.com/apis/protocolbuffers/docs/proto.html#options // If this turns out to be popular, a web service will be set up // to automatically assign option numbers. @@ -339,17 +262,11 @@ message FileOptions { // top-level extensions defined in the file. optional bool java_multiple_files = 10 [default=false]; - // This option does nothing. - optional bool java_generate_equals_and_hash = 20 [deprecated=true]; - - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default=false]; - + // If set true, then the Java code generator will generate equals() and + // hashCode() methods for all messages defined in the .proto file. This is + // purely a speed optimization, as the AbstractMessage base class includes + // reflection-based implementations of these methods. + optional bool java_generate_equals_and_hash = 20 [default=false]; // Generated classes can be optimized for speed or code size. enum OptimizeMode { @@ -361,10 +278,7 @@ message FileOptions { optional OptimizeMode optimize_for = 9 [default=SPEED]; // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. + // placed. There is no default. optional string go_package = 11; @@ -373,7 +287,7 @@ message FileOptions { // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. + // early versions of proto2. // // Generic services are now considered deprecated in favor of using plugins // that generate code specific to your particular RPC system. Therefore, @@ -382,50 +296,12 @@ message FileOptions { optional bool cc_generic_services = 16 [default=false]; optional bool java_generic_services = 17 [default=false]; optional bool py_generic_services = 18 [default=false]; - optional bool php_generic_services = 42 [default=false]; - - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default=false]; - - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default=false]; - - - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - optional string objc_class_prefix = 36; - - // Namespace for generated classes; defaults to the package. - optional string csharp_namespace = 37; - // By default Swift generators will take the proto package and CamelCase it - // replacing '.' with underscore and use that to prefix the types/symbols - // defined. When this options is provided, they will use this value instead - // to prefix the types/symbols defined. - optional string swift_prefix = 39; - - // Sets the php class prefix which is prepended to all php generated classes - // from this .proto. Default is empty. - optional string php_class_prefix = 40; - - // Use this option to change the namespace of php generated classes. Default - // is empty. When this option is empty, the package name will be used for - // determining the namespace. - optional string php_namespace = 41; - - // The parser stores options it doesn't recognize here. - // See the documentation for the "Options" section above. + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; - // Clients can define custom options in extensions of this message. - // See the documentation for the "Options" section above. + // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; - - reserved 38; } message MessageOptions { @@ -454,38 +330,6 @@ message MessageOptions { // from proto1 easier; new code should avoid fields named "descriptor". optional bool no_standard_descriptor_accessor = 2 [default=false]; - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default=false]; - - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map<KeyType, ValueType> map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - optional bool map_entry = 7; - - reserved 8; // javalite_serializable - reserved 9; // javanano_as_lite - // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -510,32 +354,10 @@ message FieldOptions { // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. + // a single length-delimited blob. optional bool packed = 2; - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - // is represented as JavaScript string, which avoids loss of precision that - // can happen when a large value is converted to a floating point JavaScript. - // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - // use the JavaScript "number" type. The behavior of the default option - // JS_NORMAL is implementation dependent. - // - // This option is an enum to permit additional types to be added, e.g. - // goog.math.Integer. - optional JSType jstype = 6 [default = JS_NORMAL]; - enum JSType { - // Use the default type. - JS_NORMAL = 0; - - // Use JavaScript strings. - JS_STRING = 1; - - // Use JavaScript numbers. - JS_NUMBER = 2; - } + // Should this field be parsed lazily? Lazy applies only to message-type // fields. It means that when the outer message is initially parsed, the @@ -556,7 +378,7 @@ message FieldOptions { // // // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message + // a lazy sub-message. That is, calling IsInitialized() on the outher message // may return true even if the inner message has missing required fields. // This is necessary because otherwise the inner message would have to be // parsed in order to perform the check, defeating the purpose of lazy @@ -573,20 +395,23 @@ message FieldOptions { // is a formalization for deprecating fields. optional bool deprecated = 3 [default=false]; + // EXPERIMENTAL. DO NOT USE. + // For "map" fields, the name of the field in the enclosed type that + // is the key for this map. For example, suppose we have: + // message Item { + // required string name = 1; + // required string value = 2; + // } + // message Config { + // repeated Item items = 1 [experimental_map_key="name"]; + // } + // In this situation, the map key for Item will be set to "name". + // TODO: Fully-implement this, then remove the "experimental_" prefix. + optional string experimental_map_key = 9; + // For Google-internal migration only. Do not use. optional bool weak = 10 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; - - reserved 4; // removed jtype -} - -message OneofOptions { // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -596,17 +421,9 @@ message OneofOptions { message EnumOptions { - // Set this option to true to allow mapping different tag names to the same + // Set this option to false to disallow mapping different tag names to a same // value. - optional bool allow_alias = 2; - - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - optional bool deprecated = 3 [default=false]; - - reserved 5; // javanano_as_lite + optional bool allow_alias = 2 [default=true]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -616,12 +433,6 @@ message EnumOptions { } message EnumValueOptions { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default=false]; - // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -636,12 +447,6 @@ message ServiceOptions { // we were already using them long before we decided to release Protocol // Buffers. - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - optional bool deprecated = 33 [default=false]; - // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -656,23 +461,6 @@ message MethodOptions { // we were already using them long before we decided to release Protocol // Buffers. - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default=false]; - - // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - // or neither? HTTP based RPC implementation may choose GET verb for safe - // methods, and PUT verb for idempotent methods instead of the default POST. - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; // implies idempotent - IDEMPOTENT = 2; // idempotent, but may have side effects - } - optional IdempotencyLevel idempotency_level = - 34 [default=IDEMPOTENCY_UNKNOWN]; - // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -799,11 +587,6 @@ message SourceCodeInfo { // A series of line comments appearing on consecutive lines, with no other // tokens appearing on those lines, will be treated as a single comment. // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // // Only the comment content is provided; comment markers (e.g. //) are // stripped out. For block comments, leading whitespace and an asterisk // will be stripped from the beginning of each line other than the first. @@ -824,12 +607,6 @@ message SourceCodeInfo { // // Another line attached to qux. // optional double qux = 4; // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // // optional string corge = 5; // /* Block comment attached // * to corge. Leading asterisks @@ -837,36 +614,7 @@ message SourceCodeInfo { // /* Block comment attached to // * grault. */ // optional int32 grault = 6; - // - // // ignored detached comments. optional string leading_comments = 3; optional string trailing_comments = 4; - repeated string leading_detached_comments = 6; - } -} - -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. -message GeneratedCodeInfo { - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - repeated Annotation annotation = 1; - message Annotation { - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - repeated int32 path = 1 [packed=true]; - - // Identifies the filesystem path to the original source .proto. - optional string source_file = 2; - - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - optional int32 begin = 3; - - // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past - // the last relevant byte (so the length of the text = end - begin). - optional int32 end = 4; } } diff --git a/generator/proto/nanopb.proto b/generator/proto/nanopb.proto index 0c05a2b..2be2f80 100644 --- a/generator/proto/nanopb.proto +++ b/generator/proto/nanopb.proto @@ -5,7 +5,6 @@ // These are used by nanopb to generate statically allocable structures // for memory-limited environments. -syntax = "proto2"; import "google/protobuf/descriptor.proto"; option java_package = "fi.kapsi.koti.jpa.nanopb"; @@ -16,15 +15,6 @@ enum FieldType { FT_POINTER = 4; // Always generate a dynamically allocated field. FT_STATIC = 2; // Generate a static field or raise an exception if not possible. FT_IGNORE = 3; // Ignore the field completely. - FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead -} - -enum IntSize { - IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto - IS_8 = 8; - IS_16 = 16; - IS_32 = 32; - IS_64 = 64; } // This is the inner options message, which basically defines options for @@ -32,20 +22,11 @@ enum IntSize { // fields. message NanoPBOptions { // Allocated size for 'bytes' and 'string' fields. - // For string fields, this should include the space for null terminator. optional int32 max_size = 1; - // Maximum length for 'string' fields. Setting this is equivalent - // to setting max_size to a value of length+1. - optional int32 max_length = 14; - // Allocated number of entries in arrays ('repeated' fields) optional int32 max_count = 2; - // Size of integer fields. Can save some memory if you don't need - // full 32 bits for the value. - optional IntSize int_size = 7 [default = IS_DEFAULT]; - // Force type of field (callback or static allocation) optional FieldType type = 3 [default = FT_DEFAULT]; @@ -56,33 +37,6 @@ message NanoPBOptions { // Note: this cannot be used on CPUs that break on unaligned // accesses to variables. optional bool packed_struct = 5 [default = false]; - - // Add 'packed' attribute to generated enums. - optional bool packed_enum = 10 [default = false]; - - // Skip this message - optional bool skip_message = 6 [default = false]; - - // Generate oneof fields as normal optional fields instead of union. - optional bool no_unions = 8 [default = false]; - - // integer type tag for a message - optional uint32 msgid = 9; - - // decode oneof as anonymous union - optional bool anonymous_oneof = 11 [default = false]; - - // Proto3 singular field does not generate a "has_" flag - optional bool proto3 = 12 [default = false]; - - // Generate an enum->string mapping function (can take up lots of space). - optional bool enum_to_string = 13 [default = false]; - - // Generate bytes arrays with fixed length - optional bool fixed_length = 15 [default = false]; - - // Generate repeated field with fixed count - optional bool fixed_count = 16 [default = false]; } // Extensions to protoc 'Descriptor' type in order to define options diff --git a/generator/proto/nanopb_pb2.py b/generator/proto/nanopb_pb2.py index 24215eb..7291eae 100644 --- a/generator/proto/nanopb_pb2.py +++ b/generator/proto/nanopb_pb2.py @@ -1,119 +1,59 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: nanopb.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database +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) -_sym_db = _symbol_database.Default() - -from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( +DESCRIPTOR = descriptor.FileDescriptor( name='nanopb.proto', package='', - syntax='proto2', - serialized_pb=_b('\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto\"\xbf\x03\n\rNanoPBOptions\x12\x10\n\x08max_size\x18\x01 \x01(\x05\x12\x12\n\nmax_length\x18\x0e \x01(\x05\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12&\n\x08int_size\x18\x07 \x01(\x0e\x32\x08.IntSize:\nIS_DEFAULT\x12$\n\x04type\x18\x03 \x01(\x0e\x32\n.FieldType:\nFT_DEFAULT\x12\x18\n\nlong_names\x18\x04 \x01(\x08:\x04true\x12\x1c\n\rpacked_struct\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0bpacked_enum\x18\n \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0cskip_message\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tno_unions\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\r\n\x05msgid\x18\t \x01(\r\x12\x1e\n\x0f\x61nonymous_oneof\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x15\n\x06proto3\x18\x0c \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x0e\x65num_to_string\x18\r \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0c\x66ixed_length\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x66ixed_count\x18\x10 \x01(\x08:\x05\x66\x61lse*i\n\tFieldType\x12\x0e\n\nFT_DEFAULT\x10\x00\x12\x0f\n\x0b\x46T_CALLBACK\x10\x01\x12\x0e\n\nFT_POINTER\x10\x04\x12\r\n\tFT_STATIC\x10\x02\x12\r\n\tFT_IGNORE\x10\x03\x12\r\n\tFT_INLINE\x10\x05*D\n\x07IntSize\x12\x0e\n\nIS_DEFAULT\x10\x00\x12\x08\n\x04IS_8\x10\x08\x12\t\n\x05IS_16\x10\x10\x12\t\n\x05IS_32\x10 \x12\t\n\x05IS_64\x10@:E\n\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:G\n\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:E\n\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:>\n\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptionsB\x1a\n\x18\x66i.kapsi.koti.jpa.nanopb') - , - dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) + serialized_pb='\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto\"\x92\x01\n\rNanoPBOptions\x12\x10\n\x08max_size\x18\x01 \x01(\x05\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12$\n\x04type\x18\x03 \x01(\x0e\x32\n.FieldType:\nFT_DEFAULT\x12\x18\n\nlong_names\x18\x04 \x01(\x08:\x04true\x12\x1c\n\rpacked_struct\x18\x05 \x01(\x08:\x05\x66\x61lse*Z\n\tFieldType\x12\x0e\n\nFT_DEFAULT\x10\x00\x12\x0f\n\x0b\x46T_CALLBACK\x10\x01\x12\x0e\n\nFT_POINTER\x10\x04\x12\r\n\tFT_STATIC\x10\x02\x12\r\n\tFT_IGNORE\x10\x03:E\n\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:G\n\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:E\n\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:>\n\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptionsB\x1a\n\x18\x66i.kapsi.koti.jpa.nanopb') -_FIELDTYPE = _descriptor.EnumDescriptor( +_FIELDTYPE = descriptor.EnumDescriptor( name='FieldType', full_name='FieldType', filename=None, file=DESCRIPTOR, values=[ - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='FT_DEFAULT', index=0, number=0, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='FT_CALLBACK', index=1, number=1, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='FT_POINTER', index=2, number=4, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='FT_STATIC', index=3, number=2, options=None, type=None), - _descriptor.EnumValueDescriptor( + descriptor.EnumValueDescriptor( name='FT_IGNORE', index=4, number=3, options=None, type=None), - _descriptor.EnumValueDescriptor( - name='FT_INLINE', index=5, number=5, - options=None, - type=None), ], containing_type=None, options=None, - serialized_start=500, - serialized_end=605, + serialized_start=199, + serialized_end=289, ) -_sym_db.RegisterEnumDescriptor(_FIELDTYPE) -FieldType = enum_type_wrapper.EnumTypeWrapper(_FIELDTYPE) -_INTSIZE = _descriptor.EnumDescriptor( - name='IntSize', - full_name='IntSize', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='IS_DEFAULT', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='IS_8', index=1, number=8, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='IS_16', index=2, number=16, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='IS_32', index=3, number=32, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='IS_64', index=4, number=64, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=607, - serialized_end=675, -) -_sym_db.RegisterEnumDescriptor(_INTSIZE) -IntSize = enum_type_wrapper.EnumTypeWrapper(_INTSIZE) FT_DEFAULT = 0 FT_CALLBACK = 1 FT_POINTER = 4 FT_STATIC = 2 FT_IGNORE = 3 -FT_INLINE = 5 -IS_DEFAULT = 0 -IS_8 = 8 -IS_16 = 16 -IS_32 = 32 -IS_64 = 64 NANOPB_FILEOPT_FIELD_NUMBER = 1010 -nanopb_fileopt = _descriptor.FieldDescriptor( +nanopb_fileopt = descriptor.FieldDescriptor( name='nanopb_fileopt', full_name='nanopb_fileopt', index=0, number=1010, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -121,7 +61,7 @@ nanopb_fileopt = _descriptor.FieldDescriptor( is_extension=True, extension_scope=None, options=None) NANOPB_MSGOPT_FIELD_NUMBER = 1010 -nanopb_msgopt = _descriptor.FieldDescriptor( +nanopb_msgopt = descriptor.FieldDescriptor( name='nanopb_msgopt', full_name='nanopb_msgopt', index=1, number=1010, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -129,7 +69,7 @@ nanopb_msgopt = _descriptor.FieldDescriptor( is_extension=True, extension_scope=None, options=None) NANOPB_ENUMOPT_FIELD_NUMBER = 1010 -nanopb_enumopt = _descriptor.FieldDescriptor( +nanopb_enumopt = descriptor.FieldDescriptor( name='nanopb_enumopt', full_name='nanopb_enumopt', index=2, number=1010, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -137,7 +77,7 @@ nanopb_enumopt = _descriptor.FieldDescriptor( is_extension=True, extension_scope=None, options=None) NANOPB_FIELD_NUMBER = 1010 -nanopb = _descriptor.FieldDescriptor( +nanopb = descriptor.FieldDescriptor( name='nanopb', full_name='nanopb', index=3, number=1010, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, @@ -146,125 +86,48 @@ nanopb = _descriptor.FieldDescriptor( options=None) -_NANOPBOPTIONS = _descriptor.Descriptor( +_NANOPBOPTIONS = descriptor.Descriptor( name='NanoPBOptions', full_name='NanoPBOptions', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='max_size', full_name='NanoPBOptions.max_size', index=0, number=1, type=5, cpp_type=1, label=1, 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='max_length', full_name='NanoPBOptions.max_length', index=1, - number=14, type=5, cpp_type=1, label=1, - 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='max_count', full_name='NanoPBOptions.max_count', index=2, + descriptor.FieldDescriptor( + name='max_count', full_name='NanoPBOptions.max_count', index=1, number=2, type=5, cpp_type=1, label=1, 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='int_size', full_name='NanoPBOptions.int_size', index=3, - number=7, 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='type', full_name='NanoPBOptions.type', index=4, + descriptor.FieldDescriptor( + name='type', full_name='NanoPBOptions.type', index=2, number=3, 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='long_names', full_name='NanoPBOptions.long_names', index=5, + descriptor.FieldDescriptor( + name='long_names', full_name='NanoPBOptions.long_names', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=True, default_value=True, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( - name='packed_struct', full_name='NanoPBOptions.packed_struct', index=6, + descriptor.FieldDescriptor( + name='packed_struct', full_name='NanoPBOptions.packed_struct', index=4, number=5, type=8, cpp_type=7, label=1, has_default_value=True, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), - _descriptor.FieldDescriptor( - name='packed_enum', full_name='NanoPBOptions.packed_enum', index=7, - number=10, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='skip_message', full_name='NanoPBOptions.skip_message', index=8, - number=6, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='no_unions', full_name='NanoPBOptions.no_unions', index=9, - number=8, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='msgid', full_name='NanoPBOptions.msgid', index=10, - number=9, type=13, cpp_type=3, label=1, - 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='anonymous_oneof', full_name='NanoPBOptions.anonymous_oneof', index=11, - number=11, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='proto3', full_name='NanoPBOptions.proto3', index=12, - number=12, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='enum_to_string', full_name='NanoPBOptions.enum_to_string', index=13, - number=13, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='fixed_length', full_name='NanoPBOptions.fixed_length', index=14, - number=15, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='fixed_count', full_name='NanoPBOptions.fixed_count', index=15, - number=16, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), ], extensions=[ ], @@ -273,40 +136,27 @@ _NANOPBOPTIONS = _descriptor.Descriptor( ], options=None, is_extendable=False, - syntax='proto2', extension_ranges=[], - oneofs=[ - ], serialized_start=51, - serialized_end=498, + serialized_end=197, ) -_NANOPBOPTIONS.fields_by_name['int_size'].enum_type = _INTSIZE +import google.protobuf.descriptor_pb2 + _NANOPBOPTIONS.fields_by_name['type'].enum_type = _FIELDTYPE -DESCRIPTOR.message_types_by_name['NanoPBOptions'] = _NANOPBOPTIONS -DESCRIPTOR.enum_types_by_name['FieldType'] = _FIELDTYPE -DESCRIPTOR.enum_types_by_name['IntSize'] = _INTSIZE -DESCRIPTOR.extensions_by_name['nanopb_fileopt'] = nanopb_fileopt -DESCRIPTOR.extensions_by_name['nanopb_msgopt'] = nanopb_msgopt -DESCRIPTOR.extensions_by_name['nanopb_enumopt'] = nanopb_enumopt -DESCRIPTOR.extensions_by_name['nanopb'] = nanopb -NanoPBOptions = _reflection.GeneratedProtocolMessageType('NanoPBOptions', (_message.Message,), dict( - DESCRIPTOR = _NANOPBOPTIONS, - __module__ = 'nanopb_pb2' +class NanoPBOptions(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _NANOPBOPTIONS + # @@protoc_insertion_point(class_scope:NanoPBOptions) - )) -_sym_db.RegisterMessage(NanoPBOptions) nanopb_fileopt.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(nanopb_fileopt) +google.protobuf.descriptor_pb2.FileOptions.RegisterExtension(nanopb_fileopt) nanopb_msgopt.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(nanopb_msgopt) +google.protobuf.descriptor_pb2.MessageOptions.RegisterExtension(nanopb_msgopt) nanopb_enumopt.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(nanopb_enumopt) +google.protobuf.descriptor_pb2.EnumOptions.RegisterExtension(nanopb_enumopt) nanopb.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(nanopb) - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\030fi.kapsi.koti.jpa.nanopb')) +google.protobuf.descriptor_pb2.FieldOptions.RegisterExtension(nanopb) # @@protoc_insertion_point(module_scope) diff --git a/generator/proto/plugin.proto b/generator/proto/plugin.proto index e627289..651ed10 100644 --- a/generator/proto/plugin.proto +++ b/generator/proto/plugin.proto @@ -1,6 +1,6 @@ // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ +// http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -44,10 +44,7 @@ // plugin should be named "protoc-gen-$NAME", and will then be used when the // flag "--${NAME}_out" is passed to protoc. -syntax = "proto2"; package google.protobuf.compiler; -option java_package = "com.google.protobuf.compiler"; -option java_outer_classname = "PluginProtos"; import "google/protobuf/descriptor.proto"; diff --git a/generator/proto/plugin_pb2.py b/generator/proto/plugin_pb2.py index b046775..a0a6bb7 100644 --- a/generator/proto/plugin_pb2.py +++ b/generator/proto/plugin_pb2.py @@ -1,55 +1,42 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: plugin.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database +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) -_sym_db = _symbol_database.Default() - -from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( +DESCRIPTOR = descriptor.FileDescriptor( name='plugin.proto', package='google.protobuf.compiler', - syntax='proto2', - serialized_pb=_b('\n\x0cplugin.proto\x12\x18google.protobuf.compiler\x1a google/protobuf/descriptor.proto\"}\n\x14\x43odeGeneratorRequest\x12\x18\n\x10\x66ile_to_generate\x18\x01 \x03(\t\x12\x11\n\tparameter\x18\x02 \x01(\t\x12\x38\n\nproto_file\x18\x0f \x03(\x0b\x32$.google.protobuf.FileDescriptorProto\"\xaa\x01\n\x15\x43odeGeneratorResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12\x42\n\x04\x66ile\x18\x0f \x03(\x0b\x32\x34.google.protobuf.compiler.CodeGeneratorResponse.File\x1a>\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0finsertion_point\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x0f \x01(\tB,\n\x1c\x63om.google.protobuf.compilerB\x0cPluginProtos') - , - dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) + serialized_pb='\n\x0cplugin.proto\x12\x18google.protobuf.compiler\x1a google/protobuf/descriptor.proto\"}\n\x14\x43odeGeneratorRequest\x12\x18\n\x10\x66ile_to_generate\x18\x01 \x03(\t\x12\x11\n\tparameter\x18\x02 \x01(\t\x12\x38\n\nproto_file\x18\x0f \x03(\x0b\x32$.google.protobuf.FileDescriptorProto\"\xaa\x01\n\x15\x43odeGeneratorResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12\x42\n\x04\x66ile\x18\x0f \x03(\x0b\x32\x34.google.protobuf.compiler.CodeGeneratorResponse.File\x1a>\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0finsertion_point\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x0f \x01(\t') -_CODEGENERATORREQUEST = _descriptor.Descriptor( +_CODEGENERATORREQUEST = descriptor.Descriptor( name='CodeGeneratorRequest', full_name='google.protobuf.compiler.CodeGeneratorRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='file_to_generate', full_name='google.protobuf.compiler.CodeGeneratorRequest.file_to_generate', index=0, number=1, type=9, cpp_type=9, 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), - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='parameter', full_name='google.protobuf.compiler.CodeGeneratorRequest.parameter', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + 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( + descriptor.FieldDescriptor( name='proto_file', full_name='google.protobuf.compiler.CodeGeneratorRequest.proto_file', index=2, number=15, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], @@ -64,40 +51,37 @@ _CODEGENERATORREQUEST = _descriptor.Descriptor( ], options=None, is_extendable=False, - syntax='proto2', extension_ranges=[], - oneofs=[ - ], serialized_start=76, serialized_end=201, ) -_CODEGENERATORRESPONSE_FILE = _descriptor.Descriptor( +_CODEGENERATORRESPONSE_FILE = descriptor.Descriptor( name='File', full_name='google.protobuf.compiler.CodeGeneratorResponse.File', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='name', full_name='google.protobuf.compiler.CodeGeneratorResponse.File.name', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + 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( + descriptor.FieldDescriptor( name='insertion_point', full_name='google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + 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( + descriptor.FieldDescriptor( name='content', full_name='google.protobuf.compiler.CodeGeneratorResponse.File.content', index=2, number=15, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + 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), @@ -109,29 +93,26 @@ _CODEGENERATORRESPONSE_FILE = _descriptor.Descriptor( ], options=None, is_extendable=False, - syntax='proto2', extension_ranges=[], - oneofs=[ - ], serialized_start=312, serialized_end=374, ) -_CODEGENERATORRESPONSE = _descriptor.Descriptor( +_CODEGENERATORRESPONSE = descriptor.Descriptor( name='CodeGeneratorResponse', full_name='google.protobuf.compiler.CodeGeneratorResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( + descriptor.FieldDescriptor( name='error', full_name='google.protobuf.compiler.CodeGeneratorResponse.error', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + 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( + descriptor.FieldDescriptor( name='file', full_name='google.protobuf.compiler.CodeGeneratorResponse.file', index=1, number=15, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], @@ -146,43 +127,33 @@ _CODEGENERATORRESPONSE = _descriptor.Descriptor( ], options=None, is_extendable=False, - syntax='proto2', extension_ranges=[], - oneofs=[ - ], serialized_start=204, serialized_end=374, ) -_CODEGENERATORREQUEST.fields_by_name['proto_file'].message_type = google_dot_protobuf_dot_descriptor__pb2._FILEDESCRIPTORPROTO -_CODEGENERATORRESPONSE_FILE.containing_type = _CODEGENERATORRESPONSE +import google.protobuf.descriptor_pb2 + +_CODEGENERATORREQUEST.fields_by_name['proto_file'].message_type = google.protobuf.descriptor_pb2._FILEDESCRIPTORPROTO +_CODEGENERATORRESPONSE_FILE.containing_type = _CODEGENERATORRESPONSE; _CODEGENERATORRESPONSE.fields_by_name['file'].message_type = _CODEGENERATORRESPONSE_FILE -DESCRIPTOR.message_types_by_name['CodeGeneratorRequest'] = _CODEGENERATORREQUEST -DESCRIPTOR.message_types_by_name['CodeGeneratorResponse'] = _CODEGENERATORRESPONSE -CodeGeneratorRequest = _reflection.GeneratedProtocolMessageType('CodeGeneratorRequest', (_message.Message,), dict( - DESCRIPTOR = _CODEGENERATORREQUEST, - __module__ = 'plugin_pb2' +class CodeGeneratorRequest(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _CODEGENERATORREQUEST + # @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest) - )) -_sym_db.RegisterMessage(CodeGeneratorRequest) -CodeGeneratorResponse = _reflection.GeneratedProtocolMessageType('CodeGeneratorResponse', (_message.Message,), dict( - - File = _reflection.GeneratedProtocolMessageType('File', (_message.Message,), dict( - DESCRIPTOR = _CODEGENERATORRESPONSE_FILE, - __module__ = 'plugin_pb2' +class CodeGeneratorResponse(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + + class File(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _CODEGENERATORRESPONSE_FILE + # @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File) - )) - , - DESCRIPTOR = _CODEGENERATORRESPONSE, - __module__ = 'plugin_pb2' + DESCRIPTOR = _CODEGENERATORRESPONSE + # @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse) - )) -_sym_db.RegisterMessage(CodeGeneratorResponse) -_sym_db.RegisterMessage(CodeGeneratorResponse.File) - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\034com.google.protobuf.compilerB\014PluginProtos')) # @@protoc_insertion_point(module_scope) |