/** * <code>optional .transit_realtime.VehiclePosition vehicle = 4;</code> */ public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) { if (vehicleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } vehicle_ = value; onChanged(); } else { vehicleBuilder_.setMessage(value); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .transit_realtime.Alert alert = 5;</code> */ public Builder setAlert(com.google.transit.realtime.GtfsRealtime.Alert value) { if (alertBuilder_ == null) { if (value == null) { throw new NullPointerException(); } alert_ = value; onChanged(); } else { alertBuilder_.setMessage(value); } bitField0_ |= 0x00000010; return this; } /**
/** * <code>optional .transit_realtime.TripUpdate trip_update = 3;</code> * * <pre> * Data about the entity itself. Exactly one of the following fields must be * present (unless the entity is being deleted). * </pre> */ public Builder setTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) { if (tripUpdateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } tripUpdate_ = value; onChanged(); } else { tripUpdateBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>required string id = 1;</code> * * <pre> * The ids are used only to provide incrementality support. The id should be * unique within a FeedMessage. Consequent FeedMessages may contain * FeedEntities with the same id. In case of a DIFFERENTIAL update the new * FeedEntity with some id will replace the old FeedEntity with the same id * (or delete it - see is_deleted below). * The actual GTFS entities (e.g. stations, routes, trips) referenced by the * feed must be specified by explicit selectors (see EntitySelector below for * more info). * </pre> */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; id_ = value; onChanged(); return this; } /**
/** * <code>required string id = 1;</code> * * <pre> * The ids are used only to provide incrementality support. The id should be * unique within a FeedMessage. Consequent FeedMessages may contain * FeedEntities with the same id. In case of a DIFFERENTIAL update the new * FeedEntity with some id will replace the old FeedEntity with the same id * (or delete it - see is_deleted below). * The actual GTFS entities (e.g. stations, routes, trips) referenced by the * feed must be specified by explicit selectors (see EntitySelector below for * more info). * </pre> */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; id_ = value; onChanged(); return this; }
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedEntity other) { if (other == com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance()) return this; if (other.hasId()) { bitField0_ |= 0x00000001; id_ = other.id_; onChanged(); } if (other.hasIsDeleted()) { setIsDeleted(other.getIsDeleted()); } if (other.hasTripUpdate()) { mergeTripUpdate(other.getTripUpdate()); } if (other.hasVehicle()) { mergeVehicle(other.getVehicle()); } if (other.hasAlert()) { mergeAlert(other.getAlert()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>optional .transit_realtime.TripUpdate trip_update = 3;</code> * * <pre> * Data about the entity itself. Exactly one of the following fields must be * present (unless the entity is being deleted). * </pre> */ public Builder setTripUpdate( com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder builderForValue) { if (tripUpdateBuilder_ == null) { tripUpdate_ = builderForValue.build(); onChanged(); } else { tripUpdateBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>required string id = 1;</code> * * <pre> * The ids are used only to provide incrementality support. The id should be * unique within a FeedMessage. Consequent FeedMessages may contain * FeedEntities with the same id. In case of a DIFFERENTIAL update the new * FeedEntity with some id will replace the old FeedEntity with the same id * (or delete it - see is_deleted below). * The actual GTFS entities (e.g. stations, routes, trips) referenced by the * feed must be specified by explicit selectors (see EntitySelector below for * more info). * </pre> */ public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000001); id_ = getDefaultInstance().getId(); onChanged(); return this; } /**
/** * <code>optional .transit_realtime.VehiclePosition vehicle = 4;</code> */ public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) { if (vehicleBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && vehicle_ != com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()) { vehicle_ = com.google.transit.realtime.GtfsRealtime.VehiclePosition.newBuilder(vehicle_).mergeFrom(value).buildPartial(); } else { vehicle_ = value; } onChanged(); } else { vehicleBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .transit_realtime.Alert alert = 5;</code> */ public Builder mergeAlert(com.google.transit.realtime.GtfsRealtime.Alert value) { if (alertBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && alert_ != com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()) { alert_ = com.google.transit.realtime.GtfsRealtime.Alert.newBuilder(alert_).mergeFrom(value).buildPartial(); } else { alert_ = value; } onChanged(); } else { alertBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } /**
/** * <code>optional .transit_realtime.TripUpdate trip_update = 3;</code> * * <pre> * Data about the entity itself. Exactly one of the following fields must be * present (unless the entity is being deleted). * </pre> */ public Builder clearTripUpdate() { if (tripUpdateBuilder_ == null) { tripUpdate_ = com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance(); onChanged(); } else { tripUpdateBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /**
/** * <code>optional bool is_deleted = 2 [default = false];</code> * * <pre> * Whether this entity is to be deleted. Relevant only for incremental * fetches. * </pre> */ public Builder setIsDeleted(boolean value) { bitField0_ |= 0x00000002; isDeleted_ = value; onChanged(); return this; } /**
/** * <code>optional .transit_realtime.VehiclePosition vehicle = 4;</code> */ public Builder setVehicle( com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder builderForValue) { if (vehicleBuilder_ == null) { vehicle_ = builderForValue.build(); onChanged(); } else { vehicleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .transit_realtime.Alert alert = 5;</code> */ public Builder setAlert( com.google.transit.realtime.GtfsRealtime.Alert.Builder builderForValue) { if (alertBuilder_ == null) { alert_ = builderForValue.build(); onChanged(); } else { alertBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; return this; } /**
/** * <code>optional .transit_realtime.VehiclePosition vehicle = 4;</code> */ public Builder clearVehicle() { if (vehicleBuilder_ == null) { vehicle_ = com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance(); onChanged(); } else { vehicleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } /**
/** * <code>optional .transit_realtime.Alert alert = 5;</code> */ public Builder clearAlert() { if (alertBuilder_ == null) { alert_ = com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance(); onChanged(); } else { alertBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } /**
/** * <code>optional bool is_deleted = 2 [default = false];</code> * * <pre> * Whether this entity is to be deleted. Relevant only for incremental * fetches. * </pre> */ public Builder clearIsDeleted() { bitField0_ = (bitField0_ & ~0x00000002); isDeleted_ = false; onChanged(); return this; }
/** * <code>optional .transit_realtime.TripUpdate trip_update = 3;</code> * * <pre> * Data about the entity itself. Exactly one of the following fields must be * present (unless the entity is being deleted). * </pre> */ public com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder getTripUpdateBuilder() { bitField0_ |= 0x00000004; onChanged(); return getTripUpdateFieldBuilder().getBuilder(); } /**
/** * <code>optional .transit_realtime.Alert alert = 5;</code> */ public com.google.transit.realtime.GtfsRealtime.Alert.Builder getAlertBuilder() { bitField0_ |= 0x00000010; onChanged(); return getAlertFieldBuilder().getBuilder(); } /**
/** * <code>optional .transit_realtime.VehiclePosition vehicle = 4;</code> */ public com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder getVehicleBuilder() { bitField0_ |= 0x00000008; onChanged(); return getVehicleFieldBuilder().getBuilder(); } /**