OLD | NEW |
(Empty) | |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 // source: google/protobuf/descriptor.proto |
| 3 |
| 4 #import "GPBProtocolBuffers.h" |
| 5 |
| 6 #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
| 7 #error This file was generated by a different version of protoc which is incompa
tible with your Protocol Buffer library sources. |
| 8 #endif |
| 9 |
| 10 // @@protoc_insertion_point(imports) |
| 11 |
| 12 CF_EXTERN_C_BEGIN |
| 13 |
| 14 @class GPBEnumOptions; |
| 15 @class GPBEnumValueOptions; |
| 16 @class GPBFieldOptions; |
| 17 @class GPBFileOptions; |
| 18 @class GPBMessageOptions; |
| 19 @class GPBMethodOptions; |
| 20 @class GPBServiceOptions; |
| 21 @class GPBSourceCodeInfo; |
| 22 |
| 23 NS_ASSUME_NONNULL_BEGIN |
| 24 |
| 25 #pragma mark - Enum GPBFieldDescriptorProto_Type |
| 26 |
| 27 typedef GPB_ENUM(GPBFieldDescriptorProto_Type) { |
| 28 // 0 is reserved for errors. |
| 29 // Order is weird for historical reasons. |
| 30 GPBFieldDescriptorProto_Type_TypeDouble = 1, |
| 31 GPBFieldDescriptorProto_Type_TypeFloat = 2, |
| 32 |
| 33 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if |
| 34 // negative values are likely. |
| 35 GPBFieldDescriptorProto_Type_TypeInt64 = 3, |
| 36 GPBFieldDescriptorProto_Type_TypeUint64 = 4, |
| 37 |
| 38 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if |
| 39 // negative values are likely. |
| 40 GPBFieldDescriptorProto_Type_TypeInt32 = 5, |
| 41 GPBFieldDescriptorProto_Type_TypeFixed64 = 6, |
| 42 GPBFieldDescriptorProto_Type_TypeFixed32 = 7, |
| 43 GPBFieldDescriptorProto_Type_TypeBool = 8, |
| 44 GPBFieldDescriptorProto_Type_TypeString = 9, |
| 45 |
| 46 // Tag-delimited aggregate. |
| 47 GPBFieldDescriptorProto_Type_TypeGroup = 10, |
| 48 |
| 49 // Length-delimited aggregate. |
| 50 GPBFieldDescriptorProto_Type_TypeMessage = 11, |
| 51 |
| 52 // New in version 2. |
| 53 GPBFieldDescriptorProto_Type_TypeBytes = 12, |
| 54 GPBFieldDescriptorProto_Type_TypeUint32 = 13, |
| 55 GPBFieldDescriptorProto_Type_TypeEnum = 14, |
| 56 GPBFieldDescriptorProto_Type_TypeSfixed32 = 15, |
| 57 GPBFieldDescriptorProto_Type_TypeSfixed64 = 16, |
| 58 |
| 59 // Uses ZigZag encoding. |
| 60 GPBFieldDescriptorProto_Type_TypeSint32 = 17, |
| 61 |
| 62 // Uses ZigZag encoding. |
| 63 GPBFieldDescriptorProto_Type_TypeSint64 = 18, |
| 64 }; |
| 65 |
| 66 GPBEnumDescriptor *GPBFieldDescriptorProto_Type_EnumDescriptor(void); |
| 67 |
| 68 BOOL GPBFieldDescriptorProto_Type_IsValidValue(int32_t value); |
| 69 |
| 70 #pragma mark - Enum GPBFieldDescriptorProto_Label |
| 71 |
| 72 typedef GPB_ENUM(GPBFieldDescriptorProto_Label) { |
| 73 // 0 is reserved for errors |
| 74 GPBFieldDescriptorProto_Label_LabelOptional = 1, |
| 75 GPBFieldDescriptorProto_Label_LabelRequired = 2, |
| 76 |
| 77 // TODO(sanjay): Should we add LABEL_MAP? |
| 78 GPBFieldDescriptorProto_Label_LabelRepeated = 3, |
| 79 }; |
| 80 |
| 81 GPBEnumDescriptor *GPBFieldDescriptorProto_Label_EnumDescriptor(void); |
| 82 |
| 83 BOOL GPBFieldDescriptorProto_Label_IsValidValue(int32_t value); |
| 84 |
| 85 #pragma mark - Enum GPBFileOptions_OptimizeMode |
| 86 |
| 87 // Generated classes can be optimized for speed or code size. |
| 88 typedef GPB_ENUM(GPBFileOptions_OptimizeMode) { |
| 89 // Generate complete code for parsing, serialization, |
| 90 GPBFileOptions_OptimizeMode_Speed = 1, |
| 91 |
| 92 // etc. |
| 93 GPBFileOptions_OptimizeMode_CodeSize = 2, |
| 94 |
| 95 // Generate code using MessageLite and the lite runtime. |
| 96 GPBFileOptions_OptimizeMode_LiteRuntime = 3, |
| 97 }; |
| 98 |
| 99 GPBEnumDescriptor *GPBFileOptions_OptimizeMode_EnumDescriptor(void); |
| 100 |
| 101 BOOL GPBFileOptions_OptimizeMode_IsValidValue(int32_t value); |
| 102 |
| 103 #pragma mark - Enum GPBFieldOptions_CType |
| 104 |
| 105 typedef GPB_ENUM(GPBFieldOptions_CType) { |
| 106 // Default mode. |
| 107 GPBFieldOptions_CType_String = 0, |
| 108 GPBFieldOptions_CType_Cord = 1, |
| 109 GPBFieldOptions_CType_StringPiece = 2, |
| 110 }; |
| 111 |
| 112 GPBEnumDescriptor *GPBFieldOptions_CType_EnumDescriptor(void); |
| 113 |
| 114 BOOL GPBFieldOptions_CType_IsValidValue(int32_t value); |
| 115 |
| 116 #pragma mark - Enum GPBFieldOptions_JSType |
| 117 |
| 118 typedef GPB_ENUM(GPBFieldOptions_JSType) { |
| 119 // Use the default type. |
| 120 GPBFieldOptions_JSType_JsNormal = 0, |
| 121 |
| 122 // Use JavaScript strings. |
| 123 GPBFieldOptions_JSType_JsString = 1, |
| 124 |
| 125 // Use JavaScript numbers. |
| 126 GPBFieldOptions_JSType_JsNumber = 2, |
| 127 }; |
| 128 |
| 129 GPBEnumDescriptor *GPBFieldOptions_JSType_EnumDescriptor(void); |
| 130 |
| 131 BOOL GPBFieldOptions_JSType_IsValidValue(int32_t value); |
| 132 |
| 133 #pragma mark - GPBDescriptorRoot |
| 134 |
| 135 @interface GPBDescriptorRoot : GPBRootObject |
| 136 |
| 137 // The base class provides: |
| 138 // + (GPBExtensionRegistry *)extensionRegistry; |
| 139 // which is an GPBExtensionRegistry that includes all the extensions defined by |
| 140 // this file and all files that it depends on. |
| 141 |
| 142 @end |
| 143 |
| 144 #pragma mark - GPBFileDescriptorSet |
| 145 |
| 146 typedef GPB_ENUM(GPBFileDescriptorSet_FieldNumber) { |
| 147 GPBFileDescriptorSet_FieldNumber_FileArray = 1, |
| 148 }; |
| 149 |
| 150 // The protocol compiler can output a FileDescriptorSet containing the .proto |
| 151 // files it parses. |
| 152 @interface GPBFileDescriptorSet : GPBMessage |
| 153 |
| 154 // |fileArray| contains |GPBFileDescriptorProto| |
| 155 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fileArr
ay; |
| 156 @property(nonatomic, readonly) NSUInteger fileArray_Count; |
| 157 |
| 158 @end |
| 159 |
| 160 #pragma mark - GPBFileDescriptorProto |
| 161 |
| 162 typedef GPB_ENUM(GPBFileDescriptorProto_FieldNumber) { |
| 163 GPBFileDescriptorProto_FieldNumber_Name = 1, |
| 164 GPBFileDescriptorProto_FieldNumber_Package = 2, |
| 165 GPBFileDescriptorProto_FieldNumber_DependencyArray = 3, |
| 166 GPBFileDescriptorProto_FieldNumber_MessageTypeArray = 4, |
| 167 GPBFileDescriptorProto_FieldNumber_EnumTypeArray = 5, |
| 168 GPBFileDescriptorProto_FieldNumber_ServiceArray = 6, |
| 169 GPBFileDescriptorProto_FieldNumber_ExtensionArray = 7, |
| 170 GPBFileDescriptorProto_FieldNumber_Options = 8, |
| 171 GPBFileDescriptorProto_FieldNumber_SourceCodeInfo = 9, |
| 172 GPBFileDescriptorProto_FieldNumber_PublicDependencyArray = 10, |
| 173 GPBFileDescriptorProto_FieldNumber_WeakDependencyArray = 11, |
| 174 GPBFileDescriptorProto_FieldNumber_Syntax = 12, |
| 175 }; |
| 176 |
| 177 // Describes a complete .proto file. |
| 178 @interface GPBFileDescriptorProto : GPBMessage |
| 179 |
| 180 // file name, relative to root of source tree |
| 181 @property(nonatomic, readwrite) BOOL hasName; |
| 182 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 183 |
| 184 // e.g. "foo", "foo.bar", etc. |
| 185 @property(nonatomic, readwrite) BOOL hasPackage; |
| 186 @property(nonatomic, readwrite, copy, null_resettable) NSString *package; |
| 187 |
| 188 // Names of files imported by this file. |
| 189 // |dependencyArray| contains |NSString| |
| 190 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *depende
ncyArray; |
| 191 @property(nonatomic, readonly) NSUInteger dependencyArray_Count; |
| 192 |
| 193 // Indexes of the public imported files in the dependency list above. |
| 194 @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *publicDe
pendencyArray; |
| 195 @property(nonatomic, readonly) NSUInteger publicDependencyArray_Count; |
| 196 |
| 197 // Indexes of the weak imported files in the dependency list. |
| 198 // For Google-internal migration only. Do not use. |
| 199 @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *weakDepe
ndencyArray; |
| 200 @property(nonatomic, readonly) NSUInteger weakDependencyArray_Count; |
| 201 |
| 202 // All top-level definitions in this file. |
| 203 // |messageTypeArray| contains |GPBDescriptorProto| |
| 204 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *message
TypeArray; |
| 205 @property(nonatomic, readonly) NSUInteger messageTypeArray_Count; |
| 206 |
| 207 // |enumTypeArray| contains |GPBEnumDescriptorProto| |
| 208 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumTyp
eArray; |
| 209 @property(nonatomic, readonly) NSUInteger enumTypeArray_Count; |
| 210 |
| 211 // |serviceArray| contains |GPBServiceDescriptorProto| |
| 212 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *service
Array; |
| 213 @property(nonatomic, readonly) NSUInteger serviceArray_Count; |
| 214 |
| 215 // |extensionArray| contains |GPBFieldDescriptorProto| |
| 216 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *extensi
onArray; |
| 217 @property(nonatomic, readonly) NSUInteger extensionArray_Count; |
| 218 |
| 219 @property(nonatomic, readwrite) BOOL hasOptions; |
| 220 @property(nonatomic, readwrite, strong, null_resettable) GPBFileOptions *options
; |
| 221 |
| 222 // This field contains optional information about the original source code. |
| 223 // You may safely remove this entire field without harming runtime |
| 224 // functionality of the descriptors -- the information is needed only by |
| 225 // development tools. |
| 226 @property(nonatomic, readwrite) BOOL hasSourceCodeInfo; |
| 227 @property(nonatomic, readwrite, strong, null_resettable) GPBSourceCodeInfo *sour
ceCodeInfo; |
| 228 |
| 229 // The syntax of the proto file. |
| 230 // The supported values are "proto2" and "proto3". |
| 231 @property(nonatomic, readwrite) BOOL hasSyntax; |
| 232 @property(nonatomic, readwrite, copy, null_resettable) NSString *syntax; |
| 233 |
| 234 @end |
| 235 |
| 236 #pragma mark - GPBDescriptorProto |
| 237 |
| 238 typedef GPB_ENUM(GPBDescriptorProto_FieldNumber) { |
| 239 GPBDescriptorProto_FieldNumber_Name = 1, |
| 240 GPBDescriptorProto_FieldNumber_FieldArray = 2, |
| 241 GPBDescriptorProto_FieldNumber_NestedTypeArray = 3, |
| 242 GPBDescriptorProto_FieldNumber_EnumTypeArray = 4, |
| 243 GPBDescriptorProto_FieldNumber_ExtensionRangeArray = 5, |
| 244 GPBDescriptorProto_FieldNumber_ExtensionArray = 6, |
| 245 GPBDescriptorProto_FieldNumber_Options = 7, |
| 246 GPBDescriptorProto_FieldNumber_OneofDeclArray = 8, |
| 247 GPBDescriptorProto_FieldNumber_ReservedRangeArray = 9, |
| 248 GPBDescriptorProto_FieldNumber_ReservedNameArray = 10, |
| 249 }; |
| 250 |
| 251 // Describes a message type. |
| 252 @interface GPBDescriptorProto : GPBMessage |
| 253 |
| 254 @property(nonatomic, readwrite) BOOL hasName; |
| 255 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 256 |
| 257 // |fieldArray| contains |GPBFieldDescriptorProto| |
| 258 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldAr
ray; |
| 259 @property(nonatomic, readonly) NSUInteger fieldArray_Count; |
| 260 |
| 261 // |extensionArray| contains |GPBFieldDescriptorProto| |
| 262 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *extensi
onArray; |
| 263 @property(nonatomic, readonly) NSUInteger extensionArray_Count; |
| 264 |
| 265 // |nestedTypeArray| contains |GPBDescriptorProto| |
| 266 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *nestedT
ypeArray; |
| 267 @property(nonatomic, readonly) NSUInteger nestedTypeArray_Count; |
| 268 |
| 269 // |enumTypeArray| contains |GPBEnumDescriptorProto| |
| 270 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumTyp
eArray; |
| 271 @property(nonatomic, readonly) NSUInteger enumTypeArray_Count; |
| 272 |
| 273 // |extensionRangeArray| contains |GPBDescriptorProto_ExtensionRange| |
| 274 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *extensi
onRangeArray; |
| 275 @property(nonatomic, readonly) NSUInteger extensionRangeArray_Count; |
| 276 |
| 277 // |oneofDeclArray| contains |GPBOneofDescriptorProto| |
| 278 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *oneofDe
clArray; |
| 279 @property(nonatomic, readonly) NSUInteger oneofDeclArray_Count; |
| 280 |
| 281 @property(nonatomic, readwrite) BOOL hasOptions; |
| 282 @property(nonatomic, readwrite, strong, null_resettable) GPBMessageOptions *opti
ons; |
| 283 |
| 284 // |reservedRangeArray| contains |GPBDescriptorProto_ReservedRange| |
| 285 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *reserve
dRangeArray; |
| 286 @property(nonatomic, readonly) NSUInteger reservedRangeArray_Count; |
| 287 |
| 288 // Reserved field names, which may not be used by fields in the same message. |
| 289 // A given name may only be reserved once. |
| 290 // |reservedNameArray| contains |NSString| |
| 291 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *reserve
dNameArray; |
| 292 @property(nonatomic, readonly) NSUInteger reservedNameArray_Count; |
| 293 |
| 294 @end |
| 295 |
| 296 #pragma mark - GPBDescriptorProto_ExtensionRange |
| 297 |
| 298 typedef GPB_ENUM(GPBDescriptorProto_ExtensionRange_FieldNumber) { |
| 299 GPBDescriptorProto_ExtensionRange_FieldNumber_Start = 1, |
| 300 GPBDescriptorProto_ExtensionRange_FieldNumber_End = 2, |
| 301 }; |
| 302 |
| 303 @interface GPBDescriptorProto_ExtensionRange : GPBMessage |
| 304 |
| 305 @property(nonatomic, readwrite) BOOL hasStart; |
| 306 @property(nonatomic, readwrite) int32_t start; |
| 307 |
| 308 @property(nonatomic, readwrite) BOOL hasEnd; |
| 309 @property(nonatomic, readwrite) int32_t end; |
| 310 |
| 311 @end |
| 312 |
| 313 #pragma mark - GPBDescriptorProto_ReservedRange |
| 314 |
| 315 typedef GPB_ENUM(GPBDescriptorProto_ReservedRange_FieldNumber) { |
| 316 GPBDescriptorProto_ReservedRange_FieldNumber_Start = 1, |
| 317 GPBDescriptorProto_ReservedRange_FieldNumber_End = 2, |
| 318 }; |
| 319 |
| 320 // Range of reserved tag numbers. Reserved tag numbers may not be used by |
| 321 // fields or extension ranges in the same message. Reserved ranges may |
| 322 // not overlap. |
| 323 @interface GPBDescriptorProto_ReservedRange : GPBMessage |
| 324 |
| 325 // Inclusive. |
| 326 @property(nonatomic, readwrite) BOOL hasStart; |
| 327 @property(nonatomic, readwrite) int32_t start; |
| 328 |
| 329 // Exclusive. |
| 330 @property(nonatomic, readwrite) BOOL hasEnd; |
| 331 @property(nonatomic, readwrite) int32_t end; |
| 332 |
| 333 @end |
| 334 |
| 335 #pragma mark - GPBFieldDescriptorProto |
| 336 |
| 337 typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) { |
| 338 GPBFieldDescriptorProto_FieldNumber_Name = 1, |
| 339 GPBFieldDescriptorProto_FieldNumber_Extendee = 2, |
| 340 GPBFieldDescriptorProto_FieldNumber_Number = 3, |
| 341 GPBFieldDescriptorProto_FieldNumber_Label = 4, |
| 342 GPBFieldDescriptorProto_FieldNumber_Type = 5, |
| 343 GPBFieldDescriptorProto_FieldNumber_TypeName = 6, |
| 344 GPBFieldDescriptorProto_FieldNumber_DefaultValue = 7, |
| 345 GPBFieldDescriptorProto_FieldNumber_Options = 8, |
| 346 GPBFieldDescriptorProto_FieldNumber_OneofIndex = 9, |
| 347 GPBFieldDescriptorProto_FieldNumber_JsonName = 10, |
| 348 }; |
| 349 |
| 350 // Describes a field within a message. |
| 351 @interface GPBFieldDescriptorProto : GPBMessage |
| 352 |
| 353 @property(nonatomic, readwrite) BOOL hasName; |
| 354 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 355 |
| 356 @property(nonatomic, readwrite) BOOL hasNumber; |
| 357 @property(nonatomic, readwrite) int32_t number; |
| 358 |
| 359 @property(nonatomic, readwrite) BOOL hasLabel; |
| 360 @property(nonatomic, readwrite) GPBFieldDescriptorProto_Label label; |
| 361 |
| 362 // If type_name is set, this need not be set. If both this and type_name |
| 363 // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. |
| 364 @property(nonatomic, readwrite) BOOL hasType; |
| 365 @property(nonatomic, readwrite) GPBFieldDescriptorProto_Type type; |
| 366 |
| 367 // For message and enum types, this is the name of the type. If the name |
| 368 // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping |
| 369 // rules are used to find the type (i.e. first the nested types within this |
| 370 // message are searched, then within the parent, on up to the root |
| 371 // namespace). |
| 372 @property(nonatomic, readwrite) BOOL hasTypeName; |
| 373 @property(nonatomic, readwrite, copy, null_resettable) NSString *typeName; |
| 374 |
| 375 // For extensions, this is the name of the type being extended. It is |
| 376 // resolved in the same manner as type_name. |
| 377 @property(nonatomic, readwrite) BOOL hasExtendee; |
| 378 @property(nonatomic, readwrite, copy, null_resettable) NSString *extendee; |
| 379 |
| 380 // For numeric types, contains the original text representation of the value. |
| 381 // For booleans, "true" or "false". |
| 382 // For strings, contains the default text contents (not escaped in any way). |
| 383 // For bytes, contains the C escaped value. All bytes >= 128 are escaped. |
| 384 // TODO(kenton): Base-64 encode? |
| 385 @property(nonatomic, readwrite) BOOL hasDefaultValue; |
| 386 @property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue; |
| 387 |
| 388 // If set, gives the index of a oneof in the containing type's oneof_decl |
| 389 // list. This field is a member of that oneof. |
| 390 @property(nonatomic, readwrite) BOOL hasOneofIndex; |
| 391 @property(nonatomic, readwrite) int32_t oneofIndex; |
| 392 |
| 393 // JSON name of this field. The value is set by protocol compiler. If the |
| 394 // user has set a "json_name" option on this field, that option's value |
| 395 // will be used. Otherwise, it's deduced from the field's name by converting |
| 396 // it to camelCase. |
| 397 @property(nonatomic, readwrite) BOOL hasJsonName; |
| 398 @property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName; |
| 399 |
| 400 @property(nonatomic, readwrite) BOOL hasOptions; |
| 401 @property(nonatomic, readwrite, strong, null_resettable) GPBFieldOptions *option
s; |
| 402 |
| 403 @end |
| 404 |
| 405 #pragma mark - GPBOneofDescriptorProto |
| 406 |
| 407 typedef GPB_ENUM(GPBOneofDescriptorProto_FieldNumber) { |
| 408 GPBOneofDescriptorProto_FieldNumber_Name = 1, |
| 409 }; |
| 410 |
| 411 // Describes a oneof. |
| 412 @interface GPBOneofDescriptorProto : GPBMessage |
| 413 |
| 414 @property(nonatomic, readwrite) BOOL hasName; |
| 415 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 416 |
| 417 @end |
| 418 |
| 419 #pragma mark - GPBEnumDescriptorProto |
| 420 |
| 421 typedef GPB_ENUM(GPBEnumDescriptorProto_FieldNumber) { |
| 422 GPBEnumDescriptorProto_FieldNumber_Name = 1, |
| 423 GPBEnumDescriptorProto_FieldNumber_ValueArray = 2, |
| 424 GPBEnumDescriptorProto_FieldNumber_Options = 3, |
| 425 }; |
| 426 |
| 427 // Describes an enum type. |
| 428 @interface GPBEnumDescriptorProto : GPBMessage |
| 429 |
| 430 @property(nonatomic, readwrite) BOOL hasName; |
| 431 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 432 |
| 433 // |valueArray| contains |GPBEnumValueDescriptorProto| |
| 434 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *valueAr
ray; |
| 435 @property(nonatomic, readonly) NSUInteger valueArray_Count; |
| 436 |
| 437 @property(nonatomic, readwrite) BOOL hasOptions; |
| 438 @property(nonatomic, readwrite, strong, null_resettable) GPBEnumOptions *options
; |
| 439 |
| 440 @end |
| 441 |
| 442 #pragma mark - GPBEnumValueDescriptorProto |
| 443 |
| 444 typedef GPB_ENUM(GPBEnumValueDescriptorProto_FieldNumber) { |
| 445 GPBEnumValueDescriptorProto_FieldNumber_Name = 1, |
| 446 GPBEnumValueDescriptorProto_FieldNumber_Number = 2, |
| 447 GPBEnumValueDescriptorProto_FieldNumber_Options = 3, |
| 448 }; |
| 449 |
| 450 // Describes a value within an enum. |
| 451 @interface GPBEnumValueDescriptorProto : GPBMessage |
| 452 |
| 453 @property(nonatomic, readwrite) BOOL hasName; |
| 454 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 455 |
| 456 @property(nonatomic, readwrite) BOOL hasNumber; |
| 457 @property(nonatomic, readwrite) int32_t number; |
| 458 |
| 459 @property(nonatomic, readwrite) BOOL hasOptions; |
| 460 @property(nonatomic, readwrite, strong, null_resettable) GPBEnumValueOptions *op
tions; |
| 461 |
| 462 @end |
| 463 |
| 464 #pragma mark - GPBServiceDescriptorProto |
| 465 |
| 466 typedef GPB_ENUM(GPBServiceDescriptorProto_FieldNumber) { |
| 467 GPBServiceDescriptorProto_FieldNumber_Name = 1, |
| 468 GPBServiceDescriptorProto_FieldNumber_MethodArray = 2, |
| 469 GPBServiceDescriptorProto_FieldNumber_Options = 3, |
| 470 }; |
| 471 |
| 472 // Describes a service. |
| 473 @interface GPBServiceDescriptorProto : GPBMessage |
| 474 |
| 475 @property(nonatomic, readwrite) BOOL hasName; |
| 476 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 477 |
| 478 // |methodArray| contains |GPBMethodDescriptorProto| |
| 479 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *methodA
rray; |
| 480 @property(nonatomic, readonly) NSUInteger methodArray_Count; |
| 481 |
| 482 @property(nonatomic, readwrite) BOOL hasOptions; |
| 483 @property(nonatomic, readwrite, strong, null_resettable) GPBServiceOptions *opti
ons; |
| 484 |
| 485 @end |
| 486 |
| 487 #pragma mark - GPBMethodDescriptorProto |
| 488 |
| 489 typedef GPB_ENUM(GPBMethodDescriptorProto_FieldNumber) { |
| 490 GPBMethodDescriptorProto_FieldNumber_Name = 1, |
| 491 GPBMethodDescriptorProto_FieldNumber_InputType = 2, |
| 492 GPBMethodDescriptorProto_FieldNumber_OutputType = 3, |
| 493 GPBMethodDescriptorProto_FieldNumber_Options = 4, |
| 494 GPBMethodDescriptorProto_FieldNumber_ClientStreaming = 5, |
| 495 GPBMethodDescriptorProto_FieldNumber_ServerStreaming = 6, |
| 496 }; |
| 497 |
| 498 // Describes a method of a service. |
| 499 @interface GPBMethodDescriptorProto : GPBMessage |
| 500 |
| 501 @property(nonatomic, readwrite) BOOL hasName; |
| 502 @property(nonatomic, readwrite, copy, null_resettable) NSString *name; |
| 503 |
| 504 // Input and output type names. These are resolved in the same way as |
| 505 // FieldDescriptorProto.type_name, but must refer to a message type. |
| 506 @property(nonatomic, readwrite) BOOL hasInputType; |
| 507 @property(nonatomic, readwrite, copy, null_resettable) NSString *inputType; |
| 508 |
| 509 @property(nonatomic, readwrite) BOOL hasOutputType; |
| 510 @property(nonatomic, readwrite, copy, null_resettable) NSString *outputType; |
| 511 |
| 512 @property(nonatomic, readwrite) BOOL hasOptions; |
| 513 @property(nonatomic, readwrite, strong, null_resettable) GPBMethodOptions *optio
ns; |
| 514 |
| 515 // Identifies if client streams multiple client messages |
| 516 @property(nonatomic, readwrite) BOOL hasClientStreaming; |
| 517 @property(nonatomic, readwrite) BOOL clientStreaming; |
| 518 |
| 519 // Identifies if server streams multiple server messages |
| 520 @property(nonatomic, readwrite) BOOL hasServerStreaming; |
| 521 @property(nonatomic, readwrite) BOOL serverStreaming; |
| 522 |
| 523 @end |
| 524 |
| 525 #pragma mark - GPBFileOptions |
| 526 |
| 527 typedef GPB_ENUM(GPBFileOptions_FieldNumber) { |
| 528 GPBFileOptions_FieldNumber_JavaPackage = 1, |
| 529 GPBFileOptions_FieldNumber_JavaOuterClassname = 8, |
| 530 GPBFileOptions_FieldNumber_OptimizeFor = 9, |
| 531 GPBFileOptions_FieldNumber_JavaMultipleFiles = 10, |
| 532 GPBFileOptions_FieldNumber_GoPackage = 11, |
| 533 GPBFileOptions_FieldNumber_CcGenericServices = 16, |
| 534 GPBFileOptions_FieldNumber_JavaGenericServices = 17, |
| 535 GPBFileOptions_FieldNumber_PyGenericServices = 18, |
| 536 GPBFileOptions_FieldNumber_JavaGenerateEqualsAndHash = 20, |
| 537 GPBFileOptions_FieldNumber_Deprecated = 23, |
| 538 GPBFileOptions_FieldNumber_JavaStringCheckUtf8 = 27, |
| 539 GPBFileOptions_FieldNumber_CcEnableArenas = 31, |
| 540 GPBFileOptions_FieldNumber_ObjcClassPrefix = 36, |
| 541 GPBFileOptions_FieldNumber_CsharpNamespace = 37, |
| 542 GPBFileOptions_FieldNumber_JavananoUseDeprecatedPackage = 38, |
| 543 GPBFileOptions_FieldNumber_UninterpretedOptionArray = 999, |
| 544 }; |
| 545 |
| 546 @interface GPBFileOptions : GPBMessage |
| 547 |
| 548 // Sets the Java package where classes generated from this .proto will be |
| 549 // placed. By default, the proto package is used, but this is often |
| 550 // inappropriate because proto packages do not normally start with backwards |
| 551 // domain names. |
| 552 @property(nonatomic, readwrite) BOOL hasJavaPackage; |
| 553 @property(nonatomic, readwrite, copy, null_resettable) NSString *javaPackage; |
| 554 |
| 555 // If set, all the classes from the .proto file are wrapped in a single |
| 556 // outer class with the given name. This applies to both Proto1 |
| 557 // (equivalent to the old "--one_java_file" option) and Proto2 (where |
| 558 // a .proto always translates to a single class, but you may want to |
| 559 // explicitly choose the class name). |
| 560 @property(nonatomic, readwrite) BOOL hasJavaOuterClassname; |
| 561 @property(nonatomic, readwrite, copy, null_resettable) NSString *javaOuterClassn
ame; |
| 562 |
| 563 // If set true, then the Java code generator will generate a separate .java |
| 564 // file for each top-level message, enum, and service defined in the .proto |
| 565 // file. Thus, these types will *not* be nested inside the outer class |
| 566 // named by java_outer_classname. However, the outer class will still be |
| 567 // generated to contain the file's getDescriptor() method as well as any |
| 568 // top-level extensions defined in the file. |
| 569 @property(nonatomic, readwrite) BOOL hasJavaMultipleFiles; |
| 570 @property(nonatomic, readwrite) BOOL javaMultipleFiles; |
| 571 |
| 572 // If set true, then the Java code generator will generate equals() and |
| 573 // hashCode() methods for all messages defined in the .proto file. |
| 574 // This increases generated code size, potentially substantially for large |
| 575 // protos, which may harm a memory-constrained application. |
| 576 // - In the full runtime this is a speed optimization, as the |
| 577 // AbstractMessage base class includes reflection-based implementations of |
| 578 // these methods. |
| 579 // - In the lite runtime, setting this option changes the semantics of |
| 580 // equals() and hashCode() to more closely match those of the full runtime; |
| 581 // the generated methods compute their results based on field values rather |
| 582 // than object identity. (Implementations should not assume that hashcodes |
| 583 // will be consistent across runtimes or versions of the protocol compiler.) |
| 584 @property(nonatomic, readwrite) BOOL hasJavaGenerateEqualsAndHash; |
| 585 @property(nonatomic, readwrite) BOOL javaGenerateEqualsAndHash; |
| 586 |
| 587 // If set true, then the Java2 code generator will generate code that |
| 588 // throws an exception whenever an attempt is made to assign a non-UTF-8 |
| 589 // byte sequence to a string field. |
| 590 // Message reflection will do the same. |
| 591 // However, an extension field still accepts non-UTF-8 byte sequences. |
| 592 // This option has no effect on when used with the lite runtime. |
| 593 @property(nonatomic, readwrite) BOOL hasJavaStringCheckUtf8; |
| 594 @property(nonatomic, readwrite) BOOL javaStringCheckUtf8; |
| 595 |
| 596 @property(nonatomic, readwrite) BOOL hasOptimizeFor; |
| 597 @property(nonatomic, readwrite) GPBFileOptions_OptimizeMode optimizeFor; |
| 598 |
| 599 // Sets the Go package where structs generated from this .proto will be |
| 600 // placed. If omitted, the Go package will be derived from the following: |
| 601 // - The basename of the package import path, if provided. |
| 602 // - Otherwise, the package statement in the .proto file, if present. |
| 603 // - Otherwise, the basename of the .proto file, without extension. |
| 604 @property(nonatomic, readwrite) BOOL hasGoPackage; |
| 605 @property(nonatomic, readwrite, copy, null_resettable) NSString *goPackage; |
| 606 |
| 607 // Should generic services be generated in each language? "Generic" services |
| 608 // are not specific to any particular RPC system. They are generated by the |
| 609 // main code generators in each language (without additional plugins). |
| 610 // Generic services were the only kind of service generation supported by |
| 611 // early versions of google.protobuf. |
| 612 // |
| 613 // Generic services are now considered deprecated in favor of using plugins |
| 614 // that generate code specific to your particular RPC system. Therefore, |
| 615 // these default to false. Old code which depends on generic services should |
| 616 // explicitly set them to true. |
| 617 @property(nonatomic, readwrite) BOOL hasCcGenericServices; |
| 618 @property(nonatomic, readwrite) BOOL ccGenericServices; |
| 619 |
| 620 @property(nonatomic, readwrite) BOOL hasJavaGenericServices; |
| 621 @property(nonatomic, readwrite) BOOL javaGenericServices; |
| 622 |
| 623 @property(nonatomic, readwrite) BOOL hasPyGenericServices; |
| 624 @property(nonatomic, readwrite) BOOL pyGenericServices; |
| 625 |
| 626 // Is this file deprecated? |
| 627 // Depending on the target platform, this can emit Deprecated annotations |
| 628 // for everything in the file, or it will be completely ignored; in the very |
| 629 // least, this is a formalization for deprecating files. |
| 630 @property(nonatomic, readwrite) BOOL hasDeprecated; |
| 631 @property(nonatomic, readwrite) BOOL deprecated; |
| 632 |
| 633 // Enables the use of arenas for the proto messages in this file. This applies |
| 634 // only to generated classes for C++. |
| 635 @property(nonatomic, readwrite) BOOL hasCcEnableArenas; |
| 636 @property(nonatomic, readwrite) BOOL ccEnableArenas; |
| 637 |
| 638 // Sets the objective c class prefix which is prepended to all objective c |
| 639 // generated classes from this .proto. There is no default. |
| 640 @property(nonatomic, readwrite) BOOL hasObjcClassPrefix; |
| 641 @property(nonatomic, readwrite, copy, null_resettable) NSString *objcClassPrefix
; |
| 642 |
| 643 // Namespace for generated classes; defaults to the package. |
| 644 @property(nonatomic, readwrite) BOOL hasCsharpNamespace; |
| 645 @property(nonatomic, readwrite, copy, null_resettable) NSString *csharpNamespace
; |
| 646 |
| 647 // Whether the nano proto compiler should generate in the deprecated non-nano |
| 648 // suffixed package. |
| 649 @property(nonatomic, readwrite) BOOL hasJavananoUseDeprecatedPackage; |
| 650 @property(nonatomic, readwrite) BOOL javananoUseDeprecatedPackage; |
| 651 |
| 652 // The parser stores options it doesn't recognize here. See above. |
| 653 // |uninterpretedOptionArray| contains |GPBUninterpretedOption| |
| 654 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninter
pretedOptionArray; |
| 655 @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; |
| 656 |
| 657 @end |
| 658 |
| 659 #pragma mark - GPBMessageOptions |
| 660 |
| 661 typedef GPB_ENUM(GPBMessageOptions_FieldNumber) { |
| 662 GPBMessageOptions_FieldNumber_MessageSetWireFormat = 1, |
| 663 GPBMessageOptions_FieldNumber_NoStandardDescriptorAccessor = 2, |
| 664 GPBMessageOptions_FieldNumber_Deprecated = 3, |
| 665 GPBMessageOptions_FieldNumber_MapEntry = 7, |
| 666 GPBMessageOptions_FieldNumber_UninterpretedOptionArray = 999, |
| 667 }; |
| 668 |
| 669 @interface GPBMessageOptions : GPBMessage |
| 670 |
| 671 // Set true to use the old proto1 MessageSet wire format for extensions. |
| 672 // This is provided for backwards-compatibility with the MessageSet wire |
| 673 // format. You should not use this for any other reason: It's less |
| 674 // efficient, has fewer features, and is more complicated. |
| 675 // |
| 676 // The message must be defined exactly as follows: |
| 677 // message Foo { |
| 678 // option message_set_wire_format = true; |
| 679 // extensions 4 to max; |
| 680 // } |
| 681 // Note that the message cannot have any defined fields; MessageSets only |
| 682 // have extensions. |
| 683 // |
| 684 // All extensions of your type must be singular messages; e.g. they cannot |
| 685 // be int32s, enums, or repeated messages. |
| 686 // |
| 687 // Because this is an option, the above two restrictions are not enforced by |
| 688 // the protocol compiler. |
| 689 @property(nonatomic, readwrite) BOOL hasMessageSetWireFormat; |
| 690 @property(nonatomic, readwrite) BOOL messageSetWireFormat; |
| 691 |
| 692 // Disables the generation of the standard "descriptor()" accessor, which can |
| 693 // conflict with a field of the same name. This is meant to make migration |
| 694 // from proto1 easier; new code should avoid fields named "descriptor". |
| 695 @property(nonatomic, readwrite) BOOL hasNoStandardDescriptorAccessor; |
| 696 @property(nonatomic, readwrite) BOOL noStandardDescriptorAccessor; |
| 697 |
| 698 // Is this message deprecated? |
| 699 // Depending on the target platform, this can emit Deprecated annotations |
| 700 // for the message, or it will be completely ignored; in the very least, |
| 701 // this is a formalization for deprecating messages. |
| 702 @property(nonatomic, readwrite) BOOL hasDeprecated; |
| 703 @property(nonatomic, readwrite) BOOL deprecated; |
| 704 |
| 705 // Whether the message is an automatically generated map entry type for the |
| 706 // maps field. |
| 707 // |
| 708 // For maps fields: |
| 709 // map<KeyType, ValueType> map_field = 1; |
| 710 // The parsed descriptor looks like: |
| 711 // message MapFieldEntry { |
| 712 // option map_entry = true; |
| 713 // optional KeyType key = 1; |
| 714 // optional ValueType value = 2; |
| 715 // } |
| 716 // repeated MapFieldEntry map_field = 1; |
| 717 // |
| 718 // Implementations may choose not to generate the map_entry=true message, but |
| 719 // use a native map in the target language to hold the keys and values. |
| 720 // The reflection APIs in such implementions still need to work as |
| 721 // if the field is a repeated message field. |
| 722 // |
| 723 // NOTE: Do not set the option in .proto files. Always use the maps syntax |
| 724 // instead. The option should only be implicitly set by the proto compiler |
| 725 // parser. |
| 726 @property(nonatomic, readwrite) BOOL hasMapEntry; |
| 727 @property(nonatomic, readwrite) BOOL mapEntry; |
| 728 |
| 729 // The parser stores options it doesn't recognize here. See above. |
| 730 // |uninterpretedOptionArray| contains |GPBUninterpretedOption| |
| 731 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninter
pretedOptionArray; |
| 732 @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; |
| 733 |
| 734 @end |
| 735 |
| 736 #pragma mark - GPBFieldOptions |
| 737 |
| 738 typedef GPB_ENUM(GPBFieldOptions_FieldNumber) { |
| 739 GPBFieldOptions_FieldNumber_Ctype = 1, |
| 740 GPBFieldOptions_FieldNumber_Packed = 2, |
| 741 GPBFieldOptions_FieldNumber_Deprecated = 3, |
| 742 GPBFieldOptions_FieldNumber_Lazy = 5, |
| 743 GPBFieldOptions_FieldNumber_Jstype = 6, |
| 744 GPBFieldOptions_FieldNumber_Weak = 10, |
| 745 GPBFieldOptions_FieldNumber_UninterpretedOptionArray = 999, |
| 746 }; |
| 747 |
| 748 @interface GPBFieldOptions : GPBMessage |
| 749 |
| 750 // The ctype option instructs the C++ code generator to use a different |
| 751 // representation of the field than it normally would. See the specific |
| 752 // options below. This option is not yet implemented in the open source |
| 753 // release -- sorry, we'll try to include it in a future version! |
| 754 @property(nonatomic, readwrite) BOOL hasCtype; |
| 755 @property(nonatomic, readwrite) GPBFieldOptions_CType ctype; |
| 756 |
| 757 // The packed option can be enabled for repeated primitive fields to enable |
| 758 // a more efficient representation on the wire. Rather than repeatedly |
| 759 // writing the tag and type for each element, the entire array is encoded as |
| 760 // a single length-delimited blob. In proto3, only explicit setting it to |
| 761 // false will avoid using packed encoding. |
| 762 @property(nonatomic, readwrite) BOOL hasPacked; |
| 763 @property(nonatomic, readwrite) BOOL packed; |
| 764 |
| 765 // The jstype option determines the JavaScript type used for values of the |
| 766 // field. The option is permitted only for 64 bit integral and fixed types |
| 767 // (int64, uint64, sint64, fixed64, sfixed64). By default these types are |
| 768 // represented as JavaScript strings. This avoids loss of precision that can |
| 769 // happen when a large value is converted to a floating point JavaScript |
| 770 // numbers. Specifying JS_NUMBER for the jstype causes the generated |
| 771 // JavaScript code to use the JavaScript "number" type instead of strings. |
| 772 // This option is an enum to permit additional types to be added, |
| 773 // e.g. goog.math.Integer. |
| 774 @property(nonatomic, readwrite) BOOL hasJstype; |
| 775 @property(nonatomic, readwrite) GPBFieldOptions_JSType jstype; |
| 776 |
| 777 // Should this field be parsed lazily? Lazy applies only to message-type |
| 778 // fields. It means that when the outer message is initially parsed, the |
| 779 // inner message's contents will not be parsed but instead stored in encoded |
| 780 // form. The inner message will actually be parsed when it is first accessed. |
| 781 // |
| 782 // This is only a hint. Implementations are free to choose whether to use |
| 783 // eager or lazy parsing regardless of the value of this option. However, |
| 784 // setting this option true suggests that the protocol author believes that |
| 785 // using lazy parsing on this field is worth the additional bookkeeping |
| 786 // overhead typically needed to implement it. |
| 787 // |
| 788 // This option does not affect the public interface of any generated code; |
| 789 // all method signatures remain the same. Furthermore, thread-safety of the |
| 790 // interface is not affected by this option; const methods remain safe to |
| 791 // call from multiple threads concurrently, while non-const methods continue |
| 792 // to require exclusive access. |
| 793 // |
| 794 // |
| 795 // Note that implementations may choose not to check required fields within |
| 796 // a lazy sub-message. That is, calling IsInitialized() on the outher message |
| 797 // may return true even if the inner message has missing required fields. |
| 798 // This is necessary because otherwise the inner message would have to be |
| 799 // parsed in order to perform the check, defeating the purpose of lazy |
| 800 // parsing. An implementation which chooses not to check required fields |
| 801 // must be consistent about it. That is, for any particular sub-message, the |
| 802 // implementation must either *always* check its required fields, or *never* |
| 803 // check its required fields, regardless of whether or not the message has |
| 804 // been parsed. |
| 805 @property(nonatomic, readwrite) BOOL hasLazy; |
| 806 @property(nonatomic, readwrite) BOOL lazy; |
| 807 |
| 808 // Is this field deprecated? |
| 809 // Depending on the target platform, this can emit Deprecated annotations |
| 810 // for accessors, or it will be completely ignored; in the very least, this |
| 811 // is a formalization for deprecating fields. |
| 812 @property(nonatomic, readwrite) BOOL hasDeprecated; |
| 813 @property(nonatomic, readwrite) BOOL deprecated; |
| 814 |
| 815 // For Google-internal migration only. Do not use. |
| 816 @property(nonatomic, readwrite) BOOL hasWeak; |
| 817 @property(nonatomic, readwrite) BOOL weak; |
| 818 |
| 819 // The parser stores options it doesn't recognize here. See above. |
| 820 // |uninterpretedOptionArray| contains |GPBUninterpretedOption| |
| 821 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninter
pretedOptionArray; |
| 822 @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; |
| 823 |
| 824 @end |
| 825 |
| 826 #pragma mark - GPBEnumOptions |
| 827 |
| 828 typedef GPB_ENUM(GPBEnumOptions_FieldNumber) { |
| 829 GPBEnumOptions_FieldNumber_AllowAlias = 2, |
| 830 GPBEnumOptions_FieldNumber_Deprecated = 3, |
| 831 GPBEnumOptions_FieldNumber_UninterpretedOptionArray = 999, |
| 832 }; |
| 833 |
| 834 @interface GPBEnumOptions : GPBMessage |
| 835 |
| 836 // Set this option to true to allow mapping different tag names to the same |
| 837 // value. |
| 838 @property(nonatomic, readwrite) BOOL hasAllowAlias; |
| 839 @property(nonatomic, readwrite) BOOL allowAlias; |
| 840 |
| 841 // Is this enum deprecated? |
| 842 // Depending on the target platform, this can emit Deprecated annotations |
| 843 // for the enum, or it will be completely ignored; in the very least, this |
| 844 // is a formalization for deprecating enums. |
| 845 @property(nonatomic, readwrite) BOOL hasDeprecated; |
| 846 @property(nonatomic, readwrite) BOOL deprecated; |
| 847 |
| 848 // The parser stores options it doesn't recognize here. See above. |
| 849 // |uninterpretedOptionArray| contains |GPBUninterpretedOption| |
| 850 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninter
pretedOptionArray; |
| 851 @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; |
| 852 |
| 853 @end |
| 854 |
| 855 #pragma mark - GPBEnumValueOptions |
| 856 |
| 857 typedef GPB_ENUM(GPBEnumValueOptions_FieldNumber) { |
| 858 GPBEnumValueOptions_FieldNumber_Deprecated = 1, |
| 859 GPBEnumValueOptions_FieldNumber_UninterpretedOptionArray = 999, |
| 860 }; |
| 861 |
| 862 @interface GPBEnumValueOptions : GPBMessage |
| 863 |
| 864 // Is this enum value deprecated? |
| 865 // Depending on the target platform, this can emit Deprecated annotations |
| 866 // for the enum value, or it will be completely ignored; in the very least, |
| 867 // this is a formalization for deprecating enum values. |
| 868 @property(nonatomic, readwrite) BOOL hasDeprecated; |
| 869 @property(nonatomic, readwrite) BOOL deprecated; |
| 870 |
| 871 // The parser stores options it doesn't recognize here. See above. |
| 872 // |uninterpretedOptionArray| contains |GPBUninterpretedOption| |
| 873 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninter
pretedOptionArray; |
| 874 @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; |
| 875 |
| 876 @end |
| 877 |
| 878 #pragma mark - GPBServiceOptions |
| 879 |
| 880 typedef GPB_ENUM(GPBServiceOptions_FieldNumber) { |
| 881 GPBServiceOptions_FieldNumber_Deprecated = 33, |
| 882 GPBServiceOptions_FieldNumber_UninterpretedOptionArray = 999, |
| 883 }; |
| 884 |
| 885 @interface GPBServiceOptions : GPBMessage |
| 886 |
| 887 // Is this service deprecated? |
| 888 // Depending on the target platform, this can emit Deprecated annotations |
| 889 // for the service, or it will be completely ignored; in the very least, |
| 890 // this is a formalization for deprecating services. |
| 891 @property(nonatomic, readwrite) BOOL hasDeprecated; |
| 892 @property(nonatomic, readwrite) BOOL deprecated; |
| 893 |
| 894 // The parser stores options it doesn't recognize here. See above. |
| 895 // |uninterpretedOptionArray| contains |GPBUninterpretedOption| |
| 896 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninter
pretedOptionArray; |
| 897 @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; |
| 898 |
| 899 @end |
| 900 |
| 901 #pragma mark - GPBMethodOptions |
| 902 |
| 903 typedef GPB_ENUM(GPBMethodOptions_FieldNumber) { |
| 904 GPBMethodOptions_FieldNumber_Deprecated = 33, |
| 905 GPBMethodOptions_FieldNumber_UninterpretedOptionArray = 999, |
| 906 }; |
| 907 |
| 908 @interface GPBMethodOptions : GPBMessage |
| 909 |
| 910 // Is this method deprecated? |
| 911 // Depending on the target platform, this can emit Deprecated annotations |
| 912 // for the method, or it will be completely ignored; in the very least, |
| 913 // this is a formalization for deprecating methods. |
| 914 @property(nonatomic, readwrite) BOOL hasDeprecated; |
| 915 @property(nonatomic, readwrite) BOOL deprecated; |
| 916 |
| 917 // The parser stores options it doesn't recognize here. See above. |
| 918 // |uninterpretedOptionArray| contains |GPBUninterpretedOption| |
| 919 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninter
pretedOptionArray; |
| 920 @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; |
| 921 |
| 922 @end |
| 923 |
| 924 #pragma mark - GPBUninterpretedOption |
| 925 |
| 926 typedef GPB_ENUM(GPBUninterpretedOption_FieldNumber) { |
| 927 GPBUninterpretedOption_FieldNumber_NameArray = 2, |
| 928 GPBUninterpretedOption_FieldNumber_IdentifierValue = 3, |
| 929 GPBUninterpretedOption_FieldNumber_PositiveIntValue = 4, |
| 930 GPBUninterpretedOption_FieldNumber_NegativeIntValue = 5, |
| 931 GPBUninterpretedOption_FieldNumber_DoubleValue = 6, |
| 932 GPBUninterpretedOption_FieldNumber_StringValue = 7, |
| 933 GPBUninterpretedOption_FieldNumber_AggregateValue = 8, |
| 934 }; |
| 935 |
| 936 // A message representing a option the parser does not recognize. This only |
| 937 // appears in options protos created by the compiler::Parser class. |
| 938 // DescriptorPool resolves these when building Descriptor objects. Therefore, |
| 939 // options protos in descriptor objects (e.g. returned by Descriptor::options(), |
| 940 // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions |
| 941 // in them. |
| 942 @interface GPBUninterpretedOption : GPBMessage |
| 943 |
| 944 // |nameArray| contains |GPBUninterpretedOption_NamePart| |
| 945 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *nameArr
ay; |
| 946 @property(nonatomic, readonly) NSUInteger nameArray_Count; |
| 947 |
| 948 // The value of the uninterpreted option, in whatever type the tokenizer |
| 949 // identified it as during parsing. Exactly one of these should be set. |
| 950 @property(nonatomic, readwrite) BOOL hasIdentifierValue; |
| 951 @property(nonatomic, readwrite, copy, null_resettable) NSString *identifierValue
; |
| 952 |
| 953 @property(nonatomic, readwrite) BOOL hasPositiveIntValue; |
| 954 @property(nonatomic, readwrite) uint64_t positiveIntValue; |
| 955 |
| 956 @property(nonatomic, readwrite) BOOL hasNegativeIntValue; |
| 957 @property(nonatomic, readwrite) int64_t negativeIntValue; |
| 958 |
| 959 @property(nonatomic, readwrite) BOOL hasDoubleValue; |
| 960 @property(nonatomic, readwrite) double doubleValue; |
| 961 |
| 962 @property(nonatomic, readwrite) BOOL hasStringValue; |
| 963 @property(nonatomic, readwrite, copy, null_resettable) NSData *stringValue; |
| 964 |
| 965 @property(nonatomic, readwrite) BOOL hasAggregateValue; |
| 966 @property(nonatomic, readwrite, copy, null_resettable) NSString *aggregateValue; |
| 967 |
| 968 @end |
| 969 |
| 970 #pragma mark - GPBUninterpretedOption_NamePart |
| 971 |
| 972 typedef GPB_ENUM(GPBUninterpretedOption_NamePart_FieldNumber) { |
| 973 GPBUninterpretedOption_NamePart_FieldNumber_NamePart = 1, |
| 974 GPBUninterpretedOption_NamePart_FieldNumber_IsExtension = 2, |
| 975 }; |
| 976 |
| 977 // The name of the uninterpreted option. Each string represents a segment in |
| 978 // a dot-separated name. is_extension is true iff a segment represents an |
| 979 // extension (denoted with parentheses in options specs in .proto files). |
| 980 // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents |
| 981 // "foo.(bar.baz).qux". |
| 982 @interface GPBUninterpretedOption_NamePart : GPBMessage |
| 983 |
| 984 @property(nonatomic, readwrite) BOOL hasNamePart; |
| 985 @property(nonatomic, readwrite, copy, null_resettable) NSString *namePart; |
| 986 |
| 987 @property(nonatomic, readwrite) BOOL hasIsExtension; |
| 988 @property(nonatomic, readwrite) BOOL isExtension; |
| 989 |
| 990 @end |
| 991 |
| 992 #pragma mark - GPBSourceCodeInfo |
| 993 |
| 994 typedef GPB_ENUM(GPBSourceCodeInfo_FieldNumber) { |
| 995 GPBSourceCodeInfo_FieldNumber_LocationArray = 1, |
| 996 }; |
| 997 |
| 998 // Encapsulates information about the original source file from which a |
| 999 // FileDescriptorProto was generated. |
| 1000 @interface GPBSourceCodeInfo : GPBMessage |
| 1001 |
| 1002 // A Location identifies a piece of source code in a .proto file which |
| 1003 // corresponds to a particular definition. This information is intended |
| 1004 // to be useful to IDEs, code indexers, documentation generators, and similar |
| 1005 // tools. |
| 1006 // |
| 1007 // For example, say we have a file like: |
| 1008 // message Foo { |
| 1009 // optional string foo = 1; |
| 1010 // } |
| 1011 // Let's look at just the field definition: |
| 1012 // optional string foo = 1; |
| 1013 // ^ ^^ ^^ ^ ^^^ |
| 1014 // a bc de f ghi |
| 1015 // We have the following locations: |
| 1016 // span path represents |
| 1017 // [a,i) [ 4, 0, 2, 0 ] The whole field definition. |
| 1018 // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). |
| 1019 // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). |
| 1020 // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). |
| 1021 // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). |
| 1022 // |
| 1023 // Notes: |
| 1024 // - A location may refer to a repeated field itself (i.e. not to any |
| 1025 // particular index within it). This is used whenever a set of elements are |
| 1026 // logically enclosed in a single code segment. For example, an entire |
| 1027 // extend block (possibly containing multiple extension definitions) will |
| 1028 // have an outer location whose path refers to the "extensions" repeated |
| 1029 // field without an index. |
| 1030 // - Multiple locations may have the same path. This happens when a single |
| 1031 // logical declaration is spread out across multiple places. The most |
| 1032 // obvious example is the "extend" block again -- there may be multiple |
| 1033 // extend blocks in the same scope, each of which will have the same path. |
| 1034 // - A location's span is not always a subset of its parent's span. For |
| 1035 // example, the "extendee" of an extension declaration appears at the |
| 1036 // beginning of the "extend" block and is shared by all extensions within |
| 1037 // the block. |
| 1038 // - Just because a location's span is a subset of some other location's span |
| 1039 // does not mean that it is a descendent. For example, a "group" defines |
| 1040 // both a type and a field in a single declaration. Thus, the locations |
| 1041 // corresponding to the type and field and their components will overlap. |
| 1042 // - Code which tries to interpret locations should probably be designed to |
| 1043 // ignore those that it doesn't understand, as more types of locations could |
| 1044 // be recorded in the future. |
| 1045 // |locationArray| contains |GPBSourceCodeInfo_Location| |
| 1046 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *locatio
nArray; |
| 1047 @property(nonatomic, readonly) NSUInteger locationArray_Count; |
| 1048 |
| 1049 @end |
| 1050 |
| 1051 #pragma mark - GPBSourceCodeInfo_Location |
| 1052 |
| 1053 typedef GPB_ENUM(GPBSourceCodeInfo_Location_FieldNumber) { |
| 1054 GPBSourceCodeInfo_Location_FieldNumber_PathArray = 1, |
| 1055 GPBSourceCodeInfo_Location_FieldNumber_SpanArray = 2, |
| 1056 GPBSourceCodeInfo_Location_FieldNumber_LeadingComments = 3, |
| 1057 GPBSourceCodeInfo_Location_FieldNumber_TrailingComments = 4, |
| 1058 GPBSourceCodeInfo_Location_FieldNumber_LeadingDetachedCommentsArray = 6, |
| 1059 }; |
| 1060 |
| 1061 @interface GPBSourceCodeInfo_Location : GPBMessage |
| 1062 |
| 1063 // Identifies which part of the FileDescriptorProto was defined at this |
| 1064 // location. |
| 1065 // |
| 1066 // Each element is a field number or an index. They form a path from |
| 1067 // the root FileDescriptorProto to the place where the definition. For |
| 1068 // example, this path: |
| 1069 // [ 4, 3, 2, 7, 1 ] |
| 1070 // refers to: |
| 1071 // file.message_type(3) // 4, 3 |
| 1072 // .field(7) // 2, 7 |
| 1073 // .name() // 1 |
| 1074 // This is because FileDescriptorProto.message_type has field number 4: |
| 1075 // repeated DescriptorProto message_type = 4; |
| 1076 // and DescriptorProto.field has field number 2: |
| 1077 // repeated FieldDescriptorProto field = 2; |
| 1078 // and FieldDescriptorProto.name has field number 1: |
| 1079 // optional string name = 1; |
| 1080 // |
| 1081 // Thus, the above path gives the location of a field name. If we removed |
| 1082 // the last element: |
| 1083 // [ 4, 3, 2, 7 ] |
| 1084 // this path refers to the whole field declaration (from the beginning |
| 1085 // of the label to the terminating semicolon). |
| 1086 @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *pathArra
y; |
| 1087 @property(nonatomic, readonly) NSUInteger pathArray_Count; |
| 1088 |
| 1089 // Always has exactly three or four elements: start line, start column, |
| 1090 // end line (optional, otherwise assumed same as start line), end column. |
| 1091 // These are packed into a single field for efficiency. Note that line |
| 1092 // and column numbers are zero-based -- typically you will want to add |
| 1093 // 1 to each before displaying to a user. |
| 1094 @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *spanArra
y; |
| 1095 @property(nonatomic, readonly) NSUInteger spanArray_Count; |
| 1096 |
| 1097 // If this SourceCodeInfo represents a complete declaration, these are any |
| 1098 // comments appearing before and after the declaration which appear to be |
| 1099 // attached to the declaration. |
| 1100 // |
| 1101 // A series of line comments appearing on consecutive lines, with no other |
| 1102 // tokens appearing on those lines, will be treated as a single comment. |
| 1103 // |
| 1104 // leading_detached_comments will keep paragraphs of comments that appear |
| 1105 // before (but not connected to) the current element. Each paragraph, |
| 1106 // separated by empty lines, will be one comment element in the repeated |
| 1107 // field. |
| 1108 // |
| 1109 // Only the comment content is provided; comment markers (e.g. //) are |
| 1110 // stripped out. For block comments, leading whitespace and an asterisk |
| 1111 // will be stripped from the beginning of each line other than the first. |
| 1112 // Newlines are included in the output. |
| 1113 // |
| 1114 // Examples: |
| 1115 // |
| 1116 // optional int32 foo = 1; // Comment attached to foo. |
| 1117 // // Comment attached to bar. |
| 1118 // optional int32 bar = 2; |
| 1119 // |
| 1120 // optional string baz = 3; |
| 1121 // // Comment attached to baz. |
| 1122 // // Another line attached to baz. |
| 1123 // |
| 1124 // // Comment attached to qux. |
| 1125 // // |
| 1126 // // Another line attached to qux. |
| 1127 // optional double qux = 4; |
| 1128 // |
| 1129 // // Detached comment for corge. This is not leading or trailing comments |
| 1130 // // to qux or corge because there are blank lines separating it from |
| 1131 // // both. |
| 1132 // |
| 1133 // // Detached comment for corge paragraph 2. |
| 1134 // |
| 1135 // optional string corge = 5; |
| 1136 // /* Block comment attached |
| 1137 // * to corge. Leading asterisks |
| 1138 // * will be removed. */ |
| 1139 // /* Block comment attached to |
| 1140 // * grault. */ |
| 1141 // optional int32 grault = 6; |
| 1142 // |
| 1143 // // ignored detached comments. |
| 1144 @property(nonatomic, readwrite) BOOL hasLeadingComments; |
| 1145 @property(nonatomic, readwrite, copy, null_resettable) NSString *leadingComments
; |
| 1146 |
| 1147 @property(nonatomic, readwrite) BOOL hasTrailingComments; |
| 1148 @property(nonatomic, readwrite, copy, null_resettable) NSString *trailingComment
s; |
| 1149 |
| 1150 // |leadingDetachedCommentsArray| contains |NSString| |
| 1151 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *leading
DetachedCommentsArray; |
| 1152 @property(nonatomic, readonly) NSUInteger leadingDetachedCommentsArray_Count; |
| 1153 |
| 1154 @end |
| 1155 |
| 1156 NS_ASSUME_NONNULL_END |
| 1157 |
| 1158 CF_EXTERN_C_END |
| 1159 |
| 1160 // @@protoc_insertion_point(global_scope) |
OLD | NEW |