Optional data: PartialMessage<FieldOptions>Optional ctypeThe 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 only implemented to support use of [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of type "bytes" in the open source release -- sorry, we'll try to include other types in a future version!
from field: optional google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
Optional debugIndicate that the field value should not be printed out when using debug formats, e.g. when the field contains sensitive credentials.
from field: optional bool debug_redact = 16 [default = false];
Optional deprecatedIs 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.
from field: optional bool deprecated = 3 [default = false];
from field: repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
Optional featurefrom field: optional google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
Optional featuresAny features defined in the specific edition.
from field: optional google.protobuf.FeatureSet features = 21;
Optional jstypeThe 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). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent.
This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
from field: optional google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
Optional lazyShould 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 lazy message fields are still eagerly verified to check ill-formed wireformat or missing required fields. Calling IsInitialized() on the outer message would fail if the inner message has missing required fields. Failed verification would result in parsing failure (except when uninitialized messages are acceptable).
from field: optional bool lazy = 5 [default = false];
Optional packedThe 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. This option is prohibited in
Editions, but the repeated_field_encoding feature can be used to control
the behavior.
from field: optional bool packed = 2;
Optional retentionfrom field: optional google.protobuf.FieldOptions.OptionRetention retention = 17;
from field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19;
The parser stores options it doesn't recognize here. See above.
from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
Optional unverifiedunverified_lazy does no correctness checks on the byte stream. This should only be used where lazy with verification is prohibitive for performance reasons.
from field: optional bool unverified_lazy = 15 [default = false];
Optional weakFor Google-internal migration only. Do not use.
from field: optional bool weak = 10 [default = false];
Static Readonly fieldsStatic Readonly runtimeStatic Readonly typeCreate a deep copy.
Compare with a message of the same type. Note that this function disregards extensions and unknown fields.
Parse from binary data, merging fields.
Repeated fields are appended. Map entries are added, overwriting existing keys.
If a message field is already present, it will be merged with the new data.
Optional options: Partial<BinaryReadOptions>Parse a message from a JSON value.
Optional options: Partial<JsonReadOptions>Parse a message from a JSON string.
Optional options: Partial<JsonReadOptions>Retrieve the MessageType of this message - a singleton that represents the protobuf message declaration and provides metadata for reflection- based operations.
Serialize the message to binary data.
Optional options: Partial<BinaryWriteOptions>Protected toJSONOverride for serialization behavior. This will be invoked when calling JSON.stringify on this message (i.e. JSON.stringify(msg)).
Note that this will not serialize google.protobuf.Any with a packed message because the protobuf JSON format specifies that it needs to be unpacked, and this is only possible with a type registry to look up the message type. As a result, attempting to serialize a message with this type will throw an Error.
This method is protected because you should not need to invoke it directly -- instead use JSON.stringify or toJsonString for stringified JSON. Alternatively, if actual JSON is desired, you should use toJson.
Serialize the message to a JSON value, a JavaScript value that can be passed to JSON.stringify().
Optional options: Partial<JsonWriteOptions>Serialize the message to a JSON string.
Optional options: Partial<JsonWriteStringOptions>Static equalsStatic fromOptional options: Partial<BinaryReadOptions>Static fromOptional options: Partial<JsonReadOptions>Static fromOptional options: Partial<JsonReadOptions>
Generated
from message google.protobuf.FieldOptions