No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

descriptor.proto 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. syntax = "proto2";
  2. package google.protobuf;
  3. message FileDescriptorSet {
  4. repeated FileDescriptorProto file = 1;
  5. }
  6. message FileDescriptorProto {
  7. optional string name = 1;
  8. optional string package = 2;
  9. repeated string dependency = 3;
  10. repeated int32 public_dependency = 10;
  11. repeated int32 weak_dependency = 11;
  12. repeated DescriptorProto message_type = 4;
  13. repeated EnumDescriptorProto enum_type = 5;
  14. repeated ServiceDescriptorProto service = 6;
  15. repeated FieldDescriptorProto extension = 7;
  16. optional FileOptions options = 8;
  17. optional SourceCodeInfo source_code_info = 9;
  18. optional string syntax = 12;
  19. }
  20. message DescriptorProto {
  21. optional string name = 1;
  22. repeated FieldDescriptorProto field = 2;
  23. repeated FieldDescriptorProto extension = 6;
  24. repeated DescriptorProto nested_type = 3;
  25. repeated EnumDescriptorProto enum_type = 4;
  26. repeated ExtensionRange extension_range = 5;
  27. repeated OneofDescriptorProto oneof_decl = 8;
  28. optional MessageOptions options = 7;
  29. repeated ReservedRange reserved_range = 9;
  30. repeated string reserved_name = 10;
  31. message ExtensionRange {
  32. optional int32 start = 1;
  33. optional int32 end = 2;
  34. }
  35. message ReservedRange {
  36. optional int32 start = 1;
  37. optional int32 end = 2;
  38. }
  39. }
  40. message FieldDescriptorProto {
  41. optional string name = 1;
  42. optional int32 number = 3;
  43. optional Label label = 4;
  44. optional Type type = 5;
  45. optional string type_name = 6;
  46. optional string extendee = 2;
  47. optional string default_value = 7;
  48. optional int32 oneof_index = 9;
  49. optional string json_name = 10;
  50. optional FieldOptions options = 8;
  51. enum Type {
  52. TYPE_DOUBLE = 1;
  53. TYPE_FLOAT = 2;
  54. TYPE_INT64 = 3;
  55. TYPE_UINT64 = 4;
  56. TYPE_INT32 = 5;
  57. TYPE_FIXED64 = 6;
  58. TYPE_FIXED32 = 7;
  59. TYPE_BOOL = 8;
  60. TYPE_STRING = 9;
  61. TYPE_GROUP = 10;
  62. TYPE_MESSAGE = 11;
  63. TYPE_BYTES = 12;
  64. TYPE_UINT32 = 13;
  65. TYPE_ENUM = 14;
  66. TYPE_SFIXED32 = 15;
  67. TYPE_SFIXED64 = 16;
  68. TYPE_SINT32 = 17;
  69. TYPE_SINT64 = 18;
  70. }
  71. enum Label {
  72. LABEL_OPTIONAL = 1;
  73. LABEL_REQUIRED = 2;
  74. LABEL_REPEATED = 3;
  75. }
  76. }
  77. message OneofDescriptorProto {
  78. optional string name = 1;
  79. optional OneofOptions options = 2;
  80. }
  81. message EnumDescriptorProto {
  82. optional string name = 1;
  83. repeated EnumValueDescriptorProto value = 2;
  84. optional EnumOptions options = 3;
  85. }
  86. message EnumValueDescriptorProto {
  87. optional string name = 1;
  88. optional int32 number = 2;
  89. optional EnumValueOptions options = 3;
  90. }
  91. message ServiceDescriptorProto {
  92. optional string name = 1;
  93. repeated MethodDescriptorProto method = 2;
  94. optional ServiceOptions options = 3;
  95. }
  96. message MethodDescriptorProto {
  97. optional string name = 1;
  98. optional string input_type = 2;
  99. optional string output_type = 3;
  100. optional MethodOptions options = 4;
  101. optional bool client_streaming = 5;
  102. optional bool server_streaming = 6;
  103. }
  104. message FileOptions {
  105. optional string java_package = 1;
  106. optional string java_outer_classname = 8;
  107. optional bool java_multiple_files = 10;
  108. optional bool java_generate_equals_and_hash = 20 [deprecated=true];
  109. optional bool java_string_check_utf8 = 27;
  110. optional OptimizeMode optimize_for = 9 [default=SPEED];
  111. optional string go_package = 11;
  112. optional bool cc_generic_services = 16;
  113. optional bool java_generic_services = 17;
  114. optional bool py_generic_services = 18;
  115. optional bool deprecated = 23;
  116. optional bool cc_enable_arenas = 31;
  117. optional string objc_class_prefix = 36;
  118. optional string csharp_namespace = 37;
  119. repeated UninterpretedOption uninterpreted_option = 999;
  120. enum OptimizeMode {
  121. SPEED = 1;
  122. CODE_SIZE = 2;
  123. LITE_RUNTIME = 3;
  124. }
  125. extensions 1000 to max;
  126. reserved 38;
  127. }
  128. message MessageOptions {
  129. optional bool message_set_wire_format = 1;
  130. optional bool no_standard_descriptor_accessor = 2;
  131. optional bool deprecated = 3;
  132. optional bool map_entry = 7;
  133. repeated UninterpretedOption uninterpreted_option = 999;
  134. extensions 1000 to max;
  135. reserved 8;
  136. }
  137. message FieldOptions {
  138. optional CType ctype = 1 [default=STRING];
  139. optional bool packed = 2;
  140. optional JSType jstype = 6 [default=JS_NORMAL];
  141. optional bool lazy = 5;
  142. optional bool deprecated = 3;
  143. optional bool weak = 10;
  144. repeated UninterpretedOption uninterpreted_option = 999;
  145. enum CType {
  146. STRING = 0;
  147. CORD = 1;
  148. STRING_PIECE = 2;
  149. }
  150. enum JSType {
  151. JS_NORMAL = 0;
  152. JS_STRING = 1;
  153. JS_NUMBER = 2;
  154. }
  155. extensions 1000 to max;
  156. reserved 4;
  157. }
  158. message OneofOptions {
  159. repeated UninterpretedOption uninterpreted_option = 999;
  160. extensions 1000 to max;
  161. }
  162. message EnumOptions {
  163. optional bool allow_alias = 2;
  164. optional bool deprecated = 3;
  165. repeated UninterpretedOption uninterpreted_option = 999;
  166. extensions 1000 to max;
  167. }
  168. message EnumValueOptions {
  169. optional bool deprecated = 1;
  170. repeated UninterpretedOption uninterpreted_option = 999;
  171. extensions 1000 to max;
  172. }
  173. message ServiceOptions {
  174. optional bool deprecated = 33;
  175. repeated UninterpretedOption uninterpreted_option = 999;
  176. extensions 1000 to max;
  177. }
  178. message MethodOptions {
  179. optional bool deprecated = 33;
  180. repeated UninterpretedOption uninterpreted_option = 999;
  181. extensions 1000 to max;
  182. }
  183. message UninterpretedOption {
  184. repeated NamePart name = 2;
  185. optional string identifier_value = 3;
  186. optional uint64 positive_int_value = 4;
  187. optional int64 negative_int_value = 5;
  188. optional double double_value = 6;
  189. optional bytes string_value = 7;
  190. optional string aggregate_value = 8;
  191. message NamePart {
  192. required string name_part = 1;
  193. required bool is_extension = 2;
  194. }
  195. }
  196. message SourceCodeInfo {
  197. repeated Location location = 1;
  198. message Location {
  199. repeated int32 path = 1 [packed=true];
  200. repeated int32 span = 2 [packed=true];
  201. optional string leading_comments = 3;
  202. optional string trailing_comments = 4;
  203. repeated string leading_detached_comments = 6;
  204. }
  205. }
  206. message GeneratedCodeInfo {
  207. repeated Annotation annotation = 1;
  208. message Annotation {
  209. repeated int32 path = 1 [packed=true];
  210. optional string source_file = 2;
  211. optional int32 begin = 3;
  212. optional int32 end = 4;
  213. }
  214. }