TripDescriptor class
A descriptor that identifies an instance of a GTFS trip, or all instances of a trip along a route.
- To specify a single trip instance, the trip_id (and if necessary, start_time) is set. If route_id is also set, then it should be same as one that the given trip corresponds to.
- To specify all the trips along a given route, only the route_id should be set. Note that if the trip_id is not known, then stop sequence ids in TripUpdate are not sufficient, and stop_ids must be provided as well. In addition, absolute arrival/departure times must be provided.
- Inheritance
-
- Object
- GeneratedMessage
- TripDescriptor
Constructors
- TripDescriptor.new({String? tripId, String? startTime, String? startDate, TripDescriptor_ScheduleRelationship? scheduleRelationship, String? routeId, int? directionId, TripDescriptor_ModifiedTripSelector? modifiedTrip})
-
factory
-
TripDescriptor.fromBuffer(List<
int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) -
factory
- TripDescriptor.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
- directionId ↔ int
-
The direction_id from the GTFS feed trips.txt file, indicating the
direction of travel for trips this selector refers to.
getter/setter pair
- eventPlugin → EventPlugin?
-
Subclasses can override this getter to be notified of changes
to protobuf fields.
no setterinherited
- hashCode → int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
- info_ → BuilderInfo
-
no setteroverride
- isFrozen → bool
-
Returns
true
if this message is marked read-only. Otherwisefalse
.no setterinherited - modifiedTrip ↔ TripDescriptor_ModifiedTripSelector
-
getter/setter pair
- routeId ↔ String
-
The route_id from the GTFS that this selector refers to.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scheduleRelationship ↔ TripDescriptor_ScheduleRelationship
-
getter/setter pair
- startDate ↔ String
-
The scheduled start date of this trip instance.
Must be provided to disambiguate trips that are so late as to collide with
a scheduled trip on a next day. For example, for a train that departs 8:00
and 20:00 every day, and is 12 hours late, there would be two distinct
trips on the same time.
This field can be provided but is not mandatory for schedules in which such
collisions are impossible - for example, a service running on hourly
schedule where a vehicle that is one hour late is not considered to be
related to schedule anymore.
In YYYYMMDD format.
getter/setter pair
- startTime ↔ String
-
The initially scheduled start time of this trip instance.
When the trip_id corresponds to a non-frequency-based trip, this field
should either be omitted or be equal to the value in the GTFS feed. When
the trip_id correponds to a frequency-based trip, the start_time must be
specified for trip updates and vehicle positions. If the trip corresponds
to exact_times=1 GTFS record, then start_time must be some multiple
(including zero) of headway_secs later than frequencies.txt start_time for
the corresponding time period. If the trip corresponds to exact_times=0,
then its start_time may be arbitrary, and is initially expected to be the
first departure of the trip. Once established, the start_time of this
frequency-based trip should be considered immutable, even if the first
departure time changes -- that time change may instead be reflected in a
StopTimeUpdate.
Format and semantics of the field is same as that of
GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
getter/setter pair
- tripId ↔ String
-
The trip_id from the GTFS feed that this selector refers to.
For non frequency-based trips, this field is enough to uniquely identify
the trip. For frequency-based trip, start_time and start_date might also be
necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
getter/setter pair
- unknownFields → UnknownFieldSet
-
no setterinherited
Methods
-
addExtension(
Extension extension, Object? value) → void -
Adds an extension field value to a repeated field.
inherited
-
check(
) → void -
inherited
-
clear(
) → void -
Clears all data that was set in this message.
inherited
-
clearDirectionId(
) → void -
clearExtension(
Extension extension) → void -
Clears an extension field and also removes the extension.
inherited
-
clearField(
int tagNumber) → void -
Clears the contents of a given field.
inherited
-
clearModifiedTrip(
) → void -
clearRouteId(
) → void -
clearScheduleRelationship(
) → void -
clearStartDate(
) → void -
clearStartTime(
) → void -
clearTripId(
) → void -
clone(
) → TripDescriptor -
Creates a deep copy of the fields in this message.
(The generated code uses mergeFromMessage.)
override
-
copyWith(
void updates(TripDescriptor)) → TripDescriptor -
Apply
updates
to a copy of this message.override -
createEmptyInstance(
) → TripDescriptor -
Creates an empty instance of the same message type as this.
override
-
createMapField<
K, V> (int tagNumber, MapFieldInfo< K, V> fi) → Map<K, V> -
Creates a Map representing a map field.
inherited
-
createRepeatedField<
T> (int tagNumber, FieldInfo< T> fi) → List<T> -
Creates List implementing a mutable repeated field.
inherited
-
ensureModifiedTrip(
) → TripDescriptor_ModifiedTripSelector -
extensionsAreInitialized(
) → bool -
inherited
-
freeze(
) → GeneratedMessage -
Make this message read-only.
inherited
-
getDefaultForField(
int tagNumber) → dynamic -
Returns the default value for the given field.
inherited
-
getExtension(
Extension extension) → dynamic -
Returns the value of
extension
.inherited -
getField(
int tagNumber) → dynamic -
Returns the value of the field associated with
tagNumber
, or the default value if it is not set.inherited -
getFieldOrNull(
int tagNumber) → dynamic -
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(
String fieldName) → int? -
inherited
-
hasDirectionId(
) → bool -
hasExtension(
Extension extension) → bool -
Returns
true
if a value ofextension
is present.inherited -
hasField(
int tagNumber) → bool -
Whether this message has a field associated with
tagNumber
.inherited -
hasModifiedTrip(
) → bool -
hasRequiredFields(
) → bool -
Whether the message has required fields.
inherited
-
hasRouteId(
) → bool -
hasScheduleRelationship(
) → bool -
hasStartDate(
) → bool -
hasStartTime(
) → bool -
hasTripId(
) → bool -
isInitialized(
) → bool -
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(
List< int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(
CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
inherited
-
mergeFromJson(
String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from
data
, a JSON object, encoded as described byGeneratedMessage.writeToJson
.inherited -
mergeFromJsonMap(
Map< String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(
GeneratedMessage other) → void -
Merges the contents of the
other
into this message.inherited -
mergeFromProto3Json(
Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void -
Merges field values from
json
, a JSON object using proto3 encoding.inherited -
mergeUnknownFields(
UnknownFieldSet unknownFieldSet) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setExtension(
Extension extension, Object value) → void -
Sets the value of a non-repeated extension field to
value
.inherited -
setField(
int tagNumber, Object value) → void -
Sets the value of a field by its
tagNumber
.inherited -
toBuilder(
) → GeneratedMessage -
Creates a writable, shallow copy of this message.
inherited
-
toDebugString(
) → String -
Returns a String representation of this message.
inherited
-
toProto3Json(
{TypeRegistry typeRegistry = const TypeRegistry.empty()}) → Object? -
Returns an Object representing Proto3 JSON serialization of
this
.inherited -
toString(
) → String -
Returns a String representation of this message.
inherited
-
writeToBuffer(
) → Uint8List -
inherited
-
writeToCodedBufferWriter(
CodedBufferWriter output) → void -
inherited
-
writeToJson(
) → String -
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap(
) → Map< String, dynamic> -
Returns the JSON encoding of this message as a Dart Map.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → TripDescriptor -
createRepeated(
) → PbList< TripDescriptor> -
getDefault(
) → TripDescriptor