Descriptor.pbobjc.h 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/descriptor.proto
  3. #import "GPBProtocolBuffers.h"
  4. #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000
  5. #error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
  6. #endif
  7. // @@protoc_insertion_point(imports)
  8. CF_EXTERN_C_BEGIN
  9. @class GPBDescriptorProto;
  10. @class GPBDescriptorProto_ExtensionRange;
  11. @class GPBDescriptorProto_ReservedRange;
  12. @class GPBEnumDescriptorProto;
  13. @class GPBEnumOptions;
  14. @class GPBEnumValueDescriptorProto;
  15. @class GPBEnumValueOptions;
  16. @class GPBFieldDescriptorProto;
  17. @class GPBFieldOptions;
  18. @class GPBFileDescriptorProto;
  19. @class GPBFileOptions;
  20. @class GPBGeneratedCodeInfo_Annotation;
  21. @class GPBMessageOptions;
  22. @class GPBMethodDescriptorProto;
  23. @class GPBMethodOptions;
  24. @class GPBOneofDescriptorProto;
  25. @class GPBServiceDescriptorProto;
  26. @class GPBServiceOptions;
  27. @class GPBSourceCodeInfo;
  28. @class GPBSourceCodeInfo_Location;
  29. @class GPBUninterpretedOption;
  30. @class GPBUninterpretedOption_NamePart;
  31. NS_ASSUME_NONNULL_BEGIN
  32. #pragma mark - Enum GPBFieldDescriptorProto_Type
  33. typedef GPB_ENUM(GPBFieldDescriptorProto_Type) {
  34. // 0 is reserved for errors.
  35. // Order is weird for historical reasons.
  36. GPBFieldDescriptorProto_Type_TypeDouble = 1,
  37. GPBFieldDescriptorProto_Type_TypeFloat = 2,
  38. // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
  39. // negative values are likely.
  40. GPBFieldDescriptorProto_Type_TypeInt64 = 3,
  41. GPBFieldDescriptorProto_Type_TypeUint64 = 4,
  42. // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
  43. // negative values are likely.
  44. GPBFieldDescriptorProto_Type_TypeInt32 = 5,
  45. GPBFieldDescriptorProto_Type_TypeFixed64 = 6,
  46. GPBFieldDescriptorProto_Type_TypeFixed32 = 7,
  47. GPBFieldDescriptorProto_Type_TypeBool = 8,
  48. GPBFieldDescriptorProto_Type_TypeString = 9,
  49. // Tag-delimited aggregate.
  50. GPBFieldDescriptorProto_Type_TypeGroup = 10,
  51. // Length-delimited aggregate.
  52. GPBFieldDescriptorProto_Type_TypeMessage = 11,
  53. // New in version 2.
  54. GPBFieldDescriptorProto_Type_TypeBytes = 12,
  55. GPBFieldDescriptorProto_Type_TypeUint32 = 13,
  56. GPBFieldDescriptorProto_Type_TypeEnum = 14,
  57. GPBFieldDescriptorProto_Type_TypeSfixed32 = 15,
  58. GPBFieldDescriptorProto_Type_TypeSfixed64 = 16,
  59. // Uses ZigZag encoding.
  60. GPBFieldDescriptorProto_Type_TypeSint32 = 17,
  61. // Uses ZigZag encoding.
  62. GPBFieldDescriptorProto_Type_TypeSint64 = 18,
  63. };
  64. GPBEnumDescriptor *GPBFieldDescriptorProto_Type_EnumDescriptor(void);
  65. BOOL GPBFieldDescriptorProto_Type_IsValidValue(int32_t value);
  66. #pragma mark - Enum GPBFieldDescriptorProto_Label
  67. typedef GPB_ENUM(GPBFieldDescriptorProto_Label) {
  68. // 0 is reserved for errors
  69. GPBFieldDescriptorProto_Label_LabelOptional = 1,
  70. GPBFieldDescriptorProto_Label_LabelRequired = 2,
  71. // TODO(sanjay): Should we add LABEL_MAP?
  72. GPBFieldDescriptorProto_Label_LabelRepeated = 3,
  73. };
  74. GPBEnumDescriptor *GPBFieldDescriptorProto_Label_EnumDescriptor(void);
  75. BOOL GPBFieldDescriptorProto_Label_IsValidValue(int32_t value);
  76. #pragma mark - Enum GPBFileOptions_OptimizeMode
  77. // Generated classes can be optimized for speed or code size.
  78. typedef GPB_ENUM(GPBFileOptions_OptimizeMode) {
  79. // Generate complete code for parsing, serialization,
  80. GPBFileOptions_OptimizeMode_Speed = 1,
  81. // etc.
  82. GPBFileOptions_OptimizeMode_CodeSize = 2,
  83. // Generate code using MessageLite and the lite runtime.
  84. GPBFileOptions_OptimizeMode_LiteRuntime = 3,
  85. };
  86. GPBEnumDescriptor *GPBFileOptions_OptimizeMode_EnumDescriptor(void);
  87. BOOL GPBFileOptions_OptimizeMode_IsValidValue(int32_t value);
  88. #pragma mark - Enum GPBFieldOptions_CType
  89. typedef GPB_ENUM(GPBFieldOptions_CType) {
  90. // Default mode.
  91. GPBFieldOptions_CType_String = 0,
  92. GPBFieldOptions_CType_Cord = 1,
  93. GPBFieldOptions_CType_StringPiece = 2,
  94. };
  95. GPBEnumDescriptor *GPBFieldOptions_CType_EnumDescriptor(void);
  96. BOOL GPBFieldOptions_CType_IsValidValue(int32_t value);
  97. #pragma mark - Enum GPBFieldOptions_JSType
  98. typedef GPB_ENUM(GPBFieldOptions_JSType) {
  99. // Use the default type.
  100. GPBFieldOptions_JSType_JsNormal = 0,
  101. // Use JavaScript strings.
  102. GPBFieldOptions_JSType_JsString = 1,
  103. // Use JavaScript numbers.
  104. GPBFieldOptions_JSType_JsNumber = 2,
  105. };
  106. GPBEnumDescriptor *GPBFieldOptions_JSType_EnumDescriptor(void);
  107. BOOL GPBFieldOptions_JSType_IsValidValue(int32_t value);
  108. #pragma mark - GPBDescriptorRoot
  109. @interface GPBDescriptorRoot : GPBRootObject
  110. // The base class provides:
  111. // + (GPBExtensionRegistry *)extensionRegistry;
  112. // which is an GPBExtensionRegistry that includes all the extensions defined by
  113. // this file and all files that it depends on.
  114. @end
  115. #pragma mark - GPBFileDescriptorSet
  116. typedef GPB_ENUM(GPBFileDescriptorSet_FieldNumber) {
  117. GPBFileDescriptorSet_FieldNumber_FileArray = 1,
  118. };
  119. // The protocol compiler can output a FileDescriptorSet containing the .proto
  120. // files it parses.
  121. @interface GPBFileDescriptorSet : GPBMessage
  122. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFileDescriptorProto*> *fileArray;
  123. @property(nonatomic, readonly) NSUInteger fileArray_Count;
  124. @end
  125. #pragma mark - GPBFileDescriptorProto
  126. typedef GPB_ENUM(GPBFileDescriptorProto_FieldNumber) {
  127. GPBFileDescriptorProto_FieldNumber_Name = 1,
  128. GPBFileDescriptorProto_FieldNumber_Package = 2,
  129. GPBFileDescriptorProto_FieldNumber_DependencyArray = 3,
  130. GPBFileDescriptorProto_FieldNumber_MessageTypeArray = 4,
  131. GPBFileDescriptorProto_FieldNumber_EnumTypeArray = 5,
  132. GPBFileDescriptorProto_FieldNumber_ServiceArray = 6,
  133. GPBFileDescriptorProto_FieldNumber_ExtensionArray = 7,
  134. GPBFileDescriptorProto_FieldNumber_Options = 8,
  135. GPBFileDescriptorProto_FieldNumber_SourceCodeInfo = 9,
  136. GPBFileDescriptorProto_FieldNumber_PublicDependencyArray = 10,
  137. GPBFileDescriptorProto_FieldNumber_WeakDependencyArray = 11,
  138. GPBFileDescriptorProto_FieldNumber_Syntax = 12,
  139. };
  140. // Describes a complete .proto file.
  141. @interface GPBFileDescriptorProto : GPBMessage
  142. // file name, relative to root of source tree
  143. @property(nonatomic, readwrite) BOOL hasName;
  144. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  145. // e.g. "foo", "foo.bar", etc.
  146. @property(nonatomic, readwrite) BOOL hasPackage;
  147. @property(nonatomic, readwrite, copy, null_resettable) NSString *package;
  148. // Names of files imported by this file.
  149. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *dependencyArray;
  150. @property(nonatomic, readonly) NSUInteger dependencyArray_Count;
  151. // Indexes of the public imported files in the dependency list above.
  152. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *publicDependencyArray;
  153. @property(nonatomic, readonly) NSUInteger publicDependencyArray_Count;
  154. // Indexes of the weak imported files in the dependency list.
  155. // For Google-internal migration only. Do not use.
  156. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *weakDependencyArray;
  157. @property(nonatomic, readonly) NSUInteger weakDependencyArray_Count;
  158. // All top-level definitions in this file.
  159. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto*> *messageTypeArray;
  160. @property(nonatomic, readonly) NSUInteger messageTypeArray_Count;
  161. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumDescriptorProto*> *enumTypeArray;
  162. @property(nonatomic, readonly) NSUInteger enumTypeArray_Count;
  163. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBServiceDescriptorProto*> *serviceArray;
  164. @property(nonatomic, readonly) NSUInteger serviceArray_Count;
  165. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFieldDescriptorProto*> *extensionArray;
  166. @property(nonatomic, readonly) NSUInteger extensionArray_Count;
  167. @property(nonatomic, readwrite) BOOL hasOptions;
  168. @property(nonatomic, readwrite, strong, null_resettable) GPBFileOptions *options;
  169. // This field contains optional information about the original source code.
  170. // You may safely remove this entire field without harming runtime
  171. // functionality of the descriptors -- the information is needed only by
  172. // development tools.
  173. @property(nonatomic, readwrite) BOOL hasSourceCodeInfo;
  174. @property(nonatomic, readwrite, strong, null_resettable) GPBSourceCodeInfo *sourceCodeInfo;
  175. // The syntax of the proto file.
  176. // The supported values are "proto2" and "proto3".
  177. @property(nonatomic, readwrite) BOOL hasSyntax;
  178. @property(nonatomic, readwrite, copy, null_resettable) NSString *syntax;
  179. @end
  180. #pragma mark - GPBDescriptorProto
  181. typedef GPB_ENUM(GPBDescriptorProto_FieldNumber) {
  182. GPBDescriptorProto_FieldNumber_Name = 1,
  183. GPBDescriptorProto_FieldNumber_FieldArray = 2,
  184. GPBDescriptorProto_FieldNumber_NestedTypeArray = 3,
  185. GPBDescriptorProto_FieldNumber_EnumTypeArray = 4,
  186. GPBDescriptorProto_FieldNumber_ExtensionRangeArray = 5,
  187. GPBDescriptorProto_FieldNumber_ExtensionArray = 6,
  188. GPBDescriptorProto_FieldNumber_Options = 7,
  189. GPBDescriptorProto_FieldNumber_OneofDeclArray = 8,
  190. GPBDescriptorProto_FieldNumber_ReservedRangeArray = 9,
  191. GPBDescriptorProto_FieldNumber_ReservedNameArray = 10,
  192. };
  193. // Describes a message type.
  194. @interface GPBDescriptorProto : GPBMessage
  195. @property(nonatomic, readwrite) BOOL hasName;
  196. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  197. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFieldDescriptorProto*> *fieldArray;
  198. @property(nonatomic, readonly) NSUInteger fieldArray_Count;
  199. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFieldDescriptorProto*> *extensionArray;
  200. @property(nonatomic, readonly) NSUInteger extensionArray_Count;
  201. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto*> *nestedTypeArray;
  202. @property(nonatomic, readonly) NSUInteger nestedTypeArray_Count;
  203. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumDescriptorProto*> *enumTypeArray;
  204. @property(nonatomic, readonly) NSUInteger enumTypeArray_Count;
  205. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto_ExtensionRange*> *extensionRangeArray;
  206. @property(nonatomic, readonly) NSUInteger extensionRangeArray_Count;
  207. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOneofDescriptorProto*> *oneofDeclArray;
  208. @property(nonatomic, readonly) NSUInteger oneofDeclArray_Count;
  209. @property(nonatomic, readwrite) BOOL hasOptions;
  210. @property(nonatomic, readwrite, strong, null_resettable) GPBMessageOptions *options;
  211. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto_ReservedRange*> *reservedRangeArray;
  212. @property(nonatomic, readonly) NSUInteger reservedRangeArray_Count;
  213. // Reserved field names, which may not be used by fields in the same message.
  214. // A given name may only be reserved once.
  215. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *reservedNameArray;
  216. @property(nonatomic, readonly) NSUInteger reservedNameArray_Count;
  217. @end
  218. #pragma mark - GPBDescriptorProto_ExtensionRange
  219. typedef GPB_ENUM(GPBDescriptorProto_ExtensionRange_FieldNumber) {
  220. GPBDescriptorProto_ExtensionRange_FieldNumber_Start = 1,
  221. GPBDescriptorProto_ExtensionRange_FieldNumber_End = 2,
  222. };
  223. @interface GPBDescriptorProto_ExtensionRange : GPBMessage
  224. @property(nonatomic, readwrite) BOOL hasStart;
  225. @property(nonatomic, readwrite) int32_t start;
  226. @property(nonatomic, readwrite) BOOL hasEnd;
  227. @property(nonatomic, readwrite) int32_t end;
  228. @end
  229. #pragma mark - GPBDescriptorProto_ReservedRange
  230. typedef GPB_ENUM(GPBDescriptorProto_ReservedRange_FieldNumber) {
  231. GPBDescriptorProto_ReservedRange_FieldNumber_Start = 1,
  232. GPBDescriptorProto_ReservedRange_FieldNumber_End = 2,
  233. };
  234. // Range of reserved tag numbers. Reserved tag numbers may not be used by
  235. // fields or extension ranges in the same message. Reserved ranges may
  236. // not overlap.
  237. @interface GPBDescriptorProto_ReservedRange : GPBMessage
  238. // Inclusive.
  239. @property(nonatomic, readwrite) BOOL hasStart;
  240. @property(nonatomic, readwrite) int32_t start;
  241. // Exclusive.
  242. @property(nonatomic, readwrite) BOOL hasEnd;
  243. @property(nonatomic, readwrite) int32_t end;
  244. @end
  245. #pragma mark - GPBFieldDescriptorProto
  246. typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) {
  247. GPBFieldDescriptorProto_FieldNumber_Name = 1,
  248. GPBFieldDescriptorProto_FieldNumber_Extendee = 2,
  249. GPBFieldDescriptorProto_FieldNumber_Number = 3,
  250. GPBFieldDescriptorProto_FieldNumber_Label = 4,
  251. GPBFieldDescriptorProto_FieldNumber_Type = 5,
  252. GPBFieldDescriptorProto_FieldNumber_TypeName = 6,
  253. GPBFieldDescriptorProto_FieldNumber_DefaultValue = 7,
  254. GPBFieldDescriptorProto_FieldNumber_Options = 8,
  255. GPBFieldDescriptorProto_FieldNumber_OneofIndex = 9,
  256. GPBFieldDescriptorProto_FieldNumber_JsonName = 10,
  257. };
  258. // Describes a field within a message.
  259. @interface GPBFieldDescriptorProto : GPBMessage
  260. @property(nonatomic, readwrite) BOOL hasName;
  261. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  262. @property(nonatomic, readwrite) BOOL hasNumber;
  263. @property(nonatomic, readwrite) int32_t number;
  264. @property(nonatomic, readwrite) BOOL hasLabel;
  265. @property(nonatomic, readwrite) GPBFieldDescriptorProto_Label label;
  266. // If type_name is set, this need not be set. If both this and type_name
  267. // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
  268. @property(nonatomic, readwrite) BOOL hasType;
  269. @property(nonatomic, readwrite) GPBFieldDescriptorProto_Type type;
  270. // For message and enum types, this is the name of the type. If the name
  271. // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
  272. // rules are used to find the type (i.e. first the nested types within this
  273. // message are searched, then within the parent, on up to the root
  274. // namespace).
  275. @property(nonatomic, readwrite) BOOL hasTypeName;
  276. @property(nonatomic, readwrite, copy, null_resettable) NSString *typeName;
  277. // For extensions, this is the name of the type being extended. It is
  278. // resolved in the same manner as type_name.
  279. @property(nonatomic, readwrite) BOOL hasExtendee;
  280. @property(nonatomic, readwrite, copy, null_resettable) NSString *extendee;
  281. // For numeric types, contains the original text representation of the value.
  282. // For booleans, "true" or "false".
  283. // For strings, contains the default text contents (not escaped in any way).
  284. // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
  285. // TODO(kenton): Base-64 encode?
  286. @property(nonatomic, readwrite) BOOL hasDefaultValue;
  287. @property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue;
  288. // If set, gives the index of a oneof in the containing type's oneof_decl
  289. // list. This field is a member of that oneof.
  290. @property(nonatomic, readwrite) BOOL hasOneofIndex;
  291. @property(nonatomic, readwrite) int32_t oneofIndex;
  292. // JSON name of this field. The value is set by protocol compiler. If the
  293. // user has set a "json_name" option on this field, that option's value
  294. // will be used. Otherwise, it's deduced from the field's name by converting
  295. // it to camelCase.
  296. @property(nonatomic, readwrite) BOOL hasJsonName;
  297. @property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
  298. @property(nonatomic, readwrite) BOOL hasOptions;
  299. @property(nonatomic, readwrite, strong, null_resettable) GPBFieldOptions *options;
  300. @end
  301. #pragma mark - GPBOneofDescriptorProto
  302. typedef GPB_ENUM(GPBOneofDescriptorProto_FieldNumber) {
  303. GPBOneofDescriptorProto_FieldNumber_Name = 1,
  304. };
  305. // Describes a oneof.
  306. @interface GPBOneofDescriptorProto : GPBMessage
  307. @property(nonatomic, readwrite) BOOL hasName;
  308. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  309. @end
  310. #pragma mark - GPBEnumDescriptorProto
  311. typedef GPB_ENUM(GPBEnumDescriptorProto_FieldNumber) {
  312. GPBEnumDescriptorProto_FieldNumber_Name = 1,
  313. GPBEnumDescriptorProto_FieldNumber_ValueArray = 2,
  314. GPBEnumDescriptorProto_FieldNumber_Options = 3,
  315. };
  316. // Describes an enum type.
  317. @interface GPBEnumDescriptorProto : GPBMessage
  318. @property(nonatomic, readwrite) BOOL hasName;
  319. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  320. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumValueDescriptorProto*> *valueArray;
  321. @property(nonatomic, readonly) NSUInteger valueArray_Count;
  322. @property(nonatomic, readwrite) BOOL hasOptions;
  323. @property(nonatomic, readwrite, strong, null_resettable) GPBEnumOptions *options;
  324. @end
  325. #pragma mark - GPBEnumValueDescriptorProto
  326. typedef GPB_ENUM(GPBEnumValueDescriptorProto_FieldNumber) {
  327. GPBEnumValueDescriptorProto_FieldNumber_Name = 1,
  328. GPBEnumValueDescriptorProto_FieldNumber_Number = 2,
  329. GPBEnumValueDescriptorProto_FieldNumber_Options = 3,
  330. };
  331. // Describes a value within an enum.
  332. @interface GPBEnumValueDescriptorProto : GPBMessage
  333. @property(nonatomic, readwrite) BOOL hasName;
  334. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  335. @property(nonatomic, readwrite) BOOL hasNumber;
  336. @property(nonatomic, readwrite) int32_t number;
  337. @property(nonatomic, readwrite) BOOL hasOptions;
  338. @property(nonatomic, readwrite, strong, null_resettable) GPBEnumValueOptions *options;
  339. @end
  340. #pragma mark - GPBServiceDescriptorProto
  341. typedef GPB_ENUM(GPBServiceDescriptorProto_FieldNumber) {
  342. GPBServiceDescriptorProto_FieldNumber_Name = 1,
  343. GPBServiceDescriptorProto_FieldNumber_MethodArray = 2,
  344. GPBServiceDescriptorProto_FieldNumber_Options = 3,
  345. };
  346. // Describes a service.
  347. @interface GPBServiceDescriptorProto : GPBMessage
  348. @property(nonatomic, readwrite) BOOL hasName;
  349. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  350. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethodDescriptorProto*> *methodArray;
  351. @property(nonatomic, readonly) NSUInteger methodArray_Count;
  352. @property(nonatomic, readwrite) BOOL hasOptions;
  353. @property(nonatomic, readwrite, strong, null_resettable) GPBServiceOptions *options;
  354. @end
  355. #pragma mark - GPBMethodDescriptorProto
  356. typedef GPB_ENUM(GPBMethodDescriptorProto_FieldNumber) {
  357. GPBMethodDescriptorProto_FieldNumber_Name = 1,
  358. GPBMethodDescriptorProto_FieldNumber_InputType = 2,
  359. GPBMethodDescriptorProto_FieldNumber_OutputType = 3,
  360. GPBMethodDescriptorProto_FieldNumber_Options = 4,
  361. GPBMethodDescriptorProto_FieldNumber_ClientStreaming = 5,
  362. GPBMethodDescriptorProto_FieldNumber_ServerStreaming = 6,
  363. };
  364. // Describes a method of a service.
  365. @interface GPBMethodDescriptorProto : GPBMessage
  366. @property(nonatomic, readwrite) BOOL hasName;
  367. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  368. // Input and output type names. These are resolved in the same way as
  369. // FieldDescriptorProto.type_name, but must refer to a message type.
  370. @property(nonatomic, readwrite) BOOL hasInputType;
  371. @property(nonatomic, readwrite, copy, null_resettable) NSString *inputType;
  372. @property(nonatomic, readwrite) BOOL hasOutputType;
  373. @property(nonatomic, readwrite, copy, null_resettable) NSString *outputType;
  374. @property(nonatomic, readwrite) BOOL hasOptions;
  375. @property(nonatomic, readwrite, strong, null_resettable) GPBMethodOptions *options;
  376. // Identifies if client streams multiple client messages
  377. @property(nonatomic, readwrite) BOOL hasClientStreaming;
  378. @property(nonatomic, readwrite) BOOL clientStreaming;
  379. // Identifies if server streams multiple server messages
  380. @property(nonatomic, readwrite) BOOL hasServerStreaming;
  381. @property(nonatomic, readwrite) BOOL serverStreaming;
  382. @end
  383. #pragma mark - GPBFileOptions
  384. typedef GPB_ENUM(GPBFileOptions_FieldNumber) {
  385. GPBFileOptions_FieldNumber_JavaPackage = 1,
  386. GPBFileOptions_FieldNumber_JavaOuterClassname = 8,
  387. GPBFileOptions_FieldNumber_OptimizeFor = 9,
  388. GPBFileOptions_FieldNumber_JavaMultipleFiles = 10,
  389. GPBFileOptions_FieldNumber_GoPackage = 11,
  390. GPBFileOptions_FieldNumber_CcGenericServices = 16,
  391. GPBFileOptions_FieldNumber_JavaGenericServices = 17,
  392. GPBFileOptions_FieldNumber_PyGenericServices = 18,
  393. GPBFileOptions_FieldNumber_JavaGenerateEqualsAndHash = 20,
  394. GPBFileOptions_FieldNumber_Deprecated = 23,
  395. GPBFileOptions_FieldNumber_JavaStringCheckUtf8 = 27,
  396. GPBFileOptions_FieldNumber_CcEnableArenas = 31,
  397. GPBFileOptions_FieldNumber_ObjcClassPrefix = 36,
  398. GPBFileOptions_FieldNumber_CsharpNamespace = 37,
  399. GPBFileOptions_FieldNumber_JavananoUseDeprecatedPackage = 38,
  400. GPBFileOptions_FieldNumber_UninterpretedOptionArray = 999,
  401. };
  402. @interface GPBFileOptions : GPBMessage
  403. // Sets the Java package where classes generated from this .proto will be
  404. // placed. By default, the proto package is used, but this is often
  405. // inappropriate because proto packages do not normally start with backwards
  406. // domain names.
  407. @property(nonatomic, readwrite) BOOL hasJavaPackage;
  408. @property(nonatomic, readwrite, copy, null_resettable) NSString *javaPackage;
  409. // If set, all the classes from the .proto file are wrapped in a single
  410. // outer class with the given name. This applies to both Proto1
  411. // (equivalent to the old "--one_java_file" option) and Proto2 (where
  412. // a .proto always translates to a single class, but you may want to
  413. // explicitly choose the class name).
  414. @property(nonatomic, readwrite) BOOL hasJavaOuterClassname;
  415. @property(nonatomic, readwrite, copy, null_resettable) NSString *javaOuterClassname;
  416. // If set true, then the Java code generator will generate a separate .java
  417. // file for each top-level message, enum, and service defined in the .proto
  418. // file. Thus, these types will *not* be nested inside the outer class
  419. // named by java_outer_classname. However, the outer class will still be
  420. // generated to contain the file's getDescriptor() method as well as any
  421. // top-level extensions defined in the file.
  422. @property(nonatomic, readwrite) BOOL hasJavaMultipleFiles;
  423. @property(nonatomic, readwrite) BOOL javaMultipleFiles;
  424. // If set true, then the Java code generator will generate equals() and
  425. // hashCode() methods for all messages defined in the .proto file.
  426. // This increases generated code size, potentially substantially for large
  427. // protos, which may harm a memory-constrained application.
  428. // - In the full runtime this is a speed optimization, as the
  429. // AbstractMessage base class includes reflection-based implementations of
  430. // these methods.
  431. // - In the lite runtime, setting this option changes the semantics of
  432. // equals() and hashCode() to more closely match those of the full runtime;
  433. // the generated methods compute their results based on field values rather
  434. // than object identity. (Implementations should not assume that hashcodes
  435. // will be consistent across runtimes or versions of the protocol compiler.)
  436. @property(nonatomic, readwrite) BOOL hasJavaGenerateEqualsAndHash;
  437. @property(nonatomic, readwrite) BOOL javaGenerateEqualsAndHash;
  438. // If set true, then the Java2 code generator will generate code that
  439. // throws an exception whenever an attempt is made to assign a non-UTF-8
  440. // byte sequence to a string field.
  441. // Message reflection will do the same.
  442. // However, an extension field still accepts non-UTF-8 byte sequences.
  443. // This option has no effect on when used with the lite runtime.
  444. @property(nonatomic, readwrite) BOOL hasJavaStringCheckUtf8;
  445. @property(nonatomic, readwrite) BOOL javaStringCheckUtf8;
  446. @property(nonatomic, readwrite) BOOL hasOptimizeFor;
  447. @property(nonatomic, readwrite) GPBFileOptions_OptimizeMode optimizeFor;
  448. // Sets the Go package where structs generated from this .proto will be
  449. // placed. If omitted, the Go package will be derived from the following:
  450. // - The basename of the package import path, if provided.
  451. // - Otherwise, the package statement in the .proto file, if present.
  452. // - Otherwise, the basename of the .proto file, without extension.
  453. @property(nonatomic, readwrite) BOOL hasGoPackage;
  454. @property(nonatomic, readwrite, copy, null_resettable) NSString *goPackage;
  455. // Should generic services be generated in each language? "Generic" services
  456. // are not specific to any particular RPC system. They are generated by the
  457. // main code generators in each language (without additional plugins).
  458. // Generic services were the only kind of service generation supported by
  459. // early versions of google.protobuf.
  460. //
  461. // Generic services are now considered deprecated in favor of using plugins
  462. // that generate code specific to your particular RPC system. Therefore,
  463. // these default to false. Old code which depends on generic services should
  464. // explicitly set them to true.
  465. @property(nonatomic, readwrite) BOOL hasCcGenericServices;
  466. @property(nonatomic, readwrite) BOOL ccGenericServices;
  467. @property(nonatomic, readwrite) BOOL hasJavaGenericServices;
  468. @property(nonatomic, readwrite) BOOL javaGenericServices;
  469. @property(nonatomic, readwrite) BOOL hasPyGenericServices;
  470. @property(nonatomic, readwrite) BOOL pyGenericServices;
  471. // Is this file deprecated?
  472. // Depending on the target platform, this can emit Deprecated annotations
  473. // for everything in the file, or it will be completely ignored; in the very
  474. // least, this is a formalization for deprecating files.
  475. @property(nonatomic, readwrite) BOOL hasDeprecated;
  476. @property(nonatomic, readwrite) BOOL deprecated;
  477. // Enables the use of arenas for the proto messages in this file. This applies
  478. // only to generated classes for C++.
  479. @property(nonatomic, readwrite) BOOL hasCcEnableArenas;
  480. @property(nonatomic, readwrite) BOOL ccEnableArenas;
  481. // Sets the objective c class prefix which is prepended to all objective c
  482. // generated classes from this .proto. There is no default.
  483. @property(nonatomic, readwrite) BOOL hasObjcClassPrefix;
  484. @property(nonatomic, readwrite, copy, null_resettable) NSString *objcClassPrefix;
  485. // Namespace for generated classes; defaults to the package.
  486. @property(nonatomic, readwrite) BOOL hasCsharpNamespace;
  487. @property(nonatomic, readwrite, copy, null_resettable) NSString *csharpNamespace;
  488. // Whether the nano proto compiler should generate in the deprecated non-nano
  489. // suffixed package.
  490. @property(nonatomic, readwrite) BOOL hasJavananoUseDeprecatedPackage;
  491. @property(nonatomic, readwrite) BOOL javananoUseDeprecatedPackage;
  492. // The parser stores options it doesn't recognize here. See above.
  493. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray;
  494. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count;
  495. @end
  496. #pragma mark - GPBMessageOptions
  497. typedef GPB_ENUM(GPBMessageOptions_FieldNumber) {
  498. GPBMessageOptions_FieldNumber_MessageSetWireFormat = 1,
  499. GPBMessageOptions_FieldNumber_NoStandardDescriptorAccessor = 2,
  500. GPBMessageOptions_FieldNumber_Deprecated = 3,
  501. GPBMessageOptions_FieldNumber_MapEntry = 7,
  502. GPBMessageOptions_FieldNumber_UninterpretedOptionArray = 999,
  503. };
  504. @interface GPBMessageOptions : GPBMessage
  505. // Set true to use the old proto1 MessageSet wire format for extensions.
  506. // This is provided for backwards-compatibility with the MessageSet wire
  507. // format. You should not use this for any other reason: It's less
  508. // efficient, has fewer features, and is more complicated.
  509. //
  510. // The message must be defined exactly as follows:
  511. // message Foo {
  512. // option message_set_wire_format = true;
  513. // extensions 4 to max;
  514. // }
  515. // Note that the message cannot have any defined fields; MessageSets only
  516. // have extensions.
  517. //
  518. // All extensions of your type must be singular messages; e.g. they cannot
  519. // be int32s, enums, or repeated messages.
  520. //
  521. // Because this is an option, the above two restrictions are not enforced by
  522. // the protocol compiler.
  523. @property(nonatomic, readwrite) BOOL hasMessageSetWireFormat;
  524. @property(nonatomic, readwrite) BOOL messageSetWireFormat;
  525. // Disables the generation of the standard "descriptor()" accessor, which can
  526. // conflict with a field of the same name. This is meant to make migration
  527. // from proto1 easier; new code should avoid fields named "descriptor".
  528. @property(nonatomic, readwrite) BOOL hasNoStandardDescriptorAccessor;
  529. @property(nonatomic, readwrite) BOOL noStandardDescriptorAccessor;
  530. // Is this message deprecated?
  531. // Depending on the target platform, this can emit Deprecated annotations
  532. // for the message, or it will be completely ignored; in the very least,
  533. // this is a formalization for deprecating messages.
  534. @property(nonatomic, readwrite) BOOL hasDeprecated;
  535. @property(nonatomic, readwrite) BOOL deprecated;
  536. // Whether the message is an automatically generated map entry type for the
  537. // maps field.
  538. //
  539. // For maps fields:
  540. // map<KeyType, ValueType> map_field = 1;
  541. // The parsed descriptor looks like:
  542. // message MapFieldEntry {
  543. // option map_entry = true;
  544. // optional KeyType key = 1;
  545. // optional ValueType value = 2;
  546. // }
  547. // repeated MapFieldEntry map_field = 1;
  548. //
  549. // Implementations may choose not to generate the map_entry=true message, but
  550. // use a native map in the target language to hold the keys and values.
  551. // The reflection APIs in such implementions still need to work as
  552. // if the field is a repeated message field.
  553. //
  554. // NOTE: Do not set the option in .proto files. Always use the maps syntax
  555. // instead. The option should only be implicitly set by the proto compiler
  556. // parser.
  557. @property(nonatomic, readwrite) BOOL hasMapEntry;
  558. @property(nonatomic, readwrite) BOOL mapEntry;
  559. // The parser stores options it doesn't recognize here. See above.
  560. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray;
  561. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count;
  562. @end
  563. #pragma mark - GPBFieldOptions
  564. typedef GPB_ENUM(GPBFieldOptions_FieldNumber) {
  565. GPBFieldOptions_FieldNumber_Ctype = 1,
  566. GPBFieldOptions_FieldNumber_Packed = 2,
  567. GPBFieldOptions_FieldNumber_Deprecated = 3,
  568. GPBFieldOptions_FieldNumber_Lazy = 5,
  569. GPBFieldOptions_FieldNumber_Jstype = 6,
  570. GPBFieldOptions_FieldNumber_Weak = 10,
  571. GPBFieldOptions_FieldNumber_UninterpretedOptionArray = 999,
  572. };
  573. @interface GPBFieldOptions : GPBMessage
  574. // The ctype option instructs the C++ code generator to use a different
  575. // representation of the field than it normally would. See the specific
  576. // options below. This option is not yet implemented in the open source
  577. // release -- sorry, we'll try to include it in a future version!
  578. @property(nonatomic, readwrite) BOOL hasCtype;
  579. @property(nonatomic, readwrite) GPBFieldOptions_CType ctype;
  580. // The packed option can be enabled for repeated primitive fields to enable
  581. // a more efficient representation on the wire. Rather than repeatedly
  582. // writing the tag and type for each element, the entire array is encoded as
  583. // a single length-delimited blob. In proto3, only explicit setting it to
  584. // false will avoid using packed encoding.
  585. @property(nonatomic, readwrite) BOOL hasPacked;
  586. @property(nonatomic, readwrite) BOOL packed;
  587. // The jstype option determines the JavaScript type used for values of the
  588. // field. The option is permitted only for 64 bit integral and fixed types
  589. // (int64, uint64, sint64, fixed64, sfixed64). By default these types are
  590. // represented as JavaScript strings. This avoids loss of precision that can
  591. // happen when a large value is converted to a floating point JavaScript
  592. // numbers. Specifying JS_NUMBER for the jstype causes the generated
  593. // JavaScript code to use the JavaScript "number" type instead of strings.
  594. // This option is an enum to permit additional types to be added,
  595. // e.g. goog.math.Integer.
  596. @property(nonatomic, readwrite) BOOL hasJstype;
  597. @property(nonatomic, readwrite) GPBFieldOptions_JSType jstype;
  598. // Should this field be parsed lazily? Lazy applies only to message-type
  599. // fields. It means that when the outer message is initially parsed, the
  600. // inner message's contents will not be parsed but instead stored in encoded
  601. // form. The inner message will actually be parsed when it is first accessed.
  602. //
  603. // This is only a hint. Implementations are free to choose whether to use
  604. // eager or lazy parsing regardless of the value of this option. However,
  605. // setting this option true suggests that the protocol author believes that
  606. // using lazy parsing on this field is worth the additional bookkeeping
  607. // overhead typically needed to implement it.
  608. //
  609. // This option does not affect the public interface of any generated code;
  610. // all method signatures remain the same. Furthermore, thread-safety of the
  611. // interface is not affected by this option; const methods remain safe to
  612. // call from multiple threads concurrently, while non-const methods continue
  613. // to require exclusive access.
  614. //
  615. //
  616. // Note that implementations may choose not to check required fields within
  617. // a lazy sub-message. That is, calling IsInitialized() on the outher message
  618. // may return true even if the inner message has missing required fields.
  619. // This is necessary because otherwise the inner message would have to be
  620. // parsed in order to perform the check, defeating the purpose of lazy
  621. // parsing. An implementation which chooses not to check required fields
  622. // must be consistent about it. That is, for any particular sub-message, the
  623. // implementation must either *always* check its required fields, or *never*
  624. // check its required fields, regardless of whether or not the message has
  625. // been parsed.
  626. @property(nonatomic, readwrite) BOOL hasLazy;
  627. @property(nonatomic, readwrite) BOOL lazy;
  628. // Is this field deprecated?
  629. // Depending on the target platform, this can emit Deprecated annotations
  630. // for accessors, or it will be completely ignored; in the very least, this
  631. // is a formalization for deprecating fields.
  632. @property(nonatomic, readwrite) BOOL hasDeprecated;
  633. @property(nonatomic, readwrite) BOOL deprecated;
  634. // For Google-internal migration only. Do not use.
  635. @property(nonatomic, readwrite) BOOL hasWeak;
  636. @property(nonatomic, readwrite) BOOL weak;
  637. // The parser stores options it doesn't recognize here. See above.
  638. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray;
  639. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count;
  640. @end
  641. #pragma mark - GPBEnumOptions
  642. typedef GPB_ENUM(GPBEnumOptions_FieldNumber) {
  643. GPBEnumOptions_FieldNumber_AllowAlias = 2,
  644. GPBEnumOptions_FieldNumber_Deprecated = 3,
  645. GPBEnumOptions_FieldNumber_UninterpretedOptionArray = 999,
  646. };
  647. @interface GPBEnumOptions : GPBMessage
  648. // Set this option to true to allow mapping different tag names to the same
  649. // value.
  650. @property(nonatomic, readwrite) BOOL hasAllowAlias;
  651. @property(nonatomic, readwrite) BOOL allowAlias;
  652. // Is this enum deprecated?
  653. // Depending on the target platform, this can emit Deprecated annotations
  654. // for the enum, or it will be completely ignored; in the very least, this
  655. // is a formalization for deprecating enums.
  656. @property(nonatomic, readwrite) BOOL hasDeprecated;
  657. @property(nonatomic, readwrite) BOOL deprecated;
  658. // The parser stores options it doesn't recognize here. See above.
  659. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray;
  660. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count;
  661. @end
  662. #pragma mark - GPBEnumValueOptions
  663. typedef GPB_ENUM(GPBEnumValueOptions_FieldNumber) {
  664. GPBEnumValueOptions_FieldNumber_Deprecated = 1,
  665. GPBEnumValueOptions_FieldNumber_UninterpretedOptionArray = 999,
  666. };
  667. @interface GPBEnumValueOptions : GPBMessage
  668. // Is this enum value deprecated?
  669. // Depending on the target platform, this can emit Deprecated annotations
  670. // for the enum value, or it will be completely ignored; in the very least,
  671. // this is a formalization for deprecating enum values.
  672. @property(nonatomic, readwrite) BOOL hasDeprecated;
  673. @property(nonatomic, readwrite) BOOL deprecated;
  674. // The parser stores options it doesn't recognize here. See above.
  675. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray;
  676. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count;
  677. @end
  678. #pragma mark - GPBServiceOptions
  679. typedef GPB_ENUM(GPBServiceOptions_FieldNumber) {
  680. GPBServiceOptions_FieldNumber_Deprecated = 33,
  681. GPBServiceOptions_FieldNumber_UninterpretedOptionArray = 999,
  682. };
  683. @interface GPBServiceOptions : GPBMessage
  684. // Is this service deprecated?
  685. // Depending on the target platform, this can emit Deprecated annotations
  686. // for the service, or it will be completely ignored; in the very least,
  687. // this is a formalization for deprecating services.
  688. @property(nonatomic, readwrite) BOOL hasDeprecated;
  689. @property(nonatomic, readwrite) BOOL deprecated;
  690. // The parser stores options it doesn't recognize here. See above.
  691. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray;
  692. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count;
  693. @end
  694. #pragma mark - GPBMethodOptions
  695. typedef GPB_ENUM(GPBMethodOptions_FieldNumber) {
  696. GPBMethodOptions_FieldNumber_Deprecated = 33,
  697. GPBMethodOptions_FieldNumber_UninterpretedOptionArray = 999,
  698. };
  699. @interface GPBMethodOptions : GPBMessage
  700. // Is this method deprecated?
  701. // Depending on the target platform, this can emit Deprecated annotations
  702. // for the method, or it will be completely ignored; in the very least,
  703. // this is a formalization for deprecating methods.
  704. @property(nonatomic, readwrite) BOOL hasDeprecated;
  705. @property(nonatomic, readwrite) BOOL deprecated;
  706. // The parser stores options it doesn't recognize here. See above.
  707. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray;
  708. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count;
  709. @end
  710. #pragma mark - GPBUninterpretedOption
  711. typedef GPB_ENUM(GPBUninterpretedOption_FieldNumber) {
  712. GPBUninterpretedOption_FieldNumber_NameArray = 2,
  713. GPBUninterpretedOption_FieldNumber_IdentifierValue = 3,
  714. GPBUninterpretedOption_FieldNumber_PositiveIntValue = 4,
  715. GPBUninterpretedOption_FieldNumber_NegativeIntValue = 5,
  716. GPBUninterpretedOption_FieldNumber_DoubleValue = 6,
  717. GPBUninterpretedOption_FieldNumber_StringValue = 7,
  718. GPBUninterpretedOption_FieldNumber_AggregateValue = 8,
  719. };
  720. // A message representing a option the parser does not recognize. This only
  721. // appears in options protos created by the compiler::Parser class.
  722. // DescriptorPool resolves these when building Descriptor objects. Therefore,
  723. // options protos in descriptor objects (e.g. returned by Descriptor::options(),
  724. // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
  725. // in them.
  726. @interface GPBUninterpretedOption : GPBMessage
  727. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption_NamePart*> *nameArray;
  728. @property(nonatomic, readonly) NSUInteger nameArray_Count;
  729. // The value of the uninterpreted option, in whatever type the tokenizer
  730. // identified it as during parsing. Exactly one of these should be set.
  731. @property(nonatomic, readwrite) BOOL hasIdentifierValue;
  732. @property(nonatomic, readwrite, copy, null_resettable) NSString *identifierValue;
  733. @property(nonatomic, readwrite) BOOL hasPositiveIntValue;
  734. @property(nonatomic, readwrite) uint64_t positiveIntValue;
  735. @property(nonatomic, readwrite) BOOL hasNegativeIntValue;
  736. @property(nonatomic, readwrite) int64_t negativeIntValue;
  737. @property(nonatomic, readwrite) BOOL hasDoubleValue;
  738. @property(nonatomic, readwrite) double doubleValue;
  739. @property(nonatomic, readwrite) BOOL hasStringValue;
  740. @property(nonatomic, readwrite, copy, null_resettable) NSData *stringValue;
  741. @property(nonatomic, readwrite) BOOL hasAggregateValue;
  742. @property(nonatomic, readwrite, copy, null_resettable) NSString *aggregateValue;
  743. @end
  744. #pragma mark - GPBUninterpretedOption_NamePart
  745. typedef GPB_ENUM(GPBUninterpretedOption_NamePart_FieldNumber) {
  746. GPBUninterpretedOption_NamePart_FieldNumber_NamePart = 1,
  747. GPBUninterpretedOption_NamePart_FieldNumber_IsExtension = 2,
  748. };
  749. // The name of the uninterpreted option. Each string represents a segment in
  750. // a dot-separated name. is_extension is true iff a segment represents an
  751. // extension (denoted with parentheses in options specs in .proto files).
  752. // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
  753. // "foo.(bar.baz).qux".
  754. @interface GPBUninterpretedOption_NamePart : GPBMessage
  755. @property(nonatomic, readwrite) BOOL hasNamePart;
  756. @property(nonatomic, readwrite, copy, null_resettable) NSString *namePart;
  757. @property(nonatomic, readwrite) BOOL hasIsExtension;
  758. @property(nonatomic, readwrite) BOOL isExtension;
  759. @end
  760. #pragma mark - GPBSourceCodeInfo
  761. typedef GPB_ENUM(GPBSourceCodeInfo_FieldNumber) {
  762. GPBSourceCodeInfo_FieldNumber_LocationArray = 1,
  763. };
  764. // Encapsulates information about the original source file from which a
  765. // FileDescriptorProto was generated.
  766. @interface GPBSourceCodeInfo : GPBMessage
  767. // A Location identifies a piece of source code in a .proto file which
  768. // corresponds to a particular definition. This information is intended
  769. // to be useful to IDEs, code indexers, documentation generators, and similar
  770. // tools.
  771. //
  772. // For example, say we have a file like:
  773. // message Foo {
  774. // optional string foo = 1;
  775. // }
  776. // Let's look at just the field definition:
  777. // optional string foo = 1;
  778. // ^ ^^ ^^ ^ ^^^
  779. // a bc de f ghi
  780. // We have the following locations:
  781. // span path represents
  782. // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
  783. // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
  784. // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
  785. // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
  786. // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
  787. //
  788. // Notes:
  789. // - A location may refer to a repeated field itself (i.e. not to any
  790. // particular index within it). This is used whenever a set of elements are
  791. // logically enclosed in a single code segment. For example, an entire
  792. // extend block (possibly containing multiple extension definitions) will
  793. // have an outer location whose path refers to the "extensions" repeated
  794. // field without an index.
  795. // - Multiple locations may have the same path. This happens when a single
  796. // logical declaration is spread out across multiple places. The most
  797. // obvious example is the "extend" block again -- there may be multiple
  798. // extend blocks in the same scope, each of which will have the same path.
  799. // - A location's span is not always a subset of its parent's span. For
  800. // example, the "extendee" of an extension declaration appears at the
  801. // beginning of the "extend" block and is shared by all extensions within
  802. // the block.
  803. // - Just because a location's span is a subset of some other location's span
  804. // does not mean that it is a descendent. For example, a "group" defines
  805. // both a type and a field in a single declaration. Thus, the locations
  806. // corresponding to the type and field and their components will overlap.
  807. // - Code which tries to interpret locations should probably be designed to
  808. // ignore those that it doesn't understand, as more types of locations could
  809. // be recorded in the future.
  810. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBSourceCodeInfo_Location*> *locationArray;
  811. @property(nonatomic, readonly) NSUInteger locationArray_Count;
  812. @end
  813. #pragma mark - GPBSourceCodeInfo_Location
  814. typedef GPB_ENUM(GPBSourceCodeInfo_Location_FieldNumber) {
  815. GPBSourceCodeInfo_Location_FieldNumber_PathArray = 1,
  816. GPBSourceCodeInfo_Location_FieldNumber_SpanArray = 2,
  817. GPBSourceCodeInfo_Location_FieldNumber_LeadingComments = 3,
  818. GPBSourceCodeInfo_Location_FieldNumber_TrailingComments = 4,
  819. GPBSourceCodeInfo_Location_FieldNumber_LeadingDetachedCommentsArray = 6,
  820. };
  821. @interface GPBSourceCodeInfo_Location : GPBMessage
  822. // Identifies which part of the FileDescriptorProto was defined at this
  823. // location.
  824. //
  825. // Each element is a field number or an index. They form a path from
  826. // the root FileDescriptorProto to the place where the definition. For
  827. // example, this path:
  828. // [ 4, 3, 2, 7, 1 ]
  829. // refers to:
  830. // file.message_type(3) // 4, 3
  831. // .field(7) // 2, 7
  832. // .name() // 1
  833. // This is because FileDescriptorProto.message_type has field number 4:
  834. // repeated DescriptorProto message_type = 4;
  835. // and DescriptorProto.field has field number 2:
  836. // repeated FieldDescriptorProto field = 2;
  837. // and FieldDescriptorProto.name has field number 1:
  838. // optional string name = 1;
  839. //
  840. // Thus, the above path gives the location of a field name. If we removed
  841. // the last element:
  842. // [ 4, 3, 2, 7 ]
  843. // this path refers to the whole field declaration (from the beginning
  844. // of the label to the terminating semicolon).
  845. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *pathArray;
  846. @property(nonatomic, readonly) NSUInteger pathArray_Count;
  847. // Always has exactly three or four elements: start line, start column,
  848. // end line (optional, otherwise assumed same as start line), end column.
  849. // These are packed into a single field for efficiency. Note that line
  850. // and column numbers are zero-based -- typically you will want to add
  851. // 1 to each before displaying to a user.
  852. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *spanArray;
  853. @property(nonatomic, readonly) NSUInteger spanArray_Count;
  854. // If this SourceCodeInfo represents a complete declaration, these are any
  855. // comments appearing before and after the declaration which appear to be
  856. // attached to the declaration.
  857. //
  858. // A series of line comments appearing on consecutive lines, with no other
  859. // tokens appearing on those lines, will be treated as a single comment.
  860. //
  861. // leading_detached_comments will keep paragraphs of comments that appear
  862. // before (but not connected to) the current element. Each paragraph,
  863. // separated by empty lines, will be one comment element in the repeated
  864. // field.
  865. //
  866. // Only the comment content is provided; comment markers (e.g. //) are
  867. // stripped out. For block comments, leading whitespace and an asterisk
  868. // will be stripped from the beginning of each line other than the first.
  869. // Newlines are included in the output.
  870. //
  871. // Examples:
  872. //
  873. // optional int32 foo = 1; // Comment attached to foo.
  874. // // Comment attached to bar.
  875. // optional int32 bar = 2;
  876. //
  877. // optional string baz = 3;
  878. // // Comment attached to baz.
  879. // // Another line attached to baz.
  880. //
  881. // // Comment attached to qux.
  882. // //
  883. // // Another line attached to qux.
  884. // optional double qux = 4;
  885. //
  886. // // Detached comment for corge. This is not leading or trailing comments
  887. // // to qux or corge because there are blank lines separating it from
  888. // // both.
  889. //
  890. // // Detached comment for corge paragraph 2.
  891. //
  892. // optional string corge = 5;
  893. // /* Block comment attached
  894. // * to corge. Leading asterisks
  895. // * will be removed. */
  896. // /* Block comment attached to
  897. // * grault. */
  898. // optional int32 grault = 6;
  899. //
  900. // // ignored detached comments.
  901. @property(nonatomic, readwrite) BOOL hasLeadingComments;
  902. @property(nonatomic, readwrite, copy, null_resettable) NSString *leadingComments;
  903. @property(nonatomic, readwrite) BOOL hasTrailingComments;
  904. @property(nonatomic, readwrite, copy, null_resettable) NSString *trailingComments;
  905. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *leadingDetachedCommentsArray;
  906. @property(nonatomic, readonly) NSUInteger leadingDetachedCommentsArray_Count;
  907. @end
  908. #pragma mark - GPBGeneratedCodeInfo
  909. typedef GPB_ENUM(GPBGeneratedCodeInfo_FieldNumber) {
  910. GPBGeneratedCodeInfo_FieldNumber_AnnotationArray = 1,
  911. };
  912. // Describes the relationship between generated code and its original source
  913. // file. A GeneratedCodeInfo message is associated with only one generated
  914. // source file, but may contain references to different source .proto files.
  915. @interface GPBGeneratedCodeInfo : GPBMessage
  916. // An Annotation connects some span of text in generated code to an element
  917. // of its generating .proto file.
  918. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBGeneratedCodeInfo_Annotation*> *annotationArray;
  919. @property(nonatomic, readonly) NSUInteger annotationArray_Count;
  920. @end
  921. #pragma mark - GPBGeneratedCodeInfo_Annotation
  922. typedef GPB_ENUM(GPBGeneratedCodeInfo_Annotation_FieldNumber) {
  923. GPBGeneratedCodeInfo_Annotation_FieldNumber_PathArray = 1,
  924. GPBGeneratedCodeInfo_Annotation_FieldNumber_SourceFile = 2,
  925. GPBGeneratedCodeInfo_Annotation_FieldNumber_Begin = 3,
  926. GPBGeneratedCodeInfo_Annotation_FieldNumber_End = 4,
  927. };
  928. @interface GPBGeneratedCodeInfo_Annotation : GPBMessage
  929. // Identifies the element in the original source .proto file. This field
  930. // is formatted the same as SourceCodeInfo.Location.path.
  931. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *pathArray;
  932. @property(nonatomic, readonly) NSUInteger pathArray_Count;
  933. // Identifies the filesystem path to the original source .proto.
  934. @property(nonatomic, readwrite) BOOL hasSourceFile;
  935. @property(nonatomic, readwrite, copy, null_resettable) NSString *sourceFile;
  936. // Identifies the starting offset in bytes in the generated code
  937. // that relates to the identified object.
  938. @property(nonatomic, readwrite) BOOL hasBegin;
  939. @property(nonatomic, readwrite) int32_t begin;
  940. // Identifies the ending offset in bytes in the generated code that
  941. // relates to the identified offset. The end offset should be one past
  942. // the last relevant byte (so the length of the text = end - begin).
  943. @property(nonatomic, readwrite) BOOL hasEnd;
  944. @property(nonatomic, readwrite) int32_t end;
  945. @end
  946. NS_ASSUME_NONNULL_END
  947. CF_EXTERN_C_END
  948. // @@protoc_insertion_point(global_scope)