aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/google
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2015-10-05 13:54:05 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2015-10-05 13:54:05 -0700
commit8d8177c75701014dfe27fec4cdd2b1647aefcb67 (patch)
treefdc5d0d0f2fd57f2ca641069c20b34ddf90ec919 /objectivec/google
parent46e8ff63cb67a6520711da5317aaaef04d0414d0 (diff)
parentcccf6fed7e2fad1240bb48ba0c47f3978ff7433d (diff)
Merge remote-tracking branch 'origin/master' into fix-author
Diffstat (limited to 'objectivec/google')
-rw-r--r--objectivec/google/protobuf/Descriptor.pbobjc.h8
-rw-r--r--objectivec/google/protobuf/Descriptor.pbobjc.m15
2 files changed, 22 insertions, 1 deletions
diff --git a/objectivec/google/protobuf/Descriptor.pbobjc.h b/objectivec/google/protobuf/Descriptor.pbobjc.h
index 2a86a7e1..70cb7447 100644
--- a/objectivec/google/protobuf/Descriptor.pbobjc.h
+++ b/objectivec/google/protobuf/Descriptor.pbobjc.h
@@ -344,6 +344,7 @@ typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) {
GPBFieldDescriptorProto_FieldNumber_DefaultValue = 7,
GPBFieldDescriptorProto_FieldNumber_Options = 8,
GPBFieldDescriptorProto_FieldNumber_OneofIndex = 9,
+ GPBFieldDescriptorProto_FieldNumber_JsonName = 10,
};
// Describes a field within a message.
@@ -389,6 +390,13 @@ typedef GPB_ENUM(GPBFieldDescriptorProto_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasOneofIndex;
@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, copy, null_resettable) NSString *jsonName;
+
@property(nonatomic, readwrite) BOOL hasOptions;
@property(nonatomic, readwrite, strong, null_resettable) GPBFieldOptions *options;
diff --git a/objectivec/google/protobuf/Descriptor.pbobjc.m b/objectivec/google/protobuf/Descriptor.pbobjc.m
index 8d69867b..e3e44c48 100644
--- a/objectivec/google/protobuf/Descriptor.pbobjc.m
+++ b/objectivec/google/protobuf/Descriptor.pbobjc.m
@@ -578,6 +578,7 @@ typedef struct GPBDescriptorProto_ReservedRange__storage_ {
@dynamic hasExtendee, extendee;
@dynamic hasDefaultValue, defaultValue;
@dynamic hasOneofIndex, oneofIndex;
+@dynamic hasJsonName, jsonName;
@dynamic hasOptions, options;
typedef struct GPBFieldDescriptorProto__storage_ {
@@ -591,6 +592,7 @@ typedef struct GPBFieldDescriptorProto__storage_ {
NSString *typeName;
NSString *defaultValue;
GPBFieldOptions *options;
+ NSString *jsonName;
} GPBFieldDescriptorProto__storage_;
// This method is threadsafe because it is initially called
@@ -679,7 +681,7 @@ typedef struct GPBFieldDescriptorProto__storage_ {
{
.name = "options",
.number = GPBFieldDescriptorProto_FieldNumber_Options,
- .hasIndex = 8,
+ .hasIndex = 9,
.flags = GPBFieldOptional,
.dataType = GPBDataTypeMessage,
.offset = offsetof(GPBFieldDescriptorProto__storage_, options),
@@ -698,6 +700,17 @@ typedef struct GPBFieldDescriptorProto__storage_ {
.dataTypeSpecific.className = NULL,
.fieldOptions = NULL,
},
+ {
+ .name = "jsonName",
+ .number = GPBFieldDescriptorProto_FieldNumber_JsonName,
+ .hasIndex = 8,
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ .offset = offsetof(GPBFieldDescriptorProto__storage_, jsonName),
+ .defaultValue.valueString = nil,
+ .dataTypeSpecific.className = NULL,
+ .fieldOptions = NULL,
+ },
};
static GPBMessageEnumDescription enums[] = {
{ .enumDescriptorFunc = GPBFieldDescriptorProto_Type_EnumDescriptor },