/** * <code>optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;</code> */ public Builder setCongestionLevel(com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000080; congestionLevel_ = value; onChanged(); return this; } /**
/** * <code>optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;</code> */ public Builder setOccupancyStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; occupancyStatus_ = value; onChanged(); return this; } /**
/** * <code>optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];</code> * * <pre> * The exact status of the vehicle with respect to the current stop. * Ignored if current_stop_sequence is missing. * </pre> */ public Builder setCurrentStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; currentStatus_ = value; onChanged(); return this; } /**
/** * <code>optional string stop_id = 7;</code> * * <pre> * Identifies the current stop. The value must be the same as in stops.txt in * the corresponding GTFS feed. * </pre> */ public Builder setStopId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; stopId_ = value; onChanged(); return this; } /**
/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 8;</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.Position position = 2;</code> * * <pre> * Current position of this vehicle. * </pre> */ public Builder setPosition( com.google.transit.realtime.GtfsRealtime.Position.Builder builderForValue) { if (positionBuilder_ == null) { position_ = builderForValue.build(); onChanged(); } else { positionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional string stop_id = 7;</code> * * <pre> * Identifies the current stop. The value must be the same as in stops.txt in * the corresponding GTFS feed. * </pre> */ public Builder setStopIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; stopId_ = value; onChanged(); return this; }
/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 8;</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 .transit_realtime.Position position = 2;</code> * * <pre> * Current position of this vehicle. * </pre> */ public Builder clearPosition() { if (positionBuilder_ == null) { position_ = com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance(); onChanged(); } else { positionBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /**
/** * <code>optional uint32 current_stop_sequence = 3;</code> * * <pre> * The stop sequence index of the current stop. The meaning of * current_stop_sequence (i.e., the stop that it refers to) is determined by * current_status. * If current_status is missing IN_TRANSIT_TO is assumed. * </pre> */ public Builder setCurrentStopSequence(int value) { bitField0_ |= 0x00000008; currentStopSequence_ = value; onChanged(); return this; } /**
/** * <code>optional uint32 current_stop_sequence = 3;</code> * * <pre> * The stop sequence index of the current stop. The meaning of * current_stop_sequence (i.e., the stop that it refers to) is determined by * current_status. * If current_status is missing IN_TRANSIT_TO is assumed. * </pre> */ public Builder clearCurrentStopSequence() { bitField0_ = (bitField0_ & ~0x00000008); currentStopSequence_ = 0; onChanged(); return this; }
/** * <code>optional string stop_id = 7;</code> * * <pre> * Identifies the current stop. The value must be the same as in stops.txt in * the corresponding GTFS feed. * </pre> */ public Builder clearStopId() { bitField0_ = (bitField0_ & ~0x00000010); stopId_ = getDefaultInstance().getStopId(); onChanged(); 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 com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() { bitField0_ |= 0x00000001; onChanged(); return getTripFieldBuilder().getBuilder(); } /**
/** * <code>optional uint64 timestamp = 5;</code> * * <pre> * Moment at which the vehicle's position was measured. In POSIX time * (i.e., number of seconds since January 1st 1970 00:00:00 UTC). * </pre> */ public Builder setTimestamp(long value) { bitField0_ |= 0x00000040; timestamp_ = value; onChanged(); return this; } /**
/** * <code>optional uint64 timestamp = 5;</code> * * <pre> * Moment at which the vehicle's position was measured. In POSIX time * (i.e., number of seconds since January 1st 1970 00:00:00 UTC). * </pre> */ public Builder clearTimestamp() { bitField0_ = (bitField0_ & ~0x00000040); timestamp_ = 0L; onChanged(); return this; }
/** * <code>optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];</code> * * <pre> * The exact status of the vehicle with respect to the current stop. * Ignored if current_stop_sequence is missing. * </pre> */ public Builder clearCurrentStatus() { bitField0_ = (bitField0_ & ~0x00000020); currentStatus_ = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO; onChanged(); return this; }
/** * <code>optional .transit_realtime.Position position = 2;</code> * * <pre> * Current position of this vehicle. * </pre> */ public com.google.transit.realtime.GtfsRealtime.Position.Builder getPositionBuilder() { bitField0_ |= 0x00000004; onChanged(); return getPositionFieldBuilder().getBuilder(); } /**
/** * <code>optional .transit_realtime.VehicleDescriptor vehicle = 8;</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(); } /**
/** * <code>optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;</code> */ public Builder clearOccupancyStatus() { bitField0_ = (bitField0_ & ~0x00000100); occupancyStatus_ = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY; onChanged(); return this; }
/** * <code>optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;</code> */ public Builder clearCongestionLevel() { bitField0_ = (bitField0_ & ~0x00000080); congestionLevel_ = com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.UNKNOWN_CONGESTION_LEVEL; onChanged(); return this; }