diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-03-07 12:07:03 -0500 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-03-07 12:07:03 -0500 |
commit | 36650a07cf98ee4e734e07f2403fe5d20e300fc8 (patch) | |
tree | b731c6deb1d3503ba069397b6cda6fd387dce9af /objectivec/google/protobuf/Descriptor.pbobjc.h | |
parent | f2d34086766ae33d3c945408f8dd3044921b1435 (diff) | |
download | protobuf-36650a07cf98ee4e734e07f2403fe5d20e300fc8.tar.gz protobuf-36650a07cf98ee4e734e07f2403fe5d20e300fc8.tar.bz2 protobuf-36650a07cf98ee4e734e07f2403fe5d20e300fc8.zip |
HeaderDoc support in the library and generated sources
- Convert most of the core library headers over to HeaderDoc format.
- Switch the generated comments over to HeaderDoc.
- Create GPBCodedOutputStream_PackagePrivate and move some things into there
that should be more internal.
Diffstat (limited to 'objectivec/google/protobuf/Descriptor.pbobjc.h')
-rw-r--r-- | objectivec/google/protobuf/Descriptor.pbobjc.h | 1052 |
1 files changed, 566 insertions, 486 deletions
diff --git a/objectivec/google/protobuf/Descriptor.pbobjc.h b/objectivec/google/protobuf/Descriptor.pbobjc.h index 2ab20243..109711c7 100644 --- a/objectivec/google/protobuf/Descriptor.pbobjc.h +++ b/objectivec/google/protobuf/Descriptor.pbobjc.h @@ -39,85 +39,91 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Enum GPBFieldDescriptorProto_Type typedef GPB_ENUM(GPBFieldDescriptorProto_Type) { - // 0 is reserved for errors. - // Order is weird for historical reasons. + /// 0 is reserved for errors. + /// Order is weird for historical reasons. GPBFieldDescriptorProto_Type_TypeDouble = 1, GPBFieldDescriptorProto_Type_TypeFloat = 2, - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + /// negative values are likely. GPBFieldDescriptorProto_Type_TypeInt64 = 3, GPBFieldDescriptorProto_Type_TypeUint64 = 4, - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. + /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + /// negative values are likely. GPBFieldDescriptorProto_Type_TypeInt32 = 5, GPBFieldDescriptorProto_Type_TypeFixed64 = 6, GPBFieldDescriptorProto_Type_TypeFixed32 = 7, GPBFieldDescriptorProto_Type_TypeBool = 8, GPBFieldDescriptorProto_Type_TypeString = 9, - // Tag-delimited aggregate. + /// Tag-delimited aggregate. GPBFieldDescriptorProto_Type_TypeGroup = 10, - // Length-delimited aggregate. + /// Length-delimited aggregate. GPBFieldDescriptorProto_Type_TypeMessage = 11, - // New in version 2. + /// New in version 2. GPBFieldDescriptorProto_Type_TypeBytes = 12, GPBFieldDescriptorProto_Type_TypeUint32 = 13, GPBFieldDescriptorProto_Type_TypeEnum = 14, GPBFieldDescriptorProto_Type_TypeSfixed32 = 15, GPBFieldDescriptorProto_Type_TypeSfixed64 = 16, - // Uses ZigZag encoding. + /// Uses ZigZag encoding. GPBFieldDescriptorProto_Type_TypeSint32 = 17, - // Uses ZigZag encoding. + /// Uses ZigZag encoding. GPBFieldDescriptorProto_Type_TypeSint64 = 18, }; GPBEnumDescriptor *GPBFieldDescriptorProto_Type_EnumDescriptor(void); +/// Checks to see if the given value is defined by the enum or was not known at +/// the time this source was generated. BOOL GPBFieldDescriptorProto_Type_IsValidValue(int32_t value); #pragma mark - Enum GPBFieldDescriptorProto_Label typedef GPB_ENUM(GPBFieldDescriptorProto_Label) { - // 0 is reserved for errors + /// 0 is reserved for errors GPBFieldDescriptorProto_Label_LabelOptional = 1, GPBFieldDescriptorProto_Label_LabelRequired = 2, - // TODO(sanjay): Should we add LABEL_MAP? + /// TODO(sanjay): Should we add LABEL_MAP? GPBFieldDescriptorProto_Label_LabelRepeated = 3, }; GPBEnumDescriptor *GPBFieldDescriptorProto_Label_EnumDescriptor(void); +/// Checks to see if the given value is defined by the enum or was not known at +/// the time this source was generated. BOOL GPBFieldDescriptorProto_Label_IsValidValue(int32_t value); #pragma mark - Enum GPBFileOptions_OptimizeMode -// Generated classes can be optimized for speed or code size. +/// Generated classes can be optimized for speed or code size. typedef GPB_ENUM(GPBFileOptions_OptimizeMode) { - // Generate complete code for parsing, serialization, + /// Generate complete code for parsing, serialization, GPBFileOptions_OptimizeMode_Speed = 1, - // etc. + /// etc. GPBFileOptions_OptimizeMode_CodeSize = 2, - // Generate code using MessageLite and the lite runtime. + /// Generate code using MessageLite and the lite runtime. GPBFileOptions_OptimizeMode_LiteRuntime = 3, }; GPBEnumDescriptor *GPBFileOptions_OptimizeMode_EnumDescriptor(void); +/// Checks to see if the given value is defined by the enum or was not known at +/// the time this source was generated. BOOL GPBFileOptions_OptimizeMode_IsValidValue(int32_t value); #pragma mark - Enum GPBFieldOptions_CType typedef GPB_ENUM(GPBFieldOptions_CType) { - // Default mode. + /// Default mode. GPBFieldOptions_CType_String = 0, GPBFieldOptions_CType_Cord = 1, GPBFieldOptions_CType_StringPiece = 2, @@ -125,34 +131,40 @@ typedef GPB_ENUM(GPBFieldOptions_CType) { GPBEnumDescriptor *GPBFieldOptions_CType_EnumDescriptor(void); +/// Checks to see if the given value is defined by the enum or was not known at +/// the time this source was generated. BOOL GPBFieldOptions_CType_IsValidValue(int32_t value); #pragma mark - Enum GPBFieldOptions_JSType typedef GPB_ENUM(GPBFieldOptions_JSType) { - // Use the default type. + /// Use the default type. GPBFieldOptions_JSType_JsNormal = 0, - // Use JavaScript strings. + /// Use JavaScript strings. GPBFieldOptions_JSType_JsString = 1, - // Use JavaScript numbers. + /// Use JavaScript numbers. GPBFieldOptions_JSType_JsNumber = 2, }; GPBEnumDescriptor *GPBFieldOptions_JSType_EnumDescriptor(void); +/// Checks to see if the given value is defined by the enum or was not known at +/// the time this source was generated. BOOL GPBFieldOptions_JSType_IsValidValue(int32_t value); #pragma mark - GPBDescriptorRoot +/// Exposes the extension registry for this file. +/// +/// The base class provides: +/// @code +/// + (GPBExtensionRegistry *)extensionRegistry; +/// @endcode +/// which is a @c GPBExtensionRegistry that includes all the extensions defined by +/// this file and all files that it depends on. @interface GPBDescriptorRoot : GPBRootObject - -// The base class provides: -// + (GPBExtensionRegistry *)extensionRegistry; -// which is an GPBExtensionRegistry that includes all the extensions defined by -// this file and all files that it depends on. - @end #pragma mark - GPBFileDescriptorSet @@ -161,11 +173,12 @@ typedef GPB_ENUM(GPBFileDescriptorSet_FieldNumber) { GPBFileDescriptorSet_FieldNumber_FileArray = 1, }; -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. +/// The protocol compiler can output a FileDescriptorSet containing the .proto +/// files it parses. @interface GPBFileDescriptorSet : GPBMessage @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFileDescriptorProto*> *fileArray; +/// The number of items in @c fileArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger fileArray_Count; @end @@ -187,57 +200,69 @@ typedef GPB_ENUM(GPBFileDescriptorProto_FieldNumber) { GPBFileDescriptorProto_FieldNumber_Syntax = 12, }; -// Describes a complete .proto file. +/// Describes a complete .proto file. @interface GPBFileDescriptorProto : GPBMessage -// file name, relative to root of source tree -@property(nonatomic, readwrite) BOOL hasName; +/// file name, relative to root of source tree @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; -// e.g. "foo", "foo.bar", etc. -@property(nonatomic, readwrite) BOOL hasPackage; +/// e.g. "foo", "foo.bar", etc. @property(nonatomic, readwrite, copy, null_resettable) NSString *package; +/// Test to see if @c package has been set. +@property(nonatomic, readwrite) BOOL hasPackage; -// Names of files imported by this file. +/// Names of files imported by this file. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *dependencyArray; +/// The number of items in @c dependencyArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger dependencyArray_Count; -// Indexes of the public imported files in the dependency list above. +/// Indexes of the public imported files in the dependency list above. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *publicDependencyArray; +/// The number of items in @c publicDependencyArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger publicDependencyArray_Count; -// Indexes of the weak imported files in the dependency list. -// For Google-internal migration only. Do not use. +/// Indexes of the weak imported files in the dependency list. +/// For Google-internal migration only. Do not use. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *weakDependencyArray; +/// The number of items in @c weakDependencyArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger weakDependencyArray_Count; -// All top-level definitions in this file. +/// All top-level definitions in this file. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto*> *messageTypeArray; +/// The number of items in @c messageTypeArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger messageTypeArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumDescriptorProto*> *enumTypeArray; +/// The number of items in @c enumTypeArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger enumTypeArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBServiceDescriptorProto*> *serviceArray; +/// The number of items in @c serviceArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger serviceArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFieldDescriptorProto*> *extensionArray; +/// The number of items in @c extensionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger extensionArray_Count; -@property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong, null_resettable) GPBFileOptions *options; +/// Test to see if @c options has been set. +@property(nonatomic, readwrite) BOOL hasOptions; -// This field contains optional information about the original source code. -// You may safely remove this entire field without harming runtime -// functionality of the descriptors -- the information is needed only by -// development tools. -@property(nonatomic, readwrite) BOOL hasSourceCodeInfo; +/// This field contains optional information about the original source code. +/// You may safely remove this entire field without harming runtime +/// functionality of the descriptors -- the information is needed only by +/// development tools. @property(nonatomic, readwrite, strong, null_resettable) GPBSourceCodeInfo *sourceCodeInfo; +/// Test to see if @c sourceCodeInfo has been set. +@property(nonatomic, readwrite) BOOL hasSourceCodeInfo; -// The syntax of the proto file. -// The supported values are "proto2" and "proto3". -@property(nonatomic, readwrite) BOOL hasSyntax; +/// The syntax of the proto file. +/// The supported values are "proto2" and "proto3". @property(nonatomic, readwrite, copy, null_resettable) NSString *syntax; +/// Test to see if @c syntax has been set. +@property(nonatomic, readwrite) BOOL hasSyntax; @end @@ -256,39 +281,49 @@ typedef GPB_ENUM(GPBDescriptorProto_FieldNumber) { GPBDescriptorProto_FieldNumber_ReservedNameArray = 10, }; -// Describes a message type. +/// Describes a message type. @interface GPBDescriptorProto : GPBMessage -@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFieldDescriptorProto*> *fieldArray; +/// The number of items in @c fieldArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger fieldArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBFieldDescriptorProto*> *extensionArray; +/// The number of items in @c extensionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger extensionArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto*> *nestedTypeArray; +/// The number of items in @c nestedTypeArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger nestedTypeArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumDescriptorProto*> *enumTypeArray; +/// The number of items in @c enumTypeArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger enumTypeArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto_ExtensionRange*> *extensionRangeArray; +/// The number of items in @c extensionRangeArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger extensionRangeArray_Count; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOneofDescriptorProto*> *oneofDeclArray; +/// The number of items in @c oneofDeclArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger oneofDeclArray_Count; -@property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong, null_resettable) GPBMessageOptions *options; +/// Test to see if @c options has been set. +@property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBDescriptorProto_ReservedRange*> *reservedRangeArray; +/// The number of items in @c reservedRangeArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger reservedRangeArray_Count; -// Reserved field names, which may not be used by fields in the same message. -// A given name may only be reserved once. +/// Reserved field names, which may not be used by fields in the same message. +/// A given name may only be reserved once. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *reservedNameArray; +/// The number of items in @c reservedNameArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger reservedNameArray_Count; @end @@ -302,12 +337,12 @@ typedef GPB_ENUM(GPBDescriptorProto_ExtensionRange_FieldNumber) { @interface GPBDescriptorProto_ExtensionRange : GPBMessage -@property(nonatomic, readwrite) BOOL hasStart; @property(nonatomic, readwrite) int32_t start; -@property(nonatomic, readwrite) BOOL hasEnd; +@property(nonatomic, readwrite) BOOL hasStart; @property(nonatomic, readwrite) int32_t end; +@property(nonatomic, readwrite) BOOL hasEnd; @end #pragma mark - GPBDescriptorProto_ReservedRange @@ -317,19 +352,19 @@ typedef GPB_ENUM(GPBDescriptorProto_ReservedRange_FieldNumber) { GPBDescriptorProto_ReservedRange_FieldNumber_End = 2, }; -// Range of reserved tag numbers. Reserved tag numbers may not be used by -// fields or extension ranges in the same message. Reserved ranges may -// not overlap. +/// Range of reserved tag numbers. Reserved tag numbers may not be used by +/// fields or extension ranges in the same message. Reserved ranges may +/// not overlap. @interface GPBDescriptorProto_ReservedRange : GPBMessage -// Inclusive. -@property(nonatomic, readwrite) BOOL hasStart; +/// Inclusive. @property(nonatomic, readwrite) int32_t start; -// Exclusive. -@property(nonatomic, readwrite) BOOL hasEnd; +@property(nonatomic, readwrite) BOOL hasStart; +/// Exclusive. @property(nonatomic, readwrite) int32_t end; +@property(nonatomic, readwrite) BOOL hasEnd; @end #pragma mark - GPBFieldDescriptorProto @@ -347,58 +382,64 @@ typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) { GPBFieldDescriptorProto_FieldNumber_JsonName = 10, }; -// Describes a field within a message. +/// Describes a field within a message. @interface GPBFieldDescriptorProto : GPBMessage -@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite) BOOL hasNumber; @property(nonatomic, readwrite) int32_t number; -@property(nonatomic, readwrite) BOOL hasLabel; +@property(nonatomic, readwrite) BOOL hasNumber; @property(nonatomic, readwrite) GPBFieldDescriptorProto_Label label; -// If type_name is set, this need not be set. If both this and type_name -// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. -@property(nonatomic, readwrite) BOOL hasType; +@property(nonatomic, readwrite) BOOL hasLabel; +/// If type_name is set, this need not be set. If both this and type_name +/// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. @property(nonatomic, readwrite) GPBFieldDescriptorProto_Type type; -// For message and enum types, this is the name of the type. If the name -// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping -// rules are used to find the type (i.e. first the nested types within this -// message are searched, then within the parent, on up to the root -// namespace). -@property(nonatomic, readwrite) BOOL hasTypeName; +@property(nonatomic, readwrite) BOOL hasType; +/// For message and enum types, this is the name of the type. If the name +/// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping +/// rules are used to find the type (i.e. first the nested types within this +/// message are searched, then within the parent, on up to the root +/// namespace). @property(nonatomic, readwrite, copy, null_resettable) NSString *typeName; +/// Test to see if @c typeName has been set. +@property(nonatomic, readwrite) BOOL hasTypeName; -// For extensions, this is the name of the type being extended. It is -// resolved in the same manner as type_name. -@property(nonatomic, readwrite) BOOL hasExtendee; +/// For extensions, this is the name of the type being extended. It is +/// resolved in the same manner as type_name. @property(nonatomic, readwrite, copy, null_resettable) NSString *extendee; +/// Test to see if @c extendee has been set. +@property(nonatomic, readwrite) BOOL hasExtendee; -// For numeric types, contains the original text representation of the value. -// For booleans, "true" or "false". -// For strings, contains the default text contents (not escaped in any way). -// For bytes, contains the C escaped value. All bytes >= 128 are escaped. -// TODO(kenton): Base-64 encode? -@property(nonatomic, readwrite) BOOL hasDefaultValue; +/// For numeric types, contains the original text representation of the value. +/// For booleans, "true" or "false". +/// For strings, contains the default text contents (not escaped in any way). +/// For bytes, contains the C escaped value. All bytes >= 128 are escaped. +/// TODO(kenton): Base-64 encode? @property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue; +/// Test to see if @c defaultValue has been set. +@property(nonatomic, readwrite) BOOL hasDefaultValue; -// If set, gives the index of a oneof in the containing type's oneof_decl -// list. This field is a member of that oneof. -@property(nonatomic, readwrite) BOOL hasOneofIndex; +/// If set, gives the index of a oneof in the containing type's oneof_decl +/// list. This field is a member of that oneof. @property(nonatomic, readwrite) int32_t oneofIndex; -// JSON name of this field. The value is set by protocol compiler. If the -// user has set a "json_name" option on this field, that option's value -// will be used. Otherwise, it's deduced from the field's name by converting -// it to camelCase. -@property(nonatomic, readwrite) BOOL hasJsonName; +@property(nonatomic, readwrite) BOOL hasOneofIndex; +/// JSON name of this field. The value is set by protocol compiler. If the +/// user has set a "json_name" option on this field, that option's value +/// will be used. Otherwise, it's deduced from the field's name by converting +/// it to camelCase. @property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName; +/// Test to see if @c jsonName has been set. +@property(nonatomic, readwrite) BOOL hasJsonName; -@property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong, null_resettable) GPBFieldOptions *options; +/// Test to see if @c options has been set. +@property(nonatomic, readwrite) BOOL hasOptions; @end @@ -408,11 +449,12 @@ typedef GPB_ENUM(GPBOneofDescriptorProto_FieldNumber) { GPBOneofDescriptorProto_FieldNumber_Name = 1, }; -// Describes a oneof. +/// Describes a oneof. @interface GPBOneofDescriptorProto : GPBMessage -@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; @end @@ -424,17 +466,20 @@ typedef GPB_ENUM(GPBEnumDescriptorProto_FieldNumber) { GPBEnumDescriptorProto_FieldNumber_Options = 3, }; -// Describes an enum type. +/// Describes an enum type. @interface GPBEnumDescriptorProto : GPBMessage -@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumValueDescriptorProto*> *valueArray; +/// The number of items in @c valueArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger valueArray_Count; -@property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong, null_resettable) GPBEnumOptions *options; +/// Test to see if @c options has been set. +@property(nonatomic, readwrite) BOOL hasOptions; @end @@ -446,17 +491,19 @@ typedef GPB_ENUM(GPBEnumValueDescriptorProto_FieldNumber) { GPBEnumValueDescriptorProto_FieldNumber_Options = 3, }; -// Describes a value within an enum. +/// Describes a value within an enum. @interface GPBEnumValueDescriptorProto : GPBMessage -@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite) BOOL hasNumber; @property(nonatomic, readwrite) int32_t number; -@property(nonatomic, readwrite) BOOL hasOptions; +@property(nonatomic, readwrite) BOOL hasNumber; @property(nonatomic, readwrite, strong, null_resettable) GPBEnumValueOptions *options; +/// Test to see if @c options has been set. +@property(nonatomic, readwrite) BOOL hasOptions; @end @@ -468,17 +515,20 @@ typedef GPB_ENUM(GPBServiceDescriptorProto_FieldNumber) { GPBServiceDescriptorProto_FieldNumber_Options = 3, }; -// Describes a service. +/// Describes a service. @interface GPBServiceDescriptorProto : GPBMessage -@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethodDescriptorProto*> *methodArray; +/// The number of items in @c methodArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger methodArray_Count; -@property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong, null_resettable) GPBServiceOptions *options; +/// Test to see if @c options has been set. +@property(nonatomic, readwrite) BOOL hasOptions; @end @@ -493,31 +543,35 @@ typedef GPB_ENUM(GPBMethodDescriptorProto_FieldNumber) { GPBMethodDescriptorProto_FieldNumber_ServerStreaming = 6, }; -// Describes a method of a service. +/// Describes a method of a service. @interface GPBMethodDescriptorProto : GPBMessage -@property(nonatomic, readwrite) BOOL hasName; @property(nonatomic, readwrite, copy, null_resettable) NSString *name; +/// Test to see if @c name has been set. +@property(nonatomic, readwrite) BOOL hasName; -// Input and output type names. These are resolved in the same way as -// FieldDescriptorProto.type_name, but must refer to a message type. -@property(nonatomic, readwrite) BOOL hasInputType; +/// Input and output type names. These are resolved in the same way as +/// FieldDescriptorProto.type_name, but must refer to a message type. @property(nonatomic, readwrite, copy, null_resettable) NSString *inputType; +/// Test to see if @c inputType has been set. +@property(nonatomic, readwrite) BOOL hasInputType; -@property(nonatomic, readwrite) BOOL hasOutputType; @property(nonatomic, readwrite, copy, null_resettable) NSString *outputType; +/// Test to see if @c outputType has been set. +@property(nonatomic, readwrite) BOOL hasOutputType; -@property(nonatomic, readwrite) BOOL hasOptions; @property(nonatomic, readwrite, strong, null_resettable) GPBMethodOptions *options; +/// Test to see if @c options has been set. +@property(nonatomic, readwrite) BOOL hasOptions; -// Identifies if client streams multiple client messages -@property(nonatomic, readwrite) BOOL hasClientStreaming; +/// Identifies if client streams multiple client messages @property(nonatomic, readwrite) BOOL clientStreaming; -// Identifies if server streams multiple server messages -@property(nonatomic, readwrite) BOOL hasServerStreaming; +@property(nonatomic, readwrite) BOOL hasClientStreaming; +/// Identifies if server streams multiple server messages @property(nonatomic, readwrite) BOOL serverStreaming; +@property(nonatomic, readwrite) BOOL hasServerStreaming; @end #pragma mark - GPBFileOptions @@ -543,112 +597,118 @@ typedef GPB_ENUM(GPBFileOptions_FieldNumber) { @interface GPBFileOptions : GPBMessage -// Sets the Java package where classes generated from this .proto will be -// placed. By default, the proto package is used, but this is often -// inappropriate because proto packages do not normally start with backwards -// domain names. -@property(nonatomic, readwrite) BOOL hasJavaPackage; +/// Sets the Java package where classes generated from this .proto will be +/// placed. By default, the proto package is used, but this is often +/// inappropriate because proto packages do not normally start with backwards +/// domain names. @property(nonatomic, readwrite, copy, null_resettable) NSString *javaPackage; +/// Test to see if @c javaPackage has been set. +@property(nonatomic, readwrite) BOOL hasJavaPackage; -// If set, all the classes from the .proto file are wrapped in a single -// outer class with the given name. This applies to both Proto1 -// (equivalent to the old "--one_java_file" option) and Proto2 (where -// a .proto always translates to a single class, but you may want to -// explicitly choose the class name). -@property(nonatomic, readwrite) BOOL hasJavaOuterClassname; +/// If set, all the classes from the .proto file are wrapped in a single +/// outer class with the given name. This applies to both Proto1 +/// (equivalent to the old "--one_java_file" option) and Proto2 (where +/// a .proto always translates to a single class, but you may want to +/// explicitly choose the class name). @property(nonatomic, readwrite, copy, null_resettable) NSString *javaOuterClassname; +/// Test to see if @c javaOuterClassname has been set. +@property(nonatomic, readwrite) BOOL hasJavaOuterClassname; -// If set true, then the Java code generator will generate a separate .java -// file for each top-level message, enum, and service defined in the .proto -// file. Thus, these types will *not* be nested inside the outer class -// named by java_outer_classname. However, the outer class will still be -// generated to contain the file's getDescriptor() method as well as any -// top-level extensions defined in the file. -@property(nonatomic, readwrite) BOOL hasJavaMultipleFiles; +/// If set true, then the Java code generator will generate a separate .java +/// file for each top-level message, enum, and service defined in the .proto +/// file. Thus, these types will *not* be nested inside the outer class +/// named by java_outer_classname. However, the outer class will still be +/// generated to contain the file's getDescriptor() method as well as any +/// top-level extensions defined in the file. @property(nonatomic, readwrite) BOOL javaMultipleFiles; -// If set true, then the Java code generator will generate equals() and -// hashCode() methods for all messages defined in the .proto file. -// This increases generated code size, potentially substantially for large -// protos, which may harm a memory-constrained application. -// - In the full runtime this is a speed optimization, as the -// AbstractMessage base class includes reflection-based implementations of -// these methods. -// - In the lite runtime, setting this option changes the semantics of -// equals() and hashCode() to more closely match those of the full runtime; -// the generated methods compute their results based on field values rather -// than object identity. (Implementations should not assume that hashcodes -// will be consistent across runtimes or versions of the protocol compiler.) -@property(nonatomic, readwrite) BOOL hasJavaGenerateEqualsAndHash; +@property(nonatomic, readwrite) BOOL hasJavaMultipleFiles; +/// If set true, then the Java code generator will generate equals() and +/// hashCode() methods for all messages defined in the .proto file. +/// This increases generated code size, potentially substantially for large +/// protos, which may harm a memory-constrained application. +/// - In the full runtime this is a speed optimization, as the +/// AbstractMessage base class includes reflection-based implementations of +/// these methods. +/// - In the lite runtime, setting this option changes the semantics of +/// equals() and hashCode() to more closely match those of the full runtime; +/// the generated methods compute their results based on field values rather +/// than object identity. (Implementations should not assume that hashcodes +/// will be consistent across runtimes or versions of the protocol compiler.) @property(nonatomic, readwrite) BOOL javaGenerateEqualsAndHash; -// If set true, then the Java2 code generator will generate code that -// throws an exception whenever an attempt is made to assign a non-UTF-8 -// byte sequence to a string field. -// Message reflection will do the same. -// However, an extension field still accepts non-UTF-8 byte sequences. -// This option has no effect on when used with the lite runtime. -@property(nonatomic, readwrite) BOOL hasJavaStringCheckUtf8; +@property(nonatomic, readwrite) BOOL hasJavaGenerateEqualsAndHash; +/// If set true, then the Java2 code generator will generate code that +/// throws an exception whenever an attempt is made to assign a non-UTF-8 +/// byte sequence to a string field. +/// Message reflection will do the same. +/// However, an extension field still accepts non-UTF-8 byte sequences. +/// This option has no effect on when used with the lite runtime. @property(nonatomic, readwrite) BOOL javaStringCheckUtf8; -@property(nonatomic, readwrite) BOOL hasOptimizeFor; +@property(nonatomic, readwrite) BOOL hasJavaStringCheckUtf8; @property(nonatomic, readwrite) GPBFileOptions_OptimizeMode optimizeFor; -// Sets the Go package where structs generated from this .proto will be -// placed. If omitted, the Go package will be derived from the following: -// - The basename of the package import path, if provided. -// - Otherwise, the package statement in the .proto file, if present. -// - Otherwise, the basename of the .proto file, without extension. -@property(nonatomic, readwrite) BOOL hasGoPackage; +@property(nonatomic, readwrite) BOOL hasOptimizeFor; +/// Sets the Go package where structs generated from this .proto will be +/// placed. If omitted, the Go package will be derived from the following: +/// - The basename of the package import path, if provided. +/// - Otherwise, the package statement in the .proto file, if present. +/// - Otherwise, the basename of the .proto file, without extension. @property(nonatomic, readwrite, copy, null_resettable) NSString *goPackage; +/// Test to see if @c goPackage has been set. +@property(nonatomic, readwrite) BOOL hasGoPackage; -// Should generic services be generated in each language? "Generic" services -// are not specific to any particular RPC system. They are generated by the -// main code generators in each language (without additional plugins). -// Generic services were the only kind of service generation supported by -// early versions of google.protobuf. -// -// Generic services are now considered deprecated in favor of using plugins -// that generate code specific to your particular RPC system. Therefore, -// these default to false. Old code which depends on generic services should -// explicitly set them to true. -@property(nonatomic, readwrite) BOOL hasCcGenericServices; +/// Should generic services be generated in each language? "Generic" services +/// are not specific to any particular RPC system. They are generated by the +/// main code generators in each language (without additional plugins). +/// Generic services were the only kind of service generation supported by +/// early versions of google.protobuf. +/// +/// Generic services are now considered deprecated in favor of using plugins +/// that generate code specific to your particular RPC system. Therefore, +/// these default to false. Old code which depends on generic services should +/// explicitly set them to true. @property(nonatomic, readwrite) BOOL ccGenericServices; -@property(nonatomic, readwrite) BOOL hasJavaGenericServices; +@property(nonatomic, readwrite) BOOL hasCcGenericServices; @property(nonatomic, readwrite) BOOL javaGenericServices; -@property(nonatomic, readwrite) BOOL hasPyGenericServices; +@property(nonatomic, readwrite) BOOL hasJavaGenericServices; @property(nonatomic, readwrite) BOOL pyGenericServices; -// Is this file deprecated? -// Depending on the target platform, this can emit Deprecated annotations -// for everything in the file, or it will be completely ignored; in the very -// least, this is a formalization for deprecating files. -@property(nonatomic, readwrite) BOOL hasDeprecated; +@property(nonatomic, readwrite) BOOL hasPyGenericServices; +/// Is this file deprecated? +/// Depending on the target platform, this can emit Deprecated annotations +/// for everything in the file, or it will be completely ignored; in the very +/// least, this is a formalization for deprecating files. @property(nonatomic, readwrite) BOOL deprecated; -// Enables the use of arenas for the proto messages in this file. This applies -// only to generated classes for C++. -@property(nonatomic, readwrite) BOOL hasCcEnableArenas; +@property(nonatomic, readwrite) BOOL hasDeprecated; +/// Enables the use of arenas for the proto messages in this file. This applies +/// only to generated classes for C++. @property(nonatomic, readwrite) BOOL ccEnableArenas; -// Sets the objective c class prefix which is prepended to all objective c -// generated classes from this .proto. There is no default. -@property(nonatomic, readwrite) BOOL hasObjcClassPrefix; +@property(nonatomic, readwrite) BOOL hasCcEnableArenas; +/// Sets the objective c class prefix which is prepended to all objective c +/// generated classes from this .proto. There is no default. @property(nonatomic, readwrite, copy, null_resettable) NSString *objcClassPrefix; +/// Test to see if @c objcClassPrefix has been set. +@property(nonatomic, readwrite) BOOL hasObjcClassPrefix; -// Namespace for generated classes; defaults to the package. -@property(nonatomic, readwrite) BOOL hasCsharpNamespace; +/// Namespace for generated classes; defaults to the package. @property(nonatomic, readwrite, copy, null_resettable) NSString *csharpNamespace; +/// Test to see if @c csharpNamespace has been set. +@property(nonatomic, readwrite) BOOL hasCsharpNamespace; -// Whether the nano proto compiler should generate in the deprecated non-nano -// suffixed package. -@property(nonatomic, readwrite) BOOL hasJavananoUseDeprecatedPackage; +/// Whether the nano proto compiler should generate in the deprecated non-nano +/// suffixed package. @property(nonatomic, readwrite) BOOL javananoUseDeprecatedPackage; -// The parser stores options it doesn't recognize here. See above. +@property(nonatomic, readwrite) BOOL hasJavananoUseDeprecatedPackage; +/// The parser stores options it doesn't recognize here. See above. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray; +/// The number of items in @c uninterpretedOptionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -665,66 +725,67 @@ typedef GPB_ENUM(GPBMessageOptions_FieldNumber) { @interface GPBMessageOptions : GPBMessage -// Set true to use the old proto1 MessageSet wire format for extensions. -// This is provided for backwards-compatibility with the MessageSet wire -// format. You should not use this for any other reason: It's less -// efficient, has fewer features, and is more complicated. -// -// The message must be defined exactly as follows: -// message Foo { -// option message_set_wire_format = true; -// extensions 4 to max; -// } -// Note that the message cannot have any defined fields; MessageSets only -// have extensions. -// -// All extensions of your type must be singular messages; e.g. they cannot -// be int32s, enums, or repeated messages. -// -// Because this is an option, the above two restrictions are not enforced by -// the protocol compiler. -@property(nonatomic, readwrite) BOOL hasMessageSetWireFormat; +/// Set true to use the old proto1 MessageSet wire format for extensions. +/// This is provided for backwards-compatibility with the MessageSet wire +/// format. You should not use this for any other reason: It's less +/// efficient, has fewer features, and is more complicated. +/// +/// The message must be defined exactly as follows: +/// message Foo { +/// option message_set_wire_format = true; +/// extensions 4 to max; +/// } +/// Note that the message cannot have any defined fields; MessageSets only +/// have extensions. +/// +/// All extensions of your type must be singular messages; e.g. they cannot +/// be int32s, enums, or repeated messages. +/// +/// Because this is an option, the above two restrictions are not enforced by +/// the protocol compiler. @property(nonatomic, readwrite) BOOL messageSetWireFormat; -// Disables the generation of the standard "descriptor()" accessor, which can -// conflict with a field of the same name. This is meant to make migration -// from proto1 easier; new code should avoid fields named "descriptor". -@property(nonatomic, readwrite) BOOL hasNoStandardDescriptorAccessor; +@property(nonatomic, readwrite) BOOL hasMessageSetWireFormat; +/// Disables the generation of the standard "descriptor()" accessor, which can +/// conflict with a field of the same name. This is meant to make migration +/// from proto1 easier; new code should avoid fields named "descriptor". @property(nonatomic, readwrite) BOOL noStandardDescriptorAccessor; -// Is this message deprecated? -// Depending on the target platform, this can emit Deprecated annotations -// for the message, or it will be completely ignored; in the very least, -// this is a formalization for deprecating messages. -@property(nonatomic, readwrite) BOOL hasDeprecated; +@property(nonatomic, readwrite) BOOL hasNoStandardDescriptorAccessor; +/// Is this message deprecated? +/// Depending on the target platform, this can emit Deprecated annotations +/// for the message, or it will be completely ignored; in the very least, +/// this is a formalization for deprecating messages. @property(nonatomic, readwrite) BOOL deprecated; -// Whether the message is an automatically generated map entry type for the -// maps field. -// -// For maps fields: -// map<KeyType, ValueType> map_field = 1; -// The parsed descriptor looks like: -// message MapFieldEntry { -// option map_entry = true; -// optional KeyType key = 1; -// optional ValueType value = 2; -// } -// repeated MapFieldEntry map_field = 1; -// -// Implementations may choose not to generate the map_entry=true message, but -// use a native map in the target language to hold the keys and values. -// The reflection APIs in such implementions still need to work as -// if the field is a repeated message field. -// -// NOTE: Do not set the option in .proto files. Always use the maps syntax -// instead. The option should only be implicitly set by the proto compiler -// parser. -@property(nonatomic, readwrite) BOOL hasMapEntry; +@property(nonatomic, readwrite) BOOL hasDeprecated; +/// Whether the message is an automatically generated map entry type for the +/// maps field. +/// +/// For maps fields: +/// map<KeyType, ValueType> map_field = 1; +/// The parsed descriptor looks like: +/// message MapFieldEntry { +/// option map_entry = true; +/// optional KeyType key = 1; +/// optional ValueType value = 2; +/// } +/// repeated MapFieldEntry map_field = 1; +/// +/// Implementations may choose not to generate the map_entry=true message, but +/// use a native map in the target language to hold the keys and values. +/// The reflection APIs in such implementions still need to work as +/// if the field is a repeated message field. +/// +/// NOTE: Do not set the option in .proto files. Always use the maps syntax +/// instead. The option should only be implicitly set by the proto compiler +/// parser. @property(nonatomic, readwrite) BOOL mapEntry; -// The parser stores options it doesn't recognize here. See above. +@property(nonatomic, readwrite) BOOL hasMapEntry; +/// The parser stores options it doesn't recognize here. See above. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray; +/// The number of items in @c uninterpretedOptionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -743,77 +804,78 @@ typedef GPB_ENUM(GPBFieldOptions_FieldNumber) { @interface GPBFieldOptions : GPBMessage -// The ctype option instructs the C++ code generator to use a different -// representation of the field than it normally would. See the specific -// options below. This option is not yet implemented in the open source -// release -- sorry, we'll try to include it in a future version! -@property(nonatomic, readwrite) BOOL hasCtype; +/// The ctype option instructs the C++ code generator to use a different +/// representation of the field than it normally would. See the specific +/// options below. This option is not yet implemented in the open source +/// release -- sorry, we'll try to include it in a future version! @property(nonatomic, readwrite) GPBFieldOptions_CType ctype; -// The packed option can be enabled for repeated primitive fields to enable -// a more efficient representation on the wire. Rather than repeatedly -// writing the tag and type for each element, the entire array is encoded as -// a single length-delimited blob. In proto3, only explicit setting it to -// false will avoid using packed encoding. -@property(nonatomic, readwrite) BOOL hasPacked; +@property(nonatomic, readwrite) BOOL hasCtype; +/// The packed option can be enabled for repeated primitive fields to enable +/// a more efficient representation on the wire. Rather than repeatedly +/// writing the tag and type for each element, the entire array is encoded as +/// a single length-delimited blob. In proto3, only explicit setting it to +/// false will avoid using packed encoding. @property(nonatomic, readwrite) BOOL packed; -// The jstype option determines the JavaScript type used for values of the -// field. The option is permitted only for 64 bit integral and fixed types -// (int64, uint64, sint64, fixed64, sfixed64). By default these types are -// represented as JavaScript strings. This avoids loss of precision that can -// happen when a large value is converted to a floating point JavaScript -// numbers. Specifying JS_NUMBER for the jstype causes the generated -// JavaScript code to use the JavaScript "number" type instead of strings. -// This option is an enum to permit additional types to be added, -// e.g. goog.math.Integer. -@property(nonatomic, readwrite) BOOL hasJstype; +@property(nonatomic, readwrite) BOOL hasPacked; +/// The jstype option determines the JavaScript type used for values of the +/// field. The option is permitted only for 64 bit integral and fixed types +/// (int64, uint64, sint64, fixed64, sfixed64). By default these types are +/// represented as JavaScript strings. This avoids loss of precision that can +/// happen when a large value is converted to a floating point JavaScript +/// numbers. Specifying JS_NUMBER for the jstype causes the generated +/// JavaScript code to use the JavaScript "number" type instead of strings. +/// This option is an enum to permit additional types to be added, +/// e.g. goog.math.Integer. @property(nonatomic, readwrite) GPBFieldOptions_JSType jstype; -// Should this field be parsed lazily? Lazy applies only to message-type -// fields. It means that when the outer message is initially parsed, the -// inner message's contents will not be parsed but instead stored in encoded -// form. The inner message will actually be parsed when it is first accessed. -// -// This is only a hint. Implementations are free to choose whether to use -// eager or lazy parsing regardless of the value of this option. However, -// setting this option true suggests that the protocol author believes that -// using lazy parsing on this field is worth the additional bookkeeping -// overhead typically needed to implement it. -// -// This option does not affect the public interface of any generated code; -// all method signatures remain the same. Furthermore, thread-safety of the -// interface is not affected by this option; const methods remain safe to -// call from multiple threads concurrently, while non-const methods continue -// to require exclusive access. -// -// -// Note that implementations may choose not to check required fields within -// a lazy sub-message. That is, calling IsInitialized() on the outher message -// may return true even if the inner message has missing required fields. -// This is necessary because otherwise the inner message would have to be -// parsed in order to perform the check, defeating the purpose of lazy -// parsing. An implementation which chooses not to check required fields -// must be consistent about it. That is, for any particular sub-message, the -// implementation must either *always* check its required fields, or *never* -// check its required fields, regardless of whether or not the message has -// been parsed. -@property(nonatomic, readwrite) BOOL hasLazy; +@property(nonatomic, readwrite) BOOL hasJstype; +/// Should this field be parsed lazily? Lazy applies only to message-type +/// fields. It means that when the outer message is initially parsed, the +/// inner message's contents will not be parsed but instead stored in encoded +/// form. The inner message will actually be parsed when it is first accessed. +/// +/// This is only a hint. Implementations are free to choose whether to use +/// eager or lazy parsing regardless of the value of this option. However, +/// setting this option true suggests that the protocol author believes that +/// using lazy parsing on this field is worth the additional bookkeeping +/// overhead typically needed to implement it. +/// +/// This option does not affect the public interface of any generated code; +/// all method signatures remain the same. Furthermore, thread-safety of the +/// interface is not affected by this option; const methods remain safe to +/// call from multiple threads concurrently, while non-const methods continue +/// to require exclusive access. +/// +/// +/// Note that implementations may choose not to check required fields within +/// a lazy sub-message. That is, calling IsInitialized() on the outher message +/// may return true even if the inner message has missing required fields. +/// This is necessary because otherwise the inner message would have to be +/// parsed in order to perform the check, defeating the purpose of lazy +/// parsing. An implementation which chooses not to check required fields +/// must be consistent about it. That is, for any particular sub-message, the +/// implementation must either *always* check its required fields, or *never* +/// check its required fields, regardless of whether or not the message has +/// been parsed. @property(nonatomic, readwrite) BOOL lazy; -// Is this field deprecated? -// Depending on the target platform, this can emit Deprecated annotations -// for accessors, or it will be completely ignored; in the very least, this -// is a formalization for deprecating fields. -@property(nonatomic, readwrite) BOOL hasDeprecated; +@property(nonatomic, readwrite) BOOL hasLazy; +/// Is this field deprecated? +/// Depending on the target platform, this can emit Deprecated annotations +/// for accessors, or it will be completely ignored; in the very least, this +/// is a formalization for deprecating fields. @property(nonatomic, readwrite) BOOL deprecated; -// For Google-internal migration only. Do not use. -@property(nonatomic, readwrite) BOOL hasWeak; +@property(nonatomic, readwrite) BOOL hasDeprecated; +/// For Google-internal migration only. Do not use. @property(nonatomic, readwrite) BOOL weak; -// The parser stores options it doesn't recognize here. See above. +@property(nonatomic, readwrite) BOOL hasWeak; +/// The parser stores options it doesn't recognize here. See above. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray; +/// The number of items in @c uninterpretedOptionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -828,20 +890,21 @@ typedef GPB_ENUM(GPBEnumOptions_FieldNumber) { @interface GPBEnumOptions : GPBMessage -// Set this option to true to allow mapping different tag names to the same -// value. -@property(nonatomic, readwrite) BOOL hasAllowAlias; +/// Set this option to true to allow mapping different tag names to the same +/// value. @property(nonatomic, readwrite) BOOL allowAlias; -// Is this enum deprecated? -// Depending on the target platform, this can emit Deprecated annotations -// for the enum, or it will be completely ignored; in the very least, this -// is a formalization for deprecating enums. -@property(nonatomic, readwrite) BOOL hasDeprecated; +@property(nonatomic, readwrite) BOOL hasAllowAlias; +/// Is this enum deprecated? +/// Depending on the target platform, this can emit Deprecated annotations +/// for the enum, or it will be completely ignored; in the very least, this +/// is a formalization for deprecating enums. @property(nonatomic, readwrite) BOOL deprecated; -// The parser stores options it doesn't recognize here. See above. +@property(nonatomic, readwrite) BOOL hasDeprecated; +/// The parser stores options it doesn't recognize here. See above. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray; +/// The number of items in @c uninterpretedOptionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -855,15 +918,16 @@ typedef GPB_ENUM(GPBEnumValueOptions_FieldNumber) { @interface GPBEnumValueOptions : GPBMessage -// Is this enum value deprecated? -// Depending on the target platform, this can emit Deprecated annotations -// for the enum value, or it will be completely ignored; in the very least, -// this is a formalization for deprecating enum values. -@property(nonatomic, readwrite) BOOL hasDeprecated; +/// Is this enum value deprecated? +/// Depending on the target platform, this can emit Deprecated annotations +/// for the enum value, or it will be completely ignored; in the very least, +/// this is a formalization for deprecating enum values. @property(nonatomic, readwrite) BOOL deprecated; -// The parser stores options it doesn't recognize here. See above. +@property(nonatomic, readwrite) BOOL hasDeprecated; +/// The parser stores options it doesn't recognize here. See above. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray; +/// The number of items in @c uninterpretedOptionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -877,15 +941,16 @@ typedef GPB_ENUM(GPBServiceOptions_FieldNumber) { @interface GPBServiceOptions : GPBMessage -// Is this service deprecated? -// Depending on the target platform, this can emit Deprecated annotations -// for the service, or it will be completely ignored; in the very least, -// this is a formalization for deprecating services. -@property(nonatomic, readwrite) BOOL hasDeprecated; +/// Is this service deprecated? +/// Depending on the target platform, this can emit Deprecated annotations +/// for the service, or it will be completely ignored; in the very least, +/// this is a formalization for deprecating services. @property(nonatomic, readwrite) BOOL deprecated; -// The parser stores options it doesn't recognize here. See above. +@property(nonatomic, readwrite) BOOL hasDeprecated; +/// The parser stores options it doesn't recognize here. See above. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray; +/// The number of items in @c uninterpretedOptionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -899,15 +964,16 @@ typedef GPB_ENUM(GPBMethodOptions_FieldNumber) { @interface GPBMethodOptions : GPBMessage -// Is this method deprecated? -// Depending on the target platform, this can emit Deprecated annotations -// for the method, or it will be completely ignored; in the very least, -// this is a formalization for deprecating methods. -@property(nonatomic, readwrite) BOOL hasDeprecated; +/// Is this method deprecated? +/// Depending on the target platform, this can emit Deprecated annotations +/// for the method, or it will be completely ignored; in the very least, +/// this is a formalization for deprecating methods. @property(nonatomic, readwrite) BOOL deprecated; -// The parser stores options it doesn't recognize here. See above. +@property(nonatomic, readwrite) BOOL hasDeprecated; +/// The parser stores options it doesn't recognize here. See above. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption*> *uninterpretedOptionArray; +/// The number of items in @c uninterpretedOptionArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -924,36 +990,40 @@ typedef GPB_ENUM(GPBUninterpretedOption_FieldNumber) { GPBUninterpretedOption_FieldNumber_AggregateValue = 8, }; -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. +/// A message representing a option the parser does not recognize. This only +/// appears in options protos created by the compiler::Parser class. +/// DescriptorPool resolves these when building Descriptor objects. Therefore, +/// options protos in descriptor objects (e.g. returned by Descriptor::options(), +/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +/// in them. @interface GPBUninterpretedOption : GPBMessage @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBUninterpretedOption_NamePart*> *nameArray; +/// The number of items in @c nameArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger nameArray_Count; -// The value of the uninterpreted option, in whatever type the tokenizer -// identified it as during parsing. Exactly one of these should be set. -@property(nonatomic, readwrite) BOOL hasIdentifierValue; +/// The value of the uninterpreted option, in whatever type the tokenizer +/// identified it as during parsing. Exactly one of these should be set. @property(nonatomic, readwrite, copy, null_resettable) NSString *identifierValue; +/// Test to see if @c identifierValue has been set. +@property(nonatomic, readwrite) BOOL hasIdentifierValue; -@property(nonatomic, readwrite) BOOL hasPositiveIntValue; @property(nonatomic, readwrite) uint64_t positiveIntValue; -@property(nonatomic, readwrite) BOOL hasNegativeIntValue; +@property(nonatomic, readwrite) BOOL hasPositiveIntValue; @property(nonatomic, readwrite) int64_t negativeIntValue; -@property(nonatomic, readwrite) BOOL hasDoubleValue; +@property(nonatomic, readwrite) BOOL hasNegativeIntValue; @property(nonatomic, readwrite) double doubleValue; -@property(nonatomic, readwrite) BOOL hasStringValue; +@property(nonatomic, readwrite) BOOL hasDoubleValue; @property(nonatomic, readwrite, copy, null_resettable) NSData *stringValue; +/// Test to see if @c stringValue has been set. +@property(nonatomic, readwrite) BOOL hasStringValue; -@property(nonatomic, readwrite) BOOL hasAggregateValue; @property(nonatomic, readwrite, copy, null_resettable) NSString *aggregateValue; +/// Test to see if @c aggregateValue has been set. +@property(nonatomic, readwrite) BOOL hasAggregateValue; @end @@ -964,19 +1034,20 @@ typedef GPB_ENUM(GPBUninterpretedOption_NamePart_FieldNumber) { GPBUninterpretedOption_NamePart_FieldNumber_IsExtension = 2, }; -// The name of the uninterpreted option. Each string represents a segment in -// a dot-separated name. is_extension is true iff a segment represents an -// extension (denoted with parentheses in options specs in .proto files). -// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents -// "foo.(bar.baz).qux". +/// The name of the uninterpreted option. Each string represents a segment in +/// a dot-separated name. is_extension is true iff a segment represents an +/// extension (denoted with parentheses in options specs in .proto files). +/// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents +/// "foo.(bar.baz).qux". @interface GPBUninterpretedOption_NamePart : GPBMessage -@property(nonatomic, readwrite) BOOL hasNamePart; @property(nonatomic, readwrite, copy, null_resettable) NSString *namePart; +/// Test to see if @c namePart has been set. +@property(nonatomic, readwrite) BOOL hasNamePart; -@property(nonatomic, readwrite) BOOL hasIsExtension; @property(nonatomic, readwrite) BOOL isExtension; +@property(nonatomic, readwrite) BOOL hasIsExtension; @end #pragma mark - GPBSourceCodeInfo @@ -985,54 +1056,55 @@ typedef GPB_ENUM(GPBSourceCodeInfo_FieldNumber) { GPBSourceCodeInfo_FieldNumber_LocationArray = 1, }; -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. +/// Encapsulates information about the original source file from which a +/// FileDescriptorProto was generated. @interface GPBSourceCodeInfo : GPBMessage -// A Location identifies a piece of source code in a .proto file which -// corresponds to a particular definition. This information is intended -// to be useful to IDEs, code indexers, documentation generators, and similar -// tools. -// -// For example, say we have a file like: -// message Foo { -// optional string foo = 1; -// } -// Let's look at just the field definition: -// optional string foo = 1; -// ^ ^^ ^^ ^ ^^^ -// a bc de f ghi -// We have the following locations: -// span path represents -// [a,i) [ 4, 0, 2, 0 ] The whole field definition. -// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). -// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). -// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). -// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). -// -// Notes: -// - A location may refer to a repeated field itself (i.e. not to any -// particular index within it). This is used whenever a set of elements are -// logically enclosed in a single code segment. For example, an entire -// extend block (possibly containing multiple extension definitions) will -// have an outer location whose path refers to the "extensions" repeated -// field without an index. -// - Multiple locations may have the same path. This happens when a single -// logical declaration is spread out across multiple places. The most -// obvious example is the "extend" block again -- there may be multiple -// extend blocks in the same scope, each of which will have the same path. -// - A location's span is not always a subset of its parent's span. For -// example, the "extendee" of an extension declaration appears at the -// beginning of the "extend" block and is shared by all extensions within -// the block. -// - Just because a location's span is a subset of some other location's span -// does not mean that it is a descendent. For example, a "group" defines -// both a type and a field in a single declaration. Thus, the locations -// corresponding to the type and field and their components will overlap. -// - Code which tries to interpret locations should probably be designed to -// ignore those that it doesn't understand, as more types of locations could -// be recorded in the future. +/// A Location identifies a piece of source code in a .proto file which +/// corresponds to a particular definition. This information is intended +/// to be useful to IDEs, code indexers, documentation generators, and similar +/// tools. +/// +/// For example, say we have a file like: +/// message Foo { +/// optional string foo = 1; +/// } +/// Let's look at just the field definition: +/// optional string foo = 1; +/// ^ ^^ ^^ ^ ^^^ +/// a bc de f ghi +/// We have the following locations: +/// span path represents +/// [a,i) [ 4, 0, 2, 0 ] The whole field definition. +/// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). +/// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). +/// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). +/// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). +/// +/// Notes: +/// - A location may refer to a repeated field itself (i.e. not to any +/// particular index within it). This is used whenever a set of elements are +/// logically enclosed in a single code segment. For example, an entire +/// extend block (possibly containing multiple extension definitions) will +/// have an outer location whose path refers to the "extensions" repeated +/// field without an index. +/// - Multiple locations may have the same path. This happens when a single +/// logical declaration is spread out across multiple places. The most +/// obvious example is the "extend" block again -- there may be multiple +/// extend blocks in the same scope, each of which will have the same path. +/// - A location's span is not always a subset of its parent's span. For +/// example, the "extendee" of an extension declaration appears at the +/// beginning of the "extend" block and is shared by all extensions within +/// the block. +/// - Just because a location's span is a subset of some other location's span +/// does not mean that it is a descendent. For example, a "group" defines +/// both a type and a field in a single declaration. Thus, the locations +/// corresponding to the type and field and their components will overlap. +/// - Code which tries to interpret locations should probably be designed to +/// ignore those that it doesn't understand, as more types of locations could +/// be recorded in the future. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBSourceCodeInfo_Location*> *locationArray; +/// The number of items in @c locationArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger locationArray_Count; @end @@ -1049,94 +1121,99 @@ typedef GPB_ENUM(GPBSourceCodeInfo_Location_FieldNumber) { @interface GPBSourceCodeInfo_Location : GPBMessage -// Identifies which part of the FileDescriptorProto was defined at this -// location. -// -// Each element is a field number or an index. They form a path from -// the root FileDescriptorProto to the place where the definition. For -// example, this path: -// [ 4, 3, 2, 7, 1 ] -// refers to: -// file.message_type(3) // 4, 3 -// .field(7) // 2, 7 -// .name() // 1 -// This is because FileDescriptorProto.message_type has field number 4: -// repeated DescriptorProto message_type = 4; -// and DescriptorProto.field has field number 2: -// repeated FieldDescriptorProto field = 2; -// and FieldDescriptorProto.name has field number 1: -// optional string name = 1; -// -// Thus, the above path gives the location of a field name. If we removed -// the last element: -// [ 4, 3, 2, 7 ] -// this path refers to the whole field declaration (from the beginning -// of the label to the terminating semicolon). +/// Identifies which part of the FileDescriptorProto was defined at this +/// location. +/// +/// Each element is a field number or an index. They form a path from +/// the root FileDescriptorProto to the place where the definition. For +/// example, this path: +/// [ 4, 3, 2, 7, 1 ] +/// refers to: +/// file.message_type(3) // 4, 3 +/// .field(7) // 2, 7 +/// .name() // 1 +/// This is because FileDescriptorProto.message_type has field number 4: +/// repeated DescriptorProto message_type = 4; +/// and DescriptorProto.field has field number 2: +/// repeated FieldDescriptorProto field = 2; +/// and FieldDescriptorProto.name has field number 1: +/// optional string name = 1; +/// +/// Thus, the above path gives the location of a field name. If we removed +/// the last element: +/// [ 4, 3, 2, 7 ] +/// this path refers to the whole field declaration (from the beginning +/// of the label to the terminating semicolon). @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *pathArray; +/// The number of items in @c pathArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger pathArray_Count; -// Always has exactly three or four elements: start line, start column, -// end line (optional, otherwise assumed same as start line), end column. -// These are packed into a single field for efficiency. Note that line -// and column numbers are zero-based -- typically you will want to add -// 1 to each before displaying to a user. +/// Always has exactly three or four elements: start line, start column, +/// end line (optional, otherwise assumed same as start line), end column. +/// These are packed into a single field for efficiency. Note that line +/// and column numbers are zero-based -- typically you will want to add +/// 1 to each before displaying to a user. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *spanArray; +/// The number of items in @c spanArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger spanArray_Count; -// If this SourceCodeInfo represents a complete declaration, these are any -// comments appearing before and after the declaration which appear to be -// attached to the declaration. -// -// A series of line comments appearing on consecutive lines, with no other -// tokens appearing on those lines, will be treated as a single comment. -// -// leading_detached_comments will keep paragraphs of comments that appear -// before (but not connected to) the current element. Each paragraph, -// separated by empty lines, will be one comment element in the repeated -// field. -// -// Only the comment content is provided; comment markers (e.g. //) are -// stripped out. For block comments, leading whitespace and an asterisk -// will be stripped from the beginning of each line other than the first. -// Newlines are included in the output. -// -// Examples: -// -// optional int32 foo = 1; // Comment attached to foo. -// // Comment attached to bar. -// optional int32 bar = 2; -// -// optional string baz = 3; -// // Comment attached to baz. -// // Another line attached to baz. -// -// // Comment attached to qux. -// // -// // Another line attached to qux. -// optional double qux = 4; -// -// // Detached comment for corge. This is not leading or trailing comments -// // to qux or corge because there are blank lines separating it from -// // both. -// -// // Detached comment for corge paragraph 2. -// -// optional string corge = 5; -// /* Block comment attached -// * to corge. Leading asterisks -// * will be removed. */ -// /* Block comment attached to -// * grault. */ -// optional int32 grault = 6; -// -// // ignored detached comments. -@property(nonatomic, readwrite) BOOL hasLeadingComments; +/// If this SourceCodeInfo represents a complete declaration, these are any +/// comments appearing before and after the declaration which appear to be +/// attached to the declaration. +/// +/// A series of line comments appearing on consecutive lines, with no other +/// tokens appearing on those lines, will be treated as a single comment. +/// +/// leading_detached_comments will keep paragraphs of comments that appear +/// before (but not connected to) the current element. Each paragraph, +/// separated by empty lines, will be one comment element in the repeated +/// field. +/// +/// Only the comment content is provided; comment markers (e.g. //) are +/// stripped out. For block comments, leading whitespace and an asterisk +/// will be stripped from the beginning of each line other than the first. +/// Newlines are included in the output. +/// +/// Examples: +/// +/// optional int32 foo = 1; // Comment attached to foo. +/// // Comment attached to bar. +/// optional int32 bar = 2; +/// +/// optional string baz = 3; +/// // Comment attached to baz. +/// // Another line attached to baz. +/// +/// // Comment attached to qux. +/// // +/// // Another line attached to qux. +/// optional double qux = 4; +/// +/// // Detached comment for corge. This is not leading or trailing comments +/// // to qux or corge because there are blank lines separating it from +/// // both. +/// +/// // Detached comment for corge paragraph 2. +/// +/// optional string corge = 5; +/// /* Block comment attached +/// * to corge. Leading asterisks +/// * will be removed. */ +/// /* Block comment attached to +/// * grault. */ +/// optional int32 grault = 6; +/// +/// // ignored detached comments. @property(nonatomic, readwrite, copy, null_resettable) NSString *leadingComments; +/// Test to see if @c leadingComments has been set. +@property(nonatomic, readwrite) BOOL hasLeadingComments; -@property(nonatomic, readwrite) BOOL hasTrailingComments; @property(nonatomic, readwrite, copy, null_resettable) NSString *trailingComments; +/// Test to see if @c trailingComments has been set. +@property(nonatomic, readwrite) BOOL hasTrailingComments; @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *leadingDetachedCommentsArray; +/// The number of items in @c leadingDetachedCommentsArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger leadingDetachedCommentsArray_Count; @end @@ -1147,14 +1224,15 @@ typedef GPB_ENUM(GPBGeneratedCodeInfo_FieldNumber) { GPBGeneratedCodeInfo_FieldNumber_AnnotationArray = 1, }; -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. +/// Describes the relationship between generated code and its original source +/// file. A GeneratedCodeInfo message is associated with only one generated +/// source file, but may contain references to different source .proto files. @interface GPBGeneratedCodeInfo : GPBMessage -// An Annotation connects some span of text in generated code to an element -// of its generating .proto file. +/// An Annotation connects some span of text in generated code to an element +/// of its generating .proto file. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBGeneratedCodeInfo_Annotation*> *annotationArray; +/// The number of items in @c annotationArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger annotationArray_Count; @end @@ -1170,26 +1248,28 @@ typedef GPB_ENUM(GPBGeneratedCodeInfo_Annotation_FieldNumber) { @interface GPBGeneratedCodeInfo_Annotation : GPBMessage -// Identifies the element in the original source .proto file. This field -// is formatted the same as SourceCodeInfo.Location.path. +/// Identifies the element in the original source .proto file. This field +/// is formatted the same as SourceCodeInfo.Location.path. @property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *pathArray; +/// The number of items in @c pathArray without causing the array to be created. @property(nonatomic, readonly) NSUInteger pathArray_Count; -// Identifies the filesystem path to the original source .proto. -@property(nonatomic, readwrite) BOOL hasSourceFile; +/// Identifies the filesystem path to the original source .proto. @property(nonatomic, readwrite, copy, null_resettable) NSString *sourceFile; +/// Test to see if @c sourceFile has been set. +@property(nonatomic, readwrite) BOOL hasSourceFile; -// Identifies the starting offset in bytes in the generated code -// that relates to the identified object. -@property(nonatomic, readwrite) BOOL hasBegin; +/// Identifies the starting offset in bytes in the generated code +/// that relates to the identified object. @property(nonatomic, readwrite) int32_t begin; -// Identifies the ending offset in bytes in the generated code that -// relates to the identified offset. The end offset should be one past -// the last relevant byte (so the length of the text = end - begin). -@property(nonatomic, readwrite) BOOL hasEnd; +@property(nonatomic, readwrite) BOOL hasBegin; +/// Identifies the ending offset in bytes in the generated code that +/// relates to the identified offset. The end offset should be one past +/// the last relevant byte (so the length of the text = end - begin). @property(nonatomic, readwrite) int32_t end; +@property(nonatomic, readwrite) BOOL hasEnd; @end NS_ASSUME_NONNULL_END |