Type.pbobjc.h 12 KB

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