Type.pbobjc.h 13 KB

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