blob: 590d970bfd40115b8e33a555f5dbe738f3ae7b41 [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
Thomas Van Lentene664aa62016-04-19 13:13:04 -040012#pragma clang diagnostic push
13#pragma clang diagnostic ignored "-Wdeprecated-declarations"
14
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040015CF_EXTERN_C_BEGIN
16
17@class GPBAny;
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050018@class GPBEnumValue;
19@class GPBField;
20@class GPBOption;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040021@class GPBSourceContext;
22
Thomas Van Lenten8c889572015-06-16 16:45:14 -040023NS_ASSUME_NONNULL_BEGIN
24
TeBoringaca5a602015-08-26 14:02:44 -070025#pragma mark - Enum GPBSyntax
26
Thomas Van Lenten36650a02016-03-07 12:07:03 -050027/// The syntax in which a protocol buffer element is defined.
TeBoringaca5a602015-08-26 14:02:44 -070028typedef GPB_ENUM(GPBSyntax) {
Thomas Van Lenten36650a02016-03-07 12:07:03 -050029 /// 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.
TeBoringaca5a602015-08-26 14:02:44 -070032 GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Thomas Van Lenten36650a02016-03-07 12:07:03 -050033 /// Syntax `proto2`.
TeBoringaca5a602015-08-26 14:02:44 -070034 GPBSyntax_SyntaxProto2 = 0,
35
Thomas Van Lenten36650a02016-03-07 12:07:03 -050036 /// Syntax `proto3`.
TeBoringaca5a602015-08-26 14:02:44 -070037 GPBSyntax_SyntaxProto3 = 1,
38};
39
40GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void);
41
Thomas Van Lenten36650a02016-03-07 12:07:03 -050042/// Checks to see if the given value is defined by the enum or was not known at
43/// the time this source was generated.
TeBoringaca5a602015-08-26 14:02:44 -070044BOOL GPBSyntax_IsValidValue(int32_t value);
45
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040046#pragma mark - Enum GPBField_Kind
47
Thomas Van Lenten36650a02016-03-07 12:07:03 -050048/// Basic field types.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040049typedef GPB_ENUM(GPBField_Kind) {
Thomas Van Lenten36650a02016-03-07 12:07:03 -050050 /// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040053 GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Thomas Van Lenten36650a02016-03-07 12:07:03 -050054 /// Field type unknown.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040055 GPBField_Kind_TypeUnknown = 0,
56
Thomas Van Lenten36650a02016-03-07 12:07:03 -050057 /// Field type double.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040058 GPBField_Kind_TypeDouble = 1,
59
Thomas Van Lenten36650a02016-03-07 12:07:03 -050060 /// Field type float.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040061 GPBField_Kind_TypeFloat = 2,
62
Thomas Van Lenten36650a02016-03-07 12:07:03 -050063 /// Field type int64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040064 GPBField_Kind_TypeInt64 = 3,
65
Thomas Van Lenten36650a02016-03-07 12:07:03 -050066 /// Field type uint64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040067 GPBField_Kind_TypeUint64 = 4,
68
Thomas Van Lenten36650a02016-03-07 12:07:03 -050069 /// Field type int32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040070 GPBField_Kind_TypeInt32 = 5,
71
Thomas Van Lenten36650a02016-03-07 12:07:03 -050072 /// Field type fixed64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040073 GPBField_Kind_TypeFixed64 = 6,
74
Thomas Van Lenten36650a02016-03-07 12:07:03 -050075 /// Field type fixed32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040076 GPBField_Kind_TypeFixed32 = 7,
77
Thomas Van Lenten36650a02016-03-07 12:07:03 -050078 /// Field type bool.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040079 GPBField_Kind_TypeBool = 8,
80
Thomas Van Lenten36650a02016-03-07 12:07:03 -050081 /// Field type string.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040082 GPBField_Kind_TypeString = 9,
83
Thomas Van Lenten36650a02016-03-07 12:07:03 -050084 /// Field type group. Proto2 syntax only, and deprecated.
TeBoringaca5a602015-08-26 14:02:44 -070085 GPBField_Kind_TypeGroup = 10,
86
Thomas Van Lenten36650a02016-03-07 12:07:03 -050087 /// Field type message.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040088 GPBField_Kind_TypeMessage = 11,
89
Thomas Van Lenten36650a02016-03-07 12:07:03 -050090 /// Field type bytes.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040091 GPBField_Kind_TypeBytes = 12,
92
Thomas Van Lenten36650a02016-03-07 12:07:03 -050093 /// Field type uint32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040094 GPBField_Kind_TypeUint32 = 13,
95
Thomas Van Lenten36650a02016-03-07 12:07:03 -050096 /// Field type enum.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040097 GPBField_Kind_TypeEnum = 14,
98
Thomas Van Lenten36650a02016-03-07 12:07:03 -050099 /// Field type sfixed32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400100 GPBField_Kind_TypeSfixed32 = 15,
101
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500102 /// Field type sfixed64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400103 GPBField_Kind_TypeSfixed64 = 16,
104
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500105 /// Field type sint32.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400106 GPBField_Kind_TypeSint32 = 17,
107
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500108 /// Field type sint64.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400109 GPBField_Kind_TypeSint64 = 18,
110};
111
112GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void);
113
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500114/// Checks to see if the given value is defined by the enum or was not known at
115/// the time this source was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400116BOOL GPBField_Kind_IsValidValue(int32_t value);
117
118#pragma mark - Enum GPBField_Cardinality
119
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500120/// Whether a field is optional, required, or repeated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400121typedef GPB_ENUM(GPBField_Cardinality) {
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500122 /// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400125 GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500126 /// For fields with unknown cardinality.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400127 GPBField_Cardinality_CardinalityUnknown = 0,
128
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500129 /// For optional fields.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400130 GPBField_Cardinality_CardinalityOptional = 1,
131
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500132 /// For required fields. Proto2 syntax only.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400133 GPBField_Cardinality_CardinalityRequired = 2,
134
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500135 /// For repeated fields.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400136 GPBField_Cardinality_CardinalityRepeated = 3,
137};
138
139GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void);
140
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500141/// Checks to see if the given value is defined by the enum or was not known at
142/// the time this source was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400143BOOL GPBField_Cardinality_IsValidValue(int32_t value);
144
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400145#pragma mark - GPBTypeRoot
146
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500147/// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400155@interface GPBTypeRoot : GPBRootObject
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400156@end
157
158#pragma mark - GPBType
159
160typedef 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,
TeBoringaca5a602015-08-26 14:02:44 -0700166 GPBType_FieldNumber_Syntax = 6,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400167};
168
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500169/// A protocol buffer message type.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400170@interface GPBType : GPBMessage
171
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500172/// The fully qualified message name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400173@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400174
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500175/// The list of fields.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500176@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBField*> *fieldsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500177/// The number of items in @c fieldsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400178@property(nonatomic, readonly) NSUInteger fieldsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400179
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500180/// The list of types appearing in `oneof` definitions in this type.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500181@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *oneofsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500182/// The number of items in @c oneofsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400183@property(nonatomic, readonly) NSUInteger oneofsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400184
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500185/// The protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500186@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500187/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400188@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400189
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500190/// The source context.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400191@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500192/// Test to see if @c sourceContext has been set.
193@property(nonatomic, readwrite) BOOL hasSourceContext;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400194
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500195/// The source syntax.
TeBoringaca5a602015-08-26 14:02:44 -0700196@property(nonatomic, readwrite) GPBSyntax syntax;
197
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400198@end
199
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500200/// 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.
TeBoringaca5a602015-08-26 14:02:44 -0700202int32_t GPBType_Syntax_RawValue(GPBType *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500203/// 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.
TeBoringaca5a602015-08-26 14:02:44 -0700206void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value);
207
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400208#pragma mark - GPBField
209
210typedef 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,
TeBoringaca5a602015-08-26 14:02:44 -0700219 GPBField_FieldNumber_JsonName = 10,
Feng Xiaoe841bac2015-12-11 17:09:20 -0800220 GPBField_FieldNumber_DefaultValue = 11,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400221};
222
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500223/// A single field of a message type.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400224@interface GPBField : GPBMessage
225
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500226/// The field type.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400227@property(nonatomic, readwrite) GPBField_Kind kind;
228
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500229/// The field cardinality.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400230@property(nonatomic, readwrite) GPBField_Cardinality cardinality;
231
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500232/// The field number.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400233@property(nonatomic, readwrite) int32_t number;
234
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500235/// The field name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400236@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400237
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500238/// The field type URL, without the scheme, for message or enumeration
239/// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400240@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400241
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500242/// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400244@property(nonatomic, readwrite) int32_t oneofIndex;
245
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500246/// Whether to use alternative packed wire representation.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400247@property(nonatomic, readwrite) BOOL packed;
248
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500249/// The protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500250@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500251/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400252@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400253
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500254/// The field JSON name.
TeBoringaca5a602015-08-26 14:02:44 -0700255@property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
256
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500257/// The string value of the default value of this field. Proto2 syntax only.
Feng Xiaoe841bac2015-12-11 17:09:20 -0800258@property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue;
259
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400260@end
261
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500262/// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400264int32_t GPBField_Kind_RawValue(GPBField *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500265/// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400268void SetGPBField_Kind_RawValue(GPBField *message, int32_t value);
269
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500270/// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400272int32_t GPBField_Cardinality_RawValue(GPBField *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500273/// 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.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400276void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value);
277
278#pragma mark - GPBEnum
279
280typedef GPB_ENUM(GPBEnum_FieldNumber) {
281 GPBEnum_FieldNumber_Name = 1,
282 GPBEnum_FieldNumber_EnumvalueArray = 2,
283 GPBEnum_FieldNumber_OptionsArray = 3,
284 GPBEnum_FieldNumber_SourceContext = 4,
TeBoringaca5a602015-08-26 14:02:44 -0700285 GPBEnum_FieldNumber_Syntax = 5,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400286};
287
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500288/// Enum type definition.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400289@interface GPBEnum : GPBMessage
290
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500291/// Enum type name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400292@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400293
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500294/// Enum value definitions.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500295@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumValue*> *enumvalueArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500296/// The number of items in @c enumvalueArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400297@property(nonatomic, readonly) NSUInteger enumvalueArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400298
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500299/// Protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500300@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500301/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400302@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400303
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500304/// The source context.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400305@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500306/// Test to see if @c sourceContext has been set.
307@property(nonatomic, readwrite) BOOL hasSourceContext;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400308
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500309/// The source syntax.
TeBoringaca5a602015-08-26 14:02:44 -0700310@property(nonatomic, readwrite) GPBSyntax syntax;
311
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400312@end
313
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500314/// 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.
TeBoringaca5a602015-08-26 14:02:44 -0700316int32_t GPBEnum_Syntax_RawValue(GPBEnum *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500317/// 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.
TeBoringaca5a602015-08-26 14:02:44 -0700320void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value);
321
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400322#pragma mark - GPBEnumValue
323
324typedef GPB_ENUM(GPBEnumValue_FieldNumber) {
325 GPBEnumValue_FieldNumber_Name = 1,
326 GPBEnumValue_FieldNumber_Number = 2,
327 GPBEnumValue_FieldNumber_OptionsArray = 3,
328};
329
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500330/// Enum value definition.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400331@interface GPBEnumValue : GPBMessage
332
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500333/// Enum value name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400334@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400335
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500336/// Enum value number.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400337@property(nonatomic, readwrite) int32_t number;
338
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500339/// Protocol buffer options.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500340@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500341/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400342@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400343
344@end
345
346#pragma mark - GPBOption
347
348typedef GPB_ENUM(GPBOption_FieldNumber) {
349 GPBOption_FieldNumber_Name = 1,
350 GPBOption_FieldNumber_Value = 2,
351};
352
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500353/// A protocol buffer option, which can be attached to a message, field,
354/// enumeration, etc.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400355@interface GPBOption : GPBMessage
356
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500357/// The option's name. For example, `"java_package"`.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400358@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400359
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500360/// The option's value. For example, `"com.google.protobuf"`.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400361@property(nonatomic, readwrite, strong, null_resettable) GPBAny *value;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500362/// Test to see if @c value has been set.
363@property(nonatomic, readwrite) BOOL hasValue;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400364
365@end
366
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400367NS_ASSUME_NONNULL_END
368
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400369CF_EXTERN_C_END
370
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400371#pragma clang diagnostic pop
372
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400373// @@protoc_insertion_point(global_scope)