FieldOptions class
Clients can define custom options in extensions of this message. See above.
- Inheritance
-
- Object
- IProtoMessage
- CosmosProtoMessage
- FieldOptions
Constructors
-
FieldOptions({FieldOptionsCType? ctype, bool? packed, FieldOptionsJSType? jstype, bool? lazy, bool? unverifiedLazy, bool? deprecated, bool? weak, bool? debugRedact, FieldOptionsOptionRetention? retention, List<
FieldOptionsOptionTargetType> targets = const [], List<FieldOptionsEditionDefault> editionDefaults = const [], FeatureSet? features, FieldOptionsFeatureSupport? featureSupport, List<UninterpretedOption> uninterpretedOption = const []}) -
const
-
FieldOptions.deserialize(List<
int> bytes) -
factory
-
FieldOptions.fromJson(Map<
String, dynamic> json) -
factory
Properties
- ctype → FieldOptionsCType?
-
NOTE: ctype is deprecated. Use
features.(pb.cpp).string_typeinstead. The 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 ofctype=CORDandctype=STRING(the default) on non-repeated fields of type "bytes" in the open source release.final - debugRedact → bool?
-
Indicate that the field value should not be printed out when using debug
formats, e.g. when the field contains sensitive credentials.
final
- declarationId → DefaultCosmosProtoTypeUrl
-
no setteroverride
- deprecated → bool?
-
Is 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.
final
-
editionDefaults
→ List<
FieldOptionsEditionDefault> -
Textproto value.
final
- features → FeatureSet?
-
Any features defined in the specific edition.
WARNING: This field should only be used by protobuf plugins or special
cases like the proto compiler. Other uses are discouraged and
developers should rely on the protoreflect APIs for their client language.
final
- featureSupport → FieldOptionsFeatureSupport?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- jstype → FieldOptionsJSType?
-
The 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.
final
- lazy → bool?
-
Should 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.
final
- packed → bool?
-
The 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_encodingfeature can be used to control the behavior.final -
protoValues
→ List<
Object?> -
no setteroverride
- retention → FieldOptionsOptionRetention?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
targets
→ List<
FieldOptionsOptionTargetType> -
final
-
uninterpretedOption
→ List<
UninterpretedOption> -
The parser stores options it doesn't recognize here. See above.
final
- unverifiedLazy → bool?
-
unverified_lazy does no correctness checks on the byte stream. This should
only be used where lazy with verification is prohibitive for performance
reasons.
final
- weak → bool?
-
DEPRECATED. DO NOT USE!
For Google-internal migration only. Do not use.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
protoConfig(
) → ProtoMessageConfig -
override
-
toAny(
) → Any -
inherited
-
toBase64(
) → String -
inherited
-
toBuffer(
) → List< int> -
inherited
-
toJson(
) → Map< String, dynamic> -
Dont change order of toJson
the key index must be equal to protoConfig fields.
override
-
toJsonObject(
CosmosToJsonEncoding encoding, {CosmosBech32Config? config}) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
protoConfigStatic(
) → ProtoMessageConfig