diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-06-16 16:45:14 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-06-16 17:04:50 -0400 |
commit | 8c88957ef375f3b739b6e72ea5c2fb71b12e1fc2 (patch) | |
tree | 31b4561aae2a11b1a9b4b7010dc9df10c52a4d72 /objectivec/google | |
parent | 4cbb612299eaf8259db25f5dcda46022fbd1db54 (diff) | |
download | protobuf-8c88957ef375f3b739b6e72ea5c2fb71b12e1fc2.tar.gz protobuf-8c88957ef375f3b739b6e72ea5c2fb71b12e1fc2.tar.bz2 protobuf-8c88957ef375f3b739b6e72ea5c2fb71b12e1fc2.zip |
Add nonnil markup to ObjC library.
Add the clang annotations to the objc library and generated code to help with Swift bridging and compiler checks.
Diffstat (limited to 'objectivec/google')
-rw-r--r-- | objectivec/google/protobuf/Any.pbobjc.h | 7 | ||||
-rw-r--r-- | objectivec/google/protobuf/Api.pbobjc.h | 21 | ||||
-rw-r--r-- | objectivec/google/protobuf/Descriptor.pbobjc.h | 133 | ||||
-rw-r--r-- | objectivec/google/protobuf/Duration.pbobjc.h | 3 | ||||
-rw-r--r-- | objectivec/google/protobuf/Empty.pbobjc.h | 3 | ||||
-rw-r--r-- | objectivec/google/protobuf/FieldMask.pbobjc.h | 5 | ||||
-rw-r--r-- | objectivec/google/protobuf/SourceContext.pbobjc.h | 5 | ||||
-rw-r--r-- | objectivec/google/protobuf/Struct.pbobjc.h | 15 | ||||
-rw-r--r-- | objectivec/google/protobuf/Timestamp.pbobjc.h | 3 | ||||
-rw-r--r-- | objectivec/google/protobuf/Type.pbobjc.h | 37 | ||||
-rw-r--r-- | objectivec/google/protobuf/Wrappers.pbobjc.h | 7 |
11 files changed, 136 insertions, 103 deletions
diff --git a/objectivec/google/protobuf/Any.pbobjc.h b/objectivec/google/protobuf/Any.pbobjc.h index 8154318e..e09f3a49 100644 --- a/objectivec/google/protobuf/Any.pbobjc.h +++ b/objectivec/google/protobuf/Any.pbobjc.h @@ -11,6 +11,7 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBAnyRoot @@ -88,13 +89,15 @@ typedef GPB_ENUM(GPBAny_FieldNumber) { // namespace should use `type.googleapis.com/full.type.name` (without // schema and path). A type service will eventually become available which // serves those URLs (projected Q2/15). -@property(nonatomic, readwrite, copy) NSString *typeURL; +@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL; // Must be valid serialized data of the above specified type. -@property(nonatomic, readwrite, copy) NSData *value; +@property(nonatomic, readwrite, copy, null_resettable) NSData *value; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Api.pbobjc.h b/objectivec/google/protobuf/Api.pbobjc.h index 061347be..021dac5f 100644 --- a/objectivec/google/protobuf/Api.pbobjc.h +++ b/objectivec/google/protobuf/Api.pbobjc.h @@ -13,6 +13,7 @@ CF_EXTERN_C_BEGIN @class GPBSourceContext; +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBApiRoot @@ -40,16 +41,16 @@ typedef GPB_ENUM(GPBApi_FieldNumber) { // The fully qualified name of this api, including package name // followed by the api's simple name. -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // The methods of this api, in unspecified order. // |methodsArray| contains |GPBMethod| -@property(nonatomic, readwrite, strong) NSMutableArray *methodsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *methodsArray; @property(nonatomic, readonly) NSUInteger methodsArray_Count; // Any metadata attached to the API. // |optionsArray| contains |GPBOption| -@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; @property(nonatomic, readonly) NSUInteger optionsArray_Count; // A version string for this api. If specified, must have the form @@ -74,12 +75,12 @@ typedef GPB_ENUM(GPBApi_FieldNumber) { // experimental, none-GA apis. // // See also: [design doc](http://go/api-versioning). -@property(nonatomic, readwrite, copy) NSString *version; +@property(nonatomic, readwrite, copy, null_resettable) NSString *version; // Source context for the protocol buffer service represented by this // message. @property(nonatomic, readwrite) BOOL hasSourceContext; -@property(nonatomic, readwrite, strong) GPBSourceContext *sourceContext; +@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; @end @@ -98,27 +99,29 @@ typedef GPB_ENUM(GPBMethod_FieldNumber) { @interface GPBMethod : GPBMessage // The simple name of this method. -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // A URL of the input message type. -@property(nonatomic, readwrite, copy) NSString *requestTypeURL; +@property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL; // If true, the request is streamed. @property(nonatomic, readwrite) BOOL requestStreaming; // The URL of the output message type. -@property(nonatomic, readwrite, copy) NSString *responseTypeURL; +@property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL; // If true, the response is streamed. @property(nonatomic, readwrite) BOOL responseStreaming; // Any metadata attached to the method. // |optionsArray| contains |GPBOption| -@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; @property(nonatomic, readonly) NSUInteger optionsArray_Count; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Descriptor.pbobjc.h b/objectivec/google/protobuf/Descriptor.pbobjc.h index e0106534..bf0f51a6 100644 --- a/objectivec/google/protobuf/Descriptor.pbobjc.h +++ b/objectivec/google/protobuf/Descriptor.pbobjc.h @@ -20,6 +20,8 @@ CF_EXTERN_C_BEGIN @class GPBServiceOptions; @class GPBSourceCodeInfo; +NS_ASSUME_NONNULL_BEGIN + #pragma mark - Enum GPBFieldDescriptorProto_Type typedef GPB_ENUM(GPBFieldDescriptorProto_Type) { @@ -128,7 +130,6 @@ GPBEnumDescriptor *GPBFieldOptions_JSType_EnumDescriptor(void); BOOL GPBFieldOptions_JSType_IsValidValue(int32_t value); - #pragma mark - GPBDescriptorRoot @interface GPBDescriptorRoot : GPBRootObject @@ -151,7 +152,7 @@ typedef GPB_ENUM(GPBFileDescriptorSet_FieldNumber) { @interface GPBFileDescriptorSet : GPBMessage // |fileArray| contains |GPBFileDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *fileArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fileArray; @property(nonatomic, readonly) NSUInteger fileArray_Count; @end @@ -178,57 +179,57 @@ typedef GPB_ENUM(GPBFileDescriptorProto_FieldNumber) { // file name, relative to root of source tree @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // e.g. "foo", "foo.bar", etc. @property(nonatomic, readwrite) BOOL hasPackage; -@property(nonatomic, readwrite, copy) NSString *package; +@property(nonatomic, readwrite, copy, null_resettable) NSString *package; // Names of files imported by this file. // |dependencyArray| contains |NSString| -@property(nonatomic, readwrite, strong) NSMutableArray *dependencyArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *dependencyArray; @property(nonatomic, readonly) NSUInteger dependencyArray_Count; // Indexes of the public imported files in the dependency list above. -@property(nonatomic, readwrite, strong) GPBInt32Array *publicDependencyArray; +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *publicDependencyArray; @property(nonatomic, readonly) NSUInteger publicDependencyArray_Count; // Indexes of the weak imported files in the dependency list. // For Google-internal migration only. Do not use. -@property(nonatomic, readwrite, strong) GPBInt32Array *weakDependencyArray; +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *weakDependencyArray; @property(nonatomic, readonly) NSUInteger weakDependencyArray_Count; // All top-level definitions in this file. // |messageTypeArray| contains |GPBDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *messageTypeArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *messageTypeArray; @property(nonatomic, readonly) NSUInteger messageTypeArray_Count; // |enumTypeArray| contains |GPBEnumDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *enumTypeArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumTypeArray; @property(nonatomic, readonly) NSUInteger enumTypeArray_Count; // |serviceArray| contains |GPBServiceDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *serviceArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *serviceArray; @property(nonatomic, readonly) NSUInteger serviceArray_Count; // |extensionArray| contains |GPBFieldDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *extensionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *extensionArray; @property(nonatomic, readonly) NSUInteger extensionArray_Count; @property(nonatomic, readwrite) BOOL hasOptions; -@property(nonatomic, readwrite, strong) GPBFileOptions *options; +@property(nonatomic, readwrite, strong, null_resettable) GPBFileOptions *options; // 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; -@property(nonatomic, readwrite, strong) GPBSourceCodeInfo *sourceCodeInfo; +@property(nonatomic, readwrite, strong, null_resettable) GPBSourceCodeInfo *sourceCodeInfo; // The syntax of the proto file. // The supported values are "proto2" and "proto3". @property(nonatomic, readwrite) BOOL hasSyntax; -@property(nonatomic, readwrite, copy) NSString *syntax; +@property(nonatomic, readwrite, copy, null_resettable) NSString *syntax; @end @@ -251,43 +252,43 @@ typedef GPB_ENUM(GPBDescriptorProto_FieldNumber) { @interface GPBDescriptorProto : GPBMessage @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // |fieldArray| contains |GPBFieldDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *fieldArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldArray; @property(nonatomic, readonly) NSUInteger fieldArray_Count; // |extensionArray| contains |GPBFieldDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *extensionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *extensionArray; @property(nonatomic, readonly) NSUInteger extensionArray_Count; // |nestedTypeArray| contains |GPBDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *nestedTypeArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *nestedTypeArray; @property(nonatomic, readonly) NSUInteger nestedTypeArray_Count; // |enumTypeArray| contains |GPBEnumDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *enumTypeArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumTypeArray; @property(nonatomic, readonly) NSUInteger enumTypeArray_Count; // |extensionRangeArray| contains |GPBDescriptorProto_ExtensionRange| -@property(nonatomic, readwrite, strong) NSMutableArray *extensionRangeArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *extensionRangeArray; @property(nonatomic, readonly) NSUInteger extensionRangeArray_Count; // |oneofDeclArray| contains |GPBOneofDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *oneofDeclArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *oneofDeclArray; @property(nonatomic, readonly) NSUInteger oneofDeclArray_Count; @property(nonatomic, readwrite) BOOL hasOptions; -@property(nonatomic, readwrite, strong) GPBMessageOptions *options; +@property(nonatomic, readwrite, strong, null_resettable) GPBMessageOptions *options; // |reservedRangeArray| contains |GPBDescriptorProto_ReservedRange| -@property(nonatomic, readwrite, strong) NSMutableArray *reservedRangeArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *reservedRangeArray; @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. // |reservedNameArray| contains |NSString| -@property(nonatomic, readwrite, strong) NSMutableArray *reservedNameArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *reservedNameArray; @property(nonatomic, readonly) NSUInteger reservedNameArray_Count; @end @@ -349,7 +350,7 @@ typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) { @interface GPBFieldDescriptorProto : GPBMessage @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; @property(nonatomic, readwrite) BOOL hasNumber; @property(nonatomic, readwrite) int32_t number; @@ -368,12 +369,12 @@ typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) { // message are searched, then within the parent, on up to the root // namespace). @property(nonatomic, readwrite) BOOL hasTypeName; -@property(nonatomic, readwrite, copy) NSString *typeName; +@property(nonatomic, readwrite, copy, null_resettable) NSString *typeName; // 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; -@property(nonatomic, readwrite, copy) NSString *extendee; +@property(nonatomic, readwrite, copy, null_resettable) NSString *extendee; // For numeric types, contains the original text representation of the value. // For booleans, "true" or "false". @@ -381,7 +382,7 @@ typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) { // For bytes, contains the C escaped value. All bytes >= 128 are escaped. // TODO(kenton): Base-64 encode? @property(nonatomic, readwrite) BOOL hasDefaultValue; -@property(nonatomic, readwrite, copy) NSString *defaultValue; +@property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue; // If set, gives the index of a oneof in the containing type's oneof_decl // list. This field is a member of that oneof. @@ -389,7 +390,7 @@ typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) { @property(nonatomic, readwrite) int32_t oneofIndex; @property(nonatomic, readwrite) BOOL hasOptions; -@property(nonatomic, readwrite, strong) GPBFieldOptions *options; +@property(nonatomic, readwrite, strong, null_resettable) GPBFieldOptions *options; @end @@ -403,7 +404,7 @@ typedef GPB_ENUM(GPBOneofDescriptorProto_FieldNumber) { @interface GPBOneofDescriptorProto : GPBMessage @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; @end @@ -419,14 +420,14 @@ typedef GPB_ENUM(GPBEnumDescriptorProto_FieldNumber) { @interface GPBEnumDescriptorProto : GPBMessage @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // |valueArray| contains |GPBEnumValueDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *valueArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *valueArray; @property(nonatomic, readonly) NSUInteger valueArray_Count; @property(nonatomic, readwrite) BOOL hasOptions; -@property(nonatomic, readwrite, strong) GPBEnumOptions *options; +@property(nonatomic, readwrite, strong, null_resettable) GPBEnumOptions *options; @end @@ -442,13 +443,13 @@ typedef GPB_ENUM(GPBEnumValueDescriptorProto_FieldNumber) { @interface GPBEnumValueDescriptorProto : GPBMessage @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; @property(nonatomic, readwrite) BOOL hasNumber; @property(nonatomic, readwrite) int32_t number; @property(nonatomic, readwrite) BOOL hasOptions; -@property(nonatomic, readwrite, strong) GPBEnumValueOptions *options; +@property(nonatomic, readwrite, strong, null_resettable) GPBEnumValueOptions *options; @end @@ -464,14 +465,14 @@ typedef GPB_ENUM(GPBServiceDescriptorProto_FieldNumber) { @interface GPBServiceDescriptorProto : GPBMessage @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // |methodArray| contains |GPBMethodDescriptorProto| -@property(nonatomic, readwrite, strong) NSMutableArray *methodArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *methodArray; @property(nonatomic, readonly) NSUInteger methodArray_Count; @property(nonatomic, readwrite) BOOL hasOptions; -@property(nonatomic, readwrite, strong) GPBServiceOptions *options; +@property(nonatomic, readwrite, strong, null_resettable) GPBServiceOptions *options; @end @@ -490,18 +491,18 @@ typedef GPB_ENUM(GPBMethodDescriptorProto_FieldNumber) { @interface GPBMethodDescriptorProto : GPBMessage @property(nonatomic, readwrite) BOOL hasName; -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // 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; -@property(nonatomic, readwrite, copy) NSString *inputType; +@property(nonatomic, readwrite, copy, null_resettable) NSString *inputType; @property(nonatomic, readwrite) BOOL hasOutputType; -@property(nonatomic, readwrite, copy) NSString *outputType; +@property(nonatomic, readwrite, copy, null_resettable) NSString *outputType; @property(nonatomic, readwrite) BOOL hasOptions; -@property(nonatomic, readwrite, strong) GPBMethodOptions *options; +@property(nonatomic, readwrite, strong, null_resettable) GPBMethodOptions *options; // Identifies if client streams multiple client messages @property(nonatomic, readwrite) BOOL hasClientStreaming; @@ -540,7 +541,7 @@ typedef GPB_ENUM(GPBFileOptions_FieldNumber) { // inappropriate because proto packages do not normally start with backwards // domain names. @property(nonatomic, readwrite) BOOL hasJavaPackage; -@property(nonatomic, readwrite, copy) NSString *javaPackage; +@property(nonatomic, readwrite, copy, null_resettable) NSString *javaPackage; // 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 @@ -548,7 +549,7 @@ typedef GPB_ENUM(GPBFileOptions_FieldNumber) { // a .proto always translates to a single class, but you may want to // explicitly choose the class name). @property(nonatomic, readwrite) BOOL hasJavaOuterClassname; -@property(nonatomic, readwrite, copy) NSString *javaOuterClassname; +@property(nonatomic, readwrite, copy, null_resettable) NSString *javaOuterClassname; // 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 @@ -590,7 +591,7 @@ typedef GPB_ENUM(GPBFileOptions_FieldNumber) { // - 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, copy) NSString *goPackage; +@property(nonatomic, readwrite, copy, null_resettable) NSString *goPackage; // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the @@ -626,15 +627,15 @@ typedef GPB_ENUM(GPBFileOptions_FieldNumber) { // 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, copy) NSString *objcClassPrefix; +@property(nonatomic, readwrite, copy, null_resettable) NSString *objcClassPrefix; // Namespace for generated classes; defaults to the package. @property(nonatomic, readwrite) BOOL hasCsharpNamespace; -@property(nonatomic, readwrite, copy) NSString *csharpNamespace; +@property(nonatomic, readwrite, copy, null_resettable) NSString *csharpNamespace; // The parser stores options it doesn't recognize here. See above. // |uninterpretedOptionArray| contains |GPBUninterpretedOption| -@property(nonatomic, readwrite, strong) NSMutableArray *uninterpretedOptionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninterpretedOptionArray; @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -711,7 +712,7 @@ typedef GPB_ENUM(GPBMessageOptions_FieldNumber) { // The parser stores options it doesn't recognize here. See above. // |uninterpretedOptionArray| contains |GPBUninterpretedOption| -@property(nonatomic, readwrite, strong) NSMutableArray *uninterpretedOptionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninterpretedOptionArray; @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -801,7 +802,7 @@ typedef GPB_ENUM(GPBFieldOptions_FieldNumber) { // The parser stores options it doesn't recognize here. See above. // |uninterpretedOptionArray| contains |GPBUninterpretedOption| -@property(nonatomic, readwrite, strong) NSMutableArray *uninterpretedOptionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninterpretedOptionArray; @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -830,7 +831,7 @@ typedef GPB_ENUM(GPBEnumOptions_FieldNumber) { // The parser stores options it doesn't recognize here. See above. // |uninterpretedOptionArray| contains |GPBUninterpretedOption| -@property(nonatomic, readwrite, strong) NSMutableArray *uninterpretedOptionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninterpretedOptionArray; @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -853,7 +854,7 @@ typedef GPB_ENUM(GPBEnumValueOptions_FieldNumber) { // The parser stores options it doesn't recognize here. See above. // |uninterpretedOptionArray| contains |GPBUninterpretedOption| -@property(nonatomic, readwrite, strong) NSMutableArray *uninterpretedOptionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninterpretedOptionArray; @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -876,7 +877,7 @@ typedef GPB_ENUM(GPBServiceOptions_FieldNumber) { // The parser stores options it doesn't recognize here. See above. // |uninterpretedOptionArray| contains |GPBUninterpretedOption| -@property(nonatomic, readwrite, strong) NSMutableArray *uninterpretedOptionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninterpretedOptionArray; @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -899,7 +900,7 @@ typedef GPB_ENUM(GPBMethodOptions_FieldNumber) { // The parser stores options it doesn't recognize here. See above. // |uninterpretedOptionArray| contains |GPBUninterpretedOption| -@property(nonatomic, readwrite, strong) NSMutableArray *uninterpretedOptionArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *uninterpretedOptionArray; @property(nonatomic, readonly) NSUInteger uninterpretedOptionArray_Count; @end @@ -925,13 +926,13 @@ typedef GPB_ENUM(GPBUninterpretedOption_FieldNumber) { @interface GPBUninterpretedOption : GPBMessage // |nameArray| contains |GPBUninterpretedOption_NamePart| -@property(nonatomic, readwrite, strong) NSMutableArray *nameArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *nameArray; @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; -@property(nonatomic, readwrite, copy) NSString *identifierValue; +@property(nonatomic, readwrite, copy, null_resettable) NSString *identifierValue; @property(nonatomic, readwrite) BOOL hasPositiveIntValue; @property(nonatomic, readwrite) uint64_t positiveIntValue; @@ -943,10 +944,10 @@ typedef GPB_ENUM(GPBUninterpretedOption_FieldNumber) { @property(nonatomic, readwrite) double doubleValue; @property(nonatomic, readwrite) BOOL hasStringValue; -@property(nonatomic, readwrite, copy) NSData *stringValue; +@property(nonatomic, readwrite, copy, null_resettable) NSData *stringValue; @property(nonatomic, readwrite) BOOL hasAggregateValue; -@property(nonatomic, readwrite, copy) NSString *aggregateValue; +@property(nonatomic, readwrite, copy, null_resettable) NSString *aggregateValue; @end @@ -965,7 +966,7 @@ typedef GPB_ENUM(GPBUninterpretedOption_NamePart_FieldNumber) { @interface GPBUninterpretedOption_NamePart : GPBMessage @property(nonatomic, readwrite) BOOL hasNamePart; -@property(nonatomic, readwrite, copy) NSString *namePart; +@property(nonatomic, readwrite, copy, null_resettable) NSString *namePart; @property(nonatomic, readwrite) BOOL hasIsExtension; @property(nonatomic, readwrite) BOOL isExtension; @@ -1026,7 +1027,7 @@ typedef GPB_ENUM(GPBSourceCodeInfo_FieldNumber) { // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. // |locationArray| contains |GPBSourceCodeInfo_Location| -@property(nonatomic, readwrite, strong) NSMutableArray *locationArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *locationArray; @property(nonatomic, readonly) NSUInteger locationArray_Count; @end @@ -1066,7 +1067,7 @@ typedef GPB_ENUM(GPBSourceCodeInfo_Location_FieldNumber) { // [ 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) GPBInt32Array *pathArray; +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *pathArray; @property(nonatomic, readonly) NSUInteger pathArray_Count; // Always has exactly three or four elements: start line, start column, @@ -1074,7 +1075,7 @@ typedef GPB_ENUM(GPBSourceCodeInfo_Location_FieldNumber) { // 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) GPBInt32Array *spanArray; +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *spanArray; @property(nonatomic, readonly) NSUInteger spanArray_Count; // If this SourceCodeInfo represents a complete declaration, these are any @@ -1125,17 +1126,19 @@ typedef GPB_ENUM(GPBSourceCodeInfo_Location_FieldNumber) { // // // ignored detached comments. @property(nonatomic, readwrite) BOOL hasLeadingComments; -@property(nonatomic, readwrite, copy) NSString *leadingComments; +@property(nonatomic, readwrite, copy, null_resettable) NSString *leadingComments; @property(nonatomic, readwrite) BOOL hasTrailingComments; -@property(nonatomic, readwrite, copy) NSString *trailingComments; +@property(nonatomic, readwrite, copy, null_resettable) NSString *trailingComments; // |leadingDetachedCommentsArray| contains |NSString| -@property(nonatomic, readwrite, strong) NSMutableArray *leadingDetachedCommentsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *leadingDetachedCommentsArray; @property(nonatomic, readonly) NSUInteger leadingDetachedCommentsArray_Count; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Duration.pbobjc.h b/objectivec/google/protobuf/Duration.pbobjc.h index f65df6c9..9ecba197 100644 --- a/objectivec/google/protobuf/Duration.pbobjc.h +++ b/objectivec/google/protobuf/Duration.pbobjc.h @@ -11,6 +11,7 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBDurationRoot @@ -86,6 +87,8 @@ typedef GPB_ENUM(GPBDuration_FieldNumber) { @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Empty.pbobjc.h b/objectivec/google/protobuf/Empty.pbobjc.h index 1356c3a7..17e2b19b 100644 --- a/objectivec/google/protobuf/Empty.pbobjc.h +++ b/objectivec/google/protobuf/Empty.pbobjc.h @@ -11,6 +11,7 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBEmptyRoot @@ -36,6 +37,8 @@ CF_EXTERN_C_BEGIN @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/FieldMask.pbobjc.h b/objectivec/google/protobuf/FieldMask.pbobjc.h index f9b26fa2..de62c03b 100644 --- a/objectivec/google/protobuf/FieldMask.pbobjc.h +++ b/objectivec/google/protobuf/FieldMask.pbobjc.h @@ -11,6 +11,7 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBFieldMaskRoot @@ -151,11 +152,13 @@ typedef GPB_ENUM(GPBFieldMask_FieldNumber) { // The set of field mask paths. // |pathsArray| contains |NSString| -@property(nonatomic, readwrite, strong) NSMutableArray *pathsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *pathsArray; @property(nonatomic, readonly) NSUInteger pathsArray_Count; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/SourceContext.pbobjc.h b/objectivec/google/protobuf/SourceContext.pbobjc.h index bcbf1e3d..6bc57149 100644 --- a/objectivec/google/protobuf/SourceContext.pbobjc.h +++ b/objectivec/google/protobuf/SourceContext.pbobjc.h @@ -11,6 +11,7 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBSourceContextRoot @@ -35,10 +36,12 @@ typedef GPB_ENUM(GPBSourceContext_FieldNumber) { // The path-qualified name of the .proto file that contained the associated // protobuf element. For example: `"google/protobuf/source.proto"`. -@property(nonatomic, readwrite, copy) NSString *fileName; +@property(nonatomic, readwrite, copy, null_resettable) NSString *fileName; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Struct.pbobjc.h b/objectivec/google/protobuf/Struct.pbobjc.h index 45456955..d72f9738 100644 --- a/objectivec/google/protobuf/Struct.pbobjc.h +++ b/objectivec/google/protobuf/Struct.pbobjc.h @@ -14,6 +14,8 @@ CF_EXTERN_C_BEGIN @class GPBListValue; @class GPBStruct; +NS_ASSUME_NONNULL_BEGIN + #pragma mark - Enum GPBNullValue // `NullValue` is a singleton enumeration to represent the null @@ -28,7 +30,6 @@ GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void); BOOL GPBNullValue_IsValidValue(int32_t value); - #pragma mark - GPBStructRoot @interface GPBStructRoot : GPBRootObject @@ -56,7 +57,7 @@ typedef GPB_ENUM(GPBStruct_FieldNumber) { // Map of dynamically typed values. // |fields| values are |GPBValue| -@property(nonatomic, readwrite, strong) NSMutableDictionary *fields; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary *fields; @property(nonatomic, readonly) NSUInteger fields_Count; @end @@ -97,16 +98,16 @@ typedef GPB_ENUM(GPBValue_Kind_OneOfCase) { @property(nonatomic, readwrite) double numberValue; // Represents a string value. -@property(nonatomic, readwrite, copy) NSString *stringValue; +@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue; // Represents a boolean value. @property(nonatomic, readwrite) BOOL boolValue; // Represents a structured value. -@property(nonatomic, readwrite, strong) GPBStruct *structValue; +@property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue; // Represents a repeated `Value`. -@property(nonatomic, readwrite, strong) GPBListValue *listValue; +@property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue; @end @@ -126,11 +127,13 @@ typedef GPB_ENUM(GPBListValue_FieldNumber) { // Repeated field of dynamically typed values. // |valuesArray| contains |GPBValue| -@property(nonatomic, readwrite, strong) NSMutableArray *valuesArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *valuesArray; @property(nonatomic, readonly) NSUInteger valuesArray_Count; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Timestamp.pbobjc.h b/objectivec/google/protobuf/Timestamp.pbobjc.h index a81321b4..0b342156 100644 --- a/objectivec/google/protobuf/Timestamp.pbobjc.h +++ b/objectivec/google/protobuf/Timestamp.pbobjc.h @@ -11,6 +11,7 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBTimestampRoot @@ -97,6 +98,8 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) { @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Type.pbobjc.h b/objectivec/google/protobuf/Type.pbobjc.h index e3b6229f..eb807ae5 100644 --- a/objectivec/google/protobuf/Type.pbobjc.h +++ b/objectivec/google/protobuf/Type.pbobjc.h @@ -14,6 +14,8 @@ CF_EXTERN_C_BEGIN @class GPBAny; @class GPBSourceContext; +NS_ASSUME_NONNULL_BEGIN + #pragma mark - Enum GPBField_Kind // Kind represents a basic field type. @@ -101,7 +103,6 @@ GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void); BOOL GPBField_Cardinality_IsValidValue(int32_t value); - #pragma mark - GPBTypeRoot @interface GPBTypeRoot : GPBRootObject @@ -127,27 +128,27 @@ typedef GPB_ENUM(GPBType_FieldNumber) { @interface GPBType : GPBMessage // The fully qualified message name. -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // The list of fields. // |fieldsArray| contains |GPBField| -@property(nonatomic, readwrite, strong) NSMutableArray *fieldsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldsArray; @property(nonatomic, readonly) NSUInteger fieldsArray_Count; // The list of oneof definitions. // The list of oneofs declared in this Type // |oneofsArray| contains |NSString| -@property(nonatomic, readwrite, strong) NSMutableArray *oneofsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *oneofsArray; @property(nonatomic, readonly) NSUInteger oneofsArray_Count; // The proto options. // |optionsArray| contains |GPBOption| -@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; @property(nonatomic, readonly) NSUInteger optionsArray_Count; // The source context. @property(nonatomic, readwrite) BOOL hasSourceContext; -@property(nonatomic, readwrite, strong) GPBSourceContext *sourceContext; +@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; @end @@ -177,11 +178,11 @@ typedef GPB_ENUM(GPBField_FieldNumber) { @property(nonatomic, readwrite) int32_t number; // The field name. -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // The type URL (without the scheme) when the type is MESSAGE or ENUM, // such as `type.googleapis.com/google.protobuf.Empty`. -@property(nonatomic, readwrite, copy) NSString *typeURL; +@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL; // Index in Type.oneofs. Starts at 1. Zero means no oneof mapping. @property(nonatomic, readwrite) int32_t oneofIndex; @@ -191,7 +192,7 @@ typedef GPB_ENUM(GPBField_FieldNumber) { // The proto options. // |optionsArray| contains |GPBOption| -@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; @property(nonatomic, readonly) NSUInteger optionsArray_Count; @end @@ -215,21 +216,21 @@ typedef GPB_ENUM(GPBEnum_FieldNumber) { @interface GPBEnum : GPBMessage // Enum type name. -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // Enum value definitions. // |enumvalueArray| contains |GPBEnumValue| -@property(nonatomic, readwrite, strong) NSMutableArray *enumvalueArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumvalueArray; @property(nonatomic, readonly) NSUInteger enumvalueArray_Count; // Proto options for the enum type. // |optionsArray| contains |GPBOption| -@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; @property(nonatomic, readonly) NSUInteger optionsArray_Count; // The source context. @property(nonatomic, readwrite) BOOL hasSourceContext; -@property(nonatomic, readwrite, strong) GPBSourceContext *sourceContext; +@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; @end @@ -245,14 +246,14 @@ typedef GPB_ENUM(GPBEnumValue_FieldNumber) { @interface GPBEnumValue : GPBMessage // Enum value name. -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // Enum value number. @property(nonatomic, readwrite) int32_t number; // Proto options for the enum value. // |optionsArray| contains |GPBOption| -@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; @property(nonatomic, readonly) NSUInteger optionsArray_Count; @end @@ -268,14 +269,16 @@ typedef GPB_ENUM(GPBOption_FieldNumber) { @interface GPBOption : GPBMessage // Proto option name. -@property(nonatomic, readwrite, copy) NSString *name; +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; // Proto option value. @property(nonatomic, readwrite) BOOL hasValue; -@property(nonatomic, readwrite, strong) GPBAny *value; +@property(nonatomic, readwrite, strong, null_resettable) GPBAny *value; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) diff --git a/objectivec/google/protobuf/Wrappers.pbobjc.h b/objectivec/google/protobuf/Wrappers.pbobjc.h index 227d958e..b4718d02 100644 --- a/objectivec/google/protobuf/Wrappers.pbobjc.h +++ b/objectivec/google/protobuf/Wrappers.pbobjc.h @@ -11,6 +11,7 @@ CF_EXTERN_C_BEGIN +NS_ASSUME_NONNULL_BEGIN #pragma mark - GPBWrappersRoot @@ -131,7 +132,7 @@ typedef GPB_ENUM(GPBStringValue_FieldNumber) { @interface GPBStringValue : GPBMessage // The string value. -@property(nonatomic, readwrite, copy) NSString *value; +@property(nonatomic, readwrite, copy, null_resettable) NSString *value; @end @@ -145,10 +146,12 @@ typedef GPB_ENUM(GPBBytesValue_FieldNumber) { @interface GPBBytesValue : GPBMessage // The bytes value. -@property(nonatomic, readwrite, copy) NSData *value; +@property(nonatomic, readwrite, copy, null_resettable) NSData *value; @end +NS_ASSUME_NONNULL_END + CF_EXTERN_C_END // @@protoc_insertion_point(global_scope) |