ProtoGoogleDuration class

google.protobuf.Duration runtime.

Canonical JSON mapping is the "3.000001s" string form.

Inheritance

Constructors

ProtoGoogleDuration({BigInt? seconds, int? nanos})
const
ProtoGoogleDuration.deserialize(List<int> bytes)
factory
ProtoGoogleDuration.fromDynamic(Object? json)
Parses either the field map or the canonical "3.000001s" string form.
factory
ProtoGoogleDuration.fromJson(Map<String, dynamic> json, {ProtoJsonConfig config = DefaultProtoJsonConfig.defaultConfig})
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
nanos → int?
Signed fractions of a second at nanosecond resolution.
final
protoValues → List<Object?>
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seconds → BigInt?
Signed seconds of the span of time.
final

Methods

encodeString({bool asNanos = false}) → String?
Canonical "3.000001s" string form (null when empty). asNanos is accepted for generator compatibility and ignored.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
protoConfig() → ProtoMessageConfig
override
toBuffer() → BuBytes
inherited
toJson({ProtoJsonConfig config = DefaultProtoJsonConfig.defaultConfig}) → Map<String, dynamic>
override
toJsonString() → String?
Canonical JSON is the "3.000001s" string form.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

formatDuration(BigInt? seconds, int? nanos) → String
Formats seconds/nanos the canonical "3.000001s" way.
fromString(Object? value) → ProtoGoogleDuration
parseDurationString(Object? value) → ({int nanos, BigInt seconds})
Parses the canonical "3.000001s" form into (seconds, nanos).
protoConfigStatic() → ProtoMessageConfig