public static final class GtfsRealtime.TripDescriptor.Builder extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<GtfsRealtime.TripDescriptor,GtfsRealtime.TripDescriptor.Builder> implements GtfsRealtime.TripDescriptorOrBuilder
transit_realtime.TripDescriptor
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.
Modifier and Type | Method and Description |
---|---|
GtfsRealtime.TripDescriptor |
build() |
GtfsRealtime.TripDescriptor |
buildPartial() |
GtfsRealtime.TripDescriptor.Builder |
clear() |
GtfsRealtime.TripDescriptor.Builder |
clearDirectionId()
optional uint32 direction_id = 6; |
GtfsRealtime.TripDescriptor.Builder |
clearRouteId()
optional string route_id = 5; |
GtfsRealtime.TripDescriptor.Builder |
clearScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4; |
GtfsRealtime.TripDescriptor.Builder |
clearStartDate()
optional string start_date = 3; |
GtfsRealtime.TripDescriptor.Builder |
clearStartTime()
optional string start_time = 2; |
GtfsRealtime.TripDescriptor.Builder |
clearTripId()
optional string trip_id = 1; |
GtfsRealtime.TripDescriptor.Builder |
clone() |
GtfsRealtime.TripDescriptor |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
int |
getDirectionId()
optional uint32 direction_id = 6; |
String |
getRouteId()
optional string route_id = 5; |
com.google.protobuf.ByteString |
getRouteIdBytes()
optional string route_id = 5; |
GtfsRealtime.TripDescriptor.ScheduleRelationship |
getScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4; |
String |
getStartDate()
optional string start_date = 3; |
com.google.protobuf.ByteString |
getStartDateBytes()
optional string start_date = 3; |
String |
getStartTime()
optional string start_time = 2; |
com.google.protobuf.ByteString |
getStartTimeBytes()
optional string start_time = 2; |
String |
getTripId()
optional string trip_id = 1; |
com.google.protobuf.ByteString |
getTripIdBytes()
optional string trip_id = 1; |
boolean |
hasDirectionId()
optional uint32 direction_id = 6; |
boolean |
hasRouteId()
optional string route_id = 5; |
boolean |
hasScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4; |
boolean |
hasStartDate()
optional string start_date = 3; |
boolean |
hasStartTime()
optional string start_time = 2; |
boolean |
hasTripId()
optional string trip_id = 1; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
GtfsRealtime.TripDescriptor.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
GtfsRealtime.TripDescriptor.Builder |
mergeFrom(GtfsRealtime.TripDescriptor other) |
GtfsRealtime.TripDescriptor.Builder |
mergeFrom(com.google.protobuf.Message other) |
GtfsRealtime.TripDescriptor.Builder |
setDirectionId(int value)
optional uint32 direction_id = 6; |
GtfsRealtime.TripDescriptor.Builder |
setRouteId(String value)
optional string route_id = 5; |
GtfsRealtime.TripDescriptor.Builder |
setRouteIdBytes(com.google.protobuf.ByteString value)
optional string route_id = 5; |
GtfsRealtime.TripDescriptor.Builder |
setScheduleRelationship(GtfsRealtime.TripDescriptor.ScheduleRelationship value)
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4; |
GtfsRealtime.TripDescriptor.Builder |
setStartDate(String value)
optional string start_date = 3; |
GtfsRealtime.TripDescriptor.Builder |
setStartDateBytes(com.google.protobuf.ByteString value)
optional string start_date = 3; |
GtfsRealtime.TripDescriptor.Builder |
setStartTime(String value)
optional string start_time = 2; |
GtfsRealtime.TripDescriptor.Builder |
setStartTimeBytes(com.google.protobuf.ByteString value)
optional string start_time = 2; |
GtfsRealtime.TripDescriptor.Builder |
setTripId(String value)
optional string trip_id = 1; |
GtfsRealtime.TripDescriptor.Builder |
setTripIdBytes(com.google.protobuf.ByteString value)
optional string trip_id = 1; |
addExtension, addRepeatedField, clearExtension, clearField, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, parseUnknownField, setExtension, setExtension, setField, setRepeatedField
clearOneof, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getUnknownFields, hasOneof, isClean, markClean, mergeUnknownFields, newBuilderForField, onBuilt, onChanged, setUnknownFields
findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage.Builder<GtfsRealtime.TripDescriptor.Builder>
public GtfsRealtime.TripDescriptor.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessage.ExtendableBuilder<GtfsRealtime.TripDescriptor,GtfsRealtime.TripDescriptor.Builder>
public GtfsRealtime.TripDescriptor.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessage.ExtendableBuilder<GtfsRealtime.TripDescriptor,GtfsRealtime.TripDescriptor.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessage.Builder<GtfsRealtime.TripDescriptor.Builder>
public GtfsRealtime.TripDescriptor getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<GtfsRealtime.TripDescriptor>
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public GtfsRealtime.TripDescriptor build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public GtfsRealtime.TripDescriptor buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public GtfsRealtime.TripDescriptor.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<GtfsRealtime.TripDescriptor.Builder>
public GtfsRealtime.TripDescriptor.Builder mergeFrom(GtfsRealtime.TripDescriptor other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage.ExtendableBuilder<GtfsRealtime.TripDescriptor,GtfsRealtime.TripDescriptor.Builder>
public GtfsRealtime.TripDescriptor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<GtfsRealtime.TripDescriptor.Builder>
IOException
public boolean hasTripId()
optional string trip_id = 1;
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.
hasTripId
in interface GtfsRealtime.TripDescriptorOrBuilder
public String getTripId()
optional string trip_id = 1;
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.
getTripId
in interface GtfsRealtime.TripDescriptorOrBuilder
public com.google.protobuf.ByteString getTripIdBytes()
optional string trip_id = 1;
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.
getTripIdBytes
in interface GtfsRealtime.TripDescriptorOrBuilder
public GtfsRealtime.TripDescriptor.Builder setTripId(String value)
optional string trip_id = 1;
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.
public GtfsRealtime.TripDescriptor.Builder clearTripId()
optional string trip_id = 1;
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.
public GtfsRealtime.TripDescriptor.Builder setTripIdBytes(com.google.protobuf.ByteString value)
optional string trip_id = 1;
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.
public boolean hasRouteId()
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
hasRouteId
in interface GtfsRealtime.TripDescriptorOrBuilder
public String getRouteId()
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
getRouteId
in interface GtfsRealtime.TripDescriptorOrBuilder
public com.google.protobuf.ByteString getRouteIdBytes()
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
getRouteIdBytes
in interface GtfsRealtime.TripDescriptorOrBuilder
public GtfsRealtime.TripDescriptor.Builder setRouteId(String value)
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
public GtfsRealtime.TripDescriptor.Builder clearRouteId()
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
public GtfsRealtime.TripDescriptor.Builder setRouteIdBytes(com.google.protobuf.ByteString value)
optional string route_id = 5;
The route_id from the GTFS that this selector refers to.
public boolean hasDirectionId()
optional uint32 direction_id = 6;
The direction_id from the GTFS feed trips.txt file, indicating the direction of travel for trips this selector refers to. This field is still experimental, and subject to change. It may be formally adopted in the future.
hasDirectionId
in interface GtfsRealtime.TripDescriptorOrBuilder
public int getDirectionId()
optional uint32 direction_id = 6;
The direction_id from the GTFS feed trips.txt file, indicating the direction of travel for trips this selector refers to. This field is still experimental, and subject to change. It may be formally adopted in the future.
getDirectionId
in interface GtfsRealtime.TripDescriptorOrBuilder
public GtfsRealtime.TripDescriptor.Builder setDirectionId(int value)
optional uint32 direction_id = 6;
The direction_id from the GTFS feed trips.txt file, indicating the direction of travel for trips this selector refers to. This field is still experimental, and subject to change. It may be formally adopted in the future.
public GtfsRealtime.TripDescriptor.Builder clearDirectionId()
optional uint32 direction_id = 6;
The direction_id from the GTFS feed trips.txt file, indicating the direction of travel for trips this selector refers to. This field is still experimental, and subject to change. It may be formally adopted in the future.
public boolean hasStartTime()
optional string start_time = 2;
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.
hasStartTime
in interface GtfsRealtime.TripDescriptorOrBuilder
public String getStartTime()
optional string start_time = 2;
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.
getStartTime
in interface GtfsRealtime.TripDescriptorOrBuilder
public com.google.protobuf.ByteString getStartTimeBytes()
optional string start_time = 2;
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.
getStartTimeBytes
in interface GtfsRealtime.TripDescriptorOrBuilder
public GtfsRealtime.TripDescriptor.Builder setStartTime(String value)
optional string start_time = 2;
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.
public GtfsRealtime.TripDescriptor.Builder clearStartTime()
optional string start_time = 2;
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.
public GtfsRealtime.TripDescriptor.Builder setStartTimeBytes(com.google.protobuf.ByteString value)
optional string start_time = 2;
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.
public boolean hasStartDate()
optional string start_date = 3;
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.
hasStartDate
in interface GtfsRealtime.TripDescriptorOrBuilder
public String getStartDate()
optional string start_date = 3;
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.
getStartDate
in interface GtfsRealtime.TripDescriptorOrBuilder
public com.google.protobuf.ByteString getStartDateBytes()
optional string start_date = 3;
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.
getStartDateBytes
in interface GtfsRealtime.TripDescriptorOrBuilder
public GtfsRealtime.TripDescriptor.Builder setStartDate(String value)
optional string start_date = 3;
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.
public GtfsRealtime.TripDescriptor.Builder clearStartDate()
optional string start_date = 3;
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.
public GtfsRealtime.TripDescriptor.Builder setStartDateBytes(com.google.protobuf.ByteString value)
optional string start_date = 3;
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.
public boolean hasScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
hasScheduleRelationship
in interface GtfsRealtime.TripDescriptorOrBuilder
public GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
getScheduleRelationship
in interface GtfsRealtime.TripDescriptorOrBuilder
public GtfsRealtime.TripDescriptor.Builder setScheduleRelationship(GtfsRealtime.TripDescriptor.ScheduleRelationship value)
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
public GtfsRealtime.TripDescriptor.Builder clearScheduleRelationship()
optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
Copyright © 2018. All rights reserved.