/** * <code>optional .transit_realtime.TripDescriptor trip = 4;</code> */ public Builder setTrip( com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) { if (tripBuilder_ == null) { trip_ = builderForValue.build(); onChanged(); } else { tripBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; 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>optional .transit_realtime.TripDescriptor trip = 1;</code> * * <pre> * The Trip that this vehicle is serving. * Can be empty or partial if the vehicle can not be identified with a given * trip instance. * </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 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>optional .transit_realtime.TripDescriptor trip = 1;</code> * * <pre> * The Trip that this vehicle is serving. * Can be empty or partial if the vehicle can not be identified with a given * trip instance. * </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>optional .transit_realtime.TripDescriptor trip = 4;</code> */ public Builder setTrip( com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) { if (tripBuilder_ == null) { trip_ = builderForValue.build(); onChanged(); } else { tripBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
return trip.toBuilder().setTripId(matchedTrip.getId().getId()).build();
public GtfsRealtime.TripDescriptor normalize(GtfsRealtime.TripDescriptor tripDescriptor) { return GtfsRealtime.TripDescriptor.newBuilder(tripDescriptor).clearRouteId().build(); }
private void addTrips(ZoneId zoneId, List<TripWithStopTimes> trips, int time, boolean frequencyBased) { List<TripWithStopTimeAndArrivalNode> arrivalNodes = new ArrayList<>(); for (TripWithStopTimes trip : trips) { GtfsRealtime.TripDescriptor.Builder tripDescriptor = GtfsRealtime.TripDescriptor.newBuilder() .setTripId(trip.trip.trip_id) .setRouteId(trip.trip.route_id); if (frequencyBased) { tripDescriptor = tripDescriptor.setStartTime(convertToGtfsTime(time)); } addTrip(zoneId, time, arrivalNodes, trip, tripDescriptor.build(), frequencyBased); } }