Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: google/protobuf/type.proto |
| 3 | |
| 4 | #import "GPBProtocolBuffers.h" |
| 5 | |
Thomas Van Lenten | 79a23c4 | 2016-03-17 10:04:21 -0400 | [diff] [blame^] | 6 | #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001 |
Thomas Van Lenten | 536059e | 2015-12-02 14:43:05 -0500 | [diff] [blame] | 7 | #error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 8 | #endif |
| 9 | |
| 10 | // @@protoc_insertion_point(imports) |
| 11 | |
| 12 | CF_EXTERN_C_BEGIN |
| 13 | |
| 14 | @class GPBAny; |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 15 | @class GPBEnumValue; |
| 16 | @class GPBField; |
| 17 | @class GPBOption; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 18 | @class GPBSourceContext; |
| 19 | |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 20 | NS_ASSUME_NONNULL_BEGIN |
| 21 | |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 22 | #pragma mark - Enum GPBSyntax |
| 23 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 24 | /// The syntax in which a protocol buffer element is defined. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 25 | typedef GPB_ENUM(GPBSyntax) { |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 26 | /// 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. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 29 | GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 30 | /// Syntax `proto2`. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 31 | GPBSyntax_SyntaxProto2 = 0, |
| 32 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 33 | /// Syntax `proto3`. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 34 | GPBSyntax_SyntaxProto3 = 1, |
| 35 | }; |
| 36 | |
| 37 | GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void); |
| 38 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 39 | /// Checks to see if the given value is defined by the enum or was not known at |
| 40 | /// the time this source was generated. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 41 | BOOL GPBSyntax_IsValidValue(int32_t value); |
| 42 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 43 | #pragma mark - Enum GPBField_Kind |
| 44 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 45 | /// Basic field types. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 46 | typedef GPB_ENUM(GPBField_Kind) { |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 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 |
| 49 | /// of the field. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 50 | GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 51 | /// Field type unknown. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 52 | GPBField_Kind_TypeUnknown = 0, |
| 53 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 54 | /// Field type double. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 55 | GPBField_Kind_TypeDouble = 1, |
| 56 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 57 | /// Field type float. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 58 | GPBField_Kind_TypeFloat = 2, |
| 59 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 60 | /// Field type int64. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 61 | GPBField_Kind_TypeInt64 = 3, |
| 62 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 63 | /// Field type uint64. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 64 | GPBField_Kind_TypeUint64 = 4, |
| 65 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 66 | /// Field type int32. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 67 | GPBField_Kind_TypeInt32 = 5, |
| 68 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 69 | /// Field type fixed64. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 70 | GPBField_Kind_TypeFixed64 = 6, |
| 71 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 72 | /// Field type fixed32. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 73 | GPBField_Kind_TypeFixed32 = 7, |
| 74 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 75 | /// Field type bool. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 76 | GPBField_Kind_TypeBool = 8, |
| 77 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 78 | /// Field type string. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 79 | GPBField_Kind_TypeString = 9, |
| 80 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 81 | /// Field type group. Proto2 syntax only, and deprecated. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 82 | GPBField_Kind_TypeGroup = 10, |
| 83 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 84 | /// Field type message. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 85 | GPBField_Kind_TypeMessage = 11, |
| 86 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 87 | /// Field type bytes. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 88 | GPBField_Kind_TypeBytes = 12, |
| 89 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 90 | /// Field type uint32. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 91 | GPBField_Kind_TypeUint32 = 13, |
| 92 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 93 | /// Field type enum. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 94 | GPBField_Kind_TypeEnum = 14, |
| 95 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 96 | /// Field type sfixed32. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 97 | GPBField_Kind_TypeSfixed32 = 15, |
| 98 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 99 | /// Field type sfixed64. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 100 | GPBField_Kind_TypeSfixed64 = 16, |
| 101 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 102 | /// Field type sint32. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 103 | GPBField_Kind_TypeSint32 = 17, |
| 104 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 105 | /// Field type sint64. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 106 | GPBField_Kind_TypeSint64 = 18, |
| 107 | }; |
| 108 | |
| 109 | GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void); |
| 110 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 111 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 113 | BOOL GPBField_Kind_IsValidValue(int32_t value); |
| 114 | |
| 115 | #pragma mark - Enum GPBField_Cardinality |
| 116 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 117 | /// Whether a field is optional, required, or repeated. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 118 | typedef GPB_ENUM(GPBField_Cardinality) { |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 119 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 122 | GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 123 | /// For fields with unknown cardinality. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 124 | GPBField_Cardinality_CardinalityUnknown = 0, |
| 125 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 126 | /// For optional fields. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 127 | GPBField_Cardinality_CardinalityOptional = 1, |
| 128 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 129 | /// For required fields. Proto2 syntax only. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 130 | GPBField_Cardinality_CardinalityRequired = 2, |
| 131 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 132 | /// For repeated fields. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 133 | GPBField_Cardinality_CardinalityRepeated = 3, |
| 134 | }; |
| 135 | |
| 136 | GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void); |
| 137 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 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. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 140 | BOOL GPBField_Cardinality_IsValidValue(int32_t value); |
| 141 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 142 | #pragma mark - GPBTypeRoot |
| 143 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 144 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 152 | @interface GPBTypeRoot : GPBRootObject |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 153 | @end |
| 154 | |
| 155 | #pragma mark - GPBType |
| 156 | |
| 157 | typedef 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, |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 163 | GPBType_FieldNumber_Syntax = 6, |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 164 | }; |
| 165 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 166 | /// A protocol buffer message type. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 167 | @interface GPBType : GPBMessage |
| 168 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 169 | /// The fully qualified message name. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 170 | @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 171 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 172 | /// The list of fields. |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 173 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBField*> *fieldsArray; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 174 | /// The number of items in @c fieldsArray without causing the array to be created. |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 175 | @property(nonatomic, readonly) NSUInteger fieldsArray_Count; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 176 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 177 | /// The list of types appearing in `oneof` definitions in this type. |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 178 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *oneofsArray; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 179 | /// The number of items in @c oneofsArray without causing the array to be created. |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 180 | @property(nonatomic, readonly) NSUInteger oneofsArray_Count; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 181 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 182 | /// The protocol buffer options. |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 183 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 184 | /// The number of items in @c optionsArray without causing the array to be created. |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 185 | @property(nonatomic, readonly) NSUInteger optionsArray_Count; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 186 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 187 | /// The source context. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 188 | @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 189 | /// Test to see if @c sourceContext has been set. |
| 190 | @property(nonatomic, readwrite) BOOL hasSourceContext; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 191 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 192 | /// The source syntax. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 193 | @property(nonatomic, readwrite) GPBSyntax syntax; |
| 194 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 195 | @end |
| 196 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 197 | /// 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. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 199 | int32_t GPBType_Syntax_RawValue(GPBType *message); |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 200 | /// 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. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 203 | void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value); |
| 204 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 205 | #pragma mark - GPBField |
| 206 | |
| 207 | typedef 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, |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 216 | GPBField_FieldNumber_JsonName = 10, |
Feng Xiao | e841bac | 2015-12-11 17:09:20 -0800 | [diff] [blame] | 217 | GPBField_FieldNumber_DefaultValue = 11, |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 218 | }; |
| 219 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 220 | /// A single field of a message type. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 221 | @interface GPBField : GPBMessage |
| 222 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 223 | /// The field type. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 224 | @property(nonatomic, readwrite) GPBField_Kind kind; |
| 225 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 226 | /// The field cardinality. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 227 | @property(nonatomic, readwrite) GPBField_Cardinality cardinality; |
| 228 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 229 | /// The field number. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 230 | @property(nonatomic, readwrite) int32_t number; |
| 231 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 232 | /// The field name. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 233 | @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 234 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 235 | /// The field type URL, without the scheme, for message or enumeration |
| 236 | /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 237 | @property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 238 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 239 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 241 | @property(nonatomic, readwrite) int32_t oneofIndex; |
| 242 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 243 | /// Whether to use alternative packed wire representation. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 244 | @property(nonatomic, readwrite) BOOL packed; |
| 245 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 246 | /// The protocol buffer options. |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 247 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 248 | /// The number of items in @c optionsArray without causing the array to be created. |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 249 | @property(nonatomic, readonly) NSUInteger optionsArray_Count; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 250 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 251 | /// The field JSON name. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 252 | @property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName; |
| 253 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 254 | /// The string value of the default value of this field. Proto2 syntax only. |
Feng Xiao | e841bac | 2015-12-11 17:09:20 -0800 | [diff] [blame] | 255 | @property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue; |
| 256 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 257 | @end |
| 258 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 259 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 261 | int32_t GPBField_Kind_RawValue(GPBField *message); |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 262 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 265 | void SetGPBField_Kind_RawValue(GPBField *message, int32_t value); |
| 266 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 267 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 269 | int32_t GPBField_Cardinality_RawValue(GPBField *message); |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 270 | /// 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 273 | void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value); |
| 274 | |
| 275 | #pragma mark - GPBEnum |
| 276 | |
| 277 | typedef GPB_ENUM(GPBEnum_FieldNumber) { |
| 278 | GPBEnum_FieldNumber_Name = 1, |
| 279 | GPBEnum_FieldNumber_EnumvalueArray = 2, |
| 280 | GPBEnum_FieldNumber_OptionsArray = 3, |
| 281 | GPBEnum_FieldNumber_SourceContext = 4, |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 282 | GPBEnum_FieldNumber_Syntax = 5, |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 283 | }; |
| 284 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 285 | /// Enum type definition. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 286 | @interface GPBEnum : GPBMessage |
| 287 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 288 | /// Enum type name. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 289 | @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 290 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 291 | /// Enum value definitions. |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 292 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumValue*> *enumvalueArray; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 293 | /// The number of items in @c enumvalueArray without causing the array to be created. |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 294 | @property(nonatomic, readonly) NSUInteger enumvalueArray_Count; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 295 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 296 | /// Protocol buffer options. |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 297 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 298 | /// The number of items in @c optionsArray without causing the array to be created. |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 299 | @property(nonatomic, readonly) NSUInteger optionsArray_Count; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 300 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 301 | /// The source context. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 302 | @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 303 | /// Test to see if @c sourceContext has been set. |
| 304 | @property(nonatomic, readwrite) BOOL hasSourceContext; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 305 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 306 | /// The source syntax. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 307 | @property(nonatomic, readwrite) GPBSyntax syntax; |
| 308 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 309 | @end |
| 310 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 311 | /// 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. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 313 | int32_t GPBEnum_Syntax_RawValue(GPBEnum *message); |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 314 | /// 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. |
TeBoring | aca5a60 | 2015-08-26 14:02:44 -0700 | [diff] [blame] | 317 | void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value); |
| 318 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 319 | #pragma mark - GPBEnumValue |
| 320 | |
| 321 | typedef GPB_ENUM(GPBEnumValue_FieldNumber) { |
| 322 | GPBEnumValue_FieldNumber_Name = 1, |
| 323 | GPBEnumValue_FieldNumber_Number = 2, |
| 324 | GPBEnumValue_FieldNumber_OptionsArray = 3, |
| 325 | }; |
| 326 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 327 | /// Enum value definition. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 328 | @interface GPBEnumValue : GPBMessage |
| 329 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 330 | /// Enum value name. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 331 | @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 332 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 333 | /// Enum value number. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 334 | @property(nonatomic, readwrite) int32_t number; |
| 335 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 336 | /// Protocol buffer options. |
Thomas Van Lenten | 2480acb | 2015-11-30 14:38:04 -0500 | [diff] [blame] | 337 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 338 | /// The number of items in @c optionsArray without causing the array to be created. |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 339 | @property(nonatomic, readonly) NSUInteger optionsArray_Count; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 340 | |
| 341 | @end |
| 342 | |
| 343 | #pragma mark - GPBOption |
| 344 | |
| 345 | typedef GPB_ENUM(GPBOption_FieldNumber) { |
| 346 | GPBOption_FieldNumber_Name = 1, |
| 347 | GPBOption_FieldNumber_Value = 2, |
| 348 | }; |
| 349 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 350 | /// A protocol buffer option, which can be attached to a message, field, |
| 351 | /// enumeration, etc. |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 352 | @interface GPBOption : GPBMessage |
| 353 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 354 | /// The option's name. For example, `"java_package"`. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 355 | @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 356 | |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 357 | /// The option's value. For example, `"com.google.protobuf"`. |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 358 | @property(nonatomic, readwrite, strong, null_resettable) GPBAny *value; |
Thomas Van Lenten | 36650a0 | 2016-03-07 12:07:03 -0500 | [diff] [blame] | 359 | /// Test to see if @c value has been set. |
| 360 | @property(nonatomic, readwrite) BOOL hasValue; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 361 | |
| 362 | @end |
| 363 | |
Thomas Van Lenten | 8c88957 | 2015-06-16 16:45:14 -0400 | [diff] [blame] | 364 | NS_ASSUME_NONNULL_END |
| 365 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 366 | CF_EXTERN_C_END |
| 367 | |
| 368 | // @@protoc_insertion_point(global_scope) |