GPBType.pbobjc.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/type.proto
  3. // This CPP symbol can be defined to use imports that match up to the framework
  4. // imports needed when using CocoaPods.
  5. #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
  6. #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
  7. #endif
  8. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  9. #import <Protobuf/GPBDescriptor.h>
  10. #import <Protobuf/GPBMessage.h>
  11. #import <Protobuf/GPBRootObject.h>
  12. #else
  13. #import "GPBDescriptor.h"
  14. #import "GPBMessage.h"
  15. #import "GPBRootObject.h"
  16. #endif
  17. #if GOOGLE_PROTOBUF_OBJC_VERSION < 30004
  18. #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
  19. #endif
  20. #if 30004 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
  21. #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
  22. #endif
  23. // @@protoc_insertion_point(imports)
  24. #pragma clang diagnostic push
  25. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  26. CF_EXTERN_C_BEGIN
  27. @class GPBAny;
  28. @class GPBEnumValue;
  29. @class GPBField;
  30. @class GPBOption;
  31. @class GPBSourceContext;
  32. NS_ASSUME_NONNULL_BEGIN
  33. #pragma mark - Enum GPBSyntax
  34. /** The syntax in which a protocol buffer element is defined. */
  35. typedef GPB_ENUM(GPBSyntax) {
  36. /**
  37. * Value used if any message's field encounters a value that is not defined
  38. * by this enum. The message will also have C functions to get/set the rawValue
  39. * of the field.
  40. **/
  41. GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  42. /** Syntax `proto2`. */
  43. GPBSyntax_SyntaxProto2 = 0,
  44. /** Syntax `proto3`. */
  45. GPBSyntax_SyntaxProto3 = 1,
  46. };
  47. GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void);
  48. /**
  49. * Checks to see if the given value is defined by the enum or was not known at
  50. * the time this source was generated.
  51. **/
  52. BOOL GPBSyntax_IsValidValue(int32_t value);
  53. #pragma mark - Enum GPBField_Kind
  54. /** Basic field types. */
  55. typedef GPB_ENUM(GPBField_Kind) {
  56. /**
  57. * Value used if any message's field encounters a value that is not defined
  58. * by this enum. The message will also have C functions to get/set the rawValue
  59. * of the field.
  60. **/
  61. GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  62. /** Field type unknown. */
  63. GPBField_Kind_TypeUnknown = 0,
  64. /** Field type double. */
  65. GPBField_Kind_TypeDouble = 1,
  66. /** Field type float. */
  67. GPBField_Kind_TypeFloat = 2,
  68. /** Field type int64. */
  69. GPBField_Kind_TypeInt64 = 3,
  70. /** Field type uint64. */
  71. GPBField_Kind_TypeUint64 = 4,
  72. /** Field type int32. */
  73. GPBField_Kind_TypeInt32 = 5,
  74. /** Field type fixed64. */
  75. GPBField_Kind_TypeFixed64 = 6,
  76. /** Field type fixed32. */
  77. GPBField_Kind_TypeFixed32 = 7,
  78. /** Field type bool. */
  79. GPBField_Kind_TypeBool = 8,
  80. /** Field type string. */
  81. GPBField_Kind_TypeString = 9,
  82. /** Field type group. Proto2 syntax only, and deprecated. */
  83. GPBField_Kind_TypeGroup = 10,
  84. /** Field type message. */
  85. GPBField_Kind_TypeMessage = 11,
  86. /** Field type bytes. */
  87. GPBField_Kind_TypeBytes = 12,
  88. /** Field type uint32. */
  89. GPBField_Kind_TypeUint32 = 13,
  90. /** Field type enum. */
  91. GPBField_Kind_TypeEnum = 14,
  92. /** Field type sfixed32. */
  93. GPBField_Kind_TypeSfixed32 = 15,
  94. /** Field type sfixed64. */
  95. GPBField_Kind_TypeSfixed64 = 16,
  96. /** Field type sint32. */
  97. GPBField_Kind_TypeSint32 = 17,
  98. /** Field type sint64. */
  99. GPBField_Kind_TypeSint64 = 18,
  100. };
  101. GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void);
  102. /**
  103. * Checks to see if the given value is defined by the enum or was not known at
  104. * the time this source was generated.
  105. **/
  106. BOOL GPBField_Kind_IsValidValue(int32_t value);
  107. #pragma mark - Enum GPBField_Cardinality
  108. /** Whether a field is optional, required, or repeated. */
  109. typedef GPB_ENUM(GPBField_Cardinality) {
  110. /**
  111. * Value used if any message's field encounters a value that is not defined
  112. * by this enum. The message will also have C functions to get/set the rawValue
  113. * of the field.
  114. **/
  115. GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  116. /** For fields with unknown cardinality. */
  117. GPBField_Cardinality_CardinalityUnknown = 0,
  118. /** For optional fields. */
  119. GPBField_Cardinality_CardinalityOptional = 1,
  120. /** For required fields. Proto2 syntax only. */
  121. GPBField_Cardinality_CardinalityRequired = 2,
  122. /** For repeated fields. */
  123. GPBField_Cardinality_CardinalityRepeated = 3,
  124. };
  125. GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void);
  126. /**
  127. * Checks to see if the given value is defined by the enum or was not known at
  128. * the time this source was generated.
  129. **/
  130. BOOL GPBField_Cardinality_IsValidValue(int32_t value);
  131. #pragma mark - GPBTypeRoot
  132. /**
  133. * Exposes the extension registry for this file.
  134. *
  135. * The base class provides:
  136. * @code
  137. * + (GPBExtensionRegistry *)extensionRegistry;
  138. * @endcode
  139. * which is a @c GPBExtensionRegistry that includes all the extensions defined by
  140. * this file and all files that it depends on.
  141. **/
  142. GPB_FINAL @interface GPBTypeRoot : GPBRootObject
  143. @end
  144. #pragma mark - GPBType
  145. typedef GPB_ENUM(GPBType_FieldNumber) {
  146. GPBType_FieldNumber_Name = 1,
  147. GPBType_FieldNumber_FieldsArray = 2,
  148. GPBType_FieldNumber_OneofsArray = 3,
  149. GPBType_FieldNumber_OptionsArray = 4,
  150. GPBType_FieldNumber_SourceContext = 5,
  151. GPBType_FieldNumber_Syntax = 6,
  152. };
  153. /**
  154. * A protocol buffer message type.
  155. **/
  156. GPB_FINAL @interface GPBType : GPBMessage
  157. /** The fully qualified message name. */
  158. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  159. /** The list of fields. */
  160. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBField*> *fieldsArray;
  161. /** The number of items in @c fieldsArray without causing the array to be created. */
  162. @property(nonatomic, readonly) NSUInteger fieldsArray_Count;
  163. /** The list of types appearing in `oneof` definitions in this type. */
  164. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *oneofsArray;
  165. /** The number of items in @c oneofsArray without causing the array to be created. */
  166. @property(nonatomic, readonly) NSUInteger oneofsArray_Count;
  167. /** The protocol buffer options. */
  168. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
  169. /** The number of items in @c optionsArray without causing the array to be created. */
  170. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  171. /** The source context. */
  172. @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
  173. /** Test to see if @c sourceContext has been set. */
  174. @property(nonatomic, readwrite) BOOL hasSourceContext;
  175. /** The source syntax. */
  176. @property(nonatomic, readwrite) GPBSyntax syntax;
  177. @end
  178. /**
  179. * Fetches the raw value of a @c GPBType's @c syntax property, even
  180. * if the value was not defined by the enum at the time the code was generated.
  181. **/
  182. int32_t GPBType_Syntax_RawValue(GPBType *message);
  183. /**
  184. * Sets the raw value of an @c GPBType's @c syntax property, allowing
  185. * it to be set to a value that was not defined by the enum at the time the code
  186. * was generated.
  187. **/
  188. void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value);
  189. #pragma mark - GPBField
  190. typedef GPB_ENUM(GPBField_FieldNumber) {
  191. GPBField_FieldNumber_Kind = 1,
  192. GPBField_FieldNumber_Cardinality = 2,
  193. GPBField_FieldNumber_Number = 3,
  194. GPBField_FieldNumber_Name = 4,
  195. GPBField_FieldNumber_TypeURL = 6,
  196. GPBField_FieldNumber_OneofIndex = 7,
  197. GPBField_FieldNumber_Packed = 8,
  198. GPBField_FieldNumber_OptionsArray = 9,
  199. GPBField_FieldNumber_JsonName = 10,
  200. GPBField_FieldNumber_DefaultValue = 11,
  201. };
  202. /**
  203. * A single field of a message type.
  204. **/
  205. GPB_FINAL @interface GPBField : GPBMessage
  206. /** The field type. */
  207. @property(nonatomic, readwrite) GPBField_Kind kind;
  208. /** The field cardinality. */
  209. @property(nonatomic, readwrite) GPBField_Cardinality cardinality;
  210. /** The field number. */
  211. @property(nonatomic, readwrite) int32_t number;
  212. /** The field name. */
  213. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  214. /**
  215. * The field type URL, without the scheme, for message or enumeration
  216. * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
  217. **/
  218. @property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
  219. /**
  220. * The index of the field type in `Type.oneofs`, for message or enumeration
  221. * types. The first type has index 1; zero means the type is not in the list.
  222. **/
  223. @property(nonatomic, readwrite) int32_t oneofIndex;
  224. /** Whether to use alternative packed wire representation. */
  225. @property(nonatomic, readwrite) BOOL packed;
  226. /** The protocol buffer options. */
  227. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
  228. /** The number of items in @c optionsArray without causing the array to be created. */
  229. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  230. /** The field JSON name. */
  231. @property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
  232. /** The string value of the default value of this field. Proto2 syntax only. */
  233. @property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue;
  234. @end
  235. /**
  236. * Fetches the raw value of a @c GPBField's @c kind property, even
  237. * if the value was not defined by the enum at the time the code was generated.
  238. **/
  239. int32_t GPBField_Kind_RawValue(GPBField *message);
  240. /**
  241. * Sets the raw value of an @c GPBField's @c kind property, allowing
  242. * it to be set to a value that was not defined by the enum at the time the code
  243. * was generated.
  244. **/
  245. void SetGPBField_Kind_RawValue(GPBField *message, int32_t value);
  246. /**
  247. * Fetches the raw value of a @c GPBField's @c cardinality property, even
  248. * if the value was not defined by the enum at the time the code was generated.
  249. **/
  250. int32_t GPBField_Cardinality_RawValue(GPBField *message);
  251. /**
  252. * Sets the raw value of an @c GPBField's @c cardinality property, allowing
  253. * it to be set to a value that was not defined by the enum at the time the code
  254. * was generated.
  255. **/
  256. void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value);
  257. #pragma mark - GPBEnum
  258. typedef GPB_ENUM(GPBEnum_FieldNumber) {
  259. GPBEnum_FieldNumber_Name = 1,
  260. GPBEnum_FieldNumber_EnumvalueArray = 2,
  261. GPBEnum_FieldNumber_OptionsArray = 3,
  262. GPBEnum_FieldNumber_SourceContext = 4,
  263. GPBEnum_FieldNumber_Syntax = 5,
  264. };
  265. /**
  266. * Enum type definition.
  267. **/
  268. GPB_FINAL @interface GPBEnum : GPBMessage
  269. /** Enum type name. */
  270. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  271. /** Enum value definitions. */
  272. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumValue*> *enumvalueArray;
  273. /** The number of items in @c enumvalueArray without causing the array to be created. */
  274. @property(nonatomic, readonly) NSUInteger enumvalueArray_Count;
  275. /** Protocol buffer options. */
  276. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
  277. /** The number of items in @c optionsArray without causing the array to be created. */
  278. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  279. /** The source context. */
  280. @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
  281. /** Test to see if @c sourceContext has been set. */
  282. @property(nonatomic, readwrite) BOOL hasSourceContext;
  283. /** The source syntax. */
  284. @property(nonatomic, readwrite) GPBSyntax syntax;
  285. @end
  286. /**
  287. * Fetches the raw value of a @c GPBEnum's @c syntax property, even
  288. * if the value was not defined by the enum at the time the code was generated.
  289. **/
  290. int32_t GPBEnum_Syntax_RawValue(GPBEnum *message);
  291. /**
  292. * Sets the raw value of an @c GPBEnum's @c syntax property, allowing
  293. * it to be set to a value that was not defined by the enum at the time the code
  294. * was generated.
  295. **/
  296. void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value);
  297. #pragma mark - GPBEnumValue
  298. typedef GPB_ENUM(GPBEnumValue_FieldNumber) {
  299. GPBEnumValue_FieldNumber_Name = 1,
  300. GPBEnumValue_FieldNumber_Number = 2,
  301. GPBEnumValue_FieldNumber_OptionsArray = 3,
  302. };
  303. /**
  304. * Enum value definition.
  305. **/
  306. GPB_FINAL @interface GPBEnumValue : GPBMessage
  307. /** Enum value name. */
  308. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  309. /** Enum value number. */
  310. @property(nonatomic, readwrite) int32_t number;
  311. /** Protocol buffer options. */
  312. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
  313. /** The number of items in @c optionsArray without causing the array to be created. */
  314. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  315. @end
  316. #pragma mark - GPBOption
  317. typedef GPB_ENUM(GPBOption_FieldNumber) {
  318. GPBOption_FieldNumber_Name = 1,
  319. GPBOption_FieldNumber_Value = 2,
  320. };
  321. /**
  322. * A protocol buffer option, which can be attached to a message, field,
  323. * enumeration, etc.
  324. **/
  325. GPB_FINAL @interface GPBOption : GPBMessage
  326. /**
  327. * The option's name. For protobuf built-in options (options defined in
  328. * descriptor.proto), this is the short name. For example, `"map_entry"`.
  329. * For custom options, it should be the fully-qualified name. For example,
  330. * `"google.api.http"`.
  331. **/
  332. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  333. /**
  334. * The option's value packed in an Any message. If the value is a primitive,
  335. * the corresponding wrapper type defined in google/protobuf/wrappers.proto
  336. * should be used. If the value is an enum, it should be stored as an int32
  337. * value using the google.protobuf.Int32Value type.
  338. **/
  339. @property(nonatomic, readwrite, strong, null_resettable) GPBAny *value;
  340. /** Test to see if @c value has been set. */
  341. @property(nonatomic, readwrite) BOOL hasValue;
  342. @end
  343. NS_ASSUME_NONNULL_END
  344. CF_EXTERN_C_END
  345. #pragma clang diagnostic pop
  346. // @@protoc_insertion_point(global_scope)