Type.pbobjc.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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-gen-objc which is incompatible with your Protocol Buffer sources.
  6. #endif
  7. // @@protoc_insertion_point(imports)
  8. CF_EXTERN_C_BEGIN
  9. @class GPBAny;
  10. @class GPBSourceContext;
  11. NS_ASSUME_NONNULL_BEGIN
  12. #pragma mark - Enum GPBSyntax
  13. // Syntax specifies the syntax in which a service element was defined.
  14. typedef GPB_ENUM(GPBSyntax) {
  15. GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  16. // Syntax "proto2"
  17. GPBSyntax_SyntaxProto2 = 0,
  18. // Syntax "proto3"
  19. GPBSyntax_SyntaxProto3 = 1,
  20. };
  21. GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void);
  22. BOOL GPBSyntax_IsValidValue(int32_t value);
  23. #pragma mark - Enum GPBField_Kind
  24. // Kind represents a basic field type.
  25. typedef GPB_ENUM(GPBField_Kind) {
  26. GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  27. // Field type unknown.
  28. GPBField_Kind_TypeUnknown = 0,
  29. // Field type double.
  30. GPBField_Kind_TypeDouble = 1,
  31. // Field type float.
  32. GPBField_Kind_TypeFloat = 2,
  33. // Field type int64.
  34. GPBField_Kind_TypeInt64 = 3,
  35. // Field type uint64.
  36. GPBField_Kind_TypeUint64 = 4,
  37. // Field type int32.
  38. GPBField_Kind_TypeInt32 = 5,
  39. // Field type fixed64.
  40. GPBField_Kind_TypeFixed64 = 6,
  41. // Field type fixed32.
  42. GPBField_Kind_TypeFixed32 = 7,
  43. // Field type bool.
  44. GPBField_Kind_TypeBool = 8,
  45. // Field type string.
  46. GPBField_Kind_TypeString = 9,
  47. // Field type group (deprecated proto2 type)
  48. GPBField_Kind_TypeGroup = 10,
  49. // Field type message.
  50. GPBField_Kind_TypeMessage = 11,
  51. // Field type bytes.
  52. GPBField_Kind_TypeBytes = 12,
  53. // Field type uint32.
  54. GPBField_Kind_TypeUint32 = 13,
  55. // Field type enum.
  56. GPBField_Kind_TypeEnum = 14,
  57. // Field type sfixed32.
  58. GPBField_Kind_TypeSfixed32 = 15,
  59. // Field type sfixed64.
  60. GPBField_Kind_TypeSfixed64 = 16,
  61. // Field type sint32.
  62. GPBField_Kind_TypeSint32 = 17,
  63. // Field type sint64.
  64. GPBField_Kind_TypeSint64 = 18,
  65. };
  66. GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void);
  67. BOOL GPBField_Kind_IsValidValue(int32_t value);
  68. #pragma mark - Enum GPBField_Cardinality
  69. // Cardinality represents whether a field is optional, required, or
  70. // repeated.
  71. typedef GPB_ENUM(GPBField_Cardinality) {
  72. GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  73. // The field cardinality is unknown. Typically an error condition.
  74. GPBField_Cardinality_CardinalityUnknown = 0,
  75. // For optional fields.
  76. GPBField_Cardinality_CardinalityOptional = 1,
  77. // For required fields. Not used for proto3.
  78. GPBField_Cardinality_CardinalityRequired = 2,
  79. // For repeated fields.
  80. GPBField_Cardinality_CardinalityRepeated = 3,
  81. };
  82. GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void);
  83. BOOL GPBField_Cardinality_IsValidValue(int32_t value);
  84. #pragma mark - GPBTypeRoot
  85. @interface GPBTypeRoot : GPBRootObject
  86. // The base class provides:
  87. // + (GPBExtensionRegistry *)extensionRegistry;
  88. // which is an GPBExtensionRegistry that includes all the extensions defined by
  89. // this file and all files that it depends on.
  90. @end
  91. #pragma mark - GPBType
  92. typedef GPB_ENUM(GPBType_FieldNumber) {
  93. GPBType_FieldNumber_Name = 1,
  94. GPBType_FieldNumber_FieldsArray = 2,
  95. GPBType_FieldNumber_OneofsArray = 3,
  96. GPBType_FieldNumber_OptionsArray = 4,
  97. GPBType_FieldNumber_SourceContext = 5,
  98. GPBType_FieldNumber_Syntax = 6,
  99. };
  100. // A light-weight descriptor for a proto message type.
  101. @interface GPBType : GPBMessage
  102. // The fully qualified message name.
  103. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  104. // The list of fields.
  105. // |fieldsArray| contains |GPBField|
  106. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldsArray;
  107. @property(nonatomic, readonly) NSUInteger fieldsArray_Count;
  108. // The list of oneof definitions.
  109. // |oneofsArray| contains |NSString|
  110. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *oneofsArray;
  111. @property(nonatomic, readonly) NSUInteger oneofsArray_Count;
  112. // The proto options.
  113. // |optionsArray| contains |GPBOption|
  114. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray;
  115. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  116. // The source context.
  117. @property(nonatomic, readwrite) BOOL hasSourceContext;
  118. @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
  119. // The source syntax.
  120. @property(nonatomic, readwrite) GPBSyntax syntax;
  121. @end
  122. int32_t GPBType_Syntax_RawValue(GPBType *message);
  123. void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value);
  124. #pragma mark - GPBField
  125. typedef GPB_ENUM(GPBField_FieldNumber) {
  126. GPBField_FieldNumber_Kind = 1,
  127. GPBField_FieldNumber_Cardinality = 2,
  128. GPBField_FieldNumber_Number = 3,
  129. GPBField_FieldNumber_Name = 4,
  130. GPBField_FieldNumber_TypeURL = 6,
  131. GPBField_FieldNumber_OneofIndex = 7,
  132. GPBField_FieldNumber_Packed = 8,
  133. GPBField_FieldNumber_OptionsArray = 9,
  134. GPBField_FieldNumber_JsonName = 10,
  135. };
  136. // Field represents a single field of a message type.
  137. @interface GPBField : GPBMessage
  138. // The field kind.
  139. @property(nonatomic, readwrite) GPBField_Kind kind;
  140. // The field cardinality, i.e. optional/required/repeated.
  141. @property(nonatomic, readwrite) GPBField_Cardinality cardinality;
  142. // The proto field number.
  143. @property(nonatomic, readwrite) int32_t number;
  144. // The field name.
  145. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  146. // The type URL (without the scheme) when the type is MESSAGE or ENUM,
  147. // such as `type.googleapis.com/google.protobuf.Empty`.
  148. @property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
  149. // Index in Type.oneofs. Starts at 1. Zero means no oneof mapping.
  150. @property(nonatomic, readwrite) int32_t oneofIndex;
  151. // Whether to use alternative packed wire representation.
  152. @property(nonatomic, readwrite) BOOL packed;
  153. // The proto options.
  154. // |optionsArray| contains |GPBOption|
  155. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray;
  156. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  157. // The JSON name for this field.
  158. @property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
  159. @end
  160. int32_t GPBField_Kind_RawValue(GPBField *message);
  161. void SetGPBField_Kind_RawValue(GPBField *message, int32_t value);
  162. int32_t GPBField_Cardinality_RawValue(GPBField *message);
  163. void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value);
  164. #pragma mark - GPBEnum
  165. typedef GPB_ENUM(GPBEnum_FieldNumber) {
  166. GPBEnum_FieldNumber_Name = 1,
  167. GPBEnum_FieldNumber_EnumvalueArray = 2,
  168. GPBEnum_FieldNumber_OptionsArray = 3,
  169. GPBEnum_FieldNumber_SourceContext = 4,
  170. GPBEnum_FieldNumber_Syntax = 5,
  171. };
  172. // Enum type definition.
  173. @interface GPBEnum : GPBMessage
  174. // Enum type name.
  175. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  176. // Enum value definitions.
  177. // |enumvalueArray| contains |GPBEnumValue|
  178. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumvalueArray;
  179. @property(nonatomic, readonly) NSUInteger enumvalueArray_Count;
  180. // Proto options for the enum type.
  181. // |optionsArray| contains |GPBOption|
  182. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *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. // Proto options for the enum value.
  205. // |optionsArray| contains |GPBOption|
  206. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray;
  207. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  208. @end
  209. #pragma mark - GPBOption
  210. typedef GPB_ENUM(GPBOption_FieldNumber) {
  211. GPBOption_FieldNumber_Name = 1,
  212. GPBOption_FieldNumber_Value = 2,
  213. };
  214. // Proto option attached to messages/fields/enums etc.
  215. @interface GPBOption : GPBMessage
  216. // Proto option name.
  217. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  218. // Proto option value.
  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)