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