blob: efaeab392a5677cea384b4bb7ffaa977fd318e46 [file] [log] [blame]
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/type.proto
3
4#import "GPBProtocolBuffers.h"
5
Thomas Van Lenten79a23c42016-03-17 10:04:21 -04006#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
Thomas Van Lenten536059e2015-12-02 14:43:05 -05007#error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04008#endif
9
10// @@protoc_insertion_point(imports)
11
12CF_EXTERN_C_BEGIN
13
14@class GPBAny;
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050015@class GPBEnumValue;
16@class GPBField;
17@class GPBOption;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040018@class GPBSourceContext;
19
Thomas Van Lenten8c889572015-06-16 16:45:14 -040020NS_ASSUME_NONNULL_BEGIN
21
TeBoringaca5a602015-08-26 14:02:44 -070022#pragma mark - Enum GPBSyntax
23
Thomas Van Lenten36650a02016-03-07 12:07:03 -050024/// The syntax in which a protocol buffer element is defined.
TeBoringaca5a602015-08-26 14:02:44 -070025typedef GPB_ENUM(GPBSyntax) {
Thomas Van Lenten36650a02016-03-07 12:07:03 -050026 /// Value used if any message's field encounters a value that is not defined
27 /// by this enum. The message will also have C functions to get/set the rawValue
28 /// of the field.
TeBoringaca5a602015-08-26 14:02:44 -070029 GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Thomas Van Lenten36650a02016-03-07 12:07:03 -050030 /// Syntax `proto2`.
TeBoringaca5a602015-08-26 14:02:44 -070031 GPBSyntax_SyntaxProto2 = 0,
32
Thomas Van Lenten36650a02016-03-07 12:07:03 -050033 /// Syntax `proto3`.
TeBoringaca5a602015-08-26 14:02:44 -070034 GPBSyntax_SyntaxProto3 = 1,
35};
36
37GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void);
38
Thomas Van Lenten36650a02016-03-07 12:07:03 -050039/// Checks to see if the given value is defined by the enum or was not known at
40/// the time this source was generated.
TeBoringaca5a602015-08-26 14:02:44 -070041BOOL GPBSyntax_IsValidValue(int32_t value);
42
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040043#pragma mark - Enum GPBField_Kind
44
Thomas Van Lenten36650a02016-03-07 12:07:03 -050045/// Basic field types.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040046typedef GPB_ENUM(GPBField_Kind) {
Thomas Van Lenten36650a02016-03-07 12:07:03 -050047 /// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040050 GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Thomas Van Lenten36650a02016-03-07 12:07:03 -050051 /// Field type unknown.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040052 GPBField_Kind_TypeUnknown = 0,
53
Thomas Van Lenten36650a02016-03-07 12:07:03 -050054 /// Field type double.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040055 GPBField_Kind_TypeDouble = 1,
56
Thomas Van Lenten36650a02016-03-07 12:07:03 -050057 /// Field type float.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040058 GPBField_Kind_TypeFloat = 2,
59
Thomas Van Lenten36650a02016-03-07 12:07:03 -050060 /// Field type int64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040061 GPBField_Kind_TypeInt64 = 3,
62
Thomas Van Lenten36650a02016-03-07 12:07:03 -050063 /// Field type uint64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040064 GPBField_Kind_TypeUint64 = 4,
65
Thomas Van Lenten36650a02016-03-07 12:07:03 -050066 /// Field type int32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040067 GPBField_Kind_TypeInt32 = 5,
68
Thomas Van Lenten36650a02016-03-07 12:07:03 -050069 /// Field type fixed64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040070 GPBField_Kind_TypeFixed64 = 6,
71
Thomas Van Lenten36650a02016-03-07 12:07:03 -050072 /// Field type fixed32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040073 GPBField_Kind_TypeFixed32 = 7,
74
Thomas Van Lenten36650a02016-03-07 12:07:03 -050075 /// Field type bool.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040076 GPBField_Kind_TypeBool = 8,
77
Thomas Van Lenten36650a02016-03-07 12:07:03 -050078 /// Field type string.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040079 GPBField_Kind_TypeString = 9,
80
Thomas Van Lenten36650a02016-03-07 12:07:03 -050081 /// Field type group. Proto2 syntax only, and deprecated.
TeBoringaca5a602015-08-26 14:02:44 -070082 GPBField_Kind_TypeGroup = 10,
83
Thomas Van Lenten36650a02016-03-07 12:07:03 -050084 /// Field type message.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040085 GPBField_Kind_TypeMessage = 11,
86
Thomas Van Lenten36650a02016-03-07 12:07:03 -050087 /// Field type bytes.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040088 GPBField_Kind_TypeBytes = 12,
89
Thomas Van Lenten36650a02016-03-07 12:07:03 -050090 /// Field type uint32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040091 GPBField_Kind_TypeUint32 = 13,
92
Thomas Van Lenten36650a02016-03-07 12:07:03 -050093 /// Field type enum.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040094 GPBField_Kind_TypeEnum = 14,
95
Thomas Van Lenten36650a02016-03-07 12:07:03 -050096 /// Field type sfixed32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040097 GPBField_Kind_TypeSfixed32 = 15,
98
Thomas Van Lenten36650a02016-03-07 12:07:03 -050099 /// Field type sfixed64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400100 GPBField_Kind_TypeSfixed64 = 16,
101
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500102 /// Field type sint32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400103 GPBField_Kind_TypeSint32 = 17,
104
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500105 /// Field type sint64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400106 GPBField_Kind_TypeSint64 = 18,
107};
108
109GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void);
110
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500111/// Checks to see if the given value is defined by the enum or was not known at
112/// the time this source was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400113BOOL GPBField_Kind_IsValidValue(int32_t value);
114
115#pragma mark - Enum GPBField_Cardinality
116
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500117/// Whether a field is optional, required, or repeated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400118typedef GPB_ENUM(GPBField_Cardinality) {
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500119 /// Value used if any message's field encounters a value that is not defined
120 /// by this enum. The message will also have C functions to get/set the rawValue
121 /// of the field.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400122 GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500123 /// For fields with unknown cardinality.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400124 GPBField_Cardinality_CardinalityUnknown = 0,
125
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500126 /// For optional fields.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400127 GPBField_Cardinality_CardinalityOptional = 1,
128
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500129 /// For required fields. Proto2 syntax only.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400130 GPBField_Cardinality_CardinalityRequired = 2,
131
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500132 /// For repeated fields.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400133 GPBField_Cardinality_CardinalityRepeated = 3,
134};
135
136GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void);
137
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500138/// Checks to see if the given value is defined by the enum or was not known at
139/// the time this source was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400140BOOL GPBField_Cardinality_IsValidValue(int32_t value);
141
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400142#pragma mark - GPBTypeRoot
143
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500144/// Exposes the extension registry for this file.
145///
146/// The base class provides:
147/// @code
148/// + (GPBExtensionRegistry *)extensionRegistry;
149/// @endcode
150/// which is a @c GPBExtensionRegistry that includes all the extensions defined by
151/// this file and all files that it depends on.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400152@interface GPBTypeRoot : GPBRootObject
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400153@end
154
155#pragma mark - GPBType
156
157typedef GPB_ENUM(GPBType_FieldNumber) {
158 GPBType_FieldNumber_Name = 1,
159 GPBType_FieldNumber_FieldsArray = 2,
160 GPBType_FieldNumber_OneofsArray = 3,
161 GPBType_FieldNumber_OptionsArray = 4,
162 GPBType_FieldNumber_SourceContext = 5,
TeBoringaca5a602015-08-26 14:02:44 -0700163 GPBType_FieldNumber_Syntax = 6,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400164};
165
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500166/// A protocol buffer message type.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400167@interface GPBType : GPBMessage
168
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500169/// The fully qualified message name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400170@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400171
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500172/// The list of fields.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500173@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBField*> *fieldsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500174/// The number of items in @c fieldsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400175@property(nonatomic, readonly) NSUInteger fieldsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400176
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500177/// The list of types appearing in `oneof` definitions in this type.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500178@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *oneofsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500179/// The number of items in @c oneofsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400180@property(nonatomic, readonly) NSUInteger oneofsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400181
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500182/// The protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500183@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500184/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400185@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400186
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500187/// The source context.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400188@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500189/// Test to see if @c sourceContext has been set.
190@property(nonatomic, readwrite) BOOL hasSourceContext;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400191
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500192/// The source syntax.
TeBoringaca5a602015-08-26 14:02:44 -0700193@property(nonatomic, readwrite) GPBSyntax syntax;
194
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400195@end
196
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500197/// Fetches the raw value of a @c GPBType's @c syntax property, even
198/// if the value was not defined by the enum at the time the code was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700199int32_t GPBType_Syntax_RawValue(GPBType *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500200/// Sets the raw value of an @c GPBType's @c syntax property, allowing
201/// it to be set to a value that was not defined by the enum at the time the code
202/// was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700203void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value);
204
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400205#pragma mark - GPBField
206
207typedef GPB_ENUM(GPBField_FieldNumber) {
208 GPBField_FieldNumber_Kind = 1,
209 GPBField_FieldNumber_Cardinality = 2,
210 GPBField_FieldNumber_Number = 3,
211 GPBField_FieldNumber_Name = 4,
212 GPBField_FieldNumber_TypeURL = 6,
213 GPBField_FieldNumber_OneofIndex = 7,
214 GPBField_FieldNumber_Packed = 8,
215 GPBField_FieldNumber_OptionsArray = 9,
TeBoringaca5a602015-08-26 14:02:44 -0700216 GPBField_FieldNumber_JsonName = 10,
Feng Xiaoe841bac2015-12-11 17:09:20 -0800217 GPBField_FieldNumber_DefaultValue = 11,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400218};
219
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500220/// A single field of a message type.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400221@interface GPBField : GPBMessage
222
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500223/// The field type.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400224@property(nonatomic, readwrite) GPBField_Kind kind;
225
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500226/// The field cardinality.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400227@property(nonatomic, readwrite) GPBField_Cardinality cardinality;
228
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500229/// The field number.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400230@property(nonatomic, readwrite) int32_t number;
231
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500232/// The field name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400233@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400234
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500235/// The field type URL, without the scheme, for message or enumeration
236/// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400237@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400238
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500239/// The index of the field type in `Type.oneofs`, for message or enumeration
240/// types. The first type has index 1; zero means the type is not in the list.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400241@property(nonatomic, readwrite) int32_t oneofIndex;
242
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500243/// Whether to use alternative packed wire representation.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400244@property(nonatomic, readwrite) BOOL packed;
245
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500246/// The protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500247@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500248/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400249@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400250
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500251/// The field JSON name.
TeBoringaca5a602015-08-26 14:02:44 -0700252@property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
253
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500254/// The string value of the default value of this field. Proto2 syntax only.
Feng Xiaoe841bac2015-12-11 17:09:20 -0800255@property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue;
256
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400257@end
258
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500259/// Fetches the raw value of a @c GPBField's @c kind property, even
260/// if the value was not defined by the enum at the time the code was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400261int32_t GPBField_Kind_RawValue(GPBField *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500262/// Sets the raw value of an @c GPBField's @c kind property, allowing
263/// it to be set to a value that was not defined by the enum at the time the code
264/// was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400265void SetGPBField_Kind_RawValue(GPBField *message, int32_t value);
266
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500267/// Fetches the raw value of a @c GPBField's @c cardinality property, even
268/// if the value was not defined by the enum at the time the code was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400269int32_t GPBField_Cardinality_RawValue(GPBField *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500270/// Sets the raw value of an @c GPBField's @c cardinality property, allowing
271/// it to be set to a value that was not defined by the enum at the time the code
272/// was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400273void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value);
274
275#pragma mark - GPBEnum
276
277typedef GPB_ENUM(GPBEnum_FieldNumber) {
278 GPBEnum_FieldNumber_Name = 1,
279 GPBEnum_FieldNumber_EnumvalueArray = 2,
280 GPBEnum_FieldNumber_OptionsArray = 3,
281 GPBEnum_FieldNumber_SourceContext = 4,
TeBoringaca5a602015-08-26 14:02:44 -0700282 GPBEnum_FieldNumber_Syntax = 5,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400283};
284
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500285/// Enum type definition.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400286@interface GPBEnum : GPBMessage
287
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500288/// Enum type name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400289@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400290
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500291/// Enum value definitions.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500292@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumValue*> *enumvalueArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500293/// The number of items in @c enumvalueArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400294@property(nonatomic, readonly) NSUInteger enumvalueArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400295
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500296/// Protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500297@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500298/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400299@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400300
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500301/// The source context.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400302@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500303/// Test to see if @c sourceContext has been set.
304@property(nonatomic, readwrite) BOOL hasSourceContext;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400305
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500306/// The source syntax.
TeBoringaca5a602015-08-26 14:02:44 -0700307@property(nonatomic, readwrite) GPBSyntax syntax;
308
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400309@end
310
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500311/// Fetches the raw value of a @c GPBEnum's @c syntax property, even
312/// if the value was not defined by the enum at the time the code was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700313int32_t GPBEnum_Syntax_RawValue(GPBEnum *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500314/// Sets the raw value of an @c GPBEnum's @c syntax property, allowing
315/// it to be set to a value that was not defined by the enum at the time the code
316/// was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700317void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value);
318
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400319#pragma mark - GPBEnumValue
320
321typedef GPB_ENUM(GPBEnumValue_FieldNumber) {
322 GPBEnumValue_FieldNumber_Name = 1,
323 GPBEnumValue_FieldNumber_Number = 2,
324 GPBEnumValue_FieldNumber_OptionsArray = 3,
325};
326
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500327/// Enum value definition.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400328@interface GPBEnumValue : GPBMessage
329
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500330/// Enum value name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400331@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400332
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500333/// Enum value number.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400334@property(nonatomic, readwrite) int32_t number;
335
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500336/// Protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500337@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500338/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400339@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400340
341@end
342
343#pragma mark - GPBOption
344
345typedef GPB_ENUM(GPBOption_FieldNumber) {
346 GPBOption_FieldNumber_Name = 1,
347 GPBOption_FieldNumber_Value = 2,
348};
349
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500350/// A protocol buffer option, which can be attached to a message, field,
351/// enumeration, etc.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400352@interface GPBOption : GPBMessage
353
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500354/// The option's name. For example, `"java_package"`.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400355@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400356
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500357/// The option's value. For example, `"com.google.protobuf"`.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400358@property(nonatomic, readwrite, strong, null_resettable) GPBAny *value;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500359/// Test to see if @c value has been set.
360@property(nonatomic, readwrite) BOOL hasValue;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400361
362@end
363
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400364NS_ASSUME_NONNULL_END
365
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400366CF_EXTERN_C_END
367
368// @@protoc_insertion_point(global_scope)