aboutsummaryrefslogtreecommitdiff
path: root/objectivec/google
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2015-12-11 17:09:20 -0800
committerFeng Xiao <xfxyjwf@gmail.com>2015-12-11 17:10:28 -0800
commite841bac4fcf47f809e089a70d5f84ac37b3883df (patch)
treed25dc5fc814db182c04c5f276ff1a609c5965a5a /objectivec/google
parent99a6a95c751a28a3cc33dd2384959179f83f682c (diff)
downloadprotobuf-e841bac4fcf47f809e089a70d5f84ac37b3883df.tar.gz
protobuf-e841bac4fcf47f809e089a70d5f84ac37b3883df.tar.bz2
protobuf-e841bac4fcf47f809e089a70d5f84ac37b3883df.zip
Down-integrate from internal code base.
Diffstat (limited to 'objectivec/google')
-rw-r--r--objectivec/google/protobuf/Any.pbobjc.h7
-rw-r--r--objectivec/google/protobuf/Api.pbobjc.h1
-rw-r--r--objectivec/google/protobuf/FieldMask.pbobjc.h2
-rw-r--r--objectivec/google/protobuf/Type.pbobjc.h57
4 files changed, 36 insertions, 31 deletions
diff --git a/objectivec/google/protobuf/Any.pbobjc.h b/objectivec/google/protobuf/Any.pbobjc.h
index d2261ee4..9866b5b1 100644
--- a/objectivec/google/protobuf/Any.pbobjc.h
+++ b/objectivec/google/protobuf/Any.pbobjc.h
@@ -34,6 +34,7 @@ typedef GPB_ENUM(GPBAny_FieldNumber) {
// `Any` contains an arbitrary serialized message along with a URL
// that describes the type of the serialized message.
//
+//
// JSON
// ====
// The JSON representation of an `Any` value uses the regular
@@ -54,8 +55,8 @@ typedef GPB_ENUM(GPBAny_FieldNumber) {
//
// If the embedded message type is well-known and has a custom JSON
// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the the `@type`
-// field. Example (for message [google.protobuf.Duration][google.protobuf.Duration]):
+// `value` which holds the custom JSON in addition to the `@type`
+// field. Example (for message [google.protobuf.Duration][]):
//
// {
// "@type": "type.googleapis.com/google.protobuf.Duration",
@@ -72,7 +73,7 @@ typedef GPB_ENUM(GPBAny_FieldNumber) {
// * If no schema is provided, `https` is assumed.
// * The last segment of the URL's path must represent the fully
// qualified name of the type (as in `path/google.protobuf.Duration`).
-// * An HTTP GET on the URL must yield a [google.protobuf.Type][google.protobuf.Type]
+// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
// value in binary format, or produce an error.
// * Applications are allowed to cache lookup results based on the
// URL, or have them precompiled into a binary to avoid any
diff --git a/objectivec/google/protobuf/Api.pbobjc.h b/objectivec/google/protobuf/Api.pbobjc.h
index c9dacfee..c3cf8e94 100644
--- a/objectivec/google/protobuf/Api.pbobjc.h
+++ b/objectivec/google/protobuf/Api.pbobjc.h
@@ -174,7 +174,6 @@ typedef GPB_ENUM(GPBMixin_FieldNumber) {
//
// package google.storage.v2;
// service Storage {
-// // (-- see AccessControl.GetAcl --)
// rpc GetAcl(GetAclRequest) returns (Acl);
//
// // Get a data record.
diff --git a/objectivec/google/protobuf/FieldMask.pbobjc.h b/objectivec/google/protobuf/FieldMask.pbobjc.h
index 67cea4d6..4e4ec387 100644
--- a/objectivec/google/protobuf/FieldMask.pbobjc.h
+++ b/objectivec/google/protobuf/FieldMask.pbobjc.h
@@ -61,7 +61,7 @@ typedef GPB_ENUM(GPBFieldMask_FieldNumber) {
// z: 8
//
// The result will not contain specific values for fields x,y and z
-// (there value will be set to the default, and omitted in proto text
+// (their value will be set to the default, and omitted in proto text
// output):
//
//
diff --git a/objectivec/google/protobuf/Type.pbobjc.h b/objectivec/google/protobuf/Type.pbobjc.h
index 65f1da46..e4c7a251 100644
--- a/objectivec/google/protobuf/Type.pbobjc.h
+++ b/objectivec/google/protobuf/Type.pbobjc.h
@@ -18,13 +18,13 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Enum GPBSyntax
-// Syntax specifies the syntax in which a service element was defined.
+// The syntax in which a protocol buffer element is defined.
typedef GPB_ENUM(GPBSyntax) {
GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
- // Syntax "proto2"
+ // Syntax `proto2`.
GPBSyntax_SyntaxProto2 = 0,
- // Syntax "proto3"
+ // Syntax `proto3`.
GPBSyntax_SyntaxProto3 = 1,
};
@@ -34,7 +34,7 @@ BOOL GPBSyntax_IsValidValue(int32_t value);
#pragma mark - Enum GPBField_Kind
-// Kind represents a basic field type.
+// Basic field types.
typedef GPB_ENUM(GPBField_Kind) {
GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
// Field type unknown.
@@ -67,7 +67,7 @@ typedef GPB_ENUM(GPBField_Kind) {
// Field type string.
GPBField_Kind_TypeString = 9,
- // Field type group (deprecated proto2 type)
+ // Field type group. Proto2 syntax only, and deprecated.
GPBField_Kind_TypeGroup = 10,
// Field type message.
@@ -101,17 +101,16 @@ BOOL GPBField_Kind_IsValidValue(int32_t value);
#pragma mark - Enum GPBField_Cardinality
-// Cardinality represents whether a field is optional, required, or
-// repeated.
+// Whether a field is optional, required, or repeated.
typedef GPB_ENUM(GPBField_Cardinality) {
GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
- // The field cardinality is unknown. Typically an error condition.
+ // For fields with unknown cardinality.
GPBField_Cardinality_CardinalityUnknown = 0,
// For optional fields.
GPBField_Cardinality_CardinalityOptional = 1,
- // For required fields. Not used for proto3.
+ // For required fields. Proto2 syntax only.
GPBField_Cardinality_CardinalityRequired = 2,
// For repeated fields.
@@ -144,7 +143,7 @@ typedef GPB_ENUM(GPBType_FieldNumber) {
GPBType_FieldNumber_Syntax = 6,
};
-// A light-weight descriptor for a proto message type.
+// A protocol buffer message type.
@interface GPBType : GPBMessage
// The fully qualified message name.
@@ -155,12 +154,12 @@ typedef GPB_ENUM(GPBType_FieldNumber) {
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldsArray;
@property(nonatomic, readonly) NSUInteger fieldsArray_Count;
-// The list of oneof definitions.
+// The list of types appearing in `oneof` definitions in this type.
// |oneofsArray| contains |NSString|
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *oneofsArray;
@property(nonatomic, readonly) NSUInteger oneofsArray_Count;
-// The proto options.
+// The protocol buffer options.
// |optionsArray| contains |GPBOption|
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray;
@property(nonatomic, readonly) NSUInteger optionsArray_Count;
@@ -189,41 +188,46 @@ typedef GPB_ENUM(GPBField_FieldNumber) {
GPBField_FieldNumber_Packed = 8,
GPBField_FieldNumber_OptionsArray = 9,
GPBField_FieldNumber_JsonName = 10,
+ GPBField_FieldNumber_DefaultValue = 11,
};
-// Field represents a single field of a message type.
+// A single field of a message type.
@interface GPBField : GPBMessage
-// The field kind.
+// The field type.
@property(nonatomic, readwrite) GPBField_Kind kind;
-// The field cardinality, i.e. optional/required/repeated.
+// The field cardinality.
@property(nonatomic, readwrite) GPBField_Cardinality cardinality;
-// The proto field number.
+// The field number.
@property(nonatomic, readwrite) int32_t number;
// The field 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`.
+// The field type URL, without the scheme, for message or enumeration
+// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
-// Index in Type.oneofs. Starts at 1. Zero means no oneof mapping.
+// The index of the field type in `Type.oneofs`, for message or enumeration
+// types. The first type has index 1; zero means the type is not in the list.
@property(nonatomic, readwrite) int32_t oneofIndex;
// Whether to use alternative packed wire representation.
@property(nonatomic, readwrite) BOOL packed;
-// The proto options.
+// The protocol buffer options.
// |optionsArray| contains |GPBOption|
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray;
@property(nonatomic, readonly) NSUInteger optionsArray_Count;
-// The JSON name for this field.
+// The field JSON name.
@property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
+// The string value of the default value of this field. Proto2 syntax only.
+@property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue;
+
@end
int32_t GPBField_Kind_RawValue(GPBField *message);
@@ -253,7 +257,7 @@ typedef GPB_ENUM(GPBEnum_FieldNumber) {
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumvalueArray;
@property(nonatomic, readonly) NSUInteger enumvalueArray_Count;
-// Proto options for the enum type.
+// Protocol buffer options.
// |optionsArray| contains |GPBOption|
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray;
@property(nonatomic, readonly) NSUInteger optionsArray_Count;
@@ -287,7 +291,7 @@ typedef GPB_ENUM(GPBEnumValue_FieldNumber) {
// Enum value number.
@property(nonatomic, readwrite) int32_t number;
-// Proto options for the enum value.
+// Protocol buffer options.
// |optionsArray| contains |GPBOption|
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray;
@property(nonatomic, readonly) NSUInteger optionsArray_Count;
@@ -301,13 +305,14 @@ typedef GPB_ENUM(GPBOption_FieldNumber) {
GPBOption_FieldNumber_Value = 2,
};
-// Proto option attached to messages/fields/enums etc.
+// A protocol buffer option, which can be attached to a message, field,
+// enumeration, etc.
@interface GPBOption : GPBMessage
-// Proto option name.
+// The option's name. For example, `"java_package"`.
@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-// Proto option value.
+// The option's value. For example, `"com.google.protobuf"`.
@property(nonatomic, readwrite) BOOL hasValue;
@property(nonatomic, readwrite, strong, null_resettable) GPBAny *value;