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