GPBType.pbobjc.h 13 KB

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