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