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