public static final class GtfsRealtime.TripUpdate extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<GtfsRealtime.TripUpdate> implements GtfsRealtime.TripUpdateOrBuilder
Realtime update of the progress of a vehicle along a trip. Depending on the value of ScheduleRelationship, a TripUpdate can specify: - A trip that proceeds along the schedule. - A trip that proceeds along a route but has no fixed schedule. - A trip that have been added or removed with regard to schedule. The updates can be for future, predicted arrival/departure events, or for past events that already occurred. Normally, updates should get more precise and more certain (see uncertainty below) as the events gets closer to current time. Even if that is not possible, the information for past events should be precise and certain. In particular, if an update points to time in the past but its update's uncertainty is not 0, the client should conclude that the update is a (wrong) prediction and that the trip has not completed yet. Note that the update can describe a trip that is already completed. To this end, it is enough to provide an update for the last stop of the trip. If the time of that is in the past, the client will conclude from that that the whole trip is in the past (it is possible, although inconsequential, to also provide updates for preceding stops). This option is most relevant for a trip that has completed ahead of schedule, but according to the schedule, the trip is still proceeding at the current time. Removing the updates for this trip could make the client assume that the trip is still proceeding. Note that the feed provider is allowed, but not required, to purge past updates - this is one case where this would be practically useful.Protobuf type
transit_realtime.TripUpdate| Modifier and Type | Class and Description |
|---|---|
static class |
GtfsRealtime.TripUpdate.Builder
Realtime update of the progress of a vehicle along a trip.
|
static class |
GtfsRealtime.TripUpdate.StopTimeEvent
Timing information for a single predicted event (either arrival or
departure).
|
static interface |
GtfsRealtime.TripUpdate.StopTimeEventOrBuilder |
static class |
GtfsRealtime.TripUpdate.StopTimeUpdate
Realtime update for arrival and/or departure events for a given stop on a
trip.
|
static interface |
GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder |
com.google.protobuf.GeneratedMessageV3.ExtendableMessage.ExtensionWritercom.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
DELAY_FIELD_NUMBER |
static com.google.protobuf.Parser<GtfsRealtime.TripUpdate> |
PARSER
Deprecated.
|
static int |
STOP_TIME_UPDATE_FIELD_NUMBER |
static int |
TIMESTAMP_FIELD_NUMBER |
static int |
TRIP_FIELD_NUMBER |
static int |
VEHICLE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static GtfsRealtime.TripUpdate |
getDefaultInstance() |
GtfsRealtime.TripUpdate |
getDefaultInstanceForType() |
int |
getDelay()
The current schedule deviation for the trip.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<GtfsRealtime.TripUpdate> |
getParserForType() |
int |
getSerializedSize() |
GtfsRealtime.TripUpdate.StopTimeUpdate |
getStopTimeUpdate(int index)
Updates to StopTimes for the trip (both future, i.e., predictions, and in
some cases, past ones, i.e., those that already happened).
|
int |
getStopTimeUpdateCount()
Updates to StopTimes for the trip (both future, i.e., predictions, and in
some cases, past ones, i.e., those that already happened).
|
List<GtfsRealtime.TripUpdate.StopTimeUpdate> |
getStopTimeUpdateList()
Updates to StopTimes for the trip (both future, i.e., predictions, and in
some cases, past ones, i.e., those that already happened).
|
GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder |
getStopTimeUpdateOrBuilder(int index)
Updates to StopTimes for the trip (both future, i.e., predictions, and in
some cases, past ones, i.e., those that already happened).
|
List<? extends GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder> |
getStopTimeUpdateOrBuilderList()
Updates to StopTimes for the trip (both future, i.e., predictions, and in
some cases, past ones, i.e., those that already happened).
|
long |
getTimestamp()
Moment at which the vehicle's real-time progress was measured.
|
GtfsRealtime.TripDescriptor |
getTrip()
The Trip that this message applies to.
|
GtfsRealtime.TripDescriptorOrBuilder |
getTripOrBuilder()
The Trip that this message applies to.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
GtfsRealtime.VehicleDescriptor |
getVehicle()
Additional information on the vehicle that is serving this trip.
|
GtfsRealtime.VehicleDescriptorOrBuilder |
getVehicleOrBuilder()
Additional information on the vehicle that is serving this trip.
|
boolean |
hasDelay()
The current schedule deviation for the trip.
|
int |
hashCode() |
boolean |
hasTimestamp()
Moment at which the vehicle's real-time progress was measured.
|
boolean |
hasTrip()
The Trip that this message applies to.
|
boolean |
hasVehicle()
Additional information on the vehicle that is serving this trip.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static GtfsRealtime.TripUpdate.Builder |
newBuilder() |
static GtfsRealtime.TripUpdate.Builder |
newBuilder(GtfsRealtime.TripUpdate prototype) |
GtfsRealtime.TripUpdate.Builder |
newBuilderForType() |
protected GtfsRealtime.TripUpdate.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static GtfsRealtime.TripUpdate |
parseDelimitedFrom(InputStream input) |
static GtfsRealtime.TripUpdate |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GtfsRealtime.TripUpdate |
parseFrom(byte[] data) |
static GtfsRealtime.TripUpdate |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GtfsRealtime.TripUpdate |
parseFrom(ByteBuffer data) |
static GtfsRealtime.TripUpdate |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GtfsRealtime.TripUpdate |
parseFrom(com.google.protobuf.ByteString data) |
static GtfsRealtime.TripUpdate |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GtfsRealtime.TripUpdate |
parseFrom(com.google.protobuf.CodedInputStream input) |
static GtfsRealtime.TripUpdate |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GtfsRealtime.TripUpdate |
parseFrom(InputStream input) |
static GtfsRealtime.TripUpdate |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<GtfsRealtime.TripUpdate> |
parser() |
GtfsRealtime.TripUpdate.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getAllFieldsRaw, getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasExtension, hasExtension, hasField, makeExtensionsImmutable, newExtensionWriter, newMessageSetExtensionWriter, parseUnknownField, parseUnknownFieldProto3canUseUnsafe, computeStringSize, computeStringSizeNoTag, getDescriptorForType, getOneofFieldDescriptor, hasOneof, internalGetMapField, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, hasExtension, hasExtension, hasExtensionpublic static final int TRIP_FIELD_NUMBER
public static final int VEHICLE_FIELD_NUMBER
public static final int STOP_TIME_UPDATE_FIELD_NUMBER
public static final int TIMESTAMP_FIELD_NUMBER
public static final int DELAY_FIELD_NUMBER
@Deprecated public static final com.google.protobuf.Parser<GtfsRealtime.TripUpdate> PARSER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public boolean hasTrip()
The Trip that this message applies to. There can be at most one TripUpdate entity for each actual trip instance. If there is none, that means there is no prediction information available. It does *not* mean that the trip is progressing according to schedule.
required .transit_realtime.TripDescriptor trip = 1;hasTrip in interface GtfsRealtime.TripUpdateOrBuilderpublic GtfsRealtime.TripDescriptor getTrip()
The Trip that this message applies to. There can be at most one TripUpdate entity for each actual trip instance. If there is none, that means there is no prediction information available. It does *not* mean that the trip is progressing according to schedule.
required .transit_realtime.TripDescriptor trip = 1;getTrip in interface GtfsRealtime.TripUpdateOrBuilderpublic GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder()
The Trip that this message applies to. There can be at most one TripUpdate entity for each actual trip instance. If there is none, that means there is no prediction information available. It does *not* mean that the trip is progressing according to schedule.
required .transit_realtime.TripDescriptor trip = 1;getTripOrBuilder in interface GtfsRealtime.TripUpdateOrBuilderpublic boolean hasVehicle()
Additional information on the vehicle that is serving this trip.
optional .transit_realtime.VehicleDescriptor vehicle = 3;hasVehicle in interface GtfsRealtime.TripUpdateOrBuilderpublic GtfsRealtime.VehicleDescriptor getVehicle()
Additional information on the vehicle that is serving this trip.
optional .transit_realtime.VehicleDescriptor vehicle = 3;getVehicle in interface GtfsRealtime.TripUpdateOrBuilderpublic GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder()
Additional information on the vehicle that is serving this trip.
optional .transit_realtime.VehicleDescriptor vehicle = 3;getVehicleOrBuilder in interface GtfsRealtime.TripUpdateOrBuilderpublic List<GtfsRealtime.TripUpdate.StopTimeUpdate> getStopTimeUpdateList()
Updates to StopTimes for the trip (both future, i.e., predictions, and in some cases, past ones, i.e., those that already happened). The updates must be sorted by stop_sequence, and apply for all the following stops of the trip up to the next specified one. Example 1: For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure delay of 0 for stop_sequence of the current stop means that the trip is exactly on time. Example 2: For the same trip instance, 3 StopTimeUpdates are provided: - delay of 5 min for stop_sequence 3 - delay of 1 min for stop_sequence 8 - delay of unspecified duration for stop_sequence 10 This will be interpreted as: - stop_sequences 3,4,5,6,7 have delay of 5 min. - stop_sequences 8,9 have delay of 1 min. - stop_sequences 10,... have unknown delay.
repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;getStopTimeUpdateList in interface GtfsRealtime.TripUpdateOrBuilderpublic List<? extends GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder> getStopTimeUpdateOrBuilderList()
Updates to StopTimes for the trip (both future, i.e., predictions, and in some cases, past ones, i.e., those that already happened). The updates must be sorted by stop_sequence, and apply for all the following stops of the trip up to the next specified one. Example 1: For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure delay of 0 for stop_sequence of the current stop means that the trip is exactly on time. Example 2: For the same trip instance, 3 StopTimeUpdates are provided: - delay of 5 min for stop_sequence 3 - delay of 1 min for stop_sequence 8 - delay of unspecified duration for stop_sequence 10 This will be interpreted as: - stop_sequences 3,4,5,6,7 have delay of 5 min. - stop_sequences 8,9 have delay of 1 min. - stop_sequences 10,... have unknown delay.
repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;getStopTimeUpdateOrBuilderList in interface GtfsRealtime.TripUpdateOrBuilderpublic int getStopTimeUpdateCount()
Updates to StopTimes for the trip (both future, i.e., predictions, and in some cases, past ones, i.e., those that already happened). The updates must be sorted by stop_sequence, and apply for all the following stops of the trip up to the next specified one. Example 1: For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure delay of 0 for stop_sequence of the current stop means that the trip is exactly on time. Example 2: For the same trip instance, 3 StopTimeUpdates are provided: - delay of 5 min for stop_sequence 3 - delay of 1 min for stop_sequence 8 - delay of unspecified duration for stop_sequence 10 This will be interpreted as: - stop_sequences 3,4,5,6,7 have delay of 5 min. - stop_sequences 8,9 have delay of 1 min. - stop_sequences 10,... have unknown delay.
repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;getStopTimeUpdateCount in interface GtfsRealtime.TripUpdateOrBuilderpublic GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index)
Updates to StopTimes for the trip (both future, i.e., predictions, and in some cases, past ones, i.e., those that already happened). The updates must be sorted by stop_sequence, and apply for all the following stops of the trip up to the next specified one. Example 1: For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure delay of 0 for stop_sequence of the current stop means that the trip is exactly on time. Example 2: For the same trip instance, 3 StopTimeUpdates are provided: - delay of 5 min for stop_sequence 3 - delay of 1 min for stop_sequence 8 - delay of unspecified duration for stop_sequence 10 This will be interpreted as: - stop_sequences 3,4,5,6,7 have delay of 5 min. - stop_sequences 8,9 have delay of 1 min. - stop_sequences 10,... have unknown delay.
repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;getStopTimeUpdate in interface GtfsRealtime.TripUpdateOrBuilderpublic GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(int index)
Updates to StopTimes for the trip (both future, i.e., predictions, and in some cases, past ones, i.e., those that already happened). The updates must be sorted by stop_sequence, and apply for all the following stops of the trip up to the next specified one. Example 1: For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure delay of 0 for stop_sequence of the current stop means that the trip is exactly on time. Example 2: For the same trip instance, 3 StopTimeUpdates are provided: - delay of 5 min for stop_sequence 3 - delay of 1 min for stop_sequence 8 - delay of unspecified duration for stop_sequence 10 This will be interpreted as: - stop_sequences 3,4,5,6,7 have delay of 5 min. - stop_sequences 8,9 have delay of 1 min. - stop_sequences 10,... have unknown delay.
repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;getStopTimeUpdateOrBuilder in interface GtfsRealtime.TripUpdateOrBuilderpublic boolean hasTimestamp()
Moment at which the vehicle's real-time progress was measured. In POSIX time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
optional uint64 timestamp = 4;hasTimestamp in interface GtfsRealtime.TripUpdateOrBuilderpublic long getTimestamp()
Moment at which the vehicle's real-time progress was measured. In POSIX time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
optional uint64 timestamp = 4;getTimestamp in interface GtfsRealtime.TripUpdateOrBuilderpublic boolean hasDelay()
The current schedule deviation for the trip. Delay should only be specified when the prediction is given relative to some existing schedule in GTFS. Delay (in seconds) can be positive (meaning that the vehicle is late) or negative (meaning that the vehicle is ahead of schedule). Delay of 0 means that the vehicle is exactly on time. Delay information in StopTimeUpdates take precedent of trip-level delay information, such that trip-level delay is only propagated until the next stop along the trip with a StopTimeUpdate delay value specified. Feed providers are strongly encouraged to provide a TripUpdate.timestamp value indicating when the delay value was last updated, in order to evaluate the freshness of the data. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional int32 delay = 5;hasDelay in interface GtfsRealtime.TripUpdateOrBuilderpublic int getDelay()
The current schedule deviation for the trip. Delay should only be specified when the prediction is given relative to some existing schedule in GTFS. Delay (in seconds) can be positive (meaning that the vehicle is late) or negative (meaning that the vehicle is ahead of schedule). Delay of 0 means that the vehicle is exactly on time. Delay information in StopTimeUpdates take precedent of trip-level delay information, such that trip-level delay is only propagated until the next stop along the trip with a StopTimeUpdate delay value specified. Feed providers are strongly encouraged to provide a TripUpdate.timestamp value indicating when the delay value was last updated, in order to evaluate the freshness of the data. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional int32 delay = 5;getDelay in interface GtfsRealtime.TripUpdateOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.ExtendableMessage<GtfsRealtime.TripUpdate>public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static GtfsRealtime.TripUpdate parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GtfsRealtime.TripUpdate parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GtfsRealtime.TripUpdate parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GtfsRealtime.TripUpdate parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GtfsRealtime.TripUpdate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GtfsRealtime.TripUpdate parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GtfsRealtime.TripUpdate parseFrom(InputStream input) throws IOException
IOExceptionpublic static GtfsRealtime.TripUpdate parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static GtfsRealtime.TripUpdate parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static GtfsRealtime.TripUpdate parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static GtfsRealtime.TripUpdate parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static GtfsRealtime.TripUpdate parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic GtfsRealtime.TripUpdate.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static GtfsRealtime.TripUpdate.Builder newBuilder()
public static GtfsRealtime.TripUpdate.Builder newBuilder(GtfsRealtime.TripUpdate prototype)
public GtfsRealtime.TripUpdate.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected GtfsRealtime.TripUpdate.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static GtfsRealtime.TripUpdate getDefaultInstance()
public static com.google.protobuf.Parser<GtfsRealtime.TripUpdate> parser()
public com.google.protobuf.Parser<GtfsRealtime.TripUpdate> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public GtfsRealtime.TripUpdate getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<GtfsRealtime.TripUpdate>getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2019. All rights reserved.