The proto2.TestAllTypes.NestedMessage Class

proto2.TestAllTypes.NestedMessage
> goog.proto2.Message

proto2.TestAllTypes.NestedMessage()

Message NestedMessage.

.add(field, value)

Inherited from goog.proto2.Message .

Adds the given value to the field specified by the given field descriptor. Note that the field must be repeated.

field {goog.proto2.FieldDescriptor}
The field in which to add the the value.
value {*}
The new value to add to the field.

.arrayOf(field)

Inherited from goog.proto2.Message .

Returns the array of values found for the given repeated field.

field {goog.proto2.FieldDescriptor}
The field for which to return the values.
returns {!Array}
The values found.

.bCount()

returns {number}
The number of values in the b field.

.cCount()

returns {number}
The number of values in the c field.

.clear(field)

Inherited from goog.proto2.Message .

Clears the field specified.

field {goog.proto2.FieldDescriptor}
The field to clear.

.clearB()

Clears the values in the b field.

.clearC()

Clears the values in the c field.

.clone

Overrides {@link goog.proto2.Message#clone} to specify its exact return type.

returns {!proto2.TestAllTypes.NestedMessage}
The cloned message.

.copyFrom(message)

Inherited from goog.proto2.Message .

Recursively copies the known fields from the given message to this message. Removes the fields which are not present in the source message.

message {!goog.proto2.Message}
The source message.

.countOf(field)

Inherited from goog.proto2.Message .

Returns the number of values stored in the given field.

field {goog.proto2.FieldDescriptor}
The field for which to count the number of values.
returns {number}
The count of the values in the given field.

.equals(other)

Inherited from goog.proto2.Message .

Compares this message with another one ignoring the unknown fields.

other {*}
The other message.
returns {boolean}
Whether they are equal. Returns false if the {@code other} argument is a different type of message or not a message.

.forEachUnknown(callback, opt_scope)

Inherited from goog.proto2.Message .

Iterates over all the unknown fields in the message.

callback {function(number, *)}
A callback method which gets invoked for each unknown field.
opt_scope {Object=}
The scope under which to execute the callback. If not given, the current message will be used.

.get(field, opt_index)

Inherited from goog.proto2.Message .

Returns the value stored at the field specified by the given field descriptor.

field {goog.proto2.FieldDescriptor}
The field for which to get the value.
opt_index {number=}
If the field is repeated, the index to use when looking up the value.
returns {*}
The value found or null if none.

.getB()

Gets the value of the b field.

returns {?number}
The value.

.getBOrDefault()

Gets the value of the b field or the default value if not set.

returns {number}
The value.

.getC()

Gets the value of the c field.

returns {?number}
The value.

.getCOrDefault()

Gets the value of the c field or the default value if not set.

returns {number}
The value.

.getDescriptor()

Inherited from goog.proto2.Message .

Returns the descriptor which describes the current message.

returns {goog.proto2.Descriptor}
The descriptor.

.getOrDefault(field, opt_index)

Inherited from goog.proto2.Message .

Returns the value stored at the field specified by the given field descriptor or the default value if none exists.

field {goog.proto2.FieldDescriptor}
The field for which to get the value.
opt_index {number=}
If the field is repeated, the index to use when looking up the value.
returns {*}
The value found or the default if none.

.has(field)

Inherited from goog.proto2.Message .

Returns whether there is a value stored at the field specified by the given field descriptor.

field {goog.proto2.FieldDescriptor}
The field for which to check if there is a value.
returns {boolean}
True if a value was found.

.has$Value(tag)

Inherited from goog.proto2.Message .

Returns the whether or not the field indicated by the given tag has a value. GENERATED CODE USE ONLY. Basis of the has{Field} methods.

tag {number}
The tag.
returns {boolean}
Whether the message has a value for the field.

.hasB()

returns {boolean}
Whether the b field has a value.

.hasC()

returns {boolean}
Whether the c field has a value.

.initDefaults(simpleFieldsToo)

Inherited from goog.proto2.Message .

Fills in the protocol buffer with default values. Any fields that are already set will not be overridden.

simpleFieldsToo {boolean}
If true, all fields will be initialized; if false, only the nested messages and groups.

.initializeForLazyDeserializer(deserializer, data)

Inherited from goog.proto2.Message .

Initializes the message with a lazy deserializer and its associated data. This method should be called by internal methods ONLY.

deserializer {goog.proto2.LazyDeserializer}
The lazy deserializer to use to decode the data on the fly.
data {*}
The data to decode/deserialize.

.mergeFrom(message)

Inherited from goog.proto2.Message .

Merges the given message into this message. Singular fields will be overwritten, except for embedded messages which will be merged. Repeated fields will be concatenated.

message {!goog.proto2.Message}
The source message.

.set(field, value)

Inherited from goog.proto2.Message .

Stores the given value to the field specified by the given field descriptor. Note that the field must not be repeated.

field {goog.proto2.FieldDescriptor}
The field for which to set the value.
value {*}
The new value for the field.

.setB(value)

Sets the value of the b field.

value {number}
The value.

.setC(value)

Sets the value of the c field.

value {number}
The value.

.setUnknown(tag, value)

Inherited from goog.proto2.Message .

Sets the value of an unknown field, by tag.

tag {number}
The tag of an unknown field (must be >= 1).
value {*}
The value for that unknown field.