/** * <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; } /**
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); } }
subBuilder.mergeFrom(trip_); trip_ = subBuilder.buildPartial();
subBuilder.mergeFrom(trip_); trip_ = subBuilder.buildPartial();
subBuilder.mergeFrom(trip_); trip_ = subBuilder.buildPartial();
subBuilder.mergeFrom(trip_); trip_ = subBuilder.buildPartial();
tripDescriptor.setRouteId(AgencyAndId.convertToString(routeId)); tripDescriptor.setScheduleRelationship(ScheduleRelationship.SCHEDULED); tripDescriptor.setStartDate(startDate); tripDescriptor.setTripId(AgencyAndId.convertToString(tripId)); tripUpdate.setTrip(tripDescriptor);
if (affects.getTripId() != null) { TripDescriptor.Builder trip = TripDescriptor.newBuilder(); trip.setTripId(id(serviceAlert.getAgencyId(), affects.getTripId())); entitySelector.setTrip(trip);
if (vehicleData.getRouteId() != null && vehicleData.getRouteId().length() > 0) { trip = TripDescriptor.newBuilder() .setRouteId(vehicleData.getRouteId());
bitField0_ |= 0x00000001; tripId_ = other.tripId_; onChanged(); onChanged(); setDirectionId(other.getDirectionId()); onChanged(); onChanged(); setScheduleRelationship(other.getScheduleRelationship()); this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); 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.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 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>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 = 4;</code> */ public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) { if (tripBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && 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_ |= 0x00000008; 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; } /**
public Builder clone() { return create().mergeFrom(buildPartial()); }
private Builder() { maybeForceBuilderInitialization(); }
private static Builder create() { return new Builder(); }
public com.google.transit.realtime.GtfsRealtime.TripDescriptor build() { com.google.transit.realtime.GtfsRealtime.TripDescriptor result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }