/jni-build/jni/include/google/protobuf/objectivec/google/protobuf/Type.pbobjc.h

https://gitlab.com/zharfi/GunSafety · C Header · 321 lines · 154 code · 97 blank · 70 comment · 1 complexity · 1726c119abdbdcdfbc97419432689455 MD5 · raw file

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