Type.pbobjc.h 7.8 KB

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