/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 3;</code> * * <pre> * Additional information on the vehicle that is serving this trip. * </pre> */ public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) { if (vehicleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } vehicle_ = value; onChanged(); } else { vehicleBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>required .transit_realtime.TripDescriptor trip = 1;</code> * * <pre> * 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. * </pre> */ public Builder setTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) { if (tripBuilder_ == null) { if (value == null) { throw new NullPointerException(); } trip_ = value; onChanged(); } else { tripBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /**
stopTimeUpdate_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { stopTimeUpdateBuilder_.clear();
ensureStopTimeUpdateIsMutable(); stopTimeUpdate_.add(builderForValue.build()); onChanged(); } else { stopTimeUpdateBuilder_.addMessage(builderForValue.build());
onChanged(); } else { stopTimeUpdateBuilder_.setMessage(index, value);
ensureStopTimeUpdateIsMutable(); super.addAll(values, stopTimeUpdate_); onChanged(); } else { stopTimeUpdateBuilder_.addAllMessages(values);
ensureStopTimeUpdateIsMutable(); stopTimeUpdate_.set(index, builderForValue.build()); onChanged(); } else { stopTimeUpdateBuilder_.setMessage(index, builderForValue.build());
ensureStopTimeUpdateIsMutable(); stopTimeUpdate_.remove(index); onChanged(); } else { stopTimeUpdateBuilder_.remove(index);
/** * <code>optional int32 delay = 5;</code> * * <pre> * 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. * </pre> */ public Builder clearDelay() { bitField0_ = (bitField0_ & ~0x00000010); delay_ = 0; onChanged(); return this; }
bitField0_ |= 0x00000010; delay_ = value; onChanged(); return this;
/** * <code>required .transit_realtime.TripDescriptor trip = 1;</code> * * <pre> * 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. * </pre> */ public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) { if (tripBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) { trip_ = com.google.transit.realtime.GtfsRealtime.TripDescriptor.newBuilder(trip_).mergeFrom(value).buildPartial(); } else { trip_ = value; } onChanged(); } else { tripBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 3;</code> * * <pre> * Additional information on the vehicle that is serving this trip. * </pre> */ public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) { if (vehicleBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && vehicle_ != com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) { vehicle_ = com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.newBuilder(vehicle_).mergeFrom(value).buildPartial(); } else { vehicle_ = value; } onChanged(); } else { vehicleBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>required .transit_realtime.TripDescriptor trip = 1;</code> * * <pre> * 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. * </pre> */ public Builder setTrip( com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) { if (tripBuilder_ == null) { trip_ = builderForValue.build(); onChanged(); } else { tripBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>required .transit_realtime.TripDescriptor trip = 1;</code> * * <pre> * 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. * </pre> */ public Builder clearTrip() { if (tripBuilder_ == null) { trip_ = com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance(); onChanged(); } else { tripBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /**
/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 3;</code> * * <pre> * Additional information on the vehicle that is serving this trip. * </pre> */ public Builder setVehicle( com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder builderForValue) { if (vehicleBuilder_ == null) { vehicle_ = builderForValue.build(); onChanged(); } else { vehicleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 3;</code> * * <pre> * Additional information on the vehicle that is serving this trip. * </pre> */ public Builder clearVehicle() { if (vehicleBuilder_ == null) { vehicle_ = com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance(); onChanged(); } else { vehicleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /**
/** * <code>optional uint64 timestamp = 4;</code> * * <pre> * 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). * </pre> */ public Builder setTimestamp(long value) { bitField0_ |= 0x00000008; timestamp_ = value; onChanged(); return this; } /**
/** * <code>required .transit_realtime.TripDescriptor trip = 1;</code> * * <pre> * 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. * </pre> */ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() { bitField0_ |= 0x00000001; onChanged(); return getTripFieldBuilder().getBuilder(); } /**
/** * <code>optional uint64 timestamp = 4;</code> * * <pre> * 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). * </pre> */ public Builder clearTimestamp() { bitField0_ = (bitField0_ & ~0x00000008); timestamp_ = 0L; onChanged(); return this; }
/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 3;</code> * * <pre> * Additional information on the vehicle that is serving this trip. * </pre> */ public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder getVehicleBuilder() { bitField0_ |= 0x00000002; onChanged(); return getVehicleFieldBuilder().getBuilder(); } /**