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