1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/type.proto
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
10 #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11 #import <Protobuf/GPBDescriptor.h>
12 #import <Protobuf/GPBMessage.h>
13 #import <Protobuf/GPBRootObject.h>
15 #import "GPBDescriptor.h"
16 #import "GPBMessage.h"
17 #import "GPBRootObject.h"
20 #if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
21 #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
23 #if 30002 < 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.
27 // @@protoc_insertion_point(imports)
29 #pragma clang diagnostic push
30 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
38 @class GPBSourceContext;
40 NS_ASSUME_NONNULL_BEGIN
42 #pragma mark - Enum GPBSyntax
44 /** The syntax in which a protocol buffer element is defined. */
45 typedef GPB_ENUM(GPBSyntax) {
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
51 GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
52 /** Syntax `proto2`. */
53 GPBSyntax_SyntaxProto2 = 0,
55 /** Syntax `proto3`. */
56 GPBSyntax_SyntaxProto3 = 1,
59 GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void);
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.
65 BOOL GPBSyntax_IsValidValue(int32_t value);
67 #pragma mark - Enum GPBField_Kind
69 /** Basic field types. */
70 typedef GPB_ENUM(GPBField_Kind) {
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
76 GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
77 /** Field type unknown. */
78 GPBField_Kind_TypeUnknown = 0,
80 /** Field type double. */
81 GPBField_Kind_TypeDouble = 1,
83 /** Field type float. */
84 GPBField_Kind_TypeFloat = 2,
86 /** Field type int64. */
87 GPBField_Kind_TypeInt64 = 3,
89 /** Field type uint64. */
90 GPBField_Kind_TypeUint64 = 4,
92 /** Field type int32. */
93 GPBField_Kind_TypeInt32 = 5,
95 /** Field type fixed64. */
96 GPBField_Kind_TypeFixed64 = 6,
98 /** Field type fixed32. */
99 GPBField_Kind_TypeFixed32 = 7,
101 /** Field type bool. */
102 GPBField_Kind_TypeBool = 8,
104 /** Field type string. */
105 GPBField_Kind_TypeString = 9,
107 /** Field type group. Proto2 syntax only, and deprecated. */
108 GPBField_Kind_TypeGroup = 10,
110 /** Field type message. */
111 GPBField_Kind_TypeMessage = 11,
113 /** Field type bytes. */
114 GPBField_Kind_TypeBytes = 12,
116 /** Field type uint32. */
117 GPBField_Kind_TypeUint32 = 13,
119 /** Field type enum. */
120 GPBField_Kind_TypeEnum = 14,
122 /** Field type sfixed32. */
123 GPBField_Kind_TypeSfixed32 = 15,
125 /** Field type sfixed64. */
126 GPBField_Kind_TypeSfixed64 = 16,
128 /** Field type sint32. */
129 GPBField_Kind_TypeSint32 = 17,
131 /** Field type sint64. */
132 GPBField_Kind_TypeSint64 = 18,
135 GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void);
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.
141 BOOL GPBField_Kind_IsValidValue(int32_t value);
143 #pragma mark - Enum GPBField_Cardinality
145 /** Whether a field is optional, required, or repeated. */
146 typedef GPB_ENUM(GPBField_Cardinality) {
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
152 GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
153 /** For fields with unknown cardinality. */
154 GPBField_Cardinality_CardinalityUnknown = 0,
156 /** For optional fields. */
157 GPBField_Cardinality_CardinalityOptional = 1,
159 /** For required fields. Proto2 syntax only. */
160 GPBField_Cardinality_CardinalityRequired = 2,
162 /** For repeated fields. */
163 GPBField_Cardinality_CardinalityRepeated = 3,
166 GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void);
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.
172 BOOL GPBField_Cardinality_IsValidValue(int32_t value);
174 #pragma mark - GPBTypeRoot
177 * Exposes the extension registry for this file.
179 * The base class provides:
181 * + (GPBExtensionRegistry *)extensionRegistry;
183 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
184 * this file and all files that it depends on.
186 @interface GPBTypeRoot : GPBRootObject
189 #pragma mark - GPBType
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,
201 * A protocol buffer message type.
203 @interface GPBType : GPBMessage
205 /** The fully qualified message name. */
206 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
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;
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;
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;
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;
228 /** The source syntax. */
229 @property(nonatomic, readwrite) GPBSyntax syntax;
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.
237 int32_t GPBType_Syntax_RawValue(GPBType *message);
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
243 void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value);
245 #pragma mark - GPBField
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,
261 * A single field of a message type.
263 @interface GPBField : GPBMessage
265 /** The field type. */
266 @property(nonatomic, readwrite) GPBField_Kind kind;
268 /** The field cardinality. */
269 @property(nonatomic, readwrite) GPBField_Cardinality cardinality;
271 /** The field number. */
272 @property(nonatomic, readwrite) int32_t number;
274 /** The field name. */
275 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
278 * The field type URL, without the scheme, for message or enumeration
279 * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
281 @property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
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.
287 @property(nonatomic, readwrite) int32_t oneofIndex;
289 /** Whether to use alternative packed wire representation. */
290 @property(nonatomic, readwrite) BOOL packed;
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;
297 /** The field JSON name. */
298 @property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
300 /** The string value of the default value of this field. Proto2 syntax only. */
301 @property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue;
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.
309 int32_t GPBField_Kind_RawValue(GPBField *message);
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
315 void SetGPBField_Kind_RawValue(GPBField *message, int32_t value);
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.
321 int32_t GPBField_Cardinality_RawValue(GPBField *message);
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
327 void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value);
329 #pragma mark - GPBEnum
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,
340 * Enum type definition.
342 @interface GPBEnum : GPBMessage
344 /** Enum type name. */
345 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
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;
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;
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;
362 /** The source syntax. */
363 @property(nonatomic, readwrite) GPBSyntax syntax;
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.
371 int32_t GPBEnum_Syntax_RawValue(GPBEnum *message);
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
377 void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value);
379 #pragma mark - GPBEnumValue
381 typedef GPB_ENUM(GPBEnumValue_FieldNumber) {
382 GPBEnumValue_FieldNumber_Name = 1,
383 GPBEnumValue_FieldNumber_Number = 2,
384 GPBEnumValue_FieldNumber_OptionsArray = 3,
388 * Enum value definition.
390 @interface GPBEnumValue : GPBMessage
392 /** Enum value name. */
393 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
395 /** Enum value number. */
396 @property(nonatomic, readwrite) int32_t number;
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;
405 #pragma mark - GPBOption
407 typedef GPB_ENUM(GPBOption_FieldNumber) {
408 GPBOption_FieldNumber_Name = 1,
409 GPBOption_FieldNumber_Value = 2,
413 * A protocol buffer option, which can be attached to a message, field,
416 @interface GPBOption : GPBMessage
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"`.
424 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
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.
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;
438 NS_ASSUME_NONNULL_END
442 #pragma clang diagnostic pop
444 // @@protoc_insertion_point(global_scope)